/* Perceivable — the product sells accessibility, so the site itself has to pass.
   Every colour pair below clears 4.5:1, focus is always visible, and nothing
   depends on colour alone to convey meaning. */

:root {
  --bg:        #fbfaf8;
  --surface:   #ffffff;
  --surface-2: #f4f2ee;
  --border:    #e0dcd4;
  --border-2:  #cfc9be;
  --text:      #1c1a17;
  --text-2:    #55504a;
  --text-3:    #6f695f;
  --accent:    #1c4f3f;
  --accent-2:  #164134;
  --accent-fg: #ffffff;
  --accent-soft:#e6efeb;
  --good:      #1c6b3f;
  --good-bg:   #e6f2ea;
  --ok:        #7a5c00;
  --ok-bg:     #fbf1d6;
  --warn:      #9a4a12;
  --warn-bg:   #fceee2;
  --bad:       #a52222;
  --bad-bg:    #fbe9e9;
  --focus:     #0a5fd6;
  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 1px 2px rgba(28,26,23,.05), 0 4px 16px rgba(28,26,23,.05);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #14130f;
    --surface:   #1c1b17;
    --surface-2: #24231e;
    --border:    #33312a;
    --border-2:  #464339;
    --text:      #f2efe8;
    --text-2:    #bdb8ac;
    --text-3:    #9b958a;
    --accent:    #6fd0ad;
    --accent-2:  #8ce0c1;
    --accent-fg: #0d1f19;
    --accent-soft:#1d2f28;
    --good:      #6fd0ad;
    --good-bg:   #172a22;
    --ok:        #e0bf62;
    --ok-bg:     #2c2617;
    --warn:      #f0a06a;
    --warn-bg:   #312115;
    --bad:       #f08d8d;
    --bad-bg:    #331a1a;
    --focus:     #7db4ff;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 620; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
a  { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-fg);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(720px, 100% - 2.5rem); margin-inline: auto; }

/* ------------------------------------------------------------------ header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 62px; }
.brand {
  font-weight: 680; font-size: 1.12rem; letter-spacing: -.03em;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: .5rem;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center;
}
.site-nav { margin-left: auto; display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--text-2); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
/* .site-nav a (0,2,0) outranks .btn (0,1,0), so a button in the nav would inherit
   the muted link colour and fail contrast against the accent fill. */
.site-nav a.btn { color: var(--accent-fg); }
.site-nav a.btn:hover { color: var(--accent-fg); text-decoration: none; }

/* ------------------------------------------------------------------ footer */
.site-footer {
  margin-top: 5rem; border-top: 1px solid var(--border);
  background: var(--surface); padding: 2.5rem 0; color: var(--text-2); font-size: .9rem;
}
.footer-cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--border); color: var(--text-3); font-size: .85rem; }

