/* ScamLingua — scamlingua.org
   Light/dark theming via CSS custom properties on html[data-theme].
   Default follows the visitor's OS preference; toggle persists choice. */

:root,
html[data-theme="light"] {
  /* Palette drawn from both institutions: ODU slate & sky blues, CNU navy & silver, small academic-gold accent */
  --ink:#122A40;        /* deep university navy — headings */
  --body:#3D4B5C;       /* slate — body text */
  --muted:#6B6F63;      /* warm gray-slate */
  --accent:#2E6DA4;     /* primary blue accent */
  --accent-dark:#1F4E79;
  --gold:#8A6B1F;       /* decorative gold — rules, bars, focus rings, borders only */
  --gold-ink:#5C4512;   /* gold for TEXT — see the ink-token note below */
  --muted-ink:#455060;  /* muted for TEXT — slate, NOT a darkened --muted (see note) */
  --link:#1F4E79;
  --paper:#F3F0E7;      /* warm parchment — main background */
  --card:#FBF8F0;       /* ivory — header, footer, cards */
  --line:#DFD8C6;       /* warm hairlines */
  --badge-bg:#E7F0F7;   /* sky-blue tint — disclosure stays the trust element */
}

html[data-theme="dark"] {
  --ink:#E6EEF6;
  --body:#B7C5D5;
  --muted:#7F93A8;
  --accent:#6FA8DC;
  --accent-dark:#8FBCE8;
  --gold:#D6B76A;
  --gold-ink:#D6B76A;   /* already 7.7–9.3:1 on the navy surfaces — no deepening needed */
  --muted-ink:#9AAFC4;
  --link:#8FBCE8;
  --paper:#0D1726;
  --card:#142235;
  --line:#263A52;
  --badge-bg:#14283D;
}

/* ---------- Why there are separate "ink" tokens ----------
   Gold is a fine decorative color and a poor text color on a near-white page.
   On the light surfaces, --gold (#8A6B1F) measures 4.71:1 on --card, 4.38:1 on
   --paper and 4.33:1 on --badge-bg — at or under the 4.5:1 AA floor, and it was
   carrying the *smallest* type on the site (11px mono, uppercase, weight 400–500).
   Borderline contrast on tiny tracked-out monospace is what made the labels read
   as thin and washed out. --muted (#6B6F63) sat in the same band: 4.46–4.85:1.

   Rather than darken --gold and --muted globally — which would also darken every
   hairline, bar and focus ring and change the page's whole temperature — text use
   is split onto its own tokens. Decoration keeps the original values; text gets
   deeper ones. Light: --gold-ink 7.86–8.55:1, --muted-ink 7.09–7.70:1.
   Dark was already comfortable (gold 7.74–9.28:1) and is left on the same hue;
   only --muted-ink is lifted, from 4.74–5.69:1 to 6.64–7.97:1.

   --muted-ink is a SLATE, not a darkened --muted. --muted is warm (hue 80deg,
   yellow-green) because it belongs to the parchment/hairline family. Darkening it
   in place kept that cast, so the footer and captions read visibly gold-tinted
   against the page's cool slate body copy. --muted-ink is pulled onto --body's hue
   instead (216deg vs --body's 213deg) at lower saturation — it now reads as a
   lighter sibling of the body text rather than a different, warmer ink.

   Rule of thumb: --gold/--muted for anything you cannot read; --gold-ink/--muted-ink
   for anything you can.
   ---------------------------------------------------------- */

/* ---------- Type scale ----------
   Every piece of PROSE AND UI TEXT resolves to one of these five steps, so
   secondary text in one section cannot drift a half-step away from secondary
   text in another. Before this the page used .7/.75/.8125/.875/.9375/1/1.0625/
   1.125rem with no rule about which meant what, and near-identical sizes landed
   on elements of equal rank (the eyebrow at .75rem beside sibling labels at .7rem).

   Deliberately outside the scale, and staying that way:
     h1 (clamp) and h2 (1.375rem) — serif display type, sized against the layout
       rather than the body copy;
     #theme-toggle (1.05rem)      — sizes a glyph, not text;
     .sample-record (.8125rem)    — preformatted code whose line width drives
       horizontal overflow, so it is sized against its container.

   --fs-label  mono micro-labels ONLY (uppercase kickers and field labels)
   --fs-fine   fine print: captions, footer meta, citation block
   --fs-small  secondary body: trust strip, callouts, footer prose
   --fs-base   body copy
   --fs-lead   lead-ins: subhead, response note

   Rank is carried by color and weight, not by size — hence the deliberately
   tight steps at the top of the scale. Mobile shifts the tokens, not the rules. */
