/* Doposcuola.online — foglio di stile unico, nessuna dipendenza esterna */
:root {
  --c-primary: #2347b3;
  --c-primary-d: #17318a;
  --c-primary-l: #e8eefc;
  --c-accent: #f2702a;
  --c-accent-d: #d45a17;
  --c-green: #18875b;
  --c-green-l: #e3f5ec;
  --c-red: #c23434;
  --c-red-l: #fdecec;
  --c-yellow-l: #fff6dc;
  --c-text: #1b2333;
  --c-muted: #5b6577;
  --c-border: #e2e6ee;
  --c-bg: #fbfaf7;
  --c-surface: #ffffff;
  --radius: 14px;
  --radius-s: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 8px 24px rgba(20, 30, 60, .06);
  --shadow-l: 0 12px 40px rgba(20, 30, 60, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--c-text); background: var(--c-bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-underline-offset: 2px; }
a:hover { color: var(--c-primary-d); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: 72px 0; }
.section-s { padding: 44px 0; }
.section-alt { background: var(--c-surface); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.center { text-align: center; }
.muted { color: var(--c-muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.2rem; color: var(--c-muted); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c-accent-d); margin-bottom: .6rem; }
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.hp { position: absolute; left: -10000px; }

/* Bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-accent); color: #fff; box-shadow: 0 4px 14px rgba(242, 112, 42, .35); }
.btn-primary:hover { background: var(--c-accent-d); color: #fff; }
.btn-blue { background: var(--c-primary); color: #fff; }
.btn-blue:hover { background: var(--c-primary-d); color: #fff; }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary-l); }
.btn-light { background: #fff; color: var(--c-primary-d); }
.btn-danger { background: var(--c-red); color: #fff; }
.btn-s { padding: .5em 1em; font-size: .9rem; }
.btn-l { padding: 1em 1.8em; font-size: 1.1rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--c-primary); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* Header */
.topbar { background: var(--c-primary-d); color: #dfe6ff; font-size: .85rem; text-align: center; padding: 6px 12px; }
.topbar a { color: #fff; font-weight: 600; }
.header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--c-border); }
.header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--c-text); text-decoration: none; letter-spacing: -.02em; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo span b { color: var(--c-accent); font-weight: 800; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--c-text); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .5em .8em; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--c-primary-l); color: var(--c-primary-d); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; }
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px 20px; border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-l); }
  .nav.open { display: flex; }
  .nav a { padding: .8em; }
  .nav .btn { margin: 6px 0 0; }
}

/* Hero */
.hero { padding: 64px 0 72px; background: radial-gradient(1200px 500px at 85% -10%, #dfe7ff 0%, transparent 60%), radial-gradient(800px 400px at -10% 110%, #ffe9dc 0%, transparent 60%), var(--c-bg); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--c-primary); }
.hero .lead { max-width: 34em; }
.hero-points { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; display: grid; gap: .5rem; }
.hero-points li { display: flex; gap: .6em; align-items: flex-start; }
.hero-points li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--c-green-l) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2318875b' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; }
.hero-card { background: var(--c-surface); border-radius: 20px; box-shadow: var(--shadow-l); padding: 28px; border: 1px solid var(--c-border); }
.hero-card h2 { font-size: 1.35rem; }
.trust { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 1.6rem; color: var(--c-muted); font-size: .92rem; }
.trust strong { display: block; font-size: 1.5rem; color: var(--c-text); line-height: 1.1; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; gap: 32px; } .hero { padding: 40px 0 48px; } }

/* Card */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }
.card h3 { margin-bottom: .4em; }
.feature .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--c-primary-l); color: var(--c-primary); margin-bottom: 14px; }
.feature .icon svg { width: 26px; height: 26px; }
.steps { counter-reset: s; }
.step { position: relative; padding-top: 56px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--c-accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.1rem; }

