/* Survivorship Bias: an analytic report board. One container, one left edge, spacing 8/16/24/32/48/64/96.
   Faces: Host Grotesk 800 (name, headlines, big numbers), IBM Plex Sans (every sentence, label, number),
   IBM Plex Mono (addresses, signatures, memo only). Ink navy dots, signal yellow only for what is new. No red. */
@font-face { font-family: "Host Grotesk"; src: url("/fonts/HostGrotesk-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/PlexSans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/PlexSans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/PlexSans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/PlexSans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/PlexMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ground: #EDF2F6; --ground-hi: #F4F7F9; --ground-lo: #E6ECF1;
  --ink: #13233A; --ink-2: #3E5068; --ink-3: #5E7186;
  --dash: #8FA3B5; --line: #C9D4DE; --slot: #D3DDE6; --paper: #FBFCFD;
  --yellow: #FFC21A; --yellow-deep: #E0A400; --blue: #1E5BD8; --blue-deep: #0B2F86;
  --display: "Host Grotesk", "Arial Black", system-ui, sans-serif;
  --text: "Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
  --wrap: 1320px; --pad: 32px; --bar: 72px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 18px/1.55 var(--text); font-variant-numeric: tabular-nums;
  font-feature-settings: "liga" 0, "clig" 0;
  background:
    linear-gradient(rgba(143,163,181,.10) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(90deg, rgba(143,163,181,.10) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(180deg, var(--ground-lo), var(--ground-hi) 60%, var(--ground-lo));

  min-height: 100vh;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- header (one on every page) ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--ground); border-bottom: 1px solid var(--line); }
.bar .wrap { height: var(--bar); display: flex; align-items: center; gap: 48px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand .mk { position: relative; width: 40px; height: 40px; }
.brand .mk img { width: 40px; height: 40px; image-rendering: pixelated; }
.brand .mk i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--yellow); opacity: 0; left: 18px; top: 18px; transition: opacity .2s; }
.brand .mk i.on { opacity: 1; transition: none; }
.brand .mk i.dark { background: var(--ink); }
.brand span { font: 800 22px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand .sep { width: 1px; height: 24px; background: var(--line); }
.nav { display: flex; gap: 32px; }
.nav a { position: relative; text-decoration: none; font-weight: 500; font-size: 17px; color: var(--ink-2); padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { background: var(--ink); }
.badge { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; font-weight: 600; font-size: 16px; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px rgba(255,194,26,.25); }
.badge.live i { background: var(--blue); box-shadow: 0 0 0 2px rgba(30,91,216,.2); }
.badge:hover { background: #fff; }
.menu { display: none; }
.drawer { display: none; }

/* the one Rehearsal line under the header */
.rline { border-bottom: 1px solid var(--line); background: rgba(251,252,253,.6); }
.rline .wrap { min-height: 44px; display: flex; align-items: center; gap: 16px; font-size: 16px; color: var(--ink-2); }
.rline .wrap > span { flex: 1; }
.rline .short { display: none; }
.rline b { color: var(--ink); font-weight: 600; }
.rline .rp { display: none; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.rline .rp.on { display: inline-flex; }
.rline .rp .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); animation: blink 1.1s steps(2) infinite; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; font-size: 16px; color: var(--ink); }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 28px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font: 600 18px/1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #1d3352; }
.btn:not(.primary):hover { background: #fff; }
.btn.small { height: 44px; padding: 0 18px; font-size: 16px; }

/* contract row + link buttons */
/* the contract and its three links: one row on a desktop */
.ca { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.addr { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 10px 0 18px; border: 1.5px solid var(--ink); background: var(--paper); min-width: 0; flex: 0 1 auto; }
.addr code { font: 500 16px/1.2 var(--mono); color: var(--ink-2); flex: 1; min-width: 0; white-space: nowrap; }
.addr.set code { white-space: normal; overflow-wrap: anywhere; max-width: 300px; }
.addr:not(.set) code { font: 500 16px/1.2 var(--text); letter-spacing: 0; }
.addr.set code { color: var(--ink); }
.addr button { height: 40px; padding: 0 16px; border: 1.5px solid var(--ink); background: #fff; font-weight: 600; font-size: 16px; cursor: pointer; flex: none; }
.addr button:disabled { color: var(--ink-3); border-color: var(--line); cursor: default; }
.links { display: flex; gap: 8px; }
.lk { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 16px; border: 1px solid var(--ink); background: var(--paper); text-decoration: none; color: var(--ink); white-space: nowrap; }
.lk img { width: 18px; height: 18px; object-fit: contain; }
.lk span { font: 600 16px/1 var(--text); }
.lk:hover { background: #fff; }
.lk.off { border-color: var(--ink-3); color: var(--ink); }
.lk.off img { opacity: .85; }
/* a small padlock after the word: opens at launch */
.lk .lock { position: relative; width: 9px; height: 7px; margin: 3px 0 0 -2px; border-radius: 1.5px; background: var(--ink-3); display: none; flex: none; }
.lk .lock::before { content: ""; position: absolute; left: 1.5px; top: -5px; width: 6px; height: 6px; border: 1.5px solid var(--ink-3); border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }
.lk.off .lock { display: block; }
.lk .row { display: flex; align-items: center; gap: 8px; }
.tip { position: absolute; z-index: 50; top: 0; left: 0; max-width: 280px; padding: 10px 14px; background: var(--ink); color: #fff; font-size: 16px; line-height: 1.4; pointer-events: none; opacity: 0; transition: opacity .15s; }
.tip.on { opacity: 1; }

/* toasts: one at a time, 4 s, a queue */
.toast { position: fixed; z-index: 60; left: max(var(--pad), calc((100vw - var(--wrap)) / 2 + var(--pad))); bottom: 24px; transform: translate(0, 16px); background: var(--ink); color: #fff; padding: 12px 20px; font-size: 16px; font-weight: 500; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(0, 0); }
.toast b { color: var(--yellow); font-weight: 700; }

/* ---------- report pieces ---------- */
.label { font: 600 16px/1.2 var(--text); color: var(--ink-3); }
.card { border: 1.5px solid var(--ink); background: rgba(251,252,253,.94); padding: 24px; }
.bar-track { position: relative; height: 12px; background: var(--slot); overflow: hidden; }
.bar-track b { position: absolute; inset: 0 auto 0 0; background: var(--yellow); transition: width .9s cubic-bezier(.3,.7,.2,1); }
.bar-track b.flash { animation: barflash .9s ease-out; }
@keyframes barflash { 0% { filter: brightness(1.25); } 100% { filter: none; } }
.dash { border: 1.5px dashed var(--dash); }
.cross { position: relative; width: 14px; height: 14px; flex: none; }
.cross::before, .cross::after { content: ""; position: absolute; left: 6px; top: -1px; width: 0; height: 16px; border-left: 1.5px dashed var(--dash); }
.cross::before { transform: rotate(45deg); }
.cross::after { transform: rotate(-45deg); }

.sec { padding: 96px 0 0; }
.sec h2 { font: 800 clamp(36px, 4vw, 56px)/1.02 var(--display); letter-spacing: -.02em; margin: 0 0 16px; }
.sec .lede { font-size: 19px; color: var(--ink-2); max-width: 720px; margin: 0 0 48px; }
.foot { margin-top: 96px; border-top: 1px solid var(--line); }
.foot .wrap { min-height: 72px; padding-top: 16px; padding-bottom: 16px; display: flex; align-items: center; gap: 16px; font-size: 16px; color: var(--ink-2); flex-wrap: wrap; }
.foot code { font: 500 16px var(--mono); color: var(--ink); overflow-wrap: anywhere; }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 17px; }
.tbl th { position: sticky; top: var(--bar); z-index: 2; background: var(--ground-hi); text-align: left; font: 600 16px/1.2 var(--text); color: var(--ink-3); height: 52px; border-bottom: 1.5px solid var(--ink); padding: 0 18px; white-space: nowrap; }
.tbl td { height: 54px; padding: 0 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl .r { text-align: right; }
.tbl tr.hl td { background: rgba(255,194,26,.16); }
.tbl tr.new td { animation: rowin 1.6s ease-out; }
@keyframes rowin { 0% { background: rgba(255,194,26,.45); } 100% { background: transparent; } }
.tbl tbody tr:hover td { background: rgba(30,91,216,.06); }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.who code { font: 500 16px var(--mono); }
.ico { display: inline-block; width: 16px; height: 16px; min-width: 16px; border: 0; padding: 0; background: none; cursor: pointer; position: relative; flex: none; opacity: .7; }
.ico:hover { opacity: 1; }
.ico.copy::before { content: ""; position: absolute; left: 4px; top: 1px; width: 10px; height: 11px; border: 1.5px solid var(--ink); border-radius: 2px; }
.ico.copy::after { content: ""; position: absolute; left: 1px; top: 4px; width: 10px; height: 11px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--ground-hi); }
.ico.ext::before { content: ""; position: absolute; left: 1px; top: 4px; width: 10px; height: 10px; border: 1.5px solid var(--ink); border-top-color: transparent; border-right-color: transparent; }
.ico.ext::after { content: ""; position: absolute; right: 1px; top: 1px; width: 7px; height: 7px; border-top: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); }
.ico.ext { background: linear-gradient(var(--ink), var(--ink)) 9px 6px / 1.5px 1.5px no-repeat; }
.more { margin-top: 24px; }
.note { font-size: 16px; color: var(--ink-3); margin: 0 0 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .bar .wrap { gap: 32px; } .nav { gap: 24px; } }
@media (max-width: 1024px) {
  :root { --pad: 24px; }
  .nav, .bar .badge { display: none; }
  .menu { display: inline-flex; margin-left: auto; height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); background: var(--paper); font-weight: 600; font-size: 16px; align-items: center; cursor: pointer; }
  .drawer { position: fixed; z-index: 40; inset: 0; background: var(--ground-hi); padding: 24px; flex-direction: column; gap: 8px; }
  .drawer.on { display: flex; }
  .drawer a { font: 800 36px/1.3 var(--display); text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .drawer a[aria-current="page"] { color: var(--blue); }
  .drawer .x { align-self: flex-end; height: 44px; padding: 0 18px; border: 1.5px solid var(--ink); background: var(--paper); font-weight: 600; cursor: pointer; }
  .drawer .badge { display: inline-flex; margin: 24px 0 0; align-self: flex-start; }
}
@media (max-width: 640px) {
  :root { --pad: 20px; --bar: 64px; }
  body { font-size: 17px; }
  .brand span { font-size: 20px; }
  .brand .sep { display: none; }
  .rline .wrap { padding-top: 10px; padding-bottom: 10px; }
  .rline .long { display: none; }
  .rline .short { display: inline; }
  .addr code { white-space: normal; }
  .sec { padding-top: 64px; }
  .addr { max-width: none; flex-basis: 100%; height: auto; min-height: 56px; padding-top: 12px; padding-bottom: 12px; }
  .links { width: 100%; }
  .lk { flex: 1; width: auto; padding: 0 8px; flex-direction: column; gap: 6px; height: 64px; }
  .lk .lock { position: absolute; top: 8px; right: 8px; margin: 0; }
  .tbl th, .tbl td { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* under 360 px three tiles cannot keep 1 em inside: one per row, mark beside the word */
@media (max-width: 359px) {
  .links { flex-direction: column; gap: 8px; }
  .brand { gap: 8px; }
  .brand span { font-size: 17px; }
  .menu { padding: 0 16px; }
  .lk { flex: none; width: 100%; height: 52px; flex-direction: row; gap: 10px; }
}

/* ---------- the staff report: figure lines, highlighter, stamps, the memo number, flipping numbers ---------- */
.fig { font: 600 16px/1.3 var(--text); color: var(--ink-3); margin: 0 0 12px; letter-spacing: .01em; }
/* the highlighter is a stroke behind the word (a pseudo-element, so the word is never a box) */
mark.hi { color: inherit; background: none; position: relative; z-index: 0; }
mark.hi::before { content: ""; position: absolute; z-index: -1; left: -.04em; right: -.04em; bottom: .06em; height: .34em; background: rgba(255,194,26,.7); transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.2,.7,.2,1) .15s; }
mark.hi.in::before { transform: none; }
.stamp { display: inline-flex; align-items: center; padding: 8px 16px; margin-left: 12px; border: 2px solid currentColor; font: 700 16px/1 var(--text); letter-spacing: .02em; transform: rotate(-5deg); white-space: nowrap; vertical-align: middle; background: transparent; }
.stamp.y { color: #9A7000; border-color: var(--yellow-deep); background: rgba(255,194,26,.14); }
.stamp.grey { color: var(--ink-3); border-style: dashed; border-color: var(--dash); }
.stamp.ink { color: var(--ink); }
.stamp.slap { animation: slap .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes slap { 0% { transform: rotate(-14deg) scale(2.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-5deg) scale(1); opacity: 1; } }
.stamp.big { position: absolute; z-index: 3; right: 24px; top: 20px; padding: 10px 20px; font-size: 20px; margin: 0; pointer-events: none; }
.stamp.big.out { transition: opacity .6s; opacity: 0; }
.memo { font: 600 16px/1 var(--text); color: var(--ink-3); white-space: nowrap; margin-left: -24px; }
.memo.bump, [data-v].bump, [data-t].bump { animation: flip .6s cubic-bezier(.2,.7,.2,1); }
span[data-v], b[data-v], .memo { display: inline-block; }
@keyframes flip { 0% { transform: perspective(300px) rotateX(-80deg); opacity: .2; color: var(--yellow-deep); } 60% { color: var(--yellow-deep); } 100% { transform: none; opacity: 1; } }
.tbl .stamp { padding: 8px 16px; }
@media (max-width: 1280px) { .memo { display: none; } }
.memo[hidden] { display: none; }
