/* BNTO static showcase — calm editorial styling. System fonts only. */

:root {
  --bg: #f7f5f0;
  --paper: #fdfcf9;
  --ink: #1b1a17;
  --ink-2: #3d3a34;
  --muted: #7a766c;
  --rule: #e2ded4;
  --rule-strong: #cfc9bc;
  --accent: #1f4d3a;
  --accent-soft: #e6eee9;
  --bad: #8c2f25;
  --bad-soft: #f5e7e4;

  /* chart series: v1, v2 neutral; v3 accent (delivered); v4 muted green, hatched (not adopted) */
  --s-v1: #b5ae9f;
  --s-v2: #8a8476;
  --s-v3: #1f4d3a;
  --s-v4: #7fa392;

  --serif: Georgia, Palatino, "Palatino Linotype", "Iowan Old Style", "Book Antiqua", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1120px;
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.2; color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.01em; max-width: 22ch; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.3rem; margin-top: 2.2rem; }
h4 { font-size: 1.08rem; margin-top: 1.6rem; }
p { margin: 0 0 1em; max-width: 72ch; }
a { color: var(--accent); text-underline-offset: 2px; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: #efece4; padding: .08em .35em; border-radius: 3px; word-break: break-word; }
strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 3px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 252, 249, .96);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 28px;
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.wordmark { font-family: var(--serif); font-size: 1.45rem; letter-spacing: .14em; font-weight: 700; }
.brand-sub { font-size: .82rem; color: var(--muted); }
.site-nav { display: flex; gap: 22px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: .9rem; padding: 4px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.site-nav a:hover, .site-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.badge {
  display: inline-block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px; border: 1px solid var(--rule-strong); color: var(--muted);
  white-space: nowrap; font-family: var(--sans); font-weight: 600; vertical-align: middle; line-height: 1.4;
}
.badge-static { border-color: var(--accent); color: var(--accent); }
.badge-delivered { background: var(--accent); border-color: var(--accent); color: #fff; }
.badge-not { background: transparent; border-color: var(--muted); color: var(--muted); }
.badge-pass { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.badge-fail { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }

.banner { background: var(--accent-soft); border-bottom: 1px solid var(--rule); }
.banner p { margin: 0 auto; padding: 9px 28px; font-size: .88rem; color: var(--accent); max-width: var(--wrap); }

.notice { border: 1px solid var(--rule); background: var(--paper); padding: 14px 18px; border-radius: 3px; margin: 18px auto; }
.notice-bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.notice-accent { border-left: 3px solid var(--accent); background: var(--paper); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; border-bottom: 1px solid var(--rule); }
.section-alt { background: var(--paper); }
.eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; font-weight: 600; }

.hero { padding-top: 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; margin-top: 28px; align-items: start; }
.lede { font-size: 1.12rem; color: var(--ink-2); }
.lede-sm { font-size: 1.02rem; color: var(--ink-2); }

.mask {
  font-family: var(--mono); font-size: .86em;
  background: var(--ink); color: var(--paper);
  padding: .04em .32em; border-radius: 2px; white-space: nowrap;
}

.callout { background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--accent); padding: 22px 24px; }
.callout-kicker { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: .4rem; }
.callout-title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; margin-bottom: .8rem; }
.callout-body { font-size: .95rem; color: var(--ink-2); }
.cond-list { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--rule); }
.cond-list li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: .88rem; align-items: baseline; }

