/* ============================================================
   RetrainMap — instrument-panel design system  (identity v2)
   Dark instrument ground #101418 · route-green #3FAE7C
   The motif: a route map — source node, orthogonal routes,
   priced endpoints. Interiors are the first-class cabin:
   same identity as the homepage cinema, calmer, legible.
   No external requests: system font stacks, inline SVG texture.
   ============================================================ */

:root {
  --paper: #101418;            /* instrument ground */
  --panel: #151B21;            /* raised card */
  --panel-2: #1A222B;          /* higher elevation */
  --well: #0C1014;             /* recessed (footer, code wells) */
  --ink: #E9EEF1;              /* primary text */
  --ink-2: #A9B4BD;            /* secondary text */
  --ink-3: #7D8994;            /* tertiary / annotations — lifted from #75818C for WCAG AA
                                  (≥4.5 vs ground, panel, and the sticky ledger-header fill) */
  --route: #3FAE7C;            /* route green — the brand accent */
  --route-ink: #5FC493;        /* brighter green (hover, endpoints) */
  --on-route: #081710;         /* text set on green */
  --survey: #82AFD6;           /* links — instrument blue */
  --olive: #A9C46F;            /* positive readings */
  --slate: #5C6C7C;            /* secondary route / dead ends */
  --amber: #D9A054;            /* cautions — retired, flagged */
  --rule: #212932;             /* hairlines */
  --rule-2: #33404B;           /* stronger hairlines */
  --focus: #3FAE7C;
  --paper-contour: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M56 .5H.5V56' fill='none' stroke='%23161C23' stroke-width='1'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-color: var(--rule-2) var(--paper); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 480px at 50% -180px, rgba(63, 174, 124, 0.05), transparent 70%),
    var(--paper-contour);
  color: var(--ink);
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.f-display, h1, h2, h3, .btn, .navbar, .chip, .wp-marker {
  font-family: "Avenir Next", Avenir, "Franklin Gothic Medium", "Arial Nova", "Segoe UI", ui-sans-serif, -apple-system, sans-serif;
}
.f-mono, code, .ledger, .stat-num, .src, .scale-label, .coords {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Cascadia Mono", "Liberation Mono", monospace;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.012em; margin: 0 0 0.6rem; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.13rem; letter-spacing: 0.01em; }
p  { margin: 0.65rem 0 1rem; }
a  { color: var(--survey); text-decoration-color: color-mix(in srgb, var(--survey) 40%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--route-ink); text-decoration-color: color-mix(in srgb, var(--route) 55%, transparent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
strong { font-weight: 700; }
small { color: var(--ink-2); }
::selection { background: color-mix(in srgb, var(--route) 32%, transparent); }
li::marker { color: var(--route); }        /* node bullets — quiet signature */

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.2rem); }

/* ---------- header — animated on entry, route underline ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: rgba(16, 20, 24, 0.88);   /* plain fallback for engines without color-mix() */
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 40;
}
.masthead.scrolled { border-bottom-color: var(--rule-2); box-shadow: 0 12px 28px -22px rgba(0, 0, 0, 0.95); }
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--route) 0%, var(--route) 16%,
              color-mix(in srgb, var(--route) 40%, transparent) 42%, transparent 72%);
  transform-origin: 0 50%; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .masthead { animation: rm-mast 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  .masthead::after { animation: rm-draw 1.1s 0.12s cubic-bezier(0.22, 0.61, 0.21, 1) both; }
}
@keyframes rm-mast { from { opacity: 0; transform: translateY(-10px); } }
@keyframes rm-draw { from { transform: scaleX(0); } }

.navbar { display: flex; align-items: center; gap: 1rem; padding-block: 0.7rem; font-size: 0.86rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em; }
.brand svg { flex: none; }
.brand .rm-map { color: var(--route); }
.brand [stroke="#B34712"] { stroke: var(--route); }   /* recolor legacy inline mark */
.navlinks { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.15rem 1.05rem; }
.navlinks a { color: var(--ink-2); text-decoration: none; text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.72rem; font-weight: 600; padding: 0.3rem 0; }
.navlinks a:hover { color: var(--route-ink); }
.navlinks a.cur { color: var(--route); box-shadow: inset 0 -2px 0 var(--route); }

