/* ==========================================================================
   Kardashev Index — design system
   Black void, brass and gold for achievement, plasma for live energy.
   Serif for the thesis, tracked caps for the monument, mono for the numbers.
   ========================================================================== */

:root {
  /* palette */
  --void: #050507;
  --ink: #0b0a09;
  --umber: #16110d;
  --umber-2: #211a15;
  --umber-3: #2e251d;
  --bone: #eedfc2;
  --paper: #f6f1e7;
  --text: #ddd3c2;
  --muted: #a99d8b;
  --dim: #8d8272;
  --brass: #c69667;
  --gold: #ddac67;
  --bronze: #9f7250;
  --plasma: #f38404;
  --ember: #d55903;
  --corona: #eeb072;
  --sky: #8fbcd3;
  --danger: #e2735a;
  --ok: #c9b27a;

  --line: rgba(221, 172, 103, 0.14);
  --line-2: rgba(221, 172, 103, 0.26);
  --line-3: rgba(221, 172, 103, 0.45);
  --glass: rgba(22, 17, 13, 0.72);

  --grad-energy: linear-gradient(90deg, var(--bronze) 0%, var(--gold) 55%, var(--plasma) 100%);

  /* type */
  --f-serif: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --f-sans: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-mon: "Cinzel", "Trajan Pro", var(--f-serif);

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.02rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.75vw, 1.95rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.5vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.85rem + 2.8vw, 4.4rem);
  --step-5: clamp(2.7rem, 1.9rem + 4vw, 5.4rem);

  --wrap: 1180px;
  --pad: clamp(1.1rem, 0.6rem + 2.4vw, 2.25rem);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--void);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* film grain over everything, very quiet */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image: url("../img/grain.svg");
  opacity: 0.05;
  mix-blend-mode: overlay;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-color: rgba(221, 172, 103, 0.35); text-underline-offset: 0.2em; transition: color .2s ease, text-decoration-color .2s ease; }
a:hover { color: var(--corona); text-decoration-color: currentColor; }
::selection { background: var(--plasma); color: var(--void); }
:focus-visible { outline: 2px solid var(--plasma); outline-offset: 3px; border-radius: 1px; }

.skip { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--plasma); color: var(--void); padding: .6rem 1rem; font-weight: 600; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.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; }

/* ---------- typographic primitives ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--f-sans); font-size: var(--step--1); font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase; color: var(--brass);
  margin: 0 0 1.1rem;
}
.eyebrow::before { content: ""; width: 2.2rem; height: 1px; background: var(--grad-energy); }
.eyebrow--plain::before { display: none; }

.display {
  font-family: var(--f-serif); font-weight: 500; color: var(--paper);
  font-size: var(--step-5); line-height: 1.02; letter-spacing: -0.012em; margin: 0;
  text-wrap: balance;
}
.display em, .h2 em { font-style: italic; color: var(--corona); }
.h2 {
  font-family: var(--f-serif); font-weight: 500; color: var(--paper);
  font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 .6rem;
  text-wrap: balance;
}
.h3 { font-family: var(--f-sans); font-weight: 600; font-size: var(--step-1); color: var(--bone); margin: 0; letter-spacing: -0.005em; }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--text); max-width: 38rem; margin: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tracked { font-family: var(--f-mon); letter-spacing: .42em; text-transform: uppercase; }
.thesis {
  font-family: var(--f-serif); font-style: italic; font-weight: 500;
  font-size: var(--step-3); color: var(--gold); line-height: 1.1; margin: 0;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 5, 7, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--paper); }
.brand:hover { color: var(--paper); }
.brand__mark { width: 2.1rem; height: 2.1rem; flex: none; }
.brand__word { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--f-mon); font-weight: 600; font-size: .98rem; letter-spacing: .34em; margin-right: -.34em; }
.brand__sub { font-family: var(--f-sans); font-size: .62rem; letter-spacing: .38em; text-transform: uppercase; color: var(--brass); margin-top: .38rem; }
.nav__links { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 2rem); }
.nav__link {
  font-size: .76rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; padding: .4rem 0; position: relative;
}
.nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--grad-energy); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--paper); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .04em; color: var(--muted);
  padding: .28rem .6rem; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none;
  white-space: nowrap;
}
a.chip:hover { color: var(--paper); border-color: var(--line-3); }
.chip__dot { width: .42rem; height: .42rem; border-radius: 50%; background: var(--plasma); box-shadow: 0 0 0 0 rgba(243,132,4,.6); animation: beat 2.8s ease-out infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(243,132,4,.55); } 70% { box-shadow: 0 0 0 .5rem rgba(243,132,4,0); } 100% { box-shadow: 0 0 0 0 rgba(243,132,4,0); } }
@media (max-width: 720px) {
  .brand__sub, .nav__meta { display: none; }
  .nav__links { gap: 1rem; }
  .nav__link { font-size: .7rem; letter-spacing: .16em; }
  .brand__name { font-size: .86rem; letter-spacing: .26em; }
}
@media (max-width: 400px) { .nav__link--opt { display: none; } }

/* ---------- flash ---------- */
.flash { margin-top: 1.25rem; padding: .9rem 1.1rem; border: 1px solid; border-left-width: 3px; font-size: .95rem; display: flex; gap: .75rem; align-items: baseline; }
.flash__tag { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; flex: none; }
.flash--ok { border-color: rgba(221,172,103,.35); border-left-color: var(--gold); background: rgba(221,172,103,.07); color: var(--bone); }
.flash--ok .flash__tag { color: var(--gold); }
.flash--err { border-color: rgba(226,115,90,.35); border-left-color: var(--danger); background: rgba(226,115,90,.07); color: #f1c7bb; }
.flash--err .flash__tag { color: var(--danger); }

/* ---------- main / footer ---------- */
main { flex: 1; }
.page { padding-block: clamp(2rem, 1.2rem + 3vw, 4rem) clamp(3rem, 2rem + 4vw, 6rem); }
.section { padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem); position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: 2rem; }
.rule { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--line-3), transparent); margin: 0; }

