/* ShortlistKit design system. Teal brand, slate neutrals, system fonts only.
   Every colour lives in the token block below; rules elsewhere use var(--token). */
:root {
  /* brand */
  --brand: #0f766e; --brand-dark: #115e59; --brand-tint: #f0fdfa; --brand-border: #99f6e4;
  --on-brand: #ffffff;
  /* text */
  --ink: #0f172a; --ink-soft: #334155; --muted: #5b6b80; --muted-on-tint: #475569;
  /* surfaces */
  --canvas: #f8fafc; --card: #ffffff; --line: #e2e8f0; --hover: #f1f5f9; --nav-bg: rgba(248,250,252,.88);
  /* semantic */
  --success-ink: #166534; --warn-ink: #78350f; --danger-ink: #991b1b; --warn-block: #fcd34d; --track: #e2e8f0; --track-edge: #8494a9;
  --success: #15803d; --success-bg: #f0fdf4; --success-border: #bbf7d0;
  --warn: #b45309; --warn-bg: #fffbeb; --warn-border: #fde68a;
  --danger: #b91c1c; --danger-bg: #fef2f2; --danger-border: #fecaca;
  /* focus, shape, spacing, type */
  --ring: rgba(15,118,110,.25); --radius: 10px; --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 12px 28px rgba(15,23,42,.10); --scrim: rgba(15,23,42,.72);
  --chip-radius: 9999px; --chip-pad: 2px 10px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* QR codes stay dark-on-white in both themes: some scanners reject inverted codes. */
  --qr-ink: #0f172a; --qr-paper: #ffffff;
  /* Landing dark band: the dark-mode palette, pinned so the band is dark in either theme. */
  --band-canvas: #0b1220; --band-card: #101a2b; --band-line: #223047; --band-ink: #e2e8f0;
  --band-ink-soft: #cbd5e1; --band-brand: #14b8a6; --band-glow: rgba(20,184,166,.18);
  /* Motion: one calm curve, everything under 500ms. */
  --ease: cubic-bezier(.4,0,.2,1);
}

/* Dark mode: system preference (unless manually forced light) or manual data-theme=dark.
   Token lists are identical; every light token stays defined above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0b1220; --card: #101a2b; --line: #223047; --hover: #16223a; --nav-bg: rgba(11,18,32,.88);
    --ink: #e2e8f0; --ink-soft: #cbd5e1; --muted: #94a3b8; --muted-on-tint: #94a3b8;
    --brand: #14b8a6; --brand-dark: #0d9488; --brand-tint: #0c2b28; --on-brand: #04211d;
    --success: #4ade80; --success-bg: #052e16; --success-border: #14532d;
    --warn: #fbbf24; --warn-bg: #291a05; --warn-border: #78350f; --warn-block: #fcd34d;
    --danger: #f87171; --danger-bg: #2a0a0a; --danger-border: #7f1d1d;
    --track: #223047; --track-edge: #64748b;
    --ring: rgba(20,184,166,.30);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5); --shadow-md: 0 12px 28px rgba(0,0,0,.5);
    --scrim: rgba(2,6,23,.80);
  }
}
:root[data-theme="dark"] {
  --canvas: #0b1220; --card: #101a2b; --line: #223047; --hover: #16223a; --nav-bg: rgba(11,18,32,.88);
  --ink: #e2e8f0; --ink-soft: #cbd5e1; --muted: #94a3b8; --muted-on-tint: #94a3b8;
  --brand: #14b8a6; --brand-dark: #0d9488; --brand-tint: #0c2b28; --on-brand: #04211d;
  --success: #4ade80; --success-bg: #052e16; --success-border: #14532d;
  --warn: #fbbf24; --warn-bg: #291a05; --warn-border: #78350f; --warn-block: #fcd34d;
  --danger: #f87171; --danger-bg: #2a0a0a; --danger-border: #7f1d1d;
  --track: #223047; --track-edge: #64748b;
  --ring: rgba(20,184,166,.30);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5); --shadow-md: 0 12px 28px rgba(0,0,0,.5);
  --scrim: rgba(2,6,23,.80);
}

/* Logo follows the effective theme */
.logo-mark.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-mark.logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-mark.logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-mark.logo-light { display: none; }
:root[data-theme="dark"] .logo-mark.logo-dark { display: block; }
:root[data-theme="light"] .logo-mark.logo-light { display: block; }
:root[data-theme="light"] .logo-mark.logo-dark { display: none; }

.theme-toggle { background: transparent; border: 0; padding: 4px; cursor: pointer; line-height: 0; }
.theme-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tt-track { display: inline-block; position: relative; width: 46px; height: 24px; border-radius: 9999px;
            background: var(--track); border: 1px solid var(--track-edge);
            box-shadow: inset 0 2px 4px rgba(0,0,0,.28); transition: border-color .2s; }
.theme-toggle:hover .tt-track { border-color: var(--brand); }
.tt-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
           background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.45);
           transition: transform .35s cubic-bezier(.4,0,.2,1), background-color .4s ease; }
.tt-moon, .tt-sun { position: absolute; inset: 0; margin: auto; transition: opacity .3s ease; }
.tt-moon { width: 11px; height: 11px; border-radius: 50%; color: rgba(186,230,253,.95);
           box-shadow: inset -3.5px -1.5px 0 0 currentColor, 0 0 8px rgba(127,212,255,.8); opacity: 0; }
.tt-sun { width: 8px; height: 8px; border-radius: 50%; color: rgba(252,211,77,1);
          box-shadow: 0 0 0 2px rgba(252,211,77,.6), 0 0 10px 2px rgba(251,191,36,.85); opacity: 1; }