/* Tutor card */
.tutor-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.tutor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); color: inherit; }
.tutor-head { display: flex; gap: 14px; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--c-primary-l); color: var(--c-primary-d); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.avatar-l { width: 132px; height: 132px; font-size: 2.4rem; }
.avatar-s { width: 40px; height: 40px; font-size: .9rem; }
.tutor-name { font-weight: 750; font-size: 1.1rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: .25em .7em; border-radius: 999px; background: #f1f3f8; color: var(--c-muted); }
.chip-blue { background: var(--c-primary-l); color: var(--c-primary-d); }
.chip-green { background: var(--c-green-l); color: var(--c-green); }
.chip-orange { background: #ffeadd; color: var(--c-accent-d); }
.stars { color: #f0a500; letter-spacing: 1px; }
.tutor-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--c-border); font-size: .92rem; }
.price { font-weight: 750; }

/* Filtri directory */
.filters { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 920px) { .filters { grid-template-columns: 1fr 1fr; } }

/* Form */
.form { display: grid; gap: 16px; }
.field label, .label { display: block; font-weight: 650; font-size: .95rem; margin-bottom: 6px; }
.field .hint { font-size: .85rem; color: var(--c-muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .75em .9em; border: 1.5px solid #cfd5e1; border-radius: var(--radius-s); background: #fff; color: var(--c-text); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(35, 71, 179, .15); }
textarea { min-height: 120px; resize: vertical; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--c-red); }
.err { color: var(--c-red); font-size: .88rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; line-height: 1.45; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--c-primary); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.checks label { display: flex; gap: 8px; align-items: center; padding: .55em .7em; border: 1.5px solid var(--c-border); border-radius: var(--radius-s); cursor: pointer; font-weight: 500; font-size: .93rem; background: #fff; }
.checks label:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-l); }
.checks input { accent-color: var(--c-primary); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #eef1f7; padding: 5px; border-radius: 12px; margin-bottom: 20px; }
.role-switch a { text-align: center; padding: .7em; border-radius: 9px; text-decoration: none; font-weight: 700; color: var(--c-muted); }
.role-switch a.on { background: #fff; color: var(--c-primary-d); box-shadow: var(--shadow); }

/* Alert */
.alert { padding: 14px 18px; border-radius: var(--radius-s); margin-bottom: 16px; border: 1px solid; font-size: .95rem; }
.alert-success { background: var(--c-green-l); border-color: #b5e2cc; color: #0f5c3d; }
.alert-error { background: var(--c-red-l); border-color: #f3c3c3; color: #8f1f1f; }
.alert-info { background: var(--c-primary-l); border-color: #c8d5f6; color: var(--c-primary-d); }
.alert-warn { background: var(--c-yellow-l); border-color: #f0dea0; color: #6d5200; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-d) 100%); color: #fff; border-radius: 24px; padding: 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #dbe3ff; margin: 0; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: 32px 24px; } }

/* FAQ */
.faq details { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-s); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--c-primary); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--c-muted); }

/* Blog */
.post-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.post-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-card .body { padding: 20px; }
.post-card:hover h3 { color: var(--c-primary); }
.prose { font-size: 1.08rem; line-height: 1.75; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.5em; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { border-left: 4px solid var(--c-accent); margin: 1.5em 0; padding: .5em 1.2em; background: #fff; color: var(--c-muted); }
.prose table { border-collapse: collapse; width: 100%; margin: 1.5em 0; }
.prose th, .prose td { border: 1px solid var(--c-border); padding: .5em .8em; text-align: left; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal table { font-size: .92rem; }
.post-hero { border-radius: 20px; aspect-ratio: 21/9; object-fit: cover; width: 100%; margin-bottom: 32px; }
.breadcrumb { font-size: .88rem; color: var(--c-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--c-muted); }
.inline-cta { background: #fff4ec; border: 1px solid #ffd9c2; border-radius: var(--radius); padding: 24px; margin: 2.5em 0; }

/* Pager */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span { padding: .5em .9em; border-radius: 8px; border: 1px solid var(--c-border); text-decoration: none; background: #fff; }
.pager .on { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* Footer */
.footer { background: #111a2e; color: #b7c0d4; padding: 56px 0 28px; margin-top: 72px; font-size: .93rem; }
.footer a { color: #dfe5f2; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: .8em; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45em; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer .legal-line { border-top: 1px solid #26314b; margin-top: 40px; padding-top: 20px; font-size: .82rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .logo { color: #fff; margin-bottom: 12px; }
@media (max-width: 820px) { .footer .cols { grid-template-columns: 1fr 1fr; } }

/* Mobile sticky CTA */
.sticky-cta { display: none; }
@media (max-width: 720px) {
  .sticky-cta { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--c-border); box-shadow: 0 -6px 20px rgba(0, 0, 0, .08); gap: 8px; }
  .sticky-cta .btn { flex: 1; }
  body.has-sticky { padding-bottom: 76px; }
}

/* Cookie banner */
.cc { position: fixed; z-index: 1000; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(10, 20, 50, .3); border: 1px solid var(--c-border); padding: 24px; font-size: .95rem; }
.cc[hidden] { display: none; }
.cc h2 { font-size: 1.15rem; margin-bottom: .4em; }
.cc p { color: var(--c-muted); margin-bottom: 1em; }
.cc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cc-actions .btn { flex: 1 1 160px; }
.cc-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--c-muted); line-height: 1; padding: 6px; }
.cc-prefs { border-top: 1px solid var(--c-border); margin-top: 16px; padding-top: 12px; display: grid; gap: 4px; }
.cc-prefs[hidden] { display: none; }
.cc-opt { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f0f2f6; }
.cc-opt:last-child { border-bottom: 0; }
.cc-opt strong { display: block; color: var(--c-text); }
.cc-opt small { color: var(--c-muted); line-height: 1.4; display: block; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd5e1; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--c-green); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:disabled + span { opacity: .6; cursor: not-allowed; }
.switch input:focus-visible + span { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* Area utente / admin */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 68px); }
.side { background: #fff; border-right: 1px solid var(--c-border); padding: 24px 14px; }
.side nav { display: grid; gap: 2px; position: sticky; top: 92px; }
.side a, .side button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: .65em .9em; border-radius: 9px; color: var(--c-text); text-decoration: none; font-weight: 600; font-size: .95rem; background: none; border: 0; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.side a:hover, .side button:hover { background: #f2f4f9; }
.side a.on { background: var(--c-primary-l); color: var(--c-primary-d); }
.side .sep { height: 1px; background: var(--c-border); margin: 10px 0; }
.side .grp { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); font-weight: 700; padding: 12px .9em 4px; }
.badge { background: var(--c-accent); color: #fff; border-radius: 999px; font-size: .72rem; padding: .15em .55em; font-weight: 700; min-width: 20px; text-align: center; }
.main { padding: 32px clamp(16px, 3vw, 40px); min-width: 0; }
.main h1 { font-size: 1.8rem; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--c-border); padding: 10px; }
  .side nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .side a, .side button { white-space: nowrap; width: auto; }
  .side .sep, .side .grp { display: none; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px; }
.kpi { background: #fff; border: 1px solid var(--c-border); border-radius: 12px; padding: 16px 18px; }
.kpi b { display: block; font-size: 1.8rem; line-height: 1.1; }
.kpi span { color: var(--c-muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--c-border); border-radius: 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); background: #f7f8fb; padding: 10px 14px; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
table.t td { padding: 10px 14px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #fafbfd; }
.st { display: inline-block; font-size: .75rem; font-weight: 700; padding: .2em .6em; border-radius: 6px; }
.st-active, .st-approved, .st-published, .st-chiuso, .st-completata { background: var(--c-green-l); color: var(--c-green); }
.st-pending, .st-nuovo, .st-draft, .st-aperta { background: var(--c-yellow-l); color: #7a5b00; }
.st-suspended, .st-rejected { background: var(--c-red-l); color: var(--c-red); }
.st-in_corso { background: var(--c-primary-l); color: var(--c-primary-d); }
.progress { height: 10px; background: #e9edf5; border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-accent), #f7a541); border-radius: 999px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; font-size: .72rem; color: var(--c-muted); }
.bars i { display: block; width: 100%; max-width: 38px; border-radius: 5px 5px 0 0; background: var(--c-primary); min-height: 2px; }
.bars i.o { background: var(--c-accent); }
.legend { display: flex; gap: 16px; font-size: .82rem; color: var(--c-muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--c-border); border-radius: 14px; padding: 20px; max-height: 60vh; overflow-y: auto; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; background: #f1f3f8; white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--c-primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { border-bottom-left-radius: 4px; }
.msg time { display: block; font-size: .72rem; opacity: .7; margin-top: 4px; }
.msg form { display: inline; }
.msg .link-btn { font-size: .72rem; color: inherit; opacity: .7; }
.conv { display: flex; gap: 14px; align-items: center; padding: 14px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid #f0f2f6; }
.conv:hover { background: #fafbfd; }
.conv .preview { color: var(--c-muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .name { font-weight: 800; }

.empty { text-align: center; padding: 48px 20px; color: var(--c-muted); }
.auth-box { max-width: 520px; margin: 48px auto; }
.profile-head { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.contact-box { position: sticky; top: 92px; }
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .contact-box { position: static; } }
@media print { .header, .footer, .cc, .sticky-cta, .topbar { display: none !important; } }