/* ---------- buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.72rem 1.25rem; border-radius: 4px; border: 1.5px solid var(--rule-2); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.015em; text-decoration: none; cursor: pointer; }
.btn-route { background: var(--route); border-color: var(--route); color: var(--on-route); box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--route) 62%, transparent); }
.btn-route:hover { background: var(--route-ink); border-color: var(--route-ink); color: var(--on-route); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--route); color: var(--route-ink); }

.chip { display: inline-block; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 3px; padding: 0.14rem 0.5rem; background: color-mix(in srgb, var(--panel-2) 72%, transparent); }
.chip-route { color: var(--route-ink); border-color: color-mix(in srgb, var(--route) 50%, transparent); background: color-mix(in srgb, var(--route) 9%, transparent); }
.chip-olive { color: var(--olive); border-color: color-mix(in srgb, var(--olive) 45%, transparent); background: color-mix(in srgb, var(--olive) 8%, transparent); }

.src { font-size: 0.72rem; color: var(--ink-3); letter-spacing: 0.01em; }
.src a { color: inherit; }
.asof { white-space: nowrap; }

/* ---------- hero (homepage shell) ---------- */
.hero { padding: clamp(2.6rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.4rem); position: relative; overflow: hidden; }
.hero .kicker { margin-bottom: 1.1rem; display: flex; align-items: center; gap: 0.7rem; }
.hero .kicker::after { content: ""; height: 1px; width: 6rem; background: var(--route); opacity: 0.5; }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { font-size: clamp(1.05rem, 2.2vw, 1.22rem); max-width: 44rem; color: var(--ink-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0 1.4rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; }
.reveal > * { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.reveal > *:nth-child(2) { animation-delay: 0.08s; }
.reveal > *:nth-child(3) { animation-delay: 0.16s; }
.reveal > *:nth-child(4) { animation-delay: 0.24s; }
.reveal > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- kickers — source-node signature ---------- */
.kicker { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--route); font-weight: 700; font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; }
.kicker::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  border: 2px solid var(--route); margin-right: 0.6rem; vertical-align: 0.08em;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--route) 16%, transparent);
}
.hero .kicker::before { display: none; }   /* homepage hero keeps its own line */

/* ---------- page heads — the route draws itself under the title ---------- */
.pagehead h1::after, main.wrap > h1::after {
  content: ""; display: block; height: 9px; width: min(11rem, 46%); margin-top: 0.85rem;
  background:
    radial-gradient(circle 4.5px at calc(100% - 5px) 50%, var(--route-ink) 96%, transparent) no-repeat,
    linear-gradient(90deg, var(--route), color-mix(in srgb, var(--route) 6%, transparent) 94%) left 50% / calc(100% - 14px) 2px no-repeat;
  transform-origin: 0 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .pagehead h1::after, main.wrap > h1::after { animation: rm-draw 0.9s 0.2s cubic-bezier(0.22, 0.61, 0.21, 1) both; }
}

/* ---------- scale bar divider ---------- */
.scalebar { display: flex; align-items: flex-end; gap: 0; margin: 0.4rem 0 0; }
.scalebar i { height: 7px; width: clamp(34px, 8vw, 74px); background: var(--ink-2); display: block; border: 1px solid var(--ink-2); }
.scalebar i:nth-child(even) { background: var(--paper); }
.scale-label { font-size: 0.66rem; color: var(--ink-3); margin-left: 0.8rem; letter-spacing: 0.08em; }