/* Dark state: knob glides right, moon lights up, sun fades (system + manual) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tt-knob { transform: translateX(22px); }
  :root:not([data-theme="light"]) .tt-moon { opacity: 1; }
  :root:not([data-theme="light"]) .tt-sun { opacity: 0; }
}
:root[data-theme="dark"] .tt-knob { transform: translateX(22px); }
:root[data-theme="dark"] .tt-moon { opacity: 1; }
:root[data-theme="dark"] .tt-sun { opacity: 0; }
:root[data-theme="light"] .tt-knob { transform: translateX(0); }
:root[data-theme="light"] .tt-moon { opacity: 0; }
:root[data-theme="light"] .tt-sun { opacity: 1; }
/* Cross-fade page colours only while the theme is switching (no everyday lag).
   Eye-comfort: a full light<->dark inversion fades over 450ms ease-in-out,
   never a hard flip. The class must outlive the longest fade or the
   transition is cancelled mid-flight and snaps (reads as a harsh flash). */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .45s ease-in-out, color .45s ease-in-out, border-color .45s ease-in-out, box-shadow .45s ease-in-out !important; }
@media (prefers-reduced-motion: reduce) {
  html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
    transition: none !important; }
  .tt-knob, .tt-moon, .tt-sun { transition: none !important; }
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { font-family: var(--font); }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink-soft); background: var(--canvas);
       min-height: 100vh; display: flex; flex-direction: column; }
body > main, body > .landing-main { flex: 1 0 auto; width: 100%; }
main { max-width: 1040px; margin: 2rem auto; padding: 0 1.5rem; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0 0 1rem; }
h2 { font-size: 20px; font-weight: 600; color: var(--ink); }
h2.sub { font-size: 16px; color: var(--muted); margin: 2rem 0 .5rem; }
h3 { font-size: 16px; font-weight: 600; color: var(--ink); margin: 1rem 0 .4rem; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
.hint, .muted, .stale, .bar-label, .fine, .local-price, .price span, .price-note, .actions .quiet,
small { color: var(--muted); font-size: 13px; font-weight: normal; }
.head { display: flex; justify-content: space-between; align-items: center; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
code { word-break: break-all; }

/* ---- Header, nav, footer ---- */
.top { display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
       padding: var(--s3) max(var(--s5), calc((100% - 1040px) / 2 + 1.5rem)); background: var(--card); border-bottom: 1px solid var(--line); }
.top form { margin: 0; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 700; font-size: 17px;
         color: var(--ink); text-decoration: none; }
.logo-mark { display: block; flex: none; color: var(--brand); }
.logo-mark .logo-box { fill: none; }
.nav { display: flex; align-items: center; gap: var(--s5); }
.nav a, .nav button.link { font-size: 15px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav button.link:hover { color: var(--ink); }
.nav a.active { font-weight: 600; color: var(--brand); }
.nav form.logout { margin-left: var(--s2); padding-left: var(--s2); border-left: 1px solid var(--line); display: flex; align-items: center; }
.nav form.logout button { color: var(--muted-on-tint); padding: 6px 12px; }
.site-footer { display: flex; justify-content: center; gap: var(--s5); padding: var(--s5); margin-top: var(--s6);
               font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer a, .landing-footer .legal a { color: var(--muted); }
.site-footer a:hover, .landing-footer .legal a:hover { color: var(--ink); text-decoration: underline; }
.demo-banner { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
               gap: var(--s3); background: var(--warn-bg); border-block-end: 1px solid var(--warn-border);
               color: var(--warn); font-size: 13px; padding: 6px var(--s4); }
.demo-banner form { margin: 0; }
.demo-banner button { background: var(--warn-block); color: var(--warn-ink); border-color: var(--warn-block); padding: 3px 12px; font-size: 13px; font-weight: 600; }
.demo-banner button:hover { background: var(--warn-block); color: var(--warn-ink); filter: brightness(.95); }

/* ---- Buttons ---- */
button, .button { font: inherit; padding: .55rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line);
                  background: var(--card); color: var(--ink-soft); cursor: pointer; text-decoration: none;
                  display: inline-block; transition: background-color .12s, border-color .12s; }
button:hover, .button:hover { background: var(--canvas); color: var(--ink-soft); }
button:active, .button:active { transform: translateY(1px); }
.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.primary:hover, button.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--on-brand); }
button.link { border: 0; background: none; padding: 0; color: var(--brand); }
button.link:hover { background: none; color: var(--brand-dark); }
.danger { color: var(--danger); border-color: var(--danger); }
.danger:hover { background: var(--danger-bg); }
dialog .actions button.danger, .card .actions button.danger { background: var(--danger); color: var(--on-brand); }
dialog .actions button.danger:hover, .card .actions button.danger:hover { background: var(--danger); filter: brightness(.9); }
button.outline { color: var(--brand); border-color: var(--brand); background: var(--card); padding: .3rem .9rem; }
button.outline:hover { background: var(--brand-tint); }
button.ghost { color: var(--muted-on-tint); border-color: transparent; background: transparent; padding: .3rem .6rem; }
button.ghost:hover { background: var(--hover); }
a.ghost { color: var(--muted-on-tint); }

/* ---- Forms ---- */
input, textarea, select { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: var(--radius);
                          background: var(--card); color: var(--ink); }
input, textarea { width: 100%; margin-top: .25rem; }
input:focus, textarea:focus, select:focus { outline: 2px solid transparent; border-color: var(--brand); box-shadow: 0 0 0 2px var(--ring); }
form.job label { display: block; font-weight: 600; margin-bottom: 1rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
           padding: 1rem 1.25rem; margin: 0 0 1rem; box-shadow: var(--shadow-sm); }
legend { font-weight: 600; padding: 0 .4rem; color: var(--ink); }
.row { display: flex; gap: .5rem; }
.row input { margin-top: .35rem; flex: 1; min-width: 0; }
.row input.points { width: 6rem; flex: none; }
.total { margin: 1rem 0 0; font-weight: 600; }
.total.ok { color: var(--success); }
.total.off { color: var(--warn); }
.note { color: var(--warn); }
.actions { display: flex; gap: 1.25rem; align-items: center; margin-top: 1rem; }
.actions .quiet { margin-left: auto; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); max-width: 32rem; }
dialog label { display: block; margin: 1rem 0; }
.upload-form input[type=file]:not(.dropzone-input) { display: block; margin: .5rem 0 1rem; }
form.inline { display: inline; margin: 0; }