:root{
  --fs-label:.8125rem;
  --fs-fine:.9375rem;
  --fs-small:1rem;
  --fs-base:1.0625rem;
  --fs-lead:1.125rem;
}

/* If no stored choice and no data-theme set yet, follow the OS */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --ink:#E6EEF6; --body:#B7C5D5; --muted:#7F93A8;
    --accent:#6FA8DC; --accent-dark:#8FBCE8; --gold:#D6B76A; --link:#8FBCE8;
    --gold-ink:#D6B76A; --muted-ink:#9AAFC4;
    --paper:#0D1726; --card:#142235; --line:#263A52; --badge-bg:#14283D;
  }
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *{transition:none !important}
}
body{
  background:var(--paper);
  color:var(--body);
  font-family:"Source Sans 3",system-ui,-apple-system,sans-serif;
  font-size:var(--fs-base);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  transition:background-color .2s ease,color .2s ease;
}
a{color:var(--link);text-decoration-thickness:1px;text-underline-offset:3px;padding:.12rem 0}
a:hover{color:var(--accent);text-decoration-color:var(--gold);text-decoration-thickness:2px}
a:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px}

.wrap{max-width:46rem;margin:0 auto;padding:0 1.25rem}

/* ---------- Skip link (accessibility) ---------- */
.skip-link{
  position:absolute;left:.75rem;top:.75rem;z-index:1000;
  background:var(--ink);color:var(--paper);
  font-family:"Source Sans 3",system-ui,sans-serif;font-weight:600;
  padding:.6rem 1rem;border-radius:6px;text-decoration:none;
  transform:translateY(-180%);
  transition:transform .15s ease;
}
.skip-link:focus{transform:translateY(0);outline:2px solid var(--gold);outline-offset:2px}
main:focus-visible{outline:none}   /* programmatic focus target — no visible ring */

/* ---------- Primary call-to-action ---------- */
.cta-row{margin:0 0 1.5rem}
.cta{
  display:inline-block;
  background:var(--ink);color:var(--card);
  font-family:"Source Sans 3",system-ui,sans-serif;font-weight:600;font-size:var(--fs-small);
  text-decoration:none;
  padding:.7rem 1.3rem;border-radius:8px;border:1px solid var(--ink);
  transition:box-shadow .15s ease,transform .15s ease;
}
.cta:hover{color:var(--card);box-shadow:0 0 0 3px var(--gold);transform:translateY(-1px)}
.cta:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* ---------- Theme toggle ---------- */
#theme-toggle{
  float:right;
  margin:-1.25rem -.25rem 0 1rem;
  background:var(--card);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:999px;
  min-width:44px;min-height:44px;   /* touch target */
  padding:.4rem .7rem;
  font-size:1.05rem;line-height:1;
  cursor:pointer;
}
#theme-toggle:hover{border-color:var(--gold)}
#theme-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
/* Show the icon for the mode you'd switch TO */
html[data-theme="dark"] .icon-dark{display:none}
html[data-theme="dark"] .icon-light{display:inline}
html[data-theme="light"] .icon-light{display:none}
html[data-theme="light"] .icon-dark{display:inline}
html:not([data-theme]) .icon-light{display:none}
@media (prefers-color-scheme: dark){
  html:not([data-theme]) .icon-dark{display:none}
  html:not([data-theme]) .icon-light{display:inline}
}

/* ---------- Brand logo ---------- */
.brand{margin:0 0 1.4rem}
.brand img{display:block;height:52px;width:auto;max-width:100%}
html[data-theme="dark"] .logo-light{display:none}
html[data-theme="light"] .logo-dark{display:none}
html:not([data-theme]) .logo-dark{display:none}
@media (prefers-color-scheme: dark){
  html:not([data-theme]) .logo-light{display:none}
  html:not([data-theme]) .logo-dark{display:block}
}