/* ---------- waypoint sections ---------- */
.route-line { position: relative; }
.wp { position: relative; padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(1.6rem, 4vw, 2.6rem); border-top: 1px solid var(--rule); }
.wp-head { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 0.9rem; }
.wp-marker { flex: none; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--rule-2); padding: 0.24rem 0.55rem; border-radius: 3px; position: relative; top: -0.2rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.wp-marker.is-route { background: color-mix(in srgb, var(--route) 14%, var(--panel)); color: var(--route-ink); border-color: color-mix(in srgb, var(--route) 45%, transparent); }
.wp h2 { margin-bottom: 0; }
.wp .deck { color: var(--ink-2); max-width: 46rem; font-size: 1.06rem; }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: clamp(1rem, 3vw, 1.6rem); }
.panel-tight { padding: 0.9rem 1.1rem; }
.panel-route { border-left: 3px solid var(--route); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }

/* ---------- stats — instrument dials ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.stat { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--rule); border-radius: 6px; padding: 1.1rem 1.2rem 1rem; position: relative; }
.stat::before { content: ""; position: absolute; inset: 6px; border: 1px dashed color-mix(in srgb, var(--rule-2) 70%, transparent); border-radius: 3px; pointer-events: none; }
.stat-num { font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 700; color: var(--route-ink); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-what { font-size: 0.86rem; color: var(--ink-2); margin-top: 0.5rem; line-height: 1.45; }

/* ---------- ledgers (route tables) ---------- */
.scroll-x { overflow: auto; border: 1px solid var(--rule); border-radius: 6px;
  background:
    linear-gradient(90deg, var(--panel) 42%, transparent) left/34px 100% no-repeat,
    linear-gradient(270deg, var(--panel) 42%, transparent) right/34px 100% no-repeat,
    radial-gradient(farthest-side at 0 50%, rgba(2, 6, 10, 0.62), transparent) left/16px 100% no-repeat,
    radial-gradient(farthest-side at 100% 50%, rgba(2, 6, 10, 0.62), transparent) right/16px 100% no-repeat,
    var(--panel);
  background-attachment: local, local, scroll, scroll; }
.scroll-x.rm-tall { max-height: min(76vh, 860px); }
.scroll-x::-webkit-scrollbar { height: 10px; width: 10px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 5px; }
.scroll-x::-webkit-scrollbar-track { background: transparent; }
.ledger { border-collapse: collapse; width: 100%; font-size: 0.83rem; min-width: 640px; }
.ledger caption { text-align: left; padding: 0.8rem 1rem 0.4rem; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.ledger caption::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--route); margin-right: 0.55rem; vertical-align: 0.1em; }
.ledger th { text-align: left; font-weight: 600; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); padding: 0.55rem 0.9rem; position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--panel-2) 94%, var(--paper)); box-shadow: 0 1.5px 0 var(--rule-2); text-wrap: balance; }
.ledger td { padding: 0.55rem 0.9rem; border-bottom: 1px solid color-mix(in srgb, var(--rule) 80%, transparent); vertical-align: top; }
.ledger tr:last-child td { border-bottom: none; }
.ledger tbody tr:hover td { background: color-mix(in srgb, var(--route) 6%, transparent); }
.ledger tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--route); }
.ledger .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger .num .src, .ledger .num div { white-space: normal; }  /* annotations inside numeric cells wrap */
.ledger .pos { color: var(--olive); font-weight: 700; }
.ledger .neg { color: var(--ink-3); }
.ledger .occ { font-family: "Avenir Next", Avenir, "Franklin Gothic Medium", "Segoe UI", sans-serif; font-weight: 600; font-size: 0.87rem; color: var(--ink); }
.ledger .note-row td { border-bottom: none; padding-top: 0.2rem; }

/* the credential registry is the widest instrument on the site —
   let it break out of the column on large screens */
@media (min-width: 1120px) {
  .scroll-x:has(#regtable) { width: min(94vw, 1360px); margin-left: calc(50% - min(47vw, 680px)); }
}

/* report-specimen tables are prose instruments: compress to the frame,
   wrap text — never clip a reading behind a horizontal scroll */
.report-frame .ledger { min-width: 100%; }
.report-frame .ledger td.num { white-space: normal; }
.report-frame .scroll-x { border: 1px solid var(--rule); }

/* status flags (embedded .pill-flag styles point at --route, which was
   a caution color in identity v1; cautions read amber on the instrument) */
span.pill-flag { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 55%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent); }