/* ------------------------------------------------------------------ blocks */
main { padding: 3rem 0 1rem; }
.hero { text-align: center; padding: 1rem 0 2.5rem; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.lede { font-size: 1.15rem; color: var(--text-2); max-width: 58ch; margin-inline: auto; }

.eyebrow {
  display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: .35rem .7rem; border-radius: 100px; margin-bottom: 1.1rem;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.card-pad-lg { padding: 2rem; }

/* -------------------------------------------------------------- scan form */
.scan-form { max-width: 620px; margin: 2rem auto 0; }
.scan-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.scan-row .field { flex: 1 1 260px; }

label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: .4rem; }
.hint { font-size: .86rem; color: var(--text-3); margin-top: .4rem; }

input[type=url], input[type=text], input[type=email], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm); padding: .72rem .85rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); }
textarea { min-height: 7rem; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: .72rem 1.3rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-fg);
  transition: background .15s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { padding: .85rem 1.7rem; font-size: 1.03rem; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------- notices */
.notice {
  border: 1px solid var(--border); border-left: 4px solid var(--text-3);
  background: var(--surface-2); padding: .9rem 1.1rem; border-radius: var(--radius-sm);
  margin-bottom: 1.2rem; font-size: .95rem;
}
.notice-bad  { border-left-color: var(--bad);  background: var(--bad-bg);  color: var(--text); }
.notice-good { border-left-color: var(--good); background: var(--good-bg); color: var(--text); }
.notice-warn { border-left-color: var(--warn); background: var(--warn-bg); color: var(--text); }
.notice strong { display: block; margin-bottom: .15rem; }

/* ------------------------------------------------------------------- score */
.score-head {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
}
@media (max-width: 620px) { .score-head { grid-template-columns: 1fr; } }

.dial { position: relative; width: 180px; height: 180px; }
.dial svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.dial-track { fill: none; stroke: var(--border); stroke-width: 12; }
.dial-fill  { fill: none; stroke-width: 12; stroke-linecap: round; }
.dial-num {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.dial-num b { font-size: 2.9rem; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.dial-num span { font-size: .78rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .09em; }

.tone-good .dial-fill { stroke: var(--good); }
.tone-ok   .dial-fill { stroke: var(--ok); }
.tone-warn .dial-fill { stroke: var(--warn); }
.tone-bad  .dial-fill { stroke: var(--bad); }

.verdict-badge {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 650; font-size: .88rem;
  padding: .35rem .8rem; border-radius: 100px; border: 1.5px solid currentColor; margin-bottom: .8rem;
}
.tone-good .verdict-badge { color: var(--good); background: var(--good-bg); }
.tone-ok   .verdict-badge { color: var(--ok);   background: var(--ok-bg); }
.tone-warn .verdict-badge { color: var(--warn); background: var(--warn-bg); }
.tone-bad  .verdict-badge { color: var(--bad);  background: var(--bad-bg); }

/* ------------------------------------------------------------------- stats */
.stat-row { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 1.6rem 0; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .9rem 1rem;
}
.stat b { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.stat span { font-size: .82rem; color: var(--text-3); }
.stat.critical b { color: var(--bad); }
.stat.serious  b { color: var(--warn); }
.stat.moderate b { color: var(--ok); }

/* ------------------------------------------------------------------ issues */
.issue {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden;
}
.issue-head { padding: 1.1rem 1.3rem; display: flex; gap: .9rem; align-items: flex-start; flex-wrap: wrap; }
.issue-head h3 { margin: 0; font-size: 1.08rem; flex: 1 1 220px; }
.issue-body { padding: 0 1.3rem 1.3rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }

.pill {
  display: inline-flex; align-items: center; gap: .3rem; flex: none;
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: .25rem .6rem; border-radius: 5px; border: 1px solid currentColor;
}
.pill-critical { color: var(--bad);  background: var(--bad-bg); }
.pill-serious  { color: var(--warn); background: var(--warn-bg); }
.pill-moderate { color: var(--ok);   background: var(--ok-bg); }
.pill-minor    { color: var(--text-2); background: var(--surface-2); }
.pill-quiet    { color: var(--text-2); background: var(--surface-2); font-weight: 600; text-transform: none; letter-spacing: 0; }

.meta-line { font-size: .85rem; color: var(--text-3); display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .4rem; }

.subhead {
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-3); margin: 1.3rem 0 .5rem;
}
.subhead:first-child { margin-top: 0; }

pre {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .85rem 1rem; overflow-x: auto;
  font-family: var(--mono); font-size: .84rem; line-height: 1.55; margin: 0 0 .8rem;
}
code { font-family: var(--mono); font-size: .89em; }
p code, li code, td code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .08em .35em; border-radius: 4px;
}
.code-pair { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .code-pair { grid-template-columns: 1fr; } }
.code-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .35rem; display: block; }
.code-bad  .code-label { color: var(--bad); }
.code-good .code-label { color: var(--good); }
.code-bad  pre { border-left: 3px solid var(--bad); }
.code-good pre { border-left: 3px solid var(--good); }

.affected { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.affected li { font-size: .86rem; }
.affected code { display: block; overflow-x: auto; white-space: pre; padding: .5rem .6rem; }

/* ------------------------------------------------------------------ tables */
/* position:relative makes this a containing block, so absolutely-positioned
   descendants — notably <caption class="sr-only"> — are clipped by the scroll
   container instead of escaping it and widening the whole document. */
.table-scroll { overflow-x: auto; position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); }
/* Focusable so a keyboard can scroll it; visibly so, or the focus vanishes. */
.table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 650; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
tbody tr:last-child td { border-bottom: none; }

/* ----------------------------------------------------------------- pricing */
.price-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; }
.plan-featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.plan .price { font-size: 2.2rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; margin: .6rem 0 .1rem; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.plan .plan-note { font-size: .88rem; color: var(--text-2); min-height: 2.6em; }
.plan ul { list-style: none; padding: 0; margin: 1.1rem 0; display: grid; gap: .55rem; font-size: .93rem; flex: 1; }
.plan li { display: flex; gap: .55rem; align-items: baseline; }
.plan li::before { content: "✓"; color: var(--good); font-weight: 700; flex: none; }
.plan li.no::before { content: "—"; color: var(--text-3); }
.plan li.no { color: var(--text-3); }

/* -------------------------------------------------------------- prose/docs */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .4rem; margin-bottom: 1.2rem; }
.prose blockquote {
  margin: 1.4rem 0; padding: .1rem 0 .1rem 1.1rem;
  border-left: 3px solid var(--border-2); color: var(--text-2); font-style: italic;
}
.toc { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; margin-bottom: 2rem; }
.toc h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); margin: 0 0 .6rem; }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; font-size: .93rem; }

