/* Worked example — self-contained styling for the three role views. */

:root {
  /* KreditChain brand specification v1.0, unaltered.
     Blockchain Blue #0070C0 · AI Teal #00C0A0 · Institutional Navy #0C2040.
     AI Teal is 2.3:1 on white and must never carry text — use --teal-ink. */
  --ink:      #0C2040;
  --ink-2:    #2A3E5C;
  --ink-3:    #5C728E;   /* 4.7:1 on white — it labels 12px text */
  --blue:     #0070C0;
  --blue-ink: #005A9A;
  --teal:     #00C0A0;
  --teal-ink: #00806B;
  --tint:     #E6F1FA;
  --tint-2:   #F4F9FD;
  --line:     #DCE5ED;
  --line-2:   #C3D1DE;
  --bg:       #F7F9FB;
  --good:     #00806B;
  --bad:      #A8452C;
  --warn:     #8A6A1F;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: Montserrat, Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* --- top bar: the site-wide menu, styled by css/topbar.css ----------- */
.role-tab {
  padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px;
  text-decoration: none; color: var(--ink-2); font-size: 13.5px; background: #fff;
  white-space: nowrap;
}
.role-tab:hover { border-color: var(--blue); color: var(--blue); }
.role-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --- role banner ----------------------------------------------------- */
.role-banner { background: var(--ink); color: #fff; padding: 20px 0 22px; }
.role-banner h1 { margin: 0 0 4px; font-size: 26px; font-weight: 650; letter-spacing: -0.2px; }
.role-banner p { margin: 0; color: #BCCFE4; font-size: 14px; max-width: 78ch; }
.role-eyebrow {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: #93AEC9; margin-bottom: 7px; font-weight: 600;
}

/* --- timeline -------------------------------------------------------- */
.timeline {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 62px; z-index: 30;   /* under the 62px site menu */
}
.timeline-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px 16px; }
.tl-row { display: flex; align-items: center; gap: 12px; }
.tl-btn {
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  width: 32px; height: 32px; border-radius: 7px; cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.tl-btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.tl-btn:disabled { opacity: .35; cursor: default; }
.tl-range { flex: 1; accent-color: var(--blue); min-width: 120px; }
.tl-count { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px;
  flex: none; min-width: 74px; text-align: right; }
.tl-jumps { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.jump {
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--tint-2); color: var(--ink-2);
}
.jump:hover { border-color: var(--blue); color: var(--blue); }
.jump.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.jump.evt { border-color: #EDCBC0; color: var(--bad); background: #FBECE8; }
.jump.evt.on { background: var(--bad); border-color: var(--bad); color: #fff; }

.tl-now { margin-top: 12px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.tl-date {
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  background: var(--tint); padding: 3px 9px; border-radius: 5px; flex: none;
}
.tl-title { font-weight: 650; font-size: 15px; }
.tl-blurb { color: var(--ink-2); font-size: 13.5px; width: 100%; margin: 0; }

/* --- layout ---------------------------------------------------------- */
main { padding: 26px 0 70px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g23 { grid-template-columns: 1.55fr 1fr; }
@media (max-width: 900px) { .g2, .g3, .g23 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px 20px;
}
.card h2 {
  margin: 0 0 3px; font-size: 11px; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650;
}
.card h3 { margin: 14px 0 8px; font-size: 14.5px; font-weight: 650; }
.card > h3:first-of-type { margin-top: 4px; }
.card p { margin: 6px 0; color: var(--ink-2); font-size: 13.5px; }
.card.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.card.dark h2 { color: #93AEC9; }
.card.dark p { color: #C5D6E8; }

/* --- numbers --------------------------------------------------------- */
.big { font-size: 30px; font-weight: 650; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.big.sm { font-size: 23px; }
.lab { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat-row { display: flex; gap: 26px; flex-wrap: wrap; }
.stat-row > div { min-width: 118px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }

/* --- tables ---------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650; padding: 6px 9px 6px 0;
  border-bottom: 1px solid var(--line);
}
td { padding: 7px 9px 7px 0; border-bottom: 1px solid #E8EFF6; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; }
/* a right-aligned cell must not touch the column after it */
td.n + td, th.n + th { padding-left: 16px; }
tr.me td { background: #F1F7FC; font-weight: 600; }
tr.dim td { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 12px; }
.trunc { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); word-break: break-all; }

/* --- misc ------------------------------------------------------------ */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--tint); color: var(--blue); font-weight: 600;
}
.pill.bad { background: #FBECE8; color: var(--bad); }
.pill.good { background: #E1F7F2; color: var(--good); }
.pill.grey { background: #EDF2F7; color: var(--ink-3); }

.note {
  border-left: 3px solid var(--line-2); padding: 2px 0 2px 12px;
  color: var(--ink-2); font-size: 13px; margin: 12px 0;
}
.note.warn { border-left-color: var(--bad); }
.note strong { color: var(--ink); }

.caveat {
  background: #FBECE8; border: 1px solid #EDCBC0; border-radius: 9px;
  padding: 13px 16px; font-size: 13.5px; color: #7A3A26; margin-bottom: 18px;
}
.caveat strong { color: var(--bad); }

select, button.act {
  font-family: inherit; font-size: 13.5px; padding: 7px 11px;
  border: 1px solid var(--line-2); border-radius: 7px; background: #fff; color: var(--ink);
}
button.act { cursor: pointer; }
button.act:hover { border-color: var(--blue); color: var(--blue); }

.gaps { margin-top: 26px; }
.gaps li { margin-bottom: 10px; color: var(--ink-2); font-size: 13.5px; }
.gaps li strong { color: var(--ink); }

footer.foot {
  border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px;
  color: var(--ink-3); font-size: 12.5px;
}

/* --- the event hero -------------------------------------------------- */
/* The spine of the single-page example: everything here changes as you
   move through the timeline. Dark, so it reads as the "now" band and the
   three lanes below read as detail. */
.hero { background: var(--ink); color: #fff; padding: 26px 0 28px; }
.hero-in { display: grid; grid-template-columns: 1.25fr 1fr; gap: 34px; align-items: start; }
.hero-eyebrow {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: #93AEC9; font-weight: 600; margin-bottom: 9px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.hero-eyebrow .when {
  font-family: var(--mono); letter-spacing: 0; text-transform: none;
  background: rgba(255,255,255,.1); padding: 2px 8px; border-radius: 5px; color: #D2E0EE;
}
.hero h1 { margin: 0 0 8px; font-family: var(--display); font-size: 26px;
  font-weight: 600; letter-spacing: -0.3px; }
.hero p { margin: 0; color: #C5D6E8; font-size: 14.5px; line-height: 1.55; max-width: 62ch; }
.hero-lab { font-size: 12px; color: #93AEC9; margin-bottom: 9px; }

/* stacked bar: one token, split three ways */
.bar { display: flex; height: 30px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.08); }
.bar > span { transition: width .22s ease; box-shadow: 2px 0 0 0 #0C2040; }
.bar .risk { background: #4A96D2; }
.bar .back { background: #00C0A0; }
.bar .gone { background: #E06A4C; }
.barkey { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.barkey > div { font-size: 12.5px; color: #93AEC9; }
.barkey b {
  display: block; font-size: 19px; font-weight: 650; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: -0.3px;
}
.barkey i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }

/* --- the three lanes -------------------------------------------------- */
.lane-eyebrow {
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--blue); font-weight: 650; margin-bottom: 3px;
}
.lane h2 { margin: 0 0 12px; font-size: 17px; font-weight: 650;
  letter-spacing: -0.2px; color: var(--ink); text-transform: none; }
.lane .rows { display: grid; gap: 9px; }
.lane .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lane .row span { font-size: 13px; color: var(--ink-2); }
.lane .row b {
  font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px; white-space: nowrap;
}
.lane .row.tot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 3px; }
.lane .say { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.lane .say strong { color: var(--ink); }

/* --- the ownership grid ----------------------------------------------- */
.unitgrid { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr));
  grid-auto-rows: min-content; gap: 3px; margin: 14px 0 6px; max-width: 760px; }
.u { aspect-ratio: 1; border-radius: 2px; background: #D9E3EC; transition: background .18s; }
.u.moved { outline: 1.5px solid #A8452C; outline-offset: 1px; }
.gridwrap { display: grid; grid-template-columns: minmax(0, 760px) 1fr; gap: 30px;
  align-items: start; }
.legend { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.sw { width: 11px; height: 11px; border-radius: 2px; display: inline-block; flex: none; }

/* --- misc for the single page ----------------------------------------- */
.ledger { display: grid; grid-template-columns: 1fr auto; gap: 7px 20px; font-size: 14.5px; }
.ledger dt { color: var(--ink-2); }
.ledger dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.ledger .tot { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.jargon td:first-child { color: var(--blue); font-weight: 600; }

@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 24px; }
  .g2, .g3, .g23, .gridwrap { grid-template-columns: 1fr; }
}

/* Visible only to assistive technology. Used by the timeline's live region:
   the page rewrites itself on every step and needs somewhere to say so. */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  border: 0;
}