.kpi-heading { font-size: 1.15rem; margin-top: 52px; }
.kpi-heading .muted { font-family: var(--sans); font-size: .9rem; }
.kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.kpi { padding: 16px 18px 14px 0; border-right: 1px solid var(--rule); padding-left: 18px; }
.kpi:first-child { padding-left: 0; }
.kpi:last-child { border-right: 0; }
.kpi-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.kpi-value { font-family: var(--serif); font-size: 2.2rem; line-height: 1.15; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.kpi-accent .kpi-value { color: var(--accent); }
.kpi-row-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.kpi-row-sm .kpi-value { font-size: 1.6rem; }

/* ---------- Charts ---------- */
.chart-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 30px 0 10px; }
.chart-grid-2 { grid-template-columns: 1fr; }
.chart-grid-2 .chart-card { max-width: 720px; }
.chart-wide { grid-column: span 2; }
.chart-card { margin: 0; background: var(--paper); border: 1px solid var(--rule); padding: 18px 18px 14px; }
.section-alt .chart-card { background: var(--bg); }
.chart-card figcaption { display: flex; flex-direction: column; margin-bottom: 8px; }
.fig-title { font-family: var(--serif); font-size: 1.05rem; }
.fig-sub { font-size: .8rem; color: var(--muted); }
.fig-note { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.chart-faint { opacity: .78; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); fill: var(--ink-2); }
.chart .axis-label { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .baseline { stroke: var(--rule-strong); stroke-width: 1; }
.chart .val { font-size: 11px; fill: var(--ink); font-variant-numeric: tabular-nums; }
.chart .val-strong { font-weight: 700; fill: var(--accent); }
.chart .ver { font-size: 10.5px; fill: var(--muted); }
.chart .grp { font-size: 12.5px; fill: var(--ink); font-weight: 600; }
.chart .bar { transition: opacity .12s; }
.chart .bar-g:hover .bar { opacity: .78; }
.chart .bar-g:hover .val { font-weight: 700; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .8rem; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; display: inline-block; border-radius: 2px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0 8px; border: 1px solid var(--rule); background: var(--paper); }
.section-alt .table-wrap { background: var(--bg); }
table.data { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--ink); white-space: nowrap; background: transparent; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
table.data tbody th { font-weight: 600; white-space: nowrap; }
table.data .group-row th { background: #f1eee7; font-family: var(--serif); font-weight: 400; font-size: .95rem; color: var(--ink); text-transform: none; letter-spacing: 0; }
table.data .col-v3 { background: var(--accent-soft); }
table.data thead th.col-v3 { color: var(--accent); border-bottom-color: var(--accent); }
table.data .col-v4 { color: var(--muted); }
table.data .delta { color: var(--ink-2); }
table.data .row-appendix td, table.data .row-appendix th { color: var(--muted); }
table.data .row-hl td, table.data .row-hl th { background: var(--bad-soft); }
table.data .row-hl-accent td, table.data .row-hl-accent th { background: var(--accent-soft); }
table.data .row-mean td, table.data .row-mean th { border-top: 1px solid var(--rule-strong); font-weight: 600; }
table.data .th-badge { display: block; margin-top: 4px; }
table.data .th-badge .badge { font-size: .62rem; padding: 1px 5px; }
table.data.compact td, table.data.compact th { padding: 7px 10px; font-size: .84rem; }
td.mono, th.mono, td .mono { font-family: var(--mono); font-size: .82rem; }
.status-fail { color: var(--bad); font-weight: 700; }
.status-pass { color: var(--accent); font-weight: 700; }

/* ---------- Text blocks ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 18px 0 8px; font-size: .92rem; }
.facts dt { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.plain-list { padding-left: 1.1em; }
.plain-list li { margin-bottom: .45em; max-width: 78ch; }
.pull { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; border-left: 2px solid var(--accent); padding-left: 18px; margin-top: 28px; color: var(--ink-2); }

/* ---------- Examples ---------- */
.examples-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
.ex-card { background: var(--paper); border: 1px solid var(--rule); display: flex; flex-direction: column; min-width: 0; }
.ex-head { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 16px 16px 12px; border-bottom: 1px solid var(--rule); }
.ex-img { width: 84px; height: 112px; object-fit: contain; background: #fff; border: 1px solid var(--rule); image-rendering: auto; }
.ex-id { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin: 0 0 2px; }
.ex-name { font-family: var(--serif); font-size: 1.02rem; line-height: 1.3; margin: 0 0 8px; }
.ex-input-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0; }
.ex-input { font-family: var(--mono); font-size: .82rem; margin: 2px 0 0; overflow-wrap: anywhere; }
.ex-score { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
.ex-card table.data { font-size: .82rem; }
.ex-card table.data th, .ex-card table.data td { padding: 6px 10px; }
.ex-card table.data thead th { font-size: .66rem; }
.ex-card .nogt { color: var(--muted); font-style: italic; }
.ex-card .tick { font-weight: 700; white-space: nowrap; }
.ex-card .tick-ok { color: var(--accent); }
.ex-card .tick-bad { color: var(--bad); }
.ex-card tr.miss td { background: var(--bad-soft); }
.ex-card tr.nogt-row td, .ex-card tr.nogt-row th { color: var(--muted); }
.ex-foot { font-size: .76rem; color: var(--muted); padding: 10px 16px 14px; margin: 0; border-top: 1px solid var(--rule); margin-top: auto; }
.ex-remask { font-size: .76rem; color: var(--ink-2); background: var(--accent-soft); padding: 8px 16px; margin: 0; }

/* ---------- Process ---------- */
.timeline { list-style: none; padding: 0; margin: 26px 0 0; border-left: 1px solid var(--rule-strong); }
.timeline li { position: relative; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1px solid var(--muted); }
.timeline li.tl-final::before { background: var(--accent); border-color: var(--accent); }
.timeline li.tl-note::before { background: var(--rule-strong); border-color: var(--rule-strong); }
.tl-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.tl-ver { font-family: var(--serif); font-size: 1.15rem; }
.tl-run { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.tl-body { margin: 0; color: var(--ink-2); }
.rules { padding-left: 1.4em; }
.rules li { margin-bottom: .7em; max-width: 78ch; padding-left: 4px; }

/* ---------- Disclosures ---------- */
.disclosure-box { background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--muted); padding: 6px 22px 10px; margin-top: 30px; }
.prose h2, .prose h3 { font-size: 1.15rem; margin-top: 1.1rem; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: .7em; max-width: 84ch; font-size: .93rem; }
.limits { padding-left: 1.1em; }
.limits li { margin-bottom: .5em; max-width: 80ch; }

/* ---------- Footer ---------- */
.site-footer { padding: 44px 0 56px; background: var(--bg); }
.footer-brand { font-family: var(--serif); color: var(--ink-2); }
.footer-brand .wordmark { font-size: 1.1rem; }
.facts-footer { font-size: .86rem; }
.facts-footer dd { font-family: var(--mono); font-size: .8rem; }

#load-error:not([hidden]) { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .chart-grid { grid-template-columns: 1fr 1fr; }
  .chart-wide { grid-column: span 2; }
  .examples-grid { grid-template-columns: 1fr 1fr; }
  .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { border-bottom: 1px solid var(--rule); }
  .kpi:nth-child(3n) { border-right: 0; }
  .kpi:nth-child(3n+1) { padding-left: 0; }
}
@media (max-width: 760px) {
  .wrap, .masthead-inner { padding: 0 18px; }
  .banner p { padding: 8px 18px; }
  .masthead-inner { flex-wrap: wrap; gap: 4px 14px; padding-top: 8px; padding-bottom: 6px; }
  .brand-sub { display: none; }
  .badge-static { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 0; justify-content: space-between; }
  .site-nav a { font-size: .8rem; }
  html { scroll-padding-top: 110px; }
  .section { padding: 52px 0; }
  .hero-grid, .two-col, .chart-grid, .chart-grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .chart-wide { grid-column: auto; }
  .examples-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi, .kpi:nth-child(3n+1) { padding-left: 14px; }
  .kpi:nth-child(odd) { padding-left: 0; }
  .kpi:nth-child(3n) { border-right: 1px solid var(--rule); }
  .kpi:nth-child(even) { border-right: 0; }
  .kpi:last-child { grid-column: span 2; border-right: 0; padding-left: 0; }
  .kpi-row-sm .kpi:last-child { grid-column: auto; }
  .kpi-value { font-size: 1.8rem; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

.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; }
