:root {
  color-scheme: light;
  --ink: #172a3b;
  --muted: #667787;
  --line: #dce4e9;
  --paper: #f3f6f7;
  --white: #ffffff;
  --navy: #102638;
  --amber: #b87018;
  --amber-soft: #fff5e7;
  --teal: #167c76;
  --teal-soft: #e7f7f4;
  --danger: #a54138;
  --shadow: 0 12px 32px rgba(14, 39, 57, .07);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #4b9bba; outline-offset: 2px; }

.hero { background: radial-gradient(ellipse at 88% 6%, rgba(54, 120, 133, .3), transparent 34%), linear-gradient(127deg, #102638 4%, #17394d 58%, #102638 100%); color: #f4f8fa; }
.hero-inner { max-width: 1450px; margin: 0 auto; padding: 29px 38px 0; }
.eyebrow, .lane-kicker, .readout-topline, .contract-label, .hero-bottom, .footer-meta { font-size: .67rem; font-weight: 800; letter-spacing: .115em; }
.hero-eyebrow { display: flex; align-items: center; gap: 9px; color: #b9ccd6; }
.local-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #7ed6bd; box-shadow: 0 0 0 4px rgba(126, 214, 189, .12); }
.eyebrow-divider { color: #708998; padding: 0 2px; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .65fr); align-items: center; gap: 46px; padding: 42px 0 36px; }
h1 { font-size: clamp(2.7rem, 5.4vw, 5.15rem); line-height: .99; letter-spacing: -.065em; margin: 0; font-weight: 780; }
h1 span { color: #81d5c4; }
.hero-copy { color: #c0d0d8; font-size: 1.04rem; max-width: 690px; line-height: 1.6; margin: 22px 0 0; }
.firewall-card { border: 1px solid rgba(190, 216, 225, .25); background: rgba(9, 27, 40, .38); border-radius: 16px; padding: 19px 20px; box-shadow: inset 0 1px rgba(255,255,255,.04); }
.firewall-icon { display: flex; align-items: center; gap: 4px; height: 25px; margin-bottom: 14px; }
.firewall-icon span { display: block; width: 5px; height: 24px; border-radius: 8px; background: #77d3c1; }
.firewall-icon span:nth-child(2) { height: 15px; opacity: .74; }
.firewall-icon span:nth-child(3) { height: 20px; opacity: .45; }
.firewall-card .eyebrow { color: #a6c8ce; }
.firewall-card p { margin: 9px 0 7px; font-weight: 700; font-size: 1.08rem; line-height: 1.35; }
.firewall-card small { color: #9cb2be; font-size: .75rem; }
.hero-bottom { border-top: 1px solid rgba(213, 231, 237, .15); min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #a4bbc6; font-size: .6rem; }

.page-shell { max-width: 1450px; margin: 0 auto; padding: 27px 38px 54px; }
.lanes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.lane { --lane-color: var(--amber); --lane-soft: var(--amber-soft); min-width: 0; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--lane-color); border-radius: 15px; padding: 24px 25px 22px; box-shadow: var(--shadow); }
.lane-teg { --lane-color: var(--teal); --lane-soft: var(--teal-soft); }
.lane-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.lane-kicker { color: var(--lane-color); font-size: .61rem; }
.lane-number { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--lane-soft); font-size: .65rem; }
.separator { color: #acb8c0; padding: 0 3px; }
h2 { margin: 9px 0 5px; color: var(--ink); font-size: 1.77rem; letter-spacing: -.04em; }
.lane-header p { margin: 0; max-width: 480px; color: var(--muted); line-height: 1.45; font-size: .87rem; }
.lane-header code, .lane-footnote code, .teg-boundary code { color: inherit; background: rgba(30, 62, 82, .06); padding: 1px 4px; border-radius: 3px; }
.lane-mark { flex: 0 0 42px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--lane-soft); color: var(--lane-color); font: 700 1.25rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.contract-strip { margin: 18px 0 15px; padding: 10px 11px; border: 1px solid #efe4d4; background: #fffbf5; border-radius: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #6c5944; font-size: .7rem; }
.contract-strip code { font-size: .66rem; }
.contract-label { color: #936123; font-size: .55rem; }
.contract-separator { color: #c8b79f; }
.vector-editors { display: grid; gap: 6px; }
.editor-label { display: flex; justify-content: space-between; align-items: baseline; color: #3d5160; font-size: .75rem; font-weight: 750; }
.editor-label span { font-weight: 500; color: #8997a1; font-size: .67rem; }
.vector-text { width: 100%; min-height: 52px; resize: vertical; padding: 9px 10px; border: 1px solid #d7e0e5; border-radius: 7px; background: #fbfcfc; color: #334d5f; font: .68rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.microcopy { margin: 0 0 3px; color: #85939d; font-size: .66rem; line-height: 1.4; }
.replay-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 13px 0 11px; }
.compact-field { color: #566977; display: grid; gap: 5px; font-size: .69rem; font-weight: 750; }
.compact-field code { color: #806035; }
.input-with-unit, .field-line { display: flex; align-items: center; border: 1px solid #d7e0e5; border-radius: 7px; background: #fff; overflow: hidden; }
.input-with-unit input, .field-line input { min-width: 0; width: 100%; border: 0; outline: 0; padding: 8px 9px; color: var(--ink); background: transparent; font-size: .82rem; }
.input-with-unit span, .field-line > span:last-child { flex: 0 0 auto; padding: 0 9px; color: #85939c; font-size: .65rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 7px; }
.button { border: 0; border-radius: 7px; padding: 10px 13px; font-size: .73rem; font-weight: 750; cursor: pointer; transition: transform .12s ease, filter .12s ease; }
.button:hover { filter: brightness(.97); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { background: #a96816; color: #fff; box-shadow: 0 2px 0 #80500f; }
.button-primary span, .button-teg span { font-size: 1rem; margin-left: 5px; }
.button-secondary { background: #f6f0e8; color: #805820; }
.button-quiet { margin-left: auto; background: transparent; color: #81909a; padding-inline: 7px; }
.error-message { margin: 9px 0 0; color: var(--danger); background: #fff1ef; border: 1px solid #f0d2cd; border-radius: 6px; padding: 8px 10px; font-size: .72rem; }
.error-message[hidden] { display: none; }
.residual-readout, .teg-results { margin-top: 14px; padding: 14px; border-radius: 10px; background: #f8fafb; border: 1px solid #e5ebee; }
.readout-topline { display: flex; align-items: center; justify-content: space-between; color: #72828d; font-size: .59rem; }
.status-pill { padding: 4px 7px; border-radius: 99px; background: #edf1f3; color: #5e6f7c; font-size: .56rem; letter-spacing: .04em; }
.status-pill.status-held { background: #fff0e6; color: #a24f16; }
.status-pill.status-clear { background: #e4f6ee; color: #17734b; }
.status-pill.status-model { background: #e2f3f0; color: #15726b; }
.status-pill.status-reverse { background: #f2eeee; color: #6e5855; }
.metrics-row { display: grid; grid-template-columns: 1fr auto 1fr 1.1fr; align-items: center; gap: 8px; margin: 13px 0 6px; }
.metric-card { min-width: 0; display: grid; gap: 4px; }
.metric-card span { color: #7c8a94; font-size: .63rem; }
.metric-card strong { color: var(--ink); font: 760 1.45rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.06em; }
.metric-arrow { color: #bdc7cc; font-size: 1rem; }
.latch-card { padding-left: 10px; border-left: 1px solid #e0e7ea; }
.latch-card strong { color: #a65b1b; font-size: .77rem; letter-spacing: 0; }
.step-summary { min-height: 30px; margin: 9px 0; color: #586b78; font-size: .72rem; line-height: 1.45; }
.work-zero { display: flex; align-items: center; gap: 9px; border-top: 1px solid #e1e8eb; padding-top: 10px; color: #415a68; }
.zero-mark { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #eaf0f2; color: #45606f; font: 700 .88rem ui-monospace, monospace; }
.work-zero strong, .work-zero small { display: block; }
.work-zero strong { font-size: .73rem; }
.work-zero small { margin-top: 2px; color: #8997a0; font-size: .62rem; }
.component-section, .observer-section { margin-top: 17px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.section-heading h3 { margin: 0; font-size: .77rem; letter-spacing: -.01em; }
.section-heading > span { color: #8a969f; font-size: .6rem; }
.legend-worst { display: inline-block; width: 7px; height: 7px; margin: 0 0 0 5px; border-radius: 2px; background: #c7822f; vertical-align: 1px; }
.component-grid { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 4px; }
.component-cell { min-width: 0; padding: 5px 2px 4px; border: 1px solid #e7ecef; border-radius: 5px; background: #fbfcfc; text-align: center; }
.component-cell span, .component-cell strong { display: block; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.component-cell span { color: #98a4ab; font-size: .5rem; }
.component-cell strong { margin-top: 2px; color: #4b6371; font: 650 .6rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.component-cell.is-worst { border-color: #e5b775; background: #fff3df; }
.component-cell.is-worst strong, .component-cell.is-worst span { color: #9a5a12; }
.observer-log { list-style: none; margin: 0; padding: 0; max-height: 135px; overflow: auto; }
.observer-log li { padding: 7px 8px; border-bottom: 1px solid #edf0f2; color: #5f707b; font-size: .67rem; line-height: 1.4; }
.observer-log li:last-child { border-bottom: 0; }
.observer-log .log-empty { color: #9aa5ab; font-style: italic; }
.lane-footnote { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #edf0f2; color: #7d8a92; font-size: .65rem; line-height: 1.5; }

.source-banner { display: flex; align-items: center; gap: 10px; margin: 19px 0 14px; padding: 11px 12px; border: 1px solid #d0eae5; border-radius: 8px; background: #f1fbf8; }
.source-glyph { display: grid; place-items: center; width: 27px; height: 27px; background: #d9f0ea; color: #147a70; border-radius: 7px; font-size: 1.1rem; }
.source-banner strong, .source-banner small { display: block; }
.source-banner strong { color: #246b65; font-size: .75rem; }
.source-banner small { margin-top: 2px; color: #71918c; font-size: .62rem; }
.synthetic-tag { margin-left: auto; padding: 4px 6px; border-radius: 4px; background: #e0f2ee; color: #427e76; font-size: .5rem; font-weight: 850; letter-spacing: .08em; }
.teg-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 9px; }
.teg-field { display: grid; gap: 5px; color: #566977; font-size: .68rem; font-weight: 750; }
.field-line { min-height: 35px; }
.field-line input { padding-block: 7px; font-size: .78rem; }
.heat-field { grid-column: 1 / -1; }
.heat-field .optional-tag { color: #93a0a7; font-weight: 500; font-size: .58rem; margin-left: 4px; }
.heat-field small { color: #89969d; font-size: .61rem; font-weight: 450; }
.button-teg { margin-top: 12px; background: #14796f; color: white; box-shadow: 0 2px 0 #0e5f57; }
.teg-results { margin-top: 15px; }
.teg-output-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; margin-top: 7px; }
.teg-output { min-width: 0; padding: 9px 7px 8px 0; border-bottom: 1px solid #e6ecee; }
.teg-output:nth-child(3n + 2), .teg-output:nth-child(3n + 3) { padding-left: 8px; border-left: 1px solid #e6ecee; }
.teg-output span { display: block; color: #7d8b93; font-size: .57rem; line-height: 1.3; }
.teg-output strong { display: block; overflow-wrap: anywhere; margin-top: 5px; color: #284657; font: 700 .88rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.teg-output-highlight { background: #eef8f6; padding-left: 8px !important; border-radius: 4px; }
.teg-output-highlight strong { color: #11776e; }
.thermo-notes { margin-top: 10px; border-top: 1px solid #e5ebee; }
.thermo-note { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0 7px; border-bottom: 1px solid #e9eef0; }
.note-mark { flex: 0 0 21px; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 6px; background: #e0f0ed; color: #297f76; font: 750 .75rem ui-serif, Georgia, serif; }
.thermo-note p { margin: 0; }
.thermo-note strong, .thermo-note small { display: block; }
.thermo-note strong { color: #4f666f; font-size: .68rem; line-height: 1.35; }
.thermo-note small { margin-top: 2px; color: #849198; font-size: .6rem; line-height: 1.4; }
.load-match-note { padding-top: 8px; color: #6d7f86; font-size: .61rem; }
.load-match-note.is-matched { color: #17776d; font-weight: 700; }
.teg-boundary { margin-top: 13px; border-left: 3px solid #65b8ad; padding: 2px 0 2px 10px; }
.teg-boundary strong { color: #247c73; font-size: .68rem; }
.teg-boundary p { margin: 4px 0 0; color: #77878e; font-size: .63rem; line-height: 1.5; }

.report-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 22px; padding: 15px 18px; border: 1px solid #dbe4e8; border-radius: 11px; background: #fff; box-shadow: 0 5px 18px rgba(14,39,57,.04); }
.report-bar > div { display: flex; align-items: center; gap: 10px; }
.report-icon { display: grid; place-items: center; width: 39px; height: 34px; border: 1px solid #dbe4e8; border-radius: 7px; color: #587282; font: 750 .56rem ui-monospace, monospace; }
.report-bar p { margin: 0; }
.report-bar strong, .report-bar small { display: block; }
.report-bar strong { font-size: .76rem; }
.report-bar small { margin-top: 3px; color: #84929a; font-size: .64rem; }
.button-export { background: #e8eff2; color: #355264; }
.page-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; padding: 18px 2px 0; }
.page-footer p { max-width: 730px; margin: 0; color: #74828a; font-size: .67rem; line-height: 1.5; }
.page-footer p strong { color: #536570; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: #9aa5aa; font-size: .52rem; white-space: nowrap; }

@media (max-width: 1050px) {
  .hero-layout { grid-template-columns: minmax(0, 1.5fr) minmax(230px, .8fr); gap: 25px; }
  .lanes { grid-template-columns: 1fr; }
  .lane { padding: 24px 26px; }
  .vector-text { min-height: 44px; }
  .component-grid { grid-template-columns: repeat(8, minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .hero-inner { padding: 22px 18px 0; }
  .hero-layout { grid-template-columns: 1fr; gap: 23px; padding: 34px 0 25px; }
  h1 { font-size: clamp(2.55rem, 12vw, 3.65rem); }
  .hero-copy { font-size: .9rem; margin-top: 15px; }
  .firewall-card { padding: 14px 16px; }
  .firewall-icon { display: none; }
  .hero-bottom { min-height: auto; padding: 12px 0; flex-wrap: wrap; justify-content: flex-start; gap: 8px 14px; font-size: .52rem; }
  .page-shell { padding: 15px 12px 32px; }
  .lane { padding: 19px 15px; border-radius: 12px; }
  h2 { font-size: 1.55rem; }
  .lane-header p { font-size: .8rem; }
  .contract-strip { gap: 5px; }
  .contract-label { flex-basis: 100%; }
  .replay-controls { gap: 7px; }
  .button-row { gap: 5px; }
  .button { padding: 9px 10px; font-size: .68rem; }
  .button-quiet { margin-left: 0; }
  .metrics-row { grid-template-columns: 1fr auto 1fr; }
  .latch-card { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #e0e7ea; padding: 8px 0 0; }
  .component-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .component-cell { padding-block: 7px; }
  .component-cell span { font-size: .57rem; }
  .component-cell strong { font-size: .68rem; }
  .teg-input-grid { gap: 9px 7px; }
  .teg-output strong { font-size: .77rem; }
  .report-bar { align-items: flex-start; flex-direction: column; margin-top: 14px; padding: 13px; }
  .report-bar small { line-height: 1.4; }
  .page-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-meta { justify-content: flex-start; }
}

/* Pages additions: honesty banner, sample-report link, footer links. */
.honesty-banner { background: #fff5e7; color: #6b4310; border-bottom: 1px solid #f0d9b5; padding: 8px 16px; text-align: center; font-size: .76rem; line-height: 1.45; }
.honesty-banner strong { letter-spacing: .08em; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
a.button { text-decoration: none; display: inline-block; }
a.button:focus-visible, .footer-links a:focus-visible { outline: 3px solid #4b9bba; outline-offset: 2px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .72rem; }
.footer-links a { color: #355264; }
.page-footer { flex-wrap: wrap; padding-bottom: 28px; }
@media (max-width: 650px) { .honesty-banner { text-align: left; font-size: .72rem; } }