/* exposure meters — injected marks beside percentile readings.
   The brighter notch is the median (50th pctl): a reading's distance
   past the notch is the story every caption tells in numbers. */
.xm { display: inline-block; inline-size: 3.3rem; block-size: 5px; border-radius: 2.5px; margin-left: 0.55rem; vertical-align: 0.12em; color: var(--ink-3);
      background:
        linear-gradient(90deg, transparent calc(50% - 1px), var(--ink-2) calc(50% - 1px), var(--ink-2) calc(50% + 1px), transparent calc(50% + 1px)),
        linear-gradient(90deg, currentColor calc(var(--p) * 1%), color-mix(in srgb, currentColor 14%, transparent) calc(var(--p) * 1%)); }
.pill .xm { color: inherit; display: block; inline-size: 3.3rem; margin: 0.3rem 0 0.1rem; }

/* ---------- honesty banner ---------- */
.honest { border: 1px solid var(--rule-2); border-left: 3px solid var(--route); border-radius: 6px; padding: 1rem 1.2rem; background: var(--panel-2); display: flex; gap: 0.9rem; align-items: flex-start; }
.honest .glyph { flex: none; width: 26px; height: 26px; margin-top: 0.15rem; color: var(--route-ink); }
.honest p { margin: 0; font-size: 0.97rem; }

/* ---------- legend / trust block ---------- */
.legend { border: 1px solid var(--rule-2); border-radius: 6px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); padding: clamp(1.1rem, 3vw, 1.7rem); position: relative; }
.legend::before { content: "MAP LEGEND — HOW TO READ US"; position: absolute; top: -0.72rem; left: 1rem; background: var(--paper); border: 1px solid var(--rule-2); border-radius: 3px; padding: 0.1rem 0.6rem; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.62rem; letter-spacing: 0.16em; color: var(--route-ink); }
.legend dl { margin: 0.4rem 0 0; display: grid; gap: 0.85rem; }
.legend dt { font-weight: 700; font-family: "Avenir Next", Avenir, "Franklin Gothic Medium", "Segoe UI", sans-serif; font-size: 0.95rem; display: flex; gap: 0.55rem; align-items: baseline; color: var(--ink); }
.legend dt .key { flex: none; display: inline-block; width: 1.5rem; text-align: center; color: var(--route); font-family: ui-monospace, Menlo, monospace; }
.legend dd { margin: 0.15rem 0 0 2.05rem; color: var(--ink-2); font-size: 0.93rem; }
.legend blockquote { margin: 0.4rem 0 0; padding: 0.5rem 0.9rem; border-left: 3px solid var(--survey); background: color-mix(in srgb, var(--survey) 8%, transparent); font-style: italic; font-size: 0.92rem; }

/* ---------- FAQ ---------- */
details { border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); margin-bottom: 0.6rem; }
details[open] { border-color: var(--rule-2); }
summary { cursor: pointer; padding: 0.85rem 1.1rem; font-weight: 700; font-family: "Avenir Next", Avenir, "Franklin Gothic Medium", "Segoe UI", sans-serif; font-size: 0.97rem; list-style: none; display: flex; gap: 0.7rem; align-items: baseline; color: var(--ink); }
summary:hover { color: var(--route-ink); }
summary::before { content: "+"; color: var(--route); font-family: Menlo, monospace; font-weight: 700; }
details[open] summary::before { content: "−"; }
summary::-webkit-details-marker { display: none; }
details .body { padding: 0 1.1rem 1rem 2.35rem; color: var(--ink-2); font-size: 0.97rem; }