/* ---- Cards and lists ---- */
.card, .empty, .identity, .jobs, .cands, .criteria, table.sample, .price-card, .auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card { padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
.card.docs-help { border: 2px dotted var(--warn-block); background: var(--warn-bg); }
.card h2 { margin-top: 0; font-size: 18px; }
.card ul { padding-left: 1.2rem; }
.card form { margin: var(--s3) 0 0; display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; }
.card form label { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: var(--s1); }
.card form .hint { flex-basis: 100%; margin: 0; }
.card li form { display: inline-flex; margin: 0 0 0 var(--s2); }
.empty { padding: var(--s6) var(--s5); text-align: center; }
.empty h2 { margin-top: 0; }
.empty ol { display: inline-block; text-align: left; }
.empty-icon { display: block; margin: 0 auto var(--s3); color: var(--muted); }
.jobs, .cands, .criteria { list-style: none; padding: 0; margin: 0; }
.jobs li, .cands li, .criteria li { padding: .8rem 1rem; border-top: 1px solid var(--line); }
.jobs li:first-child, .cands li:first-child, .criteria li:first-child { border-top: 0; }
.jobs li:hover, .cands li:hover, .sample tbody tr:hover { background: var(--hover); }
.jobs li { display: grid; grid-template-columns: 1fr auto; gap: var(--s5); align-items: center; }
.jobs .title { font-weight: 600; text-decoration: none; }
.jobs .meta { display: flex; align-items: center; gap: var(--s5); font-size: 14px; color: var(--muted); }
.jobs.closed .title { color: var(--muted); font-weight: normal; }
.jobs form { margin: 0; }
.facts li { margin-bottom: .35rem; }
.no-score { color: var(--muted-on-tint); }

/* ---- Shortlist and candidate ---- */
.crumbs { margin: 0 0 var(--s3); font-size: 13px; }
.line { display: flex; gap: 1rem; align-items: center; }
/* Candidate row: columns size to content; name gets a real width, meters take the slack. */
.cands .line { display: grid; grid-template-columns: minmax(180px, 14rem) minmax(0, 1fr) auto auto;
               grid-template-areas: "name meters score actions"; gap: var(--s2) var(--s4); align-items: start; }
.cands .title { grid-area: name; min-width: 0; font-weight: 600; color: var(--ink); text-decoration: none;
                overflow-wrap: break-word; line-height: 1.3; padding-top: 1px; }
.cands .title:hover { color: var(--brand); }
.cands .meters { grid-area: meters; min-width: 0; }
.cands .score-cell { grid-area: score; justify-self: end; display: inline-flex; align-items: center; justify-content: flex-end; white-space: nowrap; min-height: 2rem; min-width: 6.5rem; }
.cands .status { grid-area: actions; flex-wrap: wrap; min-width: 0; min-height: 2rem; }
.status button, .status .button { padding: .3rem .8rem; font-size: 14px; white-space: nowrap; }
.score { font-weight: 600; font-size: 1.1rem; min-width: 2.5rem; text-align: right; }
.score.none { color: var(--muted); font-weight: normal; }
.status { display: inline-flex; gap: var(--s2); align-items: center; justify-content: flex-end; min-width: 7rem;
          color: var(--success); font-size: 14px; }
.status .rejected { color: var(--muted); }
.criteria .line strong { flex: 1; color: var(--ink); }
.crit-score { min-width: 6rem; text-align: right; }
.bars { display: inline-flex; gap: 3px; }
.bars.labelled { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s5); align-items: start; min-width: 0; }
.bar-pair { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bar-pair .bar { width: 100%; }
.bars-legend { margin: 0 0 var(--s2); }
.bar-label { font-size: 12px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
.bar { display: inline-block; width: 2rem; height: .5rem; background: var(--track); border: 1px solid var(--track-edge); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.bar > .pct-0 { width: 0%; }
.bar > .pct-1 { width: 1%; }
.bar > .pct-2 { width: 2%; }
.bar > .pct-3 { width: 3%; }
.bar > .pct-4 { width: 4%; }
.bar > .pct-5 { width: 5%; }
.bar > .pct-6 { width: 6%; }
.bar > .pct-7 { width: 7%; }
.bar > .pct-8 { width: 8%; }
.bar > .pct-9 { width: 9%; }
.bar > .pct-10 { width: 10%; }
.bar > .pct-11 { width: 11%; }
.bar > .pct-12 { width: 12%; }
.bar > .pct-13 { width: 13%; }
.bar > .pct-14 { width: 14%; }
.bar > .pct-15 { width: 15%; }
.bar > .pct-16 { width: 16%; }
.bar > .pct-17 { width: 17%; }
.bar > .pct-18 { width: 18%; }
.bar > .pct-19 { width: 19%; }
.bar > .pct-20 { width: 20%; }
.bar > .pct-21 { width: 21%; }
.bar > .pct-22 { width: 22%; }
.bar > .pct-23 { width: 23%; }
.bar > .pct-24 { width: 24%; }
.bar > .pct-25 { width: 25%; }
.bar > .pct-26 { width: 26%; }
.bar > .pct-27 { width: 27%; }
.bar > .pct-28 { width: 28%; }
.bar > .pct-29 { width: 29%; }
.bar > .pct-30 { width: 30%; }
.bar > .pct-31 { width: 31%; }
.bar > .pct-32 { width: 32%; }
.bar > .pct-33 { width: 33%; }
.bar > .pct-34 { width: 34%; }
.bar > .pct-35 { width: 35%; }
.bar > .pct-36 { width: 36%; }
.bar > .pct-37 { width: 37%; }
.bar > .pct-38 { width: 38%; }
.bar > .pct-39 { width: 39%; }
.bar > .pct-40 { width: 40%; }
.bar > .pct-41 { width: 41%; }
.bar > .pct-42 { width: 42%; }
.bar > .pct-43 { width: 43%; }
.bar > .pct-44 { width: 44%; }
.bar > .pct-45 { width: 45%; }
.bar > .pct-46 { width: 46%; }
.bar > .pct-47 { width: 47%; }
.bar > .pct-48 { width: 48%; }
.bar > .pct-49 { width: 49%; }
.bar > .pct-50 { width: 50%; }
.bar > .pct-51 { width: 51%; }
.bar > .pct-52 { width: 52%; }
.bar > .pct-53 { width: 53%; }
.bar > .pct-54 { width: 54%; }
.bar > .pct-55 { width: 55%; }
.bar > .pct-56 { width: 56%; }
.bar > .pct-57 { width: 57%; }
.bar > .pct-58 { width: 58%; }
.bar > .pct-59 { width: 59%; }
.bar > .pct-60 { width: 60%; }
.bar > .pct-61 { width: 61%; }
.bar > .pct-62 { width: 62%; }
.bar > .pct-63 { width: 63%; }
.bar > .pct-64 { width: 64%; }
.bar > .pct-65 { width: 65%; }
.bar > .pct-66 { width: 66%; }
.bar > .pct-67 { width: 67%; }
.bar > .pct-68 { width: 68%; }
.bar > .pct-69 { width: 69%; }
.bar > .pct-70 { width: 70%; }
.bar > .pct-71 { width: 71%; }
.bar > .pct-72 { width: 72%; }
.bar > .pct-73 { width: 73%; }
.bar > .pct-74 { width: 74%; }
.bar > .pct-75 { width: 75%; }
.bar > .pct-76 { width: 76%; }
.bar > .pct-77 { width: 77%; }
.bar > .pct-78 { width: 78%; }
.bar > .pct-79 { width: 79%; }
.bar > .pct-80 { width: 80%; }
.bar > .pct-81 { width: 81%; }
.bar > .pct-82 { width: 82%; }
.bar > .pct-83 { width: 83%; }
.bar > .pct-84 { width: 84%; }
.bar > .pct-85 { width: 85%; }
.bar > .pct-86 { width: 86%; }
.bar > .pct-87 { width: 87%; }
.bar > .pct-88 { width: 88%; }
.bar > .pct-89 { width: 89%; }
.bar > .pct-90 { width: 90%; }
.bar > .pct-91 { width: 91%; }
.bar > .pct-92 { width: 92%; }
.bar > .pct-93 { width: 93%; }
.bar > .pct-94 { width: 94%; }
.bar > .pct-95 { width: 95%; }
.bar > .pct-96 { width: 96%; }
.bar > .pct-97 { width: 97%; }
.bar > .pct-98 { width: 98%; }
.bar > .pct-99 { width: 99%; }
.bar > .pct-100 { width: 100%; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.badge { font-size: 12px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-border); }
.badge.check { color: var(--brand-dark); background: var(--brand-tint); border-color: var(--brand-border); }
.notice { background: var(--brand-tint); border: 1px solid var(--brand-border); color: var(--ink-soft);
          border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: 1rem; }
.notice.ai-key-notice { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.notice.ai-key-notice a { color: var(--warn); font-weight: 600; }
.notice.failed-notice { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.notice.failed-notice form.inline, .shortlist-actions form.inline { margin-left: var(--s2); }
.shortlist-actions { margin: 0 0 1rem; gap: var(--s2); }
blockquote { margin: .5rem 0 0; padding: .3rem .8rem; border-left: 3px solid var(--brand-border);
             color: var(--ink); background: var(--canvas); }
.identity { padding: .8rem 1rem; margin-bottom: 1.25rem; }
.identity h2 { font-size: 16px; margin: 0 0 .5rem; }
.identity form { margin: 0; display: flex; gap: 1rem; align-items: center; }
.identity p { margin: .25rem 0; }
.identity dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0 0 .5rem; }
.identity dt { color: var(--muted); }
.identity dd { margin: 0; font-weight: 600; color: var(--ink); }
.fine { margin-top: 1.5rem; }
.export-links li { margin: .25rem 0; }
.closed-notice form.inline { display: inline; margin-left: var(--s2); }

/* ---- Rejection gate ---- */
.head-links { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.head-links a { white-space: nowrap; }
.head h1 { min-width: 0; overflow-wrap: anywhere; margin-right: var(--s4); }
/* Job page: title left, one action cluster right; actions never steal the title's space. */
.job-head { align-items: flex-start; gap: var(--s4) var(--s5); margin-bottom: var(--s5); }
.job-head h1 { flex: 1 1 0; min-width: 0; margin: 0; }
.job-head .head-actions { flex: 0 0 auto; display: flex; flex-wrap: nowrap; align-items: center; gap: var(--s3); justify-content: flex-end; }
.job-head .head-actions .button { margin: 0; }
.job-head .head-actions .button.primary { order: 1; }
.measure { max-width: 70ch; }
.lede { margin: 0 0 var(--s5); }
.group { margin-top: var(--s6); }
.group h2.sub { margin: 0 0 var(--s1); }
.group .group-hint, .group .bars-legend { margin: 0 0 var(--s3); }
.group .group-hint { margin-bottom: var(--s2); }
.job-head ~ .notice { margin-bottom: var(--s4); }
.decide { margin-top: .4rem; }
.decide summary { cursor: pointer; display: inline-block; list-style: none; width: max-content; font-size: 14px;
                  padding: .3rem .8rem; border: 1px solid var(--danger-border); border-radius: var(--radius);
                  color: var(--danger); background: var(--card); }
.decide summary::-webkit-details-marker { display: none; }
.decide summary:hover { background: var(--danger-bg); }
.decide[open] summary { margin-bottom: .4rem; }
.decide-body { max-width: 100%; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.decide form { margin: 0; display: flex; gap: .5rem; align-items: center; }
.decide button:not(.link) { padding: .4rem .8rem; }
.decide .explain { width: 12rem; margin: 0; }
.decide select { max-width: 100%; }
.decide form.reject:not(:has(option[value="other"]:checked)) .explain { display: none; }
.rejected-notice form { display: inline; margin-left: .5rem; }
table.sample { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.sample th, .sample td { text-align: left; vertical-align: top; padding: .6rem .7rem; border-top: 1px solid var(--line); }
.sample th { color: var(--muted); font-weight: 600; border-top: 0; }
.sample .num { text-align: right; font-weight: 600; }
.sample .do form { margin: 0 0 .3rem; }
.sample .ok { color: var(--success); }
.delete { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.confirm { display: inline-block; margin-left: var(--s2); }
.confirm summary { list-style: none; cursor: pointer; width: max-content; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm[open] summary { display: none; }
.confirm .actions { margin-top: 0; }
details.danger-zone { margin-top: var(--s6); padding: var(--s3) var(--s5); border-color: var(--danger-border); }
details.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--danger); }
details.danger-zone[open] summary { margin-bottom: var(--s2); }
details.danger-zone p { margin: 0 0 var(--s3); }
.confirm form { margin: 0; }

/* ---- Chips, pills, scores ---- */
.score-chip, .pill, .badge, .badge-text, .chip { border-radius: var(--chip-radius); padding: var(--chip-pad); }
.score-chip { display: inline-flex; align-items: baseline; gap: 1px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.score-chip .of { font-weight: 400; font-size: 12px; color: var(--muted-on-tint); }
.score-chip.ok { background: var(--success-bg); color: var(--success-ink); }
.score-chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.score-chip.bad { background: var(--danger-bg); color: var(--danger-ink); }
.score-chip.big { font-size: 28px; padding: 4px 16px; }
.score-chip.big .of { font-size: 15px; }
.pill { font-size: 12px; font-weight: 600; }
.pill.open { color: var(--success); background: var(--success-bg); }
.pill.closed { color: var(--muted-on-tint); background: var(--hover); }
.pill.shortlisted { color: var(--success); background: var(--success-bg); border: 1px solid var(--success-border); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.neutral { color: var(--muted-on-tint); background: var(--hover); }
.chip.failed { color: var(--danger); background: var(--card); border: 1px solid var(--danger); text-decoration: none; }

/* ---- Flashes and errors ---- */
.error { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-border);
         border-radius: var(--radius); padding: .6rem .8rem; }
.flash { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; margin: 0 0 var(--s3);
         background: var(--brand-tint); border-color: var(--brand-border); color: var(--ink-soft); }
.flash p { margin: 0; }
.flash + .flash { margin-top: calc(-1 * var(--s2)); }
.flash.success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.flash.demo { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-ink); }
.flash.error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.error-card { text-align: center; }
.error-card .button { margin-top: var(--s2); }
.key-reveal { display: block; padding: var(--s3); background: var(--canvas); border: 1px solid var(--line);
              border-radius: var(--radius); color: var(--ink); }

/* ---- Auth ---- */
main.auth { max-width: 440px; margin: var(--s4) auto; }
.auth-tag { text-align: center; color: var(--muted); margin: 0 0 var(--s3); }
.auth-card { padding: var(--s5) var(--s6); }
.auth-card h1 { font-size: 22px; margin-bottom: var(--s3); }
.auth-card form { display: flex; flex-direction: column; gap: var(--s3); margin: 0; }
.auth-card label { display: flex; flex-direction: column; gap: var(--s1); font-weight: 600; font-size: 14px; }
.auth-card input { margin: 0; padding: 10px 12px; }
.auth-card button.block { width: 100%; padding: 10px 12px; font-weight: 600; }
.auth-card details { margin: var(--s3) 0; font-size: 14px; }
.auth-card summary { cursor: pointer; color: var(--muted); }
.enroll-steps { margin: 0 0 var(--s3); padding-left: 1.2rem; font-size: 14px; }
.qr-tile { margin: var(--s3) auto; display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.qr-svg { display: block; width: 200px; height: 200px; border-radius: 8px; border: 1px solid var(--line); }
.qr-svg .qr-paper { fill: var(--qr-paper); }
.qr-svg .qr-ink { fill: var(--qr-ink); }
.manual-key code { word-break: break-all; letter-spacing: .08em; }
.auth-card .skip { text-align: center; margin: var(--s3) 0 0; }
.plan-line { margin: 0 0 var(--s3); font-size: 14px; font-weight: 600; color: var(--brand-dark); }
.trust-line { margin: var(--s3) 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.cross { text-align: center; margin: var(--s3) 0 0; color: var(--muted); }
.trial-line { margin: 0 0 var(--s2); font-size: 13px; font-weight: 600; color: var(--success); }

/* ---- Legal pages ---- */
main.prose { max-width: 640px; line-height: 1.65; }
main.prose h2 { font-size: 18px; margin: var(--s5) 0 var(--s2); }
main.prose p, main.prose ul { margin: 0 0 var(--s3); }
main.prose .lead { color: var(--muted); font-size: 1.05rem; }

/* ---- Landing ---- */
.landing { background: var(--canvas); }
.landing-nav { display: flex; justify-content: space-between; align-items: center; background: var(--card);
               border-bottom: 1px solid var(--line); padding: 1rem max(1.5rem, calc((100% - 1040px)/2)); }
.landing-nav a:last-child { text-decoration: none; }
.landing-nav .nav-links { display: flex; align-items: center; gap: var(--s4); }
.landing-main { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }
.landing-main section { padding: var(--s6) 0; border-bottom: 1px solid var(--line); }
.landing-main h1 { max-width: 18ch; font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.1; letter-spacing: -.03em; }
.landing-main h2 { font-size: 1.65rem; margin: 0 0 1.25rem; }
.landing-main h3 { font-size: 1.2rem; }
.eyebrow { color: var(--brand-dark); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.price-card { padding: 1.4rem; display: flex; flex-direction: column; }
.price-card ul { padding-left: 1.2rem; flex: 1; }
.price-card .button { align-self: flex-start; }
.price-card li, .trust li { margin: .45rem 0; }
.price { font-size: 2rem; font-weight: 700; color: var(--ink); margin: .2rem 0; }
.price span { font-size: 1rem; }
.local-price { margin: 0 0 .6rem; font-size: 15px; }
.badge-text { display: inline-block; color: var(--brand-dark); background: var(--brand-tint); border: 1px solid var(--brand-border); font-size: 13px; }
.how ol { padding-left: 1.5rem; display: grid; gap: var(--s3); }
.how li { padding: var(--s3) var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.trust ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 2rem; padding-left: 1.2rem; }
.closing { text-align: center; }
.closing .cta-row { justify-content: center; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.tile { padding: var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.tile h3, .tile p { margin: 0 0 var(--s2); }
.faq details { border-bottom: 1px solid var(--line); padding: var(--s3) 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: var(--s2) 0 0; color: var(--ink-soft); }
.mobile-note { display: none; }
.landing-footer .legal { display: flex; gap: var(--s4); font-size: 13px; margin: 0; }
.landing-footer .legal span { color: var(--muted); }
ul.ticks { list-style: none; padding-left: 0 !important; }
ul.ticks li { position: relative; padding-left: var(--s5); }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: .35em; width: 5px; height: 10px;
                      border: solid var(--success); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---- Responsive ---- */
@media (max-width: 900px) { .mobile-note { display: block; } }
@media (max-width: 620px) { .price-grid, .trust ul, .tiles { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .top { flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s3) var(--s4); }
  .nav { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  main { margin: var(--s4) auto; padding: 0 var(--s4); }
  .auth-card { padding: var(--s5) var(--s4); }
  .jobs li { grid-template-columns: 1fr; gap: var(--s2); }
  .jobs .meta { flex-wrap: wrap; gap: var(--s3); }
  .line { flex-wrap: wrap; }
  .job-head { flex-wrap: wrap; }
  .cands .line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name score" "meters meters" "actions actions"; }
  .cands .status { justify-content: flex-start; }
  .head { flex-wrap: wrap; gap: var(--s3); }
  .cands, .jobs, .criteria, .identity { width: 100%; }
  .landing-nav { padding: var(--s3) var(--s4); }
}

/* ---- Mobile nav disclosure (nav.js; the toggle stays hidden without JS) ---- */
.nav-toggle { display: none; margin-left: auto; padding: 6px 12px; font-size: 20px; line-height: 1;
              background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); cursor: pointer; }
@media (max-width: 719.98px) {
  .nav-js { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav-js .nav-toggle:not([hidden]) { display: inline-block; }
  .nav-js > .nav, .nav-js > .nav-links { display: none; flex-basis: 100%; flex-direction: column; align-items: flex-start; gap: var(--s3);
                  padding-top: var(--s3); }
  .nav-js.nav-open > .nav, .nav-js.nav-open > .nav-links { display: flex; }
  .nav-js .nav form.logout, .nav-js .nav-links form.logout { margin-left: 0; padding-left: 0; border-left: 0; }
}

/* ---- Landing footer (UI-8) ---- */
.landing-footer { color: var(--muted); display: block; width: 100%; max-width: none; margin: var(--s8) 0 0; box-sizing: border-box; padding: var(--s7) var(--s5) var(--s5); border-top: 1px solid var(--line); background: var(--brand-tint); }
.lf-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s6); max-width: 1040px; margin: 0 auto var(--s5); }
.lf-brand .brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--brand-dark); text-decoration: none; }
.lf-brand p { margin: var(--s2) 0 0; color: var(--muted-on-tint); font-size: 14px; max-width: 30ch; }
.lf-col { display: flex; flex-direction: column; gap: var(--s2); }
.lf-col h3 { margin: 0 0 var(--s1); font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-on-tint); }
.lf-col a { color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.lf-col a:hover { color: var(--brand-dark); text-decoration: underline; }
.lf-fine { max-width: 1040px; margin: 0 auto; padding-top: var(--s4); border-top: 1px solid var(--line); color: var(--muted-on-tint); font-size: 13px; }
@media (max-width: 720px) { .lf-grid { grid-template-columns: 1fr 1fr; gap: var(--s5); } }

/* Docs: pill nav + setup links */
.docs-pills { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); }
.docs-pills a { display: inline-block; padding: 5px 14px; border-radius: var(--chip-radius); font-size: 14px; font-weight: 500;
                color: var(--ink-soft); background: var(--hover); text-decoration: none; border: 1px solid var(--line); }
.docs-pills a:hover { background: var(--brand-tint); color: var(--brand-dark); border-color: var(--brand-border); }
.docs-pills a.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.setup-link { margin-top: calc(-1 * var(--s2)); }

/* API page: model advisor */
.model-advisor { margin: var(--s3) 0; border: 1px solid var(--line); border-radius: 8px; padding: var(--s3); background: var(--brand-tint); }
.model-advisor summary { cursor: pointer; }
.model-guide { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.model-guide li { font-size: 14px; }
.model-guide .tag { font-style: normal; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--brand-dark); color: var(--brand-dark); }
.model-guide .tag-rec { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* wave E: job flow steps, requirement guidance, verdict chips, overflow-safe cells */
.steps { display: flex; gap: 1rem; list-style: none; padding: 0; margin: 0 0 1rem; flex-wrap: wrap; }
.steps li { color: var(--muted); font-weight: 600; }
.steps li.current { color: var(--ink); }
.step { margin: 0 0 1.5rem; }
.step .n { display: inline-block; min-width: 1.5rem; height: 1.5rem; line-height: 1.5rem; text-align: center; border-radius: 50%; background: var(--track); color: var(--ink); font-size: 13px; margin-right: .35rem; }
.guide { border: 1px solid var(--line); border-radius: 6px; padding: .6rem 1rem; margin: .5rem 0 1rem; }
.guide summary { cursor: pointer; font-weight: 600; }
.verdict { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--ink); }
.verdict.met { border-color: var(--success); color: var(--success); }
.verdict.partial { border-color: var(--warn); color: var(--warn); }
.verdict.not-met, .verdict.no-evidence { color: var(--muted); }
.why { margin: var(--s3) 0 0; padding-top: var(--s2); border-top: 1px solid var(--line); font-size: 14px; }
.why summary { cursor: pointer; display: block; padding: var(--s1) 0; font-weight: 600; color: var(--brand-dark); }
.why summary:hover { color: var(--ink); }
.reqs { list-style: none; padding: 0; margin: .4rem 0 0; }
.reqs li { padding: .4rem 0; border-top: 1px solid var(--line); min-width: 0; }
.req-text, .criteria strong { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.req-text { display: inline-block; max-width: 100%; }
.reqs blockquote, .criteria blockquote { overflow-wrap: anywhere; max-width: 100%; }

/* hardening: weight-0 advisory card */
.card.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-bg); padding: var(--s3); border-radius: 8px; margin: var(--s3) 0; font-size: 14px; }

/* ---- Wave G: plan picker, post-signup plan modal, expired-trial overlay ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; background: var(--scrim);
  display: flex; align-items: flex-start; justify-content: center; padding: var(--s5); overflow-y: auto; }
.modal-overlay[hidden] { display: none; }
.modal-box { background: var(--card); color: var(--ink-soft); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: var(--s6); max-width: 520px; width: 100%; margin: auto; }
.modal-box--wide { max-width: 720px; }
.modal-box h2 { margin: 0 0 var(--s2); }
.modal-actions { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; margin: var(--s4) 0 0; }
.modal-actions form { margin: 0; }
.plan-grid { margin: var(--s5) 0 var(--s3); }
.plan-grid form { margin: 0; }
/* Standard is the hero card */
.price-card--standard { border: 2px solid var(--brand); background: var(--brand-tint); }
.badge-text--popular { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.trial-banner { background: var(--warn-bg); color: var(--warn-ink); border-bottom: 1px solid var(--warn-border);
  padding: var(--s2) var(--s4); text-align: center; font-size: 14px; }
.trial-banner a { font-weight: 600; }

/* ---- UI-9: responsive job page ---- */
@media (max-width: 900px) {
  .job-head { flex-wrap: wrap; }
  .job-head h1 { flex-basis: 100%; }
  .job-head .head-actions { flex-wrap: wrap; justify-content: flex-start; }
  .cands .bars.labelled { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Wave I-A: weights on requirement rows, duplicate badge, AI-key dialog ---- */
.row input.weight { width: 5.5rem; flex: none; }
.row select { margin-top: .35rem; flex: none; max-width: 11rem; }
.badge.dup { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.badge.dup a { color: inherit; font-weight: 600; }
.dup-badge form.inline { display: inline; margin-left: var(--s2); }
.upload-result ul { margin: var(--s2) 0 0; padding-left: var(--s4); }
.upload-result .rejected-file { color: var(--danger); }

/* --- review links (Wave I-B) --- */
.review-public main { max-width: 760px; margin: 0 auto; padding: var(--s5) var(--s4); }
.review-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.review-card .review-form { display: block; }
.review-card .review-form textarea { width: 100%; }
.review-card .review-form .actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.review-links .rl-item { border-top: 1px solid var(--brand-border); padding: var(--s3) 0; }
.review-links .rl-url { width: 100%; font-family: monospace; }
.review-links .rl-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0; align-items: center; }
.review-links .rl-decisions { margin: var(--s2) 0 0; padding-left: 1.2rem; }
.draft-box { width: 100%; font-family: inherit; }

/* ---- Live job page: queued / analysing chips (fixed width, so rows never shift) ---- */
.state-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 6.5rem; box-sizing: border-box;
              font-size: 12px; font-weight: 600; white-space: nowrap; border-radius: var(--chip-radius); padding: var(--chip-pad); }
.state-chip.queued { color: var(--muted-on-tint); background: var(--hover); animation: chip-pulse 2s ease-in-out infinite; }
.state-chip.running { color: var(--brand-dark); background-color: var(--brand-tint); border: 1px solid var(--brand-border);
                      background-image: linear-gradient(90deg, transparent 0, var(--brand-border) 50%, transparent 100%);
                      background-size: 200% 100%; animation: chip-shimmer 1.6s linear infinite; }
.state-chip .spin { width: 10px; height: 10px; box-sizing: border-box; border: 2px solid var(--brand-border);
                    border-top-color: var(--brand); border-radius: 50%; animation: chip-spin .8s linear infinite; }
.cands .chip.failed { color: var(--warn-ink); background: var(--warn-bg); border-color: var(--warn); }
.state-chip.waiting { color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn);
                      white-space: normal; text-align: center; max-width: 12rem; }
.cands .row-failed { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s2);
                     color: var(--danger); font-size: 14px; }
.score-chip.landed { animation: score-land 1.4s ease-out 1; }
.live-notice[hidden] { display: none; }
@keyframes chip-pulse { 50% { opacity: .55; } }
@keyframes chip-shimmer { 100% { background-position: -200% 0; } }
@keyframes chip-spin { to { transform: rotate(360deg); } }
@keyframes score-land { from { opacity: 0; box-shadow: 0 0 0 4px var(--brand-border); } }
@media (prefers-reduced-motion: reduce) {
  .state-chip, .state-chip .spin, .score-chip.landed { animation: none; }
  .state-chip.running { background-image: none; }
  .state-chip .spin { display: none; }
}

/* outreach (wave H) */
.outreach { padding: .8rem 1rem; margin-bottom: 1.25rem; }
.outreach h2 { font-size: 16px; margin: 0 0 .5rem; }
.timeline { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .25rem; }
.share-card { margin-top: .5rem; display: grid; gap: .5rem; }
.share-card textarea { resize: vertical; }

/* ---- Wave UI-E ---- */
/* Upload card: the whole dashed zone is the input's label (click or drop). */
.upload-title { margin: 0 0 var(--s3); text-align: center; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center;
            padding: var(--s6) var(--s5); min-height: 44px; cursor: pointer; color: var(--ink-soft);
            border: 2px dashed var(--track-edge); border-radius: var(--radius); background: var(--canvas);
            transition: border-color .15s, background-color .15s; }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand); background: var(--brand-tint); }
.dropzone:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.dropzone-icon { color: var(--brand); }
.dropzone-lead { font-weight: 600; color: var(--ink); }
.dropzone-browse { color: var(--brand); text-decoration: underline; }
.dropzone-picked { font-weight: 600; color: var(--brand-dark); }
.dropzone-picked:empty { display: none; }
.upload-form .dropzone-input { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0;
                               opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }

/* Landing: pill CTAs (primary solid teal + secondary outline). */
.cta-row .button { border-radius: var(--chip-radius); min-height: 44px; display: inline-flex; align-items: center;
                   padding: .55rem 1.4rem; font-weight: 600; }
.cta-row .button:not(.primary) { background: transparent; border-color: var(--brand); color: var(--brand-dark); }
.cta-row .button:not(.primary):hover { background: var(--brand-tint); color: var(--brand-dark); }

/* Landing: tiles and how-it-works step cards lift slightly on hover. */
.tile, .how li { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.tile:hover, .how li:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Landing scroll-reveal: hidden only once reveal.js arms it (visible without JS).
   The entrance is an animation (not a transition) so sibling stagger delays never slow hover lifts. */
@media (prefers-reduced-motion: no-preference) {
  .is-armed .reveal { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
  .is-armed .reveal.is-visible { animation: reveal-in .4s var(--ease) backwards; }
  .is-armed .reveal:not(.is-visible) { opacity: 0; transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .how li, .dropzone { transition: none; }
  .tile:hover, .how li:hover { transform: none; }
}
@keyframes reveal-in { 0% { opacity: 0; transform: translateY(14px); } }

/* Demo workspace: polite toast when a visitor tries a change (demo_intercept.js). */
.demo-toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 1000;
              max-width: min(32rem, calc(100% - 2rem)); padding: .75rem 1rem; background: var(--ink);
              color: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); }
.demo-toast[hidden] { display: none; }
.demo-toast a { color: var(--canvas); font-weight: 600; text-decoration-color: var(--brand); }

/* ---- Wave CONTACT redesign: /contact page --------------------------------- */
/* Display face for app-chrome pages (same vendored files as landing.css). */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("fonts/plus-jakarta-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("fonts/plus-jakarta-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800;
  font-display: swap; src: url("fonts/plus-jakarta-sans-800.woff2") format("woff2"); }
.contact-wrap { max-width: 1020px; margin: 0 auto; padding: var(--s7) var(--s5); }
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s7); align-items: start; }
.contact-kicker { margin: 0 0 var(--s2); color: var(--brand); font-weight: 700;
  font-size: 13px; letter-spacing: .09em; text-transform: uppercase; }
.contact-intro h1 { font-family: "Plus Jakarta Sans", var(--font); letter-spacing: -0.02em;
  font-size: clamp(30px, 4vw, 44px); line-height: 1.08; margin: 0 0 var(--s3); }
.contact-lead { font-size: 18px; line-height: 1.55; color: var(--ink-soft); margin: 0; max-width: 46ch; }
.contact-steps { list-style: none; counter-reset: cstep; display: grid; gap: var(--s4);
  margin: var(--s6) 0 0; padding: 0; }
.contact-steps li { counter-increment: cstep; display: grid; grid-template-columns: auto 1fr; gap: var(--s4); }
.contact-steps li::before { content: counter(cstep); width: 34px; height: 34px; border-radius: 999px;
  background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; display: grid; place-items:center; }
.contact-steps b { display: block; margin-bottom: 2px; }
.contact-steps span { color: var(--ink-soft); line-height: 1.5; }
.contact-reassure { list-style: none; display: grid; gap: var(--s3); margin: var(--s6) 0 0;
  padding: var(--s5) 0 0; border-top: 1px solid var(--line); }
.contact-reassure li { display: flex; gap: var(--s3); align-items: baseline; color: var(--ink-soft); }
.contact-reassure svg { color: var(--brand); flex: none; transform: translateY(2px); }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) * 2);
  box-shadow: var(--shadow-md); padding: var(--s6); display: grid; gap: var(--s4); }
.contact-chip { justify-self: start; background: var(--brand-tint); color: var(--brand-dark);
  padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.contact-card-lead { margin: 0; font-size: 17px; line-height: 1.5; }
.contact-card .button.primary { justify-self: stretch; text-align: center; padding: .8rem 1.1rem; font-size: 17px; }
.contact-card .button { cursor: pointer; }
.contact-card .button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.copy-row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.copy-state { font-size: 14px; color: var(--muted); }
.contact-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .contact-wrap { padding: var(--s6) var(--s4); }
}

/* ---- Wave CONTACT form: prefilled-mailto form inside the action card ------ */
#contact-form { display: grid; gap: var(--s3); }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
#contact-form label { display: flex; flex-direction: column; gap: var(--s1);
  font-weight: 600; font-size: 14px; }
#contact-form input, #contact-form textarea, #contact-form select { margin-top: 0; }
#contact-form input[aria-invalid="true"], #contact-form textarea[aria-invalid="true"] {
  border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-bg); }
.cf-err { color: var(--danger-ink); font-weight: 500; font-size: 13px; line-height: 1.4; }
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-submit { justify-self: stretch; text-align: center; padding: .8rem 1.1rem; font-size: 17px; cursor: pointer; }
.cf-submit:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.cf-hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cf-status { margin: 0; font-size: 14px; color: var(--success-ink); }
.contact-alt { display: grid; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); }
.contact-alt-label { font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
@media (max-width: 560px) { .cf-grid { grid-template-columns: 1fr; } }