/* ------------------------------------------------------------------- misc */
.grid-2 { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.center { text-align: center; }
.muted { color: var(--text-2); }
.small { font-size: .88rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.section { margin: 3.5rem 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.divider { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

.upsell {
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 1.6rem; margin: 2rem 0;
}
.upsell h2 { margin-top: 0; font-size: 1.25rem; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2.5px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-track { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 100px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 100px; transition: width .4s ease; }

/* ------------------------------------------------------------------ print */
/* Also drives PDF export, which renders this same page through Chromium. */
@media print {
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #f6f5f2; --border: #ccc7bd;
    --text: #000; --text-2: #333; --text-3: #555; --accent: #14392e;
  }
  .site-header, .site-footer, .skip-link, .upsell, form, .btn { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  main { padding: 0; }
  .wrap { width: 100%; }
  .issue, .card, .stat, .table-scroll { break-inside: avoid; page-break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  h2 { margin-top: 1.4rem; }
  pre { white-space: pre-wrap; word-break: break-word; font-size: 8.5pt; }
  .affected code { white-space: pre-wrap; }
  a { color: var(--text); text-decoration: none; }
  .print-only { display: block !important; }
  .table-scroll { overflow: visible; }
}
.print-only { display: none; }

/* -------------------------------------------------------------- account state */
/* "Dashboard" appearing in the nav is too quiet a signal that you are signed in.
   The avatar plus the address makes it unambiguous at a glance. */
.account {
  display: inline-flex; align-items: center; gap: .55rem;
  padding-left: .9rem; margin-left: .2rem;
  border-left: 1px solid var(--border);
}
.account-link {
  display: inline-flex; align-items: center; gap: .45rem;
  text-decoration: none; color: var(--text-2); min-width: 0;
}
.account-link:hover .account-email { color: var(--text); text-decoration: underline; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent);
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; line-height: 1;
}
.account-text { min-width: 0; }
.account-email {
  display: block; font-size: .86rem; font-weight: 500; color: var(--text-2);
  max-width: 17ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.signout-form { margin: 0; display: inline-flex; }
.signout {
  font: inherit; font-size: .84rem; color: var(--text-3);
  background: none; border: 0; padding: .2rem .1rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.signout:hover { color: var(--text); }
.btn-sm { padding: .38rem .85rem; font-size: .88rem; }

@media (max-width: 720px) {
  /* A wrapped nav plus the account block makes the header tall. Sticky would then
     eat most of a phone screen, so let it scroll away instead. */
  .site-header { position: static; }
  .site-header .wrap { flex-wrap: wrap; gap: .4rem 1rem; min-height: 0; padding-block: .7rem; }
  .site-nav { margin-left: 0; width: 100%; gap: .5rem 1.1rem; }
  .site-nav a { font-size: .9rem; }
  .account {
    border-left: 0; border-top: 1px solid var(--border);
    padding-left: 0; padding-top: .55rem; margin-left: 0; margin-top: .1rem;
    width: 100%; justify-content: space-between;
  }
  .account-email { max-width: 22ch; }
  .signout { white-space: nowrap; }
}

/* --------------------------------------------------------------- lead list */
/* A vetting queue is scanned, not read. Each lead collapses to one line
   carrying the only things needed to triage it: score, domain, severity counts
   and the finding. Native details/summary so it works without JavaScript and
   stays keyboard operable. */
/* The row is a flex container: the disclosure grows, the actions sit beside it.
   They are siblings, not nested — a button inside <summary> would nest interactive
   controls and its click would also toggle the row. */
.lead {
  display: flex; align-items: flex-start; gap: .5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: .5rem;
}
.lead-disclosure { flex: 1 1 auto; min-width: 0; }
.lead:has(.lead-disclosure[open]) { box-shadow: var(--shadow); }
.lead-actions {
  flex: none; display: flex; gap: .4rem; align-items: center;
  padding: .55rem .6rem .55rem 0;
}
.lead-actions form { margin: 0; }
@media (max-width: 780px) {
  .lead { flex-wrap: wrap; }
  .lead-disclosure { flex-basis: 100%; }
  .lead-actions { padding: 0 .85rem .7rem; }
}
.lead-head {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  padding: .7rem 1rem .7rem .85rem; cursor: pointer; list-style: none;
  border-radius: var(--radius);
}
.lead-head::-webkit-details-marker { display: none; }
.lead-head::before {
  content: "›"; flex: none; width: 1ch; color: var(--text-3);
  font-size: 1.15rem; line-height: 1; transition: transform .12s ease;
}
.lead-disclosure[open] .lead-head::before { transform: rotate(90deg); }
.lead-head:hover { background: var(--surface-2); }
.lead-head:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
/* When open, the divider must span the whole row — the summary and the actions
   are separate flex children, so both carry it and both share a height. */
.lead-head, .lead-actions { min-height: 3rem; box-sizing: border-box; }
.lead-disclosure[open] .lead-head { border-bottom: 1px solid var(--border); }
.lead-disclosure[open] ~ .lead-actions { border-bottom: 1px solid var(--border); }
@media (max-width: 780px) {
  .lead-disclosure[open] ~ .lead-actions { border-bottom: 0; }
  .lead-actions { min-height: 0; }
}

.lead-domain { font-weight: 600; flex: none; }
.lead-counts {
  font-family: var(--mono); font-size: .8rem; color: var(--text-3); flex: none;
  font-variant-numeric: tabular-nums;
}
.lead-hook {
  color: var(--text-2); font-size: .88rem; flex: 1 1 16rem; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 700px) {
  .lead-hook { flex-basis: 100%; white-space: normal; }
}
.lead-disclosure .issue-body { padding: 1.1rem 1.3rem 1.3rem; }
@media (prefers-reduced-motion: reduce) { .lead-head::before { transition: none; } }

/* ------------------------------------------------------------- lexicon entry
   A dictionary entry, set in the serif that until now was declared and unused.
   The IPA is hidden from assistive tech and paired with a plain respelling —
   read aloud, those glyphs are noise, and an accessibility tool should not
   ship a pronunciation guide that cannot be pronounced. */
.lexicon {
  font-family: var(--serif);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin: 0 0 1.5rem;
}
.lexicon dt { margin: 0 0 .85rem; }
.lex-word {
  display: block;
  font-size: 1.55rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--text);
}
.lex-meta {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .3rem .85rem; margin-top: .35rem;
}
.lex-pron { font-family: var(--mono); font-size: .8rem; color: var(--text-2); }
.lex-region {
  font-family: var(--sans); font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: var(--text-3);
  margin-right: .15rem;
}
.lex-pos { font-style: italic; font-size: .95rem; color: var(--text-2); }
.lexicon dd {
  margin: 0 0 .55rem; padding-left: 1.6rem; text-indent: -1.6rem;
  color: var(--text-2); line-height: 1.62;
}
.lexicon dd:last-child { margin-bottom: 0; }
.lex-num {
  font-variant-numeric: tabular-nums;
  color: var(--text-3); margin-right: .5rem;
}
.lex-field {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent); margin-right: .4rem;
}


/* ============================================================ leads =======
   A work queue and a workbench. The queue is scannable; the workbench holds
   everything about one company so an action never navigates you away from
   what you were part way through. */

.wrap-narrow { max-width: 54rem; }

.queue-tabs {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 1.2rem 0 .6rem; padding: 0;
}
.queue-tab {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .8rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-2);
  text-decoration: none; font-size: .88rem; line-height: 1.2;
}
.queue-tab:hover { border-color: var(--border-2); color: var(--text); }
.queue-tab.is-current {
  background: var(--accent); border-color: var(--accent); color: var(--accent-fg);
}
.queue-tab-count {
  font-variant-numeric: tabular-nums; font-size: .78rem;
  padding: .05rem .4rem; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2);
}
.queue-tab.is-current .queue-tab-count { background: rgba(255,255,255,.22); color: var(--accent-fg); }
.queue-hint { margin: 0 0 1rem; }

.queue-search { display: flex; gap: .5rem; align-items: center; margin: 0 0 1.2rem; flex-wrap: wrap; }
.queue-search input[type="search"] { width: auto; min-width: 14rem; flex: 0 1 20rem; }

.empty-queue { text-align: center; color: var(--text-2); }

.lead-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.lead-row {
  display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap;
  padding: .9rem 0; border-bottom: 1px solid var(--border);
}
.lead-row-main { flex: 1 1 22rem; min-width: 0; }
.lead-row-domain { font-weight: 600; font-size: 1.02rem; }
.lead-row-finding { margin: .2rem 0 .3rem; color: var(--text-2); }
.lead-row-meta { margin: 0; font-size: .82rem; }
.lead-row-actions { display: flex; gap: .4rem; align-items: center; flex: 0 0 auto; flex-wrap: wrap; }
.lead-row-actions form { margin: 0; }

.lead-summary { margin-bottom: 1.6rem; }
.lead-hook { font-size: 1.05rem; margin: 0 0 .6rem; }
.finding-list { margin: .6rem 0 0; padding-left: 0; list-style: none; }
.finding-list li { padding: .25rem 0; font-size: .9rem; color: var(--text-2); }

.people-head { margin: 2rem 0 .3rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }


.msg-body { min-height: 24rem; font-family: var(--mono); font-size: .85rem; }
.sent-body { white-space: pre-wrap; font-size: .8rem; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 34rem) { .field-pair { grid-template-columns: 1fr; } }

.confirm-row { display: flex; gap: .6rem; align-items: flex-start; margin: 0; }
.confirm-row input { width: auto; margin-top: .35rem; flex: none; }
.confirm-row label { font-weight: 450; }

.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-row form { margin: 0; }

.rewrite-row {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin-top: .9rem; font-size: .9rem;
}
/* `width: auto` lets a select grow to its longest option — "Commercial —
   marketing, e-commerce" is 300px, which pushes past a 320px viewport and
   fails 1.4.10 Reflow. Cap it and let the row wrap instead. */
.rewrite-row select { width: auto; max-width: 100%; }
.rewrite-row > * { min-width: 0; }
.rewrite-row label { margin: 0; font-weight: 450; }
.rewrite-row .hint { flex: 1 1 12rem; }

.add-person { margin: 1.2rem 0; }
.outcome-box { margin-top: 2rem; }

/* -------------------------------------------------------------- workbench
   One company, one open message. Three stacked editors was a wall; you only
   ever work on one person at a time, so the rest collapse to a line. */

.crumb { margin: 0 0 .4rem; }
.lead-header { margin: 0 0 1.2rem; }
.lead-header h1 { margin: 0 0 .4rem; }
.score-chip { font-variant-numeric: tabular-nums; }

.findings-fold, .outcome-fold {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: .75rem 1rem; margin: 0 0 1.4rem;
}
.findings-fold > summary, .outcome-fold > summary { cursor: pointer; display: flex; gap: .75rem; align-items: baseline; flex-wrap: wrap; }
.fold-title { flex: 1 1 16rem; }
.fold-more { font-size: .82rem; color: var(--text-3); white-space: nowrap; }
.finding-list { margin: .8rem 0 .4rem; padding: 0; list-style: none; }
.finding-list li { padding: .22rem 0; font-size: .9rem; color: var(--text-2); }
.outcome-fold { margin: 2rem 0 0; }
.verdict-box { margin-bottom: 1.5rem; }

.people { display: flex; flex-direction: column; gap: .4rem; margin: 0 0 1.4rem; }
.person {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  padding: .6rem .85rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: .9rem;
}
a.person:hover { border-color: var(--border-2); }
.person.is-open { border-color: var(--accent); background: var(--accent-soft); }
.person-dot {
  width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--border-2); flex: none;
}
.person-ready { background: var(--accent); }
.person-due   { background: var(--warn); }
.person-draft { background: var(--text-3); }
.person-main { flex: 1 1 12rem; min-width: 0; display: flex; flex-direction: column; }
.person-who { font-weight: 600; }
.person-to { font-size: .8rem; color: var(--text-2); overflow-wrap: anywhere; }
.person-state { font-size: .8rem; color: var(--text-2); }
.person-lang {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  color: var(--text-3); border: 1px solid var(--border); border-radius: 4px;
  padding: .05rem .3rem;
}
.person-add { padding: .6rem .85rem; }
.person-add > summary { cursor: pointer; display: flex; align-items: center; gap: .7rem; color: var(--text-2); }
.person-add .person-dot { background: none; color: var(--text-3); width: auto; height: auto; font-weight: 700; }
.person-limit { margin: .2rem 0 0; }

.composer {
  border: 1px solid var(--border); border-top: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--surface);
  padding: 1.2rem 1.3rem;
}
.composer-waiting, .composer-done { border-top-color: var(--border-2); }
.composer-due { border-top-color: var(--warn); }
.composer-head { margin: 0 0 1.1rem; }
.composer-head h2 { margin: 0 0 .2rem; font-size: 1.15rem; }
.msg-state { font-weight: 600; }
.msg-state-ready { color: var(--accent); }
.msg-state-due { color: var(--warn); }
.msg-state-draft, .msg-state-waiting, .msg-state-done { color: var(--text-3); }

.envelope { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: 0 0 .9rem; font-size: .9rem; }
.envelope dt { color: var(--text-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding-top: .12rem; }
.envelope dd { margin: 0; overflow-wrap: anywhere; }

/* The message as the recipient will meet it: their font, their line length —
   not a monospace textarea. Reading and editing are different jobs. */
.letter {
  white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; margin: 0;
  font-size: .92rem; line-height: 1.6; color: var(--text);
  max-height: 26rem; overflow-y: auto;
}
.letter:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.preview { margin: .4rem 0 1rem; }
.preview-subject { margin: 0 0 .5rem; font-size: .95rem; overflow-wrap: anywhere; }
.preview-key { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-right: .4rem; }
.preview-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 0; font-size: .82rem; }

.msg-body { min-height: 26rem; font-family: var(--mono); font-size: .85rem; }
.btn-quiet { color: var(--text-2); }

/* Starting a company from nothing. The chooser is the page's job here, so it
   gets the room rather than hiding inside a disclosure. */
.blank-start { text-align: left; }
.blank-start h2 { margin: 0 0 .3rem; font-size: 1.15rem; }
.start-form { margin-top: 1rem; max-width: 26rem; }
.start-form select { width: 100%; max-width: 100%; }