/* ---------- pricing ---------- */
.price-card { border: 1px solid var(--rule-2); background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-radius: 8px; padding: clamp(1.2rem, 3.5vw, 2rem); position: relative; box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.9); overflow: hidden; }
.price-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--route), color-mix(in srgb, var(--route) 10%, transparent) 70%); }
.price-num { font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.price-num .cur { font-size: 0.5em; vertical-align: 0.6em; color: var(--route); }
.price-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.96rem; }
.price-list li { padding-left: 1.5rem; position: relative; }
.price-list li::before { content: "→"; position: absolute; left: 0; color: var(--route); font-family: Menlo, monospace; }
.slot-note { display: inline-block; margin-top: 0.6rem; border: 1.5px dashed var(--route); color: var(--route-ink); border-radius: 3px; padding: 0.3rem 0.6rem; font-family: Menlo, ui-monospace, monospace; font-size: 0.7rem; letter-spacing: 0.06em; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.1rem 0.9rem; position: relative; }
.steps li::before { content: "0" counter(step); font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--route); font-size: 1.5rem; display: block; margin-bottom: 0.35rem; }
.steps h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.steps p { margin: 0; font-size: 0.92rem; color: var(--ink-2); }

/* ---------- audit cards ---------- */
.audit { border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); padding: 1.05rem 1.15rem 0.95rem; display: flex; flex-direction: column; gap: 0.45rem; }
.audit .occ-name { font-family: "Avenir Next", Avenir, "Franklin Gothic Medium", "Segoe UI", sans-serif; font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.audit .readout { font-family: ui-monospace, Menlo, monospace; font-size: 0.78rem; color: var(--ink-2); display: grid; gap: 0.22rem; }
.audit .readout b { color: var(--route-ink); font-weight: 700; }
.audit .verdict { font-size: 0.9rem; color: var(--ink-2); border-top: 1px dotted var(--rule-2); padding-top: 0.5rem; margin-top: 0.25rem; }

/* ---------- report specimen ---------- */
.report-frame { border: 1px solid var(--rule-2); border-radius: 8px; overflow: hidden; background: var(--panel); box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.9); }
.report-head { background: var(--well); color: var(--ink); padding: 0.8rem 1.2rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: baseline; border-bottom: 1px solid var(--rule-2); position: relative; }
.report-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--route), transparent 55%); }
.report-head .t { font-family: "Avenir Next", Avenir, "Franklin Gothic Medium", "Segoe UI", sans-serif; font-weight: 700; letter-spacing: 0.04em; }
.report-head .m { font-family: ui-monospace, Menlo, monospace; font-size: 0.7rem; letter-spacing: 0.12em; opacity: 0.75; }
.report-body { padding: clamp(1rem, 3vw, 1.6rem); }
.report-sec { margin: 0 0 1.6rem; }
.report-sec h3 { display: flex; align-items: baseline; gap: 0.6rem; border-bottom: 1px solid var(--rule-2); padding-bottom: 0.4rem; margin-bottom: 0.8rem; }
.report-sec h3 .n { font-family: ui-monospace, Menlo, monospace; color: var(--route); font-size: 0.85rem; }

/* ---------- footers ---------- */
footer.site { border-top: 1px solid var(--rule-2); margin-top: clamp(2.5rem, 6vw, 4rem); padding: 2rem 0 2.6rem; font-size: 0.85rem; color: var(--ink-2); background: var(--well); position: relative; }
footer.site::before, footer.sitefoot::before { content: ""; position: absolute; top: -1px; left: 0; width: 38%; height: 2px; background: linear-gradient(90deg, var(--route), transparent); }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
footer.site h4 { font-family: "Avenir Next", Avenir, "Franklin Gothic Medium", "Segoe UI", sans-serif; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 0.5rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
footer.site a { color: var(--ink-2); }
footer.site .legal { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; align-items: baseline; font-size: 0.78rem; color: var(--ink-3); }
.coords { letter-spacing: 0.08em; }

/* free-tier footer (embedded .sitefoot styles are var-driven; deepen it) */
footer.sitefoot { background: var(--well); border-top: 1px solid var(--rule-2); position: relative; }

/* in-page CTA card (embedded .bridgebox styles) — instrument bezel, not paper */
div.bridgebox { border: 1px solid var(--rule-2); background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.9); position: relative; overflow: hidden; }
div.bridgebox::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--route), color-mix(in srgb, var(--route) 10%, transparent) 70%); }