.footer { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--void), var(--ink)); padding-block: 3rem 2.5rem; margin-top: auto; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: end; }
.footer__line { font-family: var(--f-serif); font-style: italic; font-size: var(--step-2); color: var(--bone); margin: 0 0 .5rem; line-height: 1.15; }
.footer__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: flex-end; font-size: .78rem; color: var(--dim); }
.footer__meta a { color: var(--muted); text-decoration: none; }
.footer__meta a:hover { color: var(--paper); }
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr; } .footer__meta { justify-content: flex-start; } }

/* ---------- buttons & forms ---------- */
.btn {
  --b: var(--plasma);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--f-sans); font-weight: 600; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  padding: .95rem 1.5rem; border: 1px solid var(--b); border-radius: var(--radius);
  background: var(--b); color: var(--void); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .2s ease, color .2s ease, box-shadow .25s ease, transform .2s ease;
}
.btn:hover { color: var(--void); background: #ff9a26; box-shadow: 0 0 0 1px rgba(243,132,4,.35), 0 10px 40px -10px rgba(243,132,4,.65); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--bone); border-color: var(--line-3); }
.btn--ghost:hover { background: rgba(221,172,103,.08); color: var(--paper); box-shadow: none; border-color: var(--gold); }
.btn--sm { padding: .55rem .9rem; font-size: .7rem; letter-spacing: .16em; }
.btn--danger { --b: #b9472f; color: var(--paper); }
.btn--danger:hover { background: #d0573c; color: var(--paper); box-shadow: none; }
.btn__arrow { transition: transform .2s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

.field { display: flex; flex-direction: column; gap: .45rem; }
.label { font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.label .opt { color: var(--dim); letter-spacing: .1em; text-transform: none; font-weight: 400; }
.input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--paper);
  background: rgba(11, 10, 9, 0.85); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: .85rem 1rem; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input::placeholder { color: #877c6d; }
.input:hover { border-color: var(--line-3); }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(221,172,103,.16); background: var(--ink); }
textarea.input { resize: vertical; min-height: 7rem; line-height: 1.5; }
.input--sm { padding: .5rem .7rem; font-size: .88rem; }
.hint { font-size: .8rem; color: var(--dim); margin: 0; }

.inline-form { display: flex; gap: .6rem; }
.inline-form .input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .inline-form { flex-direction: column; } }

.search { position: relative; display: flex; align-items: center; min-width: min(100%, 20rem); }
.search svg { position: absolute; left: .85rem; width: 1rem; height: 1rem; color: var(--dim); pointer-events: none; }
.search .input { padding-left: 2.5rem; padding-right: 5.6rem; }
.search .btn { position: absolute; right: .3rem; top: .3rem; bottom: .3rem; padding-block: 0; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); background: var(--void); }
.hero__art { position: absolute; inset: 0; z-index: -2; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero::before { /* legibility scrim on the text side */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,5,7,.92) 0%, rgba(5,5,7,.72) 34%, rgba(5,5,7,.08) 64%, rgba(5,5,7,0) 100%),
    linear-gradient(0deg, rgba(5,5,7,.9) 0%, rgba(5,5,7,0) 30%);
}
.hero__inner { min-height: clamp(34rem, 78vh, 46rem); display: flex; flex-direction: column; justify-content: center; padding-block: 5rem 4.5rem; }
.hero__copy { max-width: 48rem; }
.hero .lede { max-width: 36rem; }
.hero .display { margin-bottom: 1.6rem; }
.hero .thesis { margin-bottom: 1.6rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.hero__foot { display: flex; flex-wrap: wrap; gap: .4rem 2.4rem; margin-top: 3.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); max-width: 36rem; }
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat__v { font-family: var(--f-mono); font-size: 1.35rem; color: var(--paper); font-variant-numeric: tabular-nums; }
.stat__k { font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); }
.hero__caption { position: absolute; right: var(--pad); bottom: 1.1rem; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(238,223,194,.42); }
@media (max-width: 1024px) {
  .hero__art { bottom: auto; height: 27rem; }
  .hero__art img { object-position: 72% 50%; }
  .hero::before { background: linear-gradient(180deg, rgba(5,5,7,0) 0rem, rgba(5,5,7,.25) 12rem, rgba(5,5,7,.88) 22rem, var(--void) 27rem); }
  .hero__inner { min-height: auto; padding-block: 15rem 3.5rem; }
  .hero__caption { display: none; }
}