/* ---------- Hero: the disclosure IS the hero ---------- */
header{padding:3.5rem 0 2.75rem;border-bottom:1px solid var(--line);background:var(--card)}
.eyebrow{
  font-family:"IBM Plex Mono",monospace;
  font-size:var(--fs-label);letter-spacing:.06em;text-transform:uppercase;
  font-weight:600;
  color:var(--gold-ink);margin-bottom:1rem;
}
h1{
  font-family:"Source Serif 4",Georgia,serif;
  font-weight:700;color:var(--ink);
  font-size:clamp(1.6rem,4.5vw,2.5rem);
  line-height:1.2;letter-spacing:-.01em;
  margin-bottom:1.1rem;
}
h1::after{
  content:"";
  display:block;
  width:4.5rem;height:4px;
  background:var(--gold);
  border-radius:2px;
  margin-top:.75rem;
}
.subhead{font-size:var(--fs-lead);max-width:40rem;margin-bottom:1.5rem}
.subhead strong{color:var(--ink)}

.synthetic-notice{
  border:1px solid var(--accent);
  border-left:5px solid var(--accent);
  background:var(--badge-bg);
  border-radius:6px;
  padding:1rem 1.25rem;
  margin-bottom:1.5rem;
  color:var(--ink);
  font-weight:600;
  font-size:var(--fs-base);
}
.synthetic-notice .label{
  display:block;
  font-family:"IBM Plex Mono",monospace;
  font-size:var(--fs-label);letter-spacing:.06em;text-transform:uppercase;
  color:var(--gold-ink);font-weight:600;margin-bottom:.35rem;
}

.trust{
  display:flex;flex-wrap:wrap;gap:1rem 1.75rem;
  font-size:var(--fs-small);color:var(--muted-ink);
  padding-top:1.25rem;border-top:1px dashed var(--line);
}
/* Weight 500, not the 600 used by callout .labels above. Deliberate, not drift:
   these are dl field labels naming the content beneath them, so they sit a step
   below a callout's own heading. Same family, size, tracking and color — weight
   is the only variable carrying the rank. */
.trust dt{
  font-family:"IBM Plex Mono",monospace;
  font-size:var(--fs-label);letter-spacing:.06em;text-transform:uppercase;
  font-weight:500;
  color:var(--gold-ink);margin-bottom:.15rem;
}
.trust dd{color:var(--body);overflow-wrap:break-word}
.trust ul{list-style:disc;margin:.3rem 0 0 1.05rem;padding:0}
.trust li{margin-bottom:.45rem;line-height:1.6}
.trust li::marker{color:var(--gold)}
.trust > div{min-width:15rem;flex:1}

/* ---------- Body sections ---------- */
main{padding:2.5rem 0}
section{margin-bottom:2.5rem}
h2{
  font-family:"Source Serif 4",Georgia,serif;
  font-weight:600;color:var(--ink);
  font-size:1.375rem;margin-bottom:.75rem;
}
main h2::after{
  content:"";
  display:block;
  width:2.5rem;height:3px;
  background:var(--gold);
  border-radius:2px;
  margin-top:.45rem;
}
p + p{margin-top:.75rem}

/* Scope-and-standing note. Deliberately quieter than .synthetic-notice —
   it sets expectations, it isn't the hero claim. */
.status-notice{
  background:var(--card);
  border:1px solid var(--line);
  border-left:4px solid var(--muted);
  border-radius:6px;
  padding:1rem 1.25rem;
  margin-bottom:2.5rem;
  font-size:var(--fs-small);
  line-height:1.65;
  color:var(--body);
}
.status-notice .label{
  display:block;
  font-family:"IBM Plex Mono",monospace;
  font-size:var(--fs-label);letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted-ink);font-weight:600;margin-bottom:.35rem;
}
.status-notice strong{color:var(--ink);font-weight:600}

.request-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:8px;
  padding:1.5rem 1.5rem 1.4rem;
}
.request-card ol{margin:.6rem 0 0 1.25rem}
.request-card li{margin-bottom:.4rem}
.request-card li::marker{color:var(--gold-ink);font-weight:600} /* numerals are read, not decorative */
.verification-note{
  font-size:var(--fs-small);
  color:var(--body);
  margin-top:1rem;
  line-height:1.6;
  padding:.8rem 1.1rem;
  background:var(--badge-bg);
  border:1px solid var(--line);
  border-left:4px solid var(--accent);
  border-radius:6px;
}
.verification-note strong{color:var(--ink)}
.response-note{
  font-size:var(--fs-lead);  /* one step above body so it stands out */
  font-weight:600;
  text-align:center;
  color:var(--ink);          /* full-contrast so the expectation is hard to miss */
  margin-top:1.25rem;
  line-height:1.55;
  padding:.9rem 1.1rem;
  background:var(--paper);
  border:1px solid var(--line);
  border-left:4px solid var(--gold);
  border-radius:6px;
}