/* ---------- order form ---------- */
form.intake { display: grid; gap: 1rem; max-width: 34rem; }
form.intake label { font-family: "Avenir Next", Avenir, "Franklin Gothic Medium", "Segoe UI", sans-serif; font-weight: 700; font-size: 0.9rem; display: grid; gap: 0.35rem; color: var(--ink); }
form.intake input, form.intake select, form.intake textarea {
  font: inherit; color: var(--ink); background: var(--well); border: 1.5px solid var(--rule-2); border-radius: 4px; padding: 0.6rem 0.7rem; width: 100%;
}
form.intake input::placeholder, form.intake textarea::placeholder { color: var(--ink-3); }
form.intake select { -webkit-appearance: none; appearance: none; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%233fae7c' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; }
form.intake input:focus, form.intake select:focus, form.intake textarea:focus { border-color: var(--route); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--route) 18%, transparent); }
form.intake .hint { font-weight: 400; font-family: Charter, Georgia, serif; color: var(--ink-3); font-size: 0.8rem; }

/* ---------- prose pages (terms/privacy/sources) ---------- */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.5rem; }
.prose li { margin: 0.3rem 0; }
.prose hr { border: none; border-top: 1px solid var(--rule); margin: 2rem 0; }
.srcline { display: block; border-bottom: 1px solid color-mix(in srgb, var(--rule-2) 60%, transparent); padding: 0.5rem 0; font-size: 0.88rem; }
.srcline b { font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; color: var(--route-ink); }

/* ---------- scroll-reveal (progressive enhancement; JS assigns .rm-io) --- */
@media (prefers-reduced-motion: no-preference) {
  .rm-io { opacity: 0; transform: translateY(16px); }
  .rm-io.in { opacity: 1; transform: translateY(0);
    transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.21, 1), transform 0.65s cubic-bezier(0.22, 0.61, 0.21, 1);
    transition-delay: var(--rm-d, 0ms); }
}

/* ---------- print (reports stay paper) ---------- */
@media print {
  :root { --paper: #fff; --panel: #fff; --panel-2: #F3F1EC; --well: #fff;
          --ink: #111; --ink-2: #333; --ink-3: #555;
          --route: #1D7A54; --route-ink: #14603F; --on-route: #fff;
          --survey: #274E75; --olive: #4A6B1F; --slate: #6B7684;
          --rule: #C9C9C4; --rule-2: #97978F; --paper-contour: none; color-scheme: light; }
  body { background: #fff !important; color: #111; font-size: 10.5pt; }
  .masthead, .no-print, footer.site .cols { display: none !important; }
  a { color: #111; text-decoration: none; }
  .rm-io { opacity: 1 !important; transform: none !important; }
  .xm { display: none !important; }
  .scroll-x { max-height: none !important; overflow: visible; border-color: #999; }
  .ledger th { position: static; background: #fff; box-shadow: none; border-bottom: 1.5px solid #666; }
  .ledger tbody tr:hover td { background: transparent; box-shadow: none; }
  .report-frame { border-color: #111; box-shadow: none; }
  .stat, .legend, .price-card, div.bridgebox { box-shadow: none; background: #fff; }
}

/* ---------- small screens — crafted, not shrunk ---------- */
@media (max-width: 700px) {
  .navbar { flex-wrap: wrap; row-gap: 0; padding-bottom: 0; }
  .navlinks {
    order: 3; flex: 1 1 100%; display: flex; flex-wrap: nowrap; gap: 1.05rem;
    margin-left: 0; padding: 0.3rem 0.15rem 0.65rem; overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .navlinks::-webkit-scrollbar { display: none; }
  .navlinks a { white-space: nowrap; }
  .ledger { min-width: 560px; }
  .wp-head { flex-wrap: wrap; gap: 0.5rem 0.9rem; }
  .kicker, .pagehead .kicker { letter-spacing: 0.13em; }
}