/* ---------- leaderboard ---------- */
.board { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22,17,13,.55), rgba(11,10,9,.35)); }
.board-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board-table th {
  font-family: var(--f-sans); font-size: .64rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
  color: var(--dim); text-align: left; padding: 1rem 1rem .85rem; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.board-table td { padding: 1.05rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.board-table tbody tr { transition: background .2s ease; position: relative; }
.board-table tbody tr:hover { background: rgba(221,172,103,.045); }
.board-table tbody tr:last-child td { border-bottom: 0; }
.board-table .num { text-align: right; }
.col-rank { width: 4.5rem; }
.col-cat { width: 5.4rem; }
.col-overall { width: 15rem; }
.rank { font-family: var(--f-mono); font-size: .9rem; color: var(--dim); display: inline-flex; align-items: center; gap: .4rem; }
.rank--1 { color: var(--gold); }
.rank__torch { width: 1rem; height: 1.25rem; }
.entity { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.entity__name { font-family: var(--f-serif); font-weight: 600; font-size: 1.45rem; line-height: 1.1; color: var(--paper); text-decoration: none; letter-spacing: .005em; }
.entity__name:hover { color: var(--corona); }
.entity__name::after { content: ""; position: absolute; inset: 0; } /* whole row clickable */
.entity__ind { font-size: .78rem; color: var(--dim); letter-spacing: .02em; }
.minibar { display: flex; flex-direction: column; gap: .35rem; align-items: flex-end; }
.minibar__v { font-family: var(--f-mono); font-size: .82rem; color: var(--muted); }
.minibar .bar { width: 3.4rem; height: 2px; }
.overall { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .35rem 1rem; }
.overall__v { font-family: var(--f-mono); font-size: 1.6rem; font-weight: 500; color: var(--paper); line-height: 1; }
.overall__v small { font-size: .7rem; color: var(--dim); margin-left: .15rem; }
.overall .bar { grid-column: 1 / -1; height: 3px; }
.overall .band { grid-column: 1; grid-row: 1; justify-self: start; }
.board-empty { padding: 3.5rem 1.5rem; text-align: center; }
.board-empty .h3 { font-family: var(--f-serif); font-size: var(--step-2); font-weight: 500; margin-bottom: .4rem; }
.board-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 1rem; font-size: .78rem; color: var(--dim); }

@media (max-width: 960px) { .col-cat { display: none; } }
@media (max-width: 640px) {
  .board-table thead { display: none; }
  .board-table td { padding: .95rem .85rem; }
  .col-rank { width: 2.6rem; padding-right: 0 !important; }
  .col-overall { width: 8rem; }
  .rank { flex-direction: column; gap: .2rem; font-size: .8rem; }
  .overall__v { font-size: 1.4rem; }
  .overall { grid-template-columns: auto; justify-items: end; gap: .3rem; }
  .overall .band { grid-row: auto; grid-column: 1; justify-self: end; order: 3; }
  .overall .bar { width: 100%; }
  .entity__name { font-size: 1.25rem; }
}

/* energy bar — color is absolute to the 0–10 scale, not to the fill length */
.bar { position: relative; display: block; width: 100%; height: 3px; background: rgba(221,172,103,.12); overflow: hidden; }
.bar__fill {
  position: absolute; inset: 0 auto 0 0;
  width: calc(var(--s, 0) * 10%);
  background: var(--grad-energy);
  background-size: calc(100% * 10 / max(var(--s, 1), 0.1)) 100%;
  box-shadow: 0 0 12px rgba(243,132,4,.45);
}
.bar--pending .bar__fill { background: repeating-linear-gradient(90deg, rgba(198,150,103,.45) 0 4px, transparent 4px 8px); box-shadow: none; }

.band {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .62rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
}
.band::before { content: ""; width: .38rem; height: .38rem; border-radius: 50%; background: currentColor; }
.band--accel { color: var(--plasma); }
.band--accel::before { box-shadow: 0 0 8px var(--plasma); }
.band--climb { color: var(--gold); }
.band--hold { color: var(--brass); }
.band--decel { color: #a39684; }
.band--pending { color: var(--dim); }
.band--pending::before { background: transparent; border: 1px dashed currentColor; }

/* ---------- manifesto ---------- */
.manifesto { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.manifesto__intro { position: sticky; top: 6rem; }
.tenets { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.tenet { display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.tenet:last-child { border-bottom: 1px solid var(--line); }
.tenet__n { font-family: var(--f-mon); font-size: 1.1rem; color: var(--brass); letter-spacing: .1em; padding-top: .35rem; }
.tenet__t { font-family: var(--f-serif); font-size: var(--step-2); font-weight: 600; color: var(--paper); line-height: 1.15; margin: 0 0 .5rem; }
.tenet p { margin: 0; color: var(--muted); max-width: 34rem; }
@media (max-width: 860px) { .tenet { grid-template-columns: 2.2rem 1fr; } .manifesto { grid-template-columns: 1fr; } .manifesto__intro { position: static; } }

/* ---------- ladder ---------- */
.ladder { position: relative; border: 1px solid var(--line); background: radial-gradient(120% 140% at 100% 0%, rgba(243,132,4,.10), transparent 55%), linear-gradient(180deg, var(--umber), var(--ink)); overflow: hidden; }
.ladder__curve { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ladder__grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.rung { padding: 2rem 1.5rem 2.2rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; min-height: 15rem; }
.rung:first-child { border-left: 0; }
.rung__k { font-family: var(--f-mon); font-size: .78rem; letter-spacing: .36em; text-transform: uppercase; color: var(--brass); }
.rung__p { font-family: var(--f-mono); font-size: var(--step-2); color: var(--paper); line-height: 1.1; margin-top: auto; }
.rung__p sup { font-size: .55em; }
.rung__d { font-size: .88rem; color: var(--muted); margin: 0; }
.rung--now .rung__k { color: var(--plasma); }
.rung--now .rung__p { color: var(--corona); }
.ladder__note { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); font-size: .76rem; color: var(--dim); }
@media (max-width: 820px) { .ladder__curve { opacity: .3; } .rung { padding: 1.4rem 1.1rem 1.5rem; } .rung__p { font-size: var(--step-1); } .ladder__grid { grid-template-columns: 1fr 1fr; } .rung { min-height: 11rem; } .rung:nth-child(3) { border-left: 0; } .rung:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- CTA ---------- */
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem; align-items: center; }
@media (max-width: 820px) { .cta { grid-template-columns: 1fr; } }

/* ---------- company ---------- */
.crumb { display: inline-flex; align-items: center; gap: .5rem; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); text-decoration: none; margin-bottom: 2.25rem; }
.crumb:hover { color: var(--paper); }
.dossier { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2rem 3rem; align-items: center; padding: clamp(1.75rem, 1rem + 3vw, 3rem); border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 160% at 100% 50%, rgba(243,132,4,.14), rgba(213,89,3,.04) 40%, transparent 65%), linear-gradient(180deg, var(--umber), var(--ink)); }
.dossier::before { content: ""; position: absolute; z-index: -1; right: -14rem; top: 50%; width: 38rem; height: 38rem; transform: translateY(-50%); border-radius: 50%; border: 1px solid var(--line); box-shadow: inset 0 0 0 4.5rem rgba(5,5,7,0), 0 0 0 4.5rem rgba(221,172,103,.025); }
.dossier__name { font-family: var(--f-serif); font-weight: 500; font-size: var(--step-5); line-height: .98; color: var(--paper); margin: 0 0 1rem; letter-spacing: -.012em; overflow-wrap: anywhere; }
.dossier__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gauge { position: relative; width: 11.5rem; height: 11.5rem; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.gauge__track { fill: none; stroke: rgba(221,172,103,.13); stroke-width: 5; }
.gauge__ticks { fill: none; stroke: rgba(221,172,103,.35); stroke-width: 6; stroke-dasharray: 1 30.416; }
.gauge__arc { fill: none; stroke: url(#gaugeGrad); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(243,132,4,.55)); }
.gauge__arc--pending { stroke: var(--brass); stroke-dasharray: 3 6 !important; filter: none; opacity: .6; }
.gauge__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; }
.gauge__v { font-family: var(--f-mono); font-size: 2.9rem; font-weight: 500; color: var(--paper); line-height: 1; letter-spacing: -.02em; }
.gauge__k { font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); }
.dossier__score { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
@media (max-width: 720px) { .dossier { grid-template-columns: 1fr; } .dossier__score { flex-direction: row; justify-content: flex-start; gap: 1.25rem; } .gauge { width: 8.5rem; height: 8.5rem; } .gauge__v { font-size: 2.2rem; } }

.notice { margin-top: 1.25rem; display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.15rem; border: 1px dashed var(--line-3); color: var(--bone); background: rgba(221,172,103,.04); font-size: .92rem; }
.notice strong { color: var(--gold); font-weight: 600; }

.profile { margin-top: 3rem; display: grid; grid-template-columns: 1fr; gap: .95rem; padding: 1.75rem; border: 1px solid var(--line); background: rgba(11,10,9,.6); }
.profile__row { display: grid; grid-template-columns: 13rem 1fr 3.5rem; gap: 1.25rem; align-items: center; }
.profile__label { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.profile__v { font-family: var(--f-mono); font-size: .95rem; color: var(--paper); text-align: right; }
.profile .bar { height: 4px; }
@media (max-width: 640px) { .profile { padding: 1.25rem; } .profile__row { grid-template-columns: 1fr auto; gap: .45rem 1rem; } .profile__row .bar { grid-column: 1 / -1; grid-row: 2; } }

.cards { margin-top: 3rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--ink); padding: 1.75rem 1.75rem 1.6rem; display: flex; flex-direction: column; gap: .9rem; transition: background .25s ease; }
.card:hover { background: #100d0b; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.card__k { font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--brass); margin: 0 0 .35rem; }
.card__title { font-family: var(--f-serif); font-weight: 600; font-size: 1.6rem; color: var(--paper); line-height: 1.1; margin: 0; }
.card__v { font-family: var(--f-mono); font-size: 2.1rem; font-weight: 500; color: var(--paper); line-height: 1; text-align: right; }
.card__v small { display: block; font-size: .62rem; color: var(--dim); letter-spacing: .14em; margin-top: .3rem; }
.card .bar { height: 2px; }
.card__body { overflow-wrap: anywhere; margin: 0; color: var(--text); font-size: .95rem; line-height: 1.65; }
.card__body--pending { color: var(--dim); font-style: italic; }
.evidence { list-style: none; margin: auto 0 0; padding: .9rem 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .4rem; }
.evidence__k { font-size: .6rem; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); margin-bottom: .1rem; }
.evidence a { display: flex; gap: .55rem; align-items: baseline; font-family: var(--f-mono); font-size: .76rem; text-decoration: none; color: var(--gold); min-width: 0; }
.evidence a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.evidence a:hover { color: var(--corona); }
.evidence__i { color: var(--dim); flex: none; }
.card__foot { font-family: var(--f-mono); font-size: .66rem; color: var(--dim); letter-spacing: .04em; }
@media (max-width: 760px) { .cards { grid-template-columns: minmax(0, 1fr); } .card { padding: 1.4rem 1.25rem; } }

.meta-line { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-family: var(--f-mono); font-size: .74rem; color: var(--dim); }

/* ---------- narrow forms (suggest / login) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22,17,13,.75), rgba(11,10,9,.75)); padding: clamp(1.4rem, 1rem + 2vw, 2.25rem); }
.stack { display: flex; flex-direction: column; gap: 1.2rem; }
.criteria { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .1rem; }
.criteria li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .7rem; padding: .85rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.criteria li:last-child { border-bottom: 1px solid var(--line); }
.criteria b { color: var(--bone); font-weight: 600; }
.criteria .mono { color: var(--brass); font-size: .75rem; padding-top: .2rem; }
.login { max-width: 26rem; margin: clamp(1rem, 4vw, 3rem) auto 0; }
.login__mark { width: 3.2rem; height: 3.2rem; margin: 0 auto 1.5rem; }

/* ---------- admin ---------- */
.admin-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 2.5rem; }
.admin-sec { margin-bottom: 3rem; }
.admin-sec > .eyebrow { margin-bottom: 1rem; }
.queue { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.queue__item { background: var(--ink); padding: 1.1rem 1.25rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.queue__name { font-family: var(--f-serif); font-size: 1.35rem; font-weight: 600; color: var(--paper); line-height: 1.15; }
.queue__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.queue__actions form { display: flex; gap: .4rem; margin: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; border: 1px solid var(--line); }
.data-table th { font-size: .62rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line-2); background: rgba(22,17,13,.6); }
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table td.empty { color: var(--dim); }
.table-scroll { overflow-x: auto; }

/* ---------- awaiting judgment (unranked) ---------- */
.awaiting { border-top: 1px solid var(--line-2); padding: 1.1rem 1rem 1.2rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: baseline; }
.awaiting__k { margin: 0; display: flex; gap: .9rem; align-items: baseline; font-size: .78rem; }
.awaiting__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.awaiting__list li { display: flex; gap: .55rem; align-items: baseline; font-size: .8rem; }
.awaiting__list a { font-family: var(--f-serif); font-weight: 600; font-size: 1.15rem; color: var(--bone); text-decoration: none; }
.awaiting__list a:hover { color: var(--corona); }

/* ===== v2: measured + opinion ===== */
.tag { display: inline-block; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; padding: .12rem .4rem; border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.tag--measured { color: var(--gold); border-color: rgba(221,172,103,.45); }
.tag--opinion { color: var(--sky, #9db4c8); border-color: rgba(157,180,200,.35); border-style: dashed; }
.conf { display: block; margin-top: .5rem; font-family: var(--f-mono); font-size: .72rem; color: var(--muted); text-align: center; }
.conf .up { color: var(--ok, #8fbf7f); } .conf .down { color: var(--danger, #d9654b); }
.dossier__synth { margin: 1.1rem 0 0; max-width: 40rem; color: var(--text); font-size: .95rem; line-height: 1.6; }
.dossier__synth .tag { margin-left: .35rem; }

.kstrip { margin-top: 1.5rem; display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; align-items: center; padding: 1.4rem 1.6rem; border: 1px solid rgba(243,132,4,.28); background: linear-gradient(90deg, rgba(243,132,4,.08), rgba(11,10,9,.4) 60%); }
.kstrip__k { display: flex; flex-direction: column; gap: .3rem; }
.kstrip__lbl { font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--brass); }
.kstrip__v { font-family: var(--f-mono); font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); color: var(--corona, #f6c37a); line-height: 1; white-space: nowrap; }
.kstrip__body p { margin: 0 0 .35rem; color: var(--text); }
.kstrip__body p.dim { font-size: .8rem; margin: 0; }
.kstrip__body b { color: var(--paper); font-weight: 600; }
@media (max-width: 640px) { .kstrip { grid-template-columns: 1fr; gap: .8rem; } }

.profile__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .25rem; }
.profile__row--v2 { grid-template-columns: 17rem 2.5rem 1fr 3rem 4.2rem; }
.profile__row--v2 .tag { margin-left: .4rem; }
.profile__w, .profile__c { font-size: .72rem; text-align: right; }
.profile__foot { margin: .5rem 0 0; font-size: .76rem; }
@media (max-width: 760px) { .profile__row--v2 { grid-template-columns: 1fr auto auto; } .profile__row--v2 .bar { grid-column: 1 / -1; grid-row: 2; } .profile__w { display: none; } }

.sec-h { margin: 3rem 0 0; font-family: var(--f-serif); font-weight: 600; color: var(--paper); }
.sec-h .dim { font-family: var(--f-sans); font-size: .85rem; font-weight: 400; }
.card--opinion { background: linear-gradient(180deg, rgba(157,180,200,.035), transparent 40%), var(--ink); }

.quotes { list-style: none; margin: auto 0 0; padding: .9rem 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .6rem; }
.quote { font-size: .86rem; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.quote__t { color: var(--bone); font-style: italic; }
.quote__t.mono { font-style: normal; font-size: .72rem; color: var(--muted); }
.quote__src { display: inline-block; margin-left: .25rem; font-family: var(--f-mono); font-size: .7rem; color: var(--gold); text-decoration: none; }
.quote__src:hover { color: var(--corona); }

.srclist { margin: 1rem 0 0; padding-left: 1.4rem; display: grid; gap: .7rem; }
.srclist li { color: var(--dim); }
.srclist a { color: var(--gold); text-decoration: none; overflow-wrap: anywhere; }
.srclist a:hover { color: var(--corona); }
.srclist .mono { display: block; font-size: .7rem; margin-top: .15rem; overflow-wrap: anywhere; }

.runlog { margin-top: 2.5rem; border: 1px solid var(--line); padding: .9rem 1.1rem; background: rgba(11,10,9,.5); }
.runlog summary { cursor: pointer; font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }
.runlog .data-table { margin-top: .8rem; }

.col-k { text-align: right; }
.kval { font-family: var(--f-mono); font-size: .86rem; color: var(--corona, #f6c37a); }
.overall__c { display: block; font-family: var(--f-mono); font-size: .62rem; color: var(--dim); text-align: right; margin-top: .2rem; }

.rubric { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.rubric li { display: grid; grid-template-columns: 1.8rem 1fr; gap: .6rem; font-size: .86rem; color: var(--text); line-height: 1.5; }
.rubric__a { color: var(--gold); text-align: right; }
.anchors { margin-top: .25rem; }

.runstat { padding: .05rem .35rem; border: 1px solid var(--line-2); }
.runstat--succeeded { color: var(--ok, #8fbf7f); } .runstat--failed { color: var(--danger, #d9654b); }
.runstat--running, .runstat--queued { color: var(--plasma); }
.stagebar { display: flex; flex-wrap: wrap; gap: 3px; }
.stagebar__s { font-family: var(--f-mono); font-size: .62rem; padding: .1rem .3rem; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.stagebar__s--succeeded { border-color: rgba(143,191,127,.45); }
.stagebar__s--failed, .stagebar__s--interrupted { border-color: rgba(217,101,75,.6); color: var(--danger, #d9654b); }
.stagebar__s--running { border-color: var(--plasma); color: var(--plasma); }
.stagebar__s--skipped { opacity: .55; border-style: dashed; }
.cards > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 560px) { .nav__link--opt { display: none; } }
@media (max-width: 400px) { .nav__links { gap: .75rem; } .nav__link { letter-spacing: .1em; } }
.nav__short { display: none; }
@media (max-width: 480px) { .nav__long { display: none; } .nav__short { display: inline; } }
.srclist__note { margin-top: 1rem; }

/* ===== v2.1: run history, admin run views, mobile hardening ===== */
.up { color: var(--ok, #8fbf7f); } .down { color: var(--danger, #d9654b); }
.small { font-size: .74rem; }
.nowrap { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; word-break: break-word; }
.plain { color: inherit; text-decoration: none; }
form.inline { display: inline; margin: 0; }
.profile__row--v2 { grid-template-columns: 17rem 2.5rem 1fr 3rem 3rem 4.2rem; }
.profile__d { font-size: .74rem; text-align: right; }
@media (max-width: 760px) { .profile__row--v2 { grid-template-columns: 1fr auto auto auto; } }

/* relative run labels: N, N-1, … */
.runlbl { display: inline-block; min-width: 2.6rem; text-align: center; font-family: var(--f-mono); font-size: .74rem; padding: .12rem .4rem; border: 1px solid var(--line-2); color: var(--gold); }
.runlbl--cur { border-color: var(--plasma); color: var(--plasma); }
.runlbl--v0 { border-style: dashed; color: var(--dim); }
.histbar { display: flex; gap: .9rem; align-items: baseline; padding: .9rem 1.1rem; margin: -1rem 0 1.75rem; border: 1px solid var(--line-2); border-left: 3px solid var(--gold); background: rgba(221,172,103,.06); font-size: .92rem; }
.histbar a { white-space: nowrap; }
.history { margin-top: 2.5rem; }
.history__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-bottom: 1rem; }
.history__sub { margin: .35rem 0 0; font-size: .82rem; max-width: 40rem; }
.history__table tr.is-viewing td { background: rgba(243,132,4,.06); }
.history__ver { font-size: .72rem; }
.history__go { text-align: right; white-space: nowrap; }
.history__legacy td { opacity: .8; }
.sparks { display: flex; gap: 1.5rem; }
.spark { margin: 0; color: var(--gold); }
.spark svg { display: block; width: 120px; height: 32px; overflow: visible; }
.spark__dot { fill: var(--plasma); }
.spark figcaption { font-size: .72rem; color: var(--muted); margin-top: .2rem; }
.spark__k { letter-spacing: .18em; text-transform: uppercase; font-size: .62rem; color: var(--dim); }

/* admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: -1.5rem 0 2.25rem; border-bottom: 1px solid var(--line); }
.admin-nav__a { display: inline-flex; align-items: center; min-height: 44px; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.admin-nav__a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--plasma); }
.admin-sec__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem 1.25rem; margin-bottom: 1.5rem; }
.filters .field { min-width: 12rem; flex: 0 1 16rem; }
.filters__go { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 55%, calc(100% - .8rem) 55%; background-size: .3rem .3rem; background-repeat: no-repeat; padding-right: 2rem; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.25rem 0; }
.runhead { padding: 1.25rem; border: 1px solid var(--line-2); background: rgba(22,17,13,.6); margin-bottom: 1.5rem; display: grid; gap: .9rem; }
.runhead__status { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; font-family: var(--f-mono); }
.runhead__status .runstat { font-size: .95rem; padding: .2rem .6rem; }
.runhead__err { margin-top: 0; }
.stagebar--lg .stagebar__s { font-size: .74rem; padding: .3rem .5rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 2.5rem; }
.facts__g { margin: 0; padding: 1rem 1.15rem; background: var(--ink); display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .45rem 1rem; align-content: start; font-size: .84rem; }
.facts__g dt { color: var(--dim); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; padding-top: .2rem; }
.facts__g dd { margin: 0; overflow-wrap: break-word; }
pre.json { max-height: 22rem; overflow: auto; font-size: .7rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--void); border: 1px solid var(--line); padding: .7rem; margin: .4rem 0 0; }
td .err { color: var(--danger); margin-bottom: .3rem; }
td.actions { text-align: right; white-space: nowrap; }
.queue__deny .input { width: 12rem; }
.errpage { max-width: 40rem; padding-block: 3rem 2rem; }

/* stacked tables: rows become cards on small screens (cells keep their data-label) */
@media (max-width: 640px) {
  .data-table--stack { border: 0; }
  .data-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table--stack, .data-table--stack tbody, .data-table--stack tr, .data-table--stack td { display: block; width: 100%; }
  .data-table--stack tr { border: 1px solid var(--line); background: var(--ink); margin-bottom: .6rem; padding: .35rem 0; }
  .data-table--stack td { border: 0; padding: .4rem .9rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; text-align: right; }
  .data-table--stack td.num { text-align: right; }
  .data-table--stack td[data-label]::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-family: var(--f-sans); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
  .data-table--stack td > * { min-width: 0; }
  .data-table--stack td.empty { display: block; text-align: left; }
  .data-table--stack td.history__go, .data-table--stack td.actions { justify-content: flex-end; }
  .data-table--stack td:not([data-label]):empty { display: none; }
  .history__table tr.is-viewing { border-color: var(--plasma); }
  .history__head .sparks { width: 100%; justify-content: flex-start; }
  .histbar { flex-wrap: wrap; }
  .admin-nav { margin-top: -1.25rem; }
  .facts__g { grid-template-columns: 1fr; gap: .15rem; }
  .facts__g dd { margin-bottom: .45rem; }
  .queue__deny { width: 100%; }
  .queue__deny .input { flex: 1; width: auto; min-width: 0; }
}

/* long strings never force horizontal scroll */
.quote__t, .quote__src, .srclist a, .srclist span, .kstrip__body, .dossier__name, .notice, .card__foot, .entity__name, .awaiting__list li { overflow-wrap: anywhere; }
.awaiting__list li { flex-wrap: wrap; }

/* touch: 44px minimum targets for primary controls */
@media (pointer: coarse), (max-width: 760px) {
  .nav__link, .btn, .btn--sm, a.chip, .crumb, .footer__meta a, .runlog summary, .admin-nav__a, select.input, .input--sm { min-height: 44px; }
  .nav__link, a.chip, .crumb, .footer__meta a { display: inline-flex; align-items: center; }
  .btn--sm { display: inline-flex; align-items: center; justify-content: center; }
  .runlog summary { display: flex; align-items: center; }
  .footer__meta { gap: .25rem 1.25rem; }
  .crumb { margin-bottom: 1.25rem; }
  .entity__name { display: inline-block; padding-block: .35rem; }
  .quote__src { display: inline-block; padding-block: .5rem; }
  .card__foot a, .srclist li > a, .meta-line a, .awaiting__list a, .history__sub a, .histbar a, .kstrip__body a, .board-note a { display: inline-block; padding-block: .6rem; }
}

/* notched phones: keep content clear of the safe areas */
@supports (padding: max(0px)) {
  .wrap { padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }
  .footer { padding-bottom: max(2.5rem, calc(env(safe-area-inset-bottom) + 1.5rem)); }
}
@media (max-width: 720px) { a.chip.nav__meta { display: none; } }
@media (pointer: coarse), (max-width: 760px) {
  .brand { min-height: 44px; }
  .quote__src, .card__foot a, .srclist li > a, .meta-line a, .awaiting__list a, .histbar a, .kstrip__body a, .board-note a,
  .data-table--stack td a, .runlog__ver a, .profile__head a, .hint a, details > summary { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
  .data-table--stack td a.btn { min-height: 44px; }
}
/* legible type on phones/tablets: nothing that carries information below ~12px */
@media (max-width: 820px) {
  .card__foot, .quote__src, .srclist span, .meta-line, .history__ver, .runlog__ver, .small, .hint { font-size: .78rem; }
  span.dim.mono, li.dim.mono, td.mono, .profile__c, .profile__d, .profile__w { font-size: .78rem; }
  .card__k, .kstrip__lbl, .evidence__k, .facts__g dt, .spark__k, .data-table th, .data-table--stack td[data-label]::before { font-size: .72rem; }
  .chip, .nav__link, .btn--sm, .stagebar__s, pre.json, .overall__c, small { font-size: .75rem; }
  .tag { font-size: .7rem; }
}
@media (max-width: 560px) { .nav__links .nav__link--opt { display: none; } }
@media (max-width: 400px) { .nav__links { gap: .6rem; } .brand__name { letter-spacing: .2em; } }
@media (max-width: 400px) {
  .nav__inner { gap: .5rem; }
  .brand { gap: .5rem; }
  .brand__name { font-size: .74rem; letter-spacing: .14em; }
  .nav__links { gap: .5rem; }
  .nav__link { letter-spacing: .06em; }
}
@media (max-width: 340px) { .brand__word { display: none; } }
@media (pointer: coarse), (max-width: 760px) {
  .data-table--stack td a { min-width: 44px; }
  h1 a.plain { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 640px) { .data-table--stack td { padding: .28rem .9rem; } .data-table--stack tr { padding: .45rem 0; } }
@media (max-width: 760px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* v2.2 — withheld (insufficient) runs note */
.history__withheld { margin-top: .75rem; max-width: 46rem; display: flex; gap: .5rem; align-items: baseline; }
.runstat--withheld { color: var(--dim); border: 1px dashed currentColor; padding: 0 .3rem; border-radius: 3px; font-size: .85em; }

/* reliability: alert banner, identity pin, degraded runs */
.alerts { margin: 0 0 1.25rem; display: grid; gap: .45rem; }
.alerts__row { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: baseline; padding: .55rem .8rem; border: 1px solid var(--line-3); border-left: 3px solid var(--plasma); font-size: .82rem; }
.alerts__row--failed, .alerts__row--stuck { border-left-color: var(--danger, #d9654b); }
.alerts__row--degraded, .alerts__row--withheld { border-left-color: var(--gold); }
.alerts__tag { font-family: var(--mono, monospace); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-right: .2rem; }
.alerts__item { font-family: var(--mono, monospace); font-size: .76rem; }
.identity { margin-top: .35rem; }
.identity summary { cursor: pointer; color: var(--dim); }
.identity__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .4rem .6rem; margin-top: .45rem; font-size: .76rem; }
.identity__form label { display: grid; gap: .15rem; color: var(--dim); }
.identity__form input, .identity__form select { font: inherit; padding: .25rem .4rem; background: transparent; color: var(--bone); border: 1px solid var(--line-3); }
.runstat--degraded { color: var(--gold); border: 1px dashed currentColor; padding: 0 .3rem; border-radius: 3px; font-size: .85em; }
.box--degraded { border: 1px dashed var(--gold); padding: .7rem .9rem; margin: .8rem 0; font-size: .85rem; }