.citation-block{
  font-family:"IBM Plex Mono",monospace;
  font-size:var(--fs-fine);line-height:1.6;
  background:var(--paper);
  border:1px solid var(--line);
  border-left:4px solid var(--gold);
  border-radius:6px;
  padding:1rem 1.25rem;
  margin-top:.75rem;
  color:var(--ink);
  overflow-wrap:break-word;
}
.citation-block strong{font-weight:500} /* Plex Mono 500 reads as bold at this size */

/* ---------- Pipeline methodology figure ---------- */
/* Diagram is composited on white so it stays legible in both light and dark themes. */
.pipeline-figure{margin:1.25rem 0 .25rem}
.pipeline-figure img{
  display:block;width:100%;height:auto;
  background:#fff;border:1px solid var(--line);border-radius:8px;padding:.75rem;
}
.pipeline-figure figcaption{
  font-size:var(--fs-fine);color:var(--muted-ink);margin-top:.6rem;line-height:1.6;
}

/* ---------- Footer fine print ---------- */
footer{
  border-top:1px solid var(--line);
  background:var(--card);
  padding:2.25rem 0 3rem;
  font-size:var(--fs-small);color:var(--muted-ink);
}
/* One step above the footer prose it heads (--fs-base over --fs-small). Was 1rem
   against .875rem body; footer prose has since moved up to 1rem, so this moved
   with it — a heading matching its own body text reads as a bold sentence. */
footer h2{font-size:var(--fs-base);font-family:"Source Sans 3",sans-serif;font-weight:600;color:var(--ink);margin-bottom:.5rem}
footer h2::before{
  content:"";
  display:inline-block;
  width:.65rem;height:2px;
  background:var(--gold);
  border-radius:1px;
  vertical-align:middle;
  margin-right:.5rem;
}
footer section{margin-bottom:1.5rem}
footer p + p{margin-top:.5rem}
footer p{line-height:1.75}
.footer-meta{padding-top:1.25rem;border-top:1px dashed var(--line);font-size:var(--fs-fine)}
.footer-meta strong{color:var(--ink)}

/* ---------- Mobile refinements ---------- */
@media (max-width: 480px){
  /* Shift the scale, not the rules: every size steps down together, so the
     relationships set above survive the breakpoint. Previously body, .subhead
     and .citation-block were each overridden by hand here, which is how sizes
     drift apart — one gets adjusted, its siblings don't. --fs-label holds at
     13px; shrinking uppercase mono further is what caused the original problem. */
  :root{
    --fs-fine:.875rem;
    --fs-small:.9375rem;
    --fs-base:1rem;
    --fs-lead:1.0625rem;
  }
  header{padding:2.5rem 0 2rem}
  .brand img{height:38px}
  #theme-toggle{margin-top:-.75rem}
  .trust{flex-direction:column;gap:1rem}
  .trust > div{min-width:0}
  .request-card{padding:1.25rem 1.1rem}
  .status-notice{padding:.9rem 1rem;margin-bottom:2rem}
}

/* ---------- Print ---------- */
@media print{
  #theme-toggle,.skip-link,.cta{display:none}
  body{background:#fff;color:#000}
  header,footer,.request-card,.status-notice{background:#fff}
  a{color:#000;text-decoration:underline}
}

/* ---------- Sample record (metadata-only excerpt) ---------- */
.sample-record{
  font-family:"IBM Plex Mono",monospace;
  font-size:.8125rem;line-height:1.7;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:8px;
  padding:1.1rem 1.25rem;
  margin-top:.75rem;
  color:var(--body);
  overflow-x:auto;
  white-space:pre;
}
.sample-record .k{color:var(--accent-dark)}
.sample-record .v{color:var(--ink)}
.sample-caption{
  font-size:var(--fs-fine);color:var(--muted-ink);margin-top:.5rem;line-height:1.6;
}
@media (max-width:480px){ .sample-record{font-size:.75rem;padding:.9rem .8rem} }
