/* Join Worthy visual world: "Disclosure".
   The product discloses evidence and refuses a score, so its visual world comes from the
   standardised disclosure panel (the US Nutrition Facts / Drug Facts label): a clean white
   ground, near-black ink, a heavy-and-thin rule hierarchy, compact condensed headings and a
   plain government sans for everything people read. Public Sans is the US federal design
   system's typeface; Archivo, set heavy and narrow, sets page titles and the panel itself.
   The painted meadow keeps its own colour; the shell's single accent is a meadow green.
   Loaded last on every current page (site, landing and community drafts). Night values are
   the approved moonlit palette and are unchanged. */

:root {
  --paper: light-dark(#f4f6f5, #111a20);
  --raised: light-dark(#ffffff, #18232a);
  --sunk: light-dark(#e8edea, #0d151a);
  --ink: light-dark(#111412, #e6e9df);
  --muted: light-dark(#444d48, #b4bdb6);
  --faint: light-dark(#57615b, #a5afa9);
  --line: light-dark(#d3d9d6, #2a363d);
  --line-strong: light-dark(#98a29d, #3d4a51);
  --accent: light-dark(#1b6a44, #a9c4a6);
  --primary: light-dark(#111412, #d9e3cf);
  --on-primary: light-dark(#ffffff, #111a20);
  --mark: light-dark(#e4f1c8, #3a4520);
  --correction: light-dark(#fdf3d2, #2a2614);
  --response: light-dark(#ecf1f5, #17222c);
  --radius: 4px;
  --dr-radius: 4px;
  --bi-radius: 4px;
  --rule-heavy: 8px;
  --rule-mid: 3px;
  --display: 'Archivo', 'Archivo fallback', 'Arial Narrow', Arial, sans-serif;
  --sans: 'Public Sans', 'Public Sans fallback', system-ui, sans-serif;
  --serif: var(--display);
  --bi-display: var(--display);
  /* Hero tokens (editorial and meadow stylesheets). */
  --canvas: light-dark(#f4f6f5, #111a20);
  --meadow-paper: light-dark(#f4f6f5, #111a20);
  --meadow-field: light-dark(#ffffff, #18232a);
  --meadow-ink: light-dark(#111412, #e6e9df);
  --meadow-secondary: light-dark(#4b544f, #869aa6);
  --meadow-primary: light-dark(#111412, #d9e3cf);
  --meadow-primary-hover: light-dark(#2c3430, #c6d3bb);
  --meadow-focus: light-dark(#1b6a44, #a9c4a6);
  --meadow-control-hover: light-dark(#e6ece9, #162229);
  --meadow-font: var(--sans);
  scrollbar-color: light-dark(#98a29d, #9baeb9) transparent;
}
/* On the landing page the editorial stylesheet uses --paper for raised white, not the ground. */
:root:has(body.editorial) { --paper: light-dark(#ffffff, #18232a); --accent: light-dark(#1b6a44, #a9c4a6); --line: light-dark(#d3d9d6, #242e34); --muted: light-dark(#4b544f, #86949c); }
body.editorial { background: var(--canvas); }
.featured-scene-menu, .scene-fallback > div, .scene-fallback .btn { background: var(--canvas); }

/* ---- Type ------------------------------------------------------------------------------- */
:root { font-family: var(--sans); }
body { font-variant-numeric: normal; }
:where(time, td, th, .counts, .lens-count, .tab-count, .net, .chip-count, .progress-text, .up-count, .down-count, .d-num, .when, .result-summary) { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font-family: inherit; }
h1, .hero-invitation h1 { font-family: var(--display); font-weight: 780; font-stretch: 86%; letter-spacing: -0.006em; word-spacing: .08em; line-height: 1.04; }
h2, h3, .research-context h3, .record-story h3, .coverage-intro h3, .editorial .dialog-header h2, .reading-desk > h2, .section-title-row h2 { font-family: var(--sans); font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.section-head h2, .lp-section h2, .explorer-heading h2, .board-head h2 { font-family: var(--display); font-weight: 750; font-stretch: 88%; letter-spacing: -0.006em; line-height: 1.08; }
.featured-wordmark { font-family: var(--display); font-weight: 700; font-stretch: 90%; letter-spacing: -0.01em; }
.company-logo, .company-logo:is(.blue, .plum, .ochre, .stone), .editorial .company-logo { font-family: var(--display); font-style: normal; font-weight: 700; font-stretch: 90%; letter-spacing: 0; }
/* Labels are written in sentence case, never tracked capitals. */
.ledger thead th, .year-row th, .procedural, .passage figcaption, .toc-title, .ledger td::before, .aside-title, .evidence-label, .locator, .tradeoffs h3 { text-transform: none; letter-spacing: 0; }
.ledger thead th { font-size: 13px; font-weight: 600; color: var(--ink); border-bottom: var(--rule-mid) solid var(--ink); }
.ledger td::before, .locator, .passage figcaption, .toc-title, .aside-title, .evidence-label { font-size: 13px; }
.procedural { font-size: 12px; }

/* ---- Signature: the disclosure rule grammar ------------------------------------------------
   Heavy bar = a new group begins; mid bar = column heads or a summary; hairline = one record. */
.section-head { border-top: var(--rule-heavy) solid var(--ink); padding-top: 12px; }
.dr-list, .nt-list, .mod-work .mod-log { border-top: var(--rule-mid) solid var(--ink); }
.mod-table thead th, .pref-table thead th { color: var(--ink); border-bottom: var(--rule-mid) solid var(--ink); }

/* The disclosure panel: a company's research coverage, lens by lens, with no total. */
.company-top { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 24px 48px; align-items: start; padding: 10px 0 26px; }
.company-top .company-head { padding: 0; border: 0; }
.disclosure { border: 1px solid var(--ink); background: var(--raised); padding: 10px 12px 12px; display: grid; gap: 0; font-size: 14px; line-height: 1.35; }
.disclosure h2 { font-family: var(--display); font-weight: 900; font-stretch: 72%; font-size: 34px; line-height: .98; letter-spacing: -0.01em; }
.disclosure .d-sub { padding: 4px 0 6px; border-bottom: var(--rule-heavy) solid var(--ink); font-size: 13px; }
.disclosure .d-cols { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: var(--rule-mid) solid var(--ink); font-size: 12px; font-weight: 700; }
.disclosure ul { list-style: none; margin: 0; padding: 0; }
.disclosure li { border-bottom: 1px solid var(--line-strong); }
.disclosure li:last-child { border-bottom: var(--rule-mid) solid var(--ink); }
.disclosure li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 6px 0; text-decoration: none; color: var(--ink); }
.disclosure li a:hover .d-lens { text-decoration: underline; text-underline-offset: 3px; }
.disclosure .d-lens { font-weight: 700; }
.disclosure .d-matters { font-weight: 400; }
.disclosure .d-num { font-weight: 700; text-align: right; }
.disclosure .d-gap { color: var(--muted); font-weight: 400; }
.disclosure .d-note { padding-top: 6px; font-size: 12px; line-height: 1.45; color: var(--ink); }
.disclosure .d-note + .d-note { padding-top: 4px; }
@media (max-width: 900px) { .company-top { grid-template-columns: 1fr; } }

/* ---- Controls and surfaces ---------------------------------------------------------------- */
.btn { border-radius: var(--radius); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.lens-summary { border-radius: var(--radius); }
::selection { background: var(--primary); color: var(--on-primary); }
:focus-visible { outline-color: var(--accent); }

/* Touch: breadcrumb and site navigation links get a 44px target without changing the layout. */
@media (pointer: coarse), (max-width: 700px) {
  .crumbs a { display: inline-block; padding-block: 13px; margin-block: -13px; }
  .site-nav a { padding-block: 12px; margin-block: -6px; }
}
.company-main { display: grid; gap: 22px; min-width: 0; }
.company-main .company-search { margin: 0; }
.hero-invitation h1 { font-weight: 720; font-stretch: 92%; letter-spacing: -0.01em; word-spacing: .04em; }

/* Reading: about 75 characters of Public Sans at most; nothing under 12px. */
:where(#main) p, :where(#main) :is(.plain-list, .voting-rules ul, .policy-block ul) > li { max-width: 38em; }
li, dd { text-wrap: pretty; }
.hero-search #hero-search-hint, .hero-invitation .demo-line { font-size: 12px; }
.counts, .event-text { max-width: 38em; }
.counts { max-width: 36em; }
.lp-key > span { font-size: 12px; }

/* Phones: brand and theme toggle share the first row; the three destinations get their own. */
@media (max-width: 700px) {
  .site-header { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding-top: 14px; padding-bottom: 14px; }
  .site-header .brand { white-space: nowrap; }
  .site-header .site-nav { grid-row: 2; grid-column: 1 / -1; gap: 24px; }
  .site-header > .theme-toggle { grid-row: 1; grid-column: 2; }
}
/* Side notes are ruled sections, like every other group on the page. */
.aside-box { border: 0; border-top: var(--rule-mid) solid var(--ink); border-radius: 0; background: none; padding: 10px 0 0; }
/* Phone ledger rows stay hairline records, never cards. */
@media (max-width: 760px) {
  .ledger tbody { border-top: var(--rule-mid) solid var(--ink); }
  .ledger tr { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; margin: 0; padding: 10px 0; }
  .ledger th, .ledger td { padding-inline: 0; }
}

/* Finish-review fixes ------------------------------------------------------------------------ */
/* One corner: nothing rounder than 4px, except true circles (avatars, dots, step numbers). */
.indep, .note-tag, dialog.report-dialog, .inspect, .option-card, .lens-facets a, .review-item,
.form-status, .filter-chips button, .decision > .choice, .diff, .public-preview, .me-finding[data-selected="true"], .reply-simulation,
.passage { border-radius: var(--radius); }
/* Quoted passages and notes are set off by a rule above and an indent, never a side stripe. */
.corroboration { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-strong); padding-top: 6px; }
.passage, .rv-passages blockquote { border-left: 0; border-top: 1px solid var(--line-strong); }
/* Landing on phones: helper text gets its own ground where it meets the painting, and all three destinations are present. */
@media (max-width: 700px) {
  /* One band under the search field: both lines share its left edge and width. */
  .hero-search #hero-search-hint, .hero-invitation .demo-line { display: block; box-sizing: border-box; background: var(--meadow-paper); padding: 4px 8px; margin: 0; border-radius: 0; text-shadow: none; text-align: left; }
  .hero-search #hero-search-hint { width: 100%; }
  .hero-invitation .demo-line { width: auto; margin: 0; padding-top: 0; }
  .quiet-header { flex-wrap: wrap; row-gap: 2px; min-height: 0; }
  .quiet-nav { flex-basis: 100%; gap: 22px; }
  .quiet-nav > a { font-size: 14px; padding-block: 12px; margin-block: -6px; }
  .quiet-nav .desktop-link { display: inline-flex; }
  .quiet-nav .theme-toggle { margin-left: auto; }
}
.req-note { font-size: 13px; color: var(--muted); }
#main :is(input:not([type=checkbox], [type=radio]), textarea, select), .btn, .text-btn { border-radius: var(--radius); }

/* Documenter follow-ups: claim-type "unknown" passes AA on the well; the last stripe, cards and round corners go. */
:root { --t-unknown: light-dark(#5f645b, #aab1aa); }
.evidence-inline { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-strong); padding-top: 6px; }
.lens-directory { gap: 0 32px; }
.lens-directory > li { border: 0; border-top: var(--rule-mid) solid var(--ink); border-radius: 0; background: none; padding: 12px 0 20px; }
.filters form { border: 0; border-block: 1px solid var(--line); border-radius: 0; background: none; padding: 14px 0; }
.header-icon, .editorial #detail, #detail, .editorial .btn, .editorial .icon-btn, .editorial .company-logo { border-radius: var(--radius); }
@media (max-width: 760px) { .support-table tbody { border-top: var(--rule-mid) solid var(--ink); } .support-table tr { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; margin: 0; padding: 10px 0; } }

/* Audit fixes (Impeccable audit, Hallmark audit, Stageshow checks) ------------------------------ */
:root {
  --field-edge: light-dark(#7a847f, #66767f);          /* control edges at 3:1 or better on field and ground, day and night */
  --primary-pressed: light-dark(#2c3430, #c6d3bb);
  --on-dark-focus: #e6e9df;                           /* the prototype bar is dark in both themes */
}
:where(#main) :is(input:not([type=checkbox], [type=radio], [type=range]), select, textarea):not(#hero-query) { border-color: var(--field-edge); }
::placeholder { color: var(--faint); opacity: 1; }
.proto-bar :focus-visible { outline-color: var(--on-dark-focus); }
/* Pressed states, instant, without motion. */
.btn:active { background-color: var(--sunk); }
.btn.primary:active { background-color: var(--primary-pressed); border-color: var(--primary-pressed); }
.text-btn:active { color: var(--ink); text-decoration-color: currentColor; }
/* 12px is the floor: small claim tags and the landing's helper lines. */
.type.small:not(.mark-only) { font-size: 12px; }
.hero-search label, #meadow-instructions, .featured-ticker-toggle span, .lp-fiction { font-size: 12px; }
/* Phones: the theme toggle goes back beside the brand, so four destinations keep one row of their own. */
@media (max-width: 700px) {
  .site-header { position: relative; }
  .site-header .site-nav > .theme-toggle { position: absolute; top: 10px; right: var(--toggle-inset, 18px); }
  .quiet-header { position: relative; }
  .quiet-nav .theme-toggle { position: absolute; top: 12px; right: 18px; margin-left: 0; }
}
h1, h2 { text-wrap: balance; }
