/* ScoreMeadow — Instrumented Evaluation Platform.
   ONE contrast rule, minimal !important: every surface sets --fg / --fg-muted
   / --title / --surface / --border on itself; components only ever reference
   those five custom properties. Put a component inside `.on-dark` (or a node
   that already redefines the tokens, e.g. .section--night) and every child
   recolors correctly with zero extra overrides. */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Literata:opsz,wght@7..72,400;7..72,500;7..72,600;7..72,700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap");

:root {
  --paper: #EEF1EA; /* green-tinted evaluation ground — not SurveyTwine parchment twin */
  --ink: #121D1A;
  --green: #347A58;
  --blue: #356FD4;
  --orange: #DF763D;
  --ochre: #C69A32;
  --confirm: #35A677;
  --pending: #D99D35;
  --conflict: #D74F60;
  --ai: #7B69CE;

  --card-light: #FCFBF6;
  --card-dark: #1D2B27;
  --border-light: #D3CEC2;
  --border-dark: #354B44;
  --title-light: #222824;
  --title-dark: #F5F8F4;
  --body-light: #3E4541;
  --body-muted-light: #5B6158;
  --body-dark: #C5D1CC;
  --body-muted-dark: #8FA098;

  /* Contrast tokens — redefined inside .on-dark and night surfaces only. */
  --fg: var(--body-light);
  --fg-muted: var(--body-muted-light);
  --title: var(--title-light);
  --surface: var(--card-light);
  --border: var(--border-light);

  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --announce-h: 36px;
  --header-h: 58px;
  --site-top-h: calc(var(--announce-h) + var(--header-h));
  --container: min(1120px, calc(100% - 2.5rem));
  --container-wide: min(1280px, calc(100% - 2rem));
  --radius-s: 3px;
  --radius-m: 7px;
  --radius-l: 11px;
  --shadow-soft: 0 10px 28px rgba(18, 29, 26, 0.1);
  --shadow-night: 0 16px 44px rgba(0, 0, 0, 0.42);
  --ease-instrument: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg);
  background-color: var(--paper);
  /* Calibration wash — fine vertical tick marks (short + long, ruler style)
     plus low-opacity green/blue/ochre corner washes. Not SurveyTwine's warm
     dot grid, not SloganPrism's horizontal frequency bands, not TeamDune's
     diagonal hatch. */
  background-image:
    repeating-linear-gradient(90deg, rgba(18, 29, 26, 0.05) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(18, 29, 26, 0.07) 0 1px, transparent 1px 60px),
    radial-gradient(ellipse 82% 46% at 3% 0%, rgba(53, 122, 88, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 44% at 98% 4%, rgba(53, 111, 212, 0.07), transparent 52%),
    radial-gradient(ellipse 72% 42% at 96% 99%, rgba(198, 154, 50, 0.07), transparent 52%);
  background-size: 12px 100%, 60px 100%, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--title);
  font-weight: 600;
  line-height: 1.16;
  margin: 0 0 0.65em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
h4 { font-size: 1rem; font-family: var(--font-sans); font-weight: 700; }

p { margin: 0 0 1em; color: var(--fg); }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
code { font-family: var(--font-mono); font-size: 0.92em; }

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

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

@keyframes instrument-pulse {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(53, 111, 212, 0); }
  50% { box-shadow: inset 0 0 0 3px rgba(53, 111, 212, 0.32); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes needle-jitter {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-1px, 1px) rotate(-0.6deg); }
  40% { transform: translate(1px, -1px) rotate(0.5deg); }
  60% { transform: translate(-1px, -1px) rotate(-0.4deg); }
  80% { transform: translate(1px, 1px) rotate(0.6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
@keyframes chip-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ————————————————— Layout shell ————————————————— */
.site-shell { min-height: 100dvh; display: flex; flex-direction: column; position: relative; isolation: isolate; padding-top: var(--site-top-h); }
.site-shell > main { flex: 1 1 auto; }

.container { width: var(--container); margin-inline: auto; }
.container--wide { width: var(--container-wide); margin-inline: auto; }

.section { padding: 1.5rem 0; position: relative; }
.section--tight { padding: 1.1rem 0; }
.section--docs { padding-top: 1.5rem; padding-bottom: 2rem; }
.section--docs .legal-body { max-width: 68ch; }

.section--night,
.on-dark {
  --fg: var(--body-dark);
  --fg-muted: var(--body-muted-dark);
  --title: var(--title-dark);
  --surface: var(--card-dark);
  --border: var(--border-dark);
}

.section--night {
  color: var(--fg);
  background:
    linear-gradient(135deg, rgba(29, 43, 39, 0.9) 0%, transparent 55%),
    repeating-linear-gradient(90deg, rgba(53, 75, 68, 0.32) 0, rgba(53, 75, 68, 0.32) 1px, transparent 1px, transparent 74px),
    linear-gradient(180deg, #17231f 0%, var(--ink) 100%);
}

.mt-s { margin-top: 0.75rem !important; }
.mt-m { margin-top: 1.5rem !important; }
.mt-l { margin-top: 2.5rem !important; }

.is-ok { color: var(--confirm) !important; }
.is-warn { color: var(--conflict) !important; }
.is-active { border-color: var(--ochre) !important; }
.is-inview { animation: instrument-pulse 0.65s var(--ease-instrument) forwards; }

/* ————————————————— Type utilities ————————————————— */
.kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.65rem;
}

.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.6; color: var(--fg); max-width: 62ch; }

.mono-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
}

.ai-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 700; padding: 0.14rem 0.4rem;
  border-radius: 999px; background: rgba(123, 105, 206, 0.16); color: var(--ai);
}

.hint-line {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  background: var(--surface);
  margin: 1rem 0 0;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

.text-link { font-weight: 600; color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(53, 111, 212, 0.35); background: none; padding: 0; cursor: pointer; font-family: var(--font-sans); font-size: inherit; }
.text-link:hover { color: var(--ink); border-bottom-color: var(--ochre); }
.on-dark .text-link, .section--night .text-link { color: #9DB8F0; }
.on-dark a:hover, .section--night a:hover,
.on-dark .text-link:hover, .section--night .text-link:hover { color: var(--ochre); }

.linkish {
  background: none; border: none; padding: 0; font-weight: 700; color: var(--blue);
  cursor: pointer; font-family: var(--font-sans); font-size: 0.86rem;
  text-decoration: underline; text-decoration-color: rgba(53, 111, 212, 0.4);
}
.linkish:hover { color: var(--ink); }

/* Legend chips — used across ladder / offset-style legends */
.legend-item {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-muted);
}
.legend-item::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--border); flex-shrink: 0; }
.legend-item--fail::before, .legend-item--warn::before { background: var(--conflict); }
.legend-item--ok::before { background: var(--confirm); }
.legend-item--pending::before { background: var(--pending); }
.legend-item--absent::before { background: var(--border); }

/* ————————————————— Site top: announce + header ————————————————— */
.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  width: 100%;
  min-height: var(--site-top-h);
  background: var(--card-light);
}

/* Calibration strip — centered short line, notch-mark rail, case ID, and a
   lean message. Distinct from SloganPrism's spectrum rail, SurveyTwine's
   thread, and TeamDune's terrain seam. */
.announce-bar--calibration {
  position: relative;
  min-height: var(--announce-h);
  color: #C5D1CC;
  font-size: 0.8rem;
  background: #121D1A;
  border-bottom: none;
  overflow: hidden;
}
.announce-notch-rail {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(198, 154, 50, 0.55) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(53, 122, 88, 0.6) 0 1px, transparent 1px 7px);
  background-position: 0 0, 0 100%;
  background-repeat: repeat-x;
  background-size: 100% 6px, 100% 3px;
  opacity: 0.9;
}
.announce-bar--calibration .announce-bar-inner {
  width: var(--container-wide);
  margin-inline: auto;
  padding: 0.5rem 1rem;
  min-height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
}
.announce-bar--calibration .announce-text {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.7rem;
  line-height: 1.3;
  text-align: center;
}
.announce-bar--calibration .announce-case {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ochre);
}
.announce-bar--calibration .announce-tick {
  width: 1px; height: 10px;
  background: rgba(197, 209, 204, 0.4);
  flex-shrink: 0;
}
.announce-bar--calibration .announce-msg {
  color: #DCE4DE;
  font-weight: 500;
}
.announce-bar--calibration .announce-action {
  color: #8FD6B7;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 214, 183, 0.4);
}
.announce-bar--calibration .announce-action:hover,
.announce-bar--calibration .announce-action:focus-visible {
  color: var(--ochre);
  border-bottom-color: var(--ochre);
}

.site-header {
  min-height: var(--header-h);
  background: rgba(252, 251, 246, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.header-inner {
  width: var(--container-wide);
  margin-inline: auto;
  padding: 0 1rem;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.header-actions { display: flex; align-items: center; gap: 0.65rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--title-light); }
.brand:hover, .brand:focus-visible { color: var(--blue); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; color: inherit; }
.brand-text span { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.03em; color: var(--green); text-transform: uppercase; }
.brand-name { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-slogan-inline { display: block; color: var(--green); font-weight: 600; margin: 0.2rem 0 0.6rem; }
.brand-headline { margin-top: 0.15rem; }
.brand-desc { color: var(--fg); }
.brand-lockup { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.3rem; }
.brand-lockup h1 { margin: 0; }

.logo-mark { width: 2rem; height: 1.7rem; display: grid; place-items: center; flex-shrink: 0; color: var(--ink); }
.logo-mark svg { width: 100%; height: 100%; }
.logo-mark--hero { width: clamp(3rem, 5vw, 3.9rem); height: clamp(2.5rem, 4.2vw, 3.2rem); }

.nav-main { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.15rem 0.25rem; }

.nav-link {
  font-size: 0.79rem;
  font-weight: 600;
  color: rgba(18, 29, 26, 0.75);
  text-decoration: none;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--ink); background: rgba(252, 251, 246, 0.9); border-color: var(--border-light); }
.nav-link.is-active {
  color: var(--ink) !important;
  background: var(--card-light) !important;
  border-color: var(--border-light) !important;
  box-shadow: inset 0 -2px 0 var(--ochre);
}

.header-signin { font-size: 0.82rem; font-weight: 600; color: var(--body-light); text-decoration: none; }
.header-signin:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border-light);
  background: var(--card-light);
  color: var(--ink);
  border-radius: var(--radius-s);
  padding: 0.35rem 0.55rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border-light);
  background: var(--paper);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a { text-decoration: none; font-weight: 600; color: var(--body-light); padding: 0.5rem 0.65rem; border-radius: var(--radius-s); }
.mobile-nav a.is-active { background: var(--card-light); color: var(--ink); }

/* User menu */
.user-menu { position: relative; }
.user-avatar {
  width: 2.15rem; height: 2.15rem; border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--blue); color: #fff;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  cursor: pointer; display: grid; place-items: center;
}
.user-dropdown {
  --fg: var(--body-light); --fg-muted: var(--body-muted-light);
  --surface: var(--card-light); --border: var(--border-light);
  display: none; position: absolute; top: calc(100% + 0.6rem); right: 0;
  min-width: 228px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-m); box-shadow: var(--shadow-soft);
  padding: 0.5rem; flex-direction: column; z-index: 50;
}
.user-dropdown.is-open { display: flex; }
.user-workspace-label {
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--fg-muted); padding: 0.35rem 0.6rem 0.5rem; border-bottom: 1px solid var(--border); margin-bottom: 0.3rem;
}
.user-dropdown a, .user-dropdown button {
  display: block; width: 100%; text-align: left; padding: 0.5rem 0.6rem; border-radius: var(--radius-s);
  color: var(--fg); text-decoration: none; font-size: 0.86rem; font-weight: 600;
  border: none; background: none; cursor: pointer; font-family: var(--font-sans);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--paper); color: var(--ink); }
.user-dropdown button[data-sign-out] { color: var(--conflict); margin-top: 0.2rem; border-top: 1px solid var(--border); border-radius: 0; padding-top: 0.6rem; }

/* ————————————————— Buttons ————————————————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-family: var(--font-sans); font-weight: 700; font-size: 0.9rem;
  padding: 0.65rem 1.15rem; border-radius: var(--radius-m); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(53, 111, 212, 0.3); }
.btn-primary:hover { background: #2A5CB8; box-shadow: 0 10px 24px rgba(53, 111, 212, 0.36); color: #fff; }

.btn-secondary { background: var(--card-light); color: var(--ink); border-color: var(--border-light); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.section--night .btn-secondary, .on-dark .btn-secondary { background: rgba(53, 111, 212, 0.16); color: var(--title-dark); border-color: rgba(197, 209, 204, 0.4); }
.section--night .btn-secondary:hover, .on-dark .btn-secondary:hover { background: var(--blue); color: #fff; }

.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: rgba(53, 111, 212, 0.08); }
.section--night .btn-ghost, .on-dark .btn-ghost { color: var(--title-dark); border-color: rgba(197, 209, 204, 0.4); }

.btn-line { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-line:hover { background: rgba(53, 111, 212, 0.08); }

.btn-full { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ————————————————— Instrument Mast (page header) ————————————————— */
/* Full-width tick-mark bezel, then a grid: kicker/title column, lead +
   action column, and an OPTIONAL side column. The `:has()` rule below only
   opens a 3rd track when a `.instrument-mast-side` is actually present —
   never reserve empty grid space for a side panel that wasn't rendered. */
.instrument-mast { position: relative; padding: 0 0 1.35rem; background: linear-gradient(180deg, #EEEAE0 0%, var(--card-light) 100%); border-bottom: 2px solid var(--blue); overflow: hidden; }
.instrument-mast-band {
  height: 7px;
  background: repeating-linear-gradient(90deg,
    var(--border-light) 0 1px, transparent 1px 9px,
    var(--blue) 9px 10px, transparent 10px 45px);
  opacity: 0.9;
}
.instrument-mast--ink {
  --fg: var(--body-dark); --fg-muted: var(--body-muted-dark);
  --title: var(--title-dark); --surface: var(--card-dark); --border: var(--border-dark);
  background: linear-gradient(120deg, #17231f 0%, var(--ink) 55%, #101a17 100%);
  border-bottom-color: var(--green);
  color: var(--fg);
}
.instrument-mast--ink .instrument-mast-band {
  background: repeating-linear-gradient(90deg,
    var(--border-dark) 0 1px, transparent 1px 9px,
    var(--green) 9px 10px, transparent 10px 45px);
}

.instrument-mast-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
  padding-top: 1.35rem;
}
.instrument-mast-grid:has(.instrument-mast-side) {
  grid-template-columns: minmax(200px, 0.52fr) minmax(0, 1fr) minmax(220px, 0.48fr);
}

.instrument-mast-kicker-col { min-width: 0; }
.instrument-mast-kicker-col h1 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -0.02em; }
.instrument-mast-lead-col { min-width: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.instrument-mast-lead-col .lead { margin: 0; max-width: 64ch; }
.instrument-mast-action { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.instrument-mast-side { min-width: 0; }

@media (max-width: 900px) {
  .instrument-mast-grid, .instrument-mast-grid:has(.instrument-mast-side) { grid-template-columns: 1fr; }
}

/* Side panel — used inside instrument-mast-side and standalone asides */
.side-panel {
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  color: var(--fg);
}
.side-panel-chips { display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.side-chip { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.82rem; padding: 0.4rem 0.55rem; border: 1px solid var(--border); border-radius: var(--radius-s); background: rgba(53, 111, 212, 0.06); }
.side-chip span { color: var(--fg-muted); font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; }
.side-chip b { color: var(--title); }

/* Reusable CTA + hint row used at the bottom of most interactive sections */
.approve-row, .case-action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed var(--border-light); }
.approve-row .hint-line, .case-action-row .hint-line { margin: 0; flex: 1 1 260px; }

/* ————————————————— Section headings ————————————————— */
.sec-head { margin-bottom: 1rem; }
.sec-head .lead { margin-top: 0.35rem; }

/* ————————————————— Workspace layout helpers ————————————————— */
/* .workspace-main is a SINGLE grid: the toolbar spans the full row, then
   content + aside sit as the second row of that same grid. Never place a
   label/grid/aside as siblings of a 2-col grid. */
.workspace { display: flex; flex-direction: column; gap: 0.9rem; }
.workspace-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.62fr);
  gap: 1rem;
  align-items: start;
}
.workspace-toolbar { grid-column: 1 / -1; width: 100%; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; }
.workspace-content { min-width: 0; }
.workspace-aside { min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.workspace-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

@media (max-width: 1024px) { .workspace-main { grid-template-columns: 1fr; } }

/* ————————————————— Fact lines / status ————————————————— */
.fact-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.fact-lines li { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.85rem; }
.fact-lines span { color: var(--fg-muted); }
.fact-lines b { color: var(--title); font-weight: 600; }
.fact-lines--dark { --fg-muted: var(--body-muted-dark); }
.fact-lines--dark span { color: var(--body-muted-dark); }
.fact-lines--dark b { color: var(--title-dark); }

.code-block, .code-textarea {
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.6;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  color: var(--fg); padding: 1rem 1.1rem; overflow-x: auto;
}
.code-block { white-space: pre; }
.code-textarea { width: 100%; resize: vertical; min-height: 8rem; white-space: pre; }

.webhook-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.86rem; }
.webhook-list li { padding: 0.55rem 0.7rem; border-radius: var(--radius-s); border: 1px solid var(--border); background: var(--surface); }
.webhook-notice { padding: 0.7rem 0.85rem; border-radius: var(--radius-m); border: 1px solid rgba(217, 157, 53, 0.4); border-left: 3px solid var(--pending); background: rgba(217, 157, 53, 0.08); font-size: 0.86rem; margin: 0.75rem 0 0; }

/* ————————————————— Forms ————————————————— */
.form-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.85rem; font-size: 0.85rem; font-weight: 700; color: var(--title); }
.form-stack { display: flex; flex-direction: column; gap: 0.9rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; font-family: var(--font-sans); font-weight: 400; font-size: 0.9rem;
  padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-s);
  background: var(--surface); color: var(--fg);
}
textarea { font-family: var(--font-mono); font-size: 0.82rem; resize: vertical; min-height: 5.5rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

input[type="range"] { width: 100%; accent-color: var(--blue); }

.checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 400; color: var(--fg); }
.checkbox-row input[type="checkbox"], .checkbox-row input[type="radio"] { accent-color: var(--blue); width: 1rem; height: 1rem; flex-shrink: 0; }
.checkbox-row small { display: block; color: var(--fg-muted); font-weight: 400; }
.cookie-row { align-items: flex-start; margin-bottom: 0.6rem; }

/* Custom English file picker — never rely on the native "Choose File" label. */
.file-picker { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.file-picker-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-picker-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.9rem;
  border: 1px dashed var(--border) !important; border-radius: var(--radius-s);
  color: var(--title); font-weight: 700; font-size: 0.82rem; background: var(--surface); cursor: pointer;
}
.file-picker-btn:hover { border-color: var(--blue) !important; color: var(--blue); background: transparent; }
.file-picker-name { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); }

.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.9rem; }
.source-chip {
  display: block; font-size: 0.84rem; padding: 0.6rem 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); color: var(--fg); cursor: pointer;
}
.source-chip b { display: block; color: var(--title); }
.source-chip span { display: block; font-size: 0.76rem; color: var(--fg-muted); margin-top: 0.15rem; }
.source-chip input { margin-right: 0.4rem; accent-color: var(--blue); }

@media (max-width: 640px) { .source-grid { grid-template-columns: 1fr; } }

/* ════════════════════════ HOME — SCORE STAGE ════════════════════════ */
/* Full-bleed dark stage: brand + headline + signals on the left, a
   three-tab score-step switcher on the right (initial 82 -> unsupported 54
   -> rebuilt 68), each tab pre-rendering its own dial state + evidence in
   pages.py — this file only ever toggles which panel shows. */

/* Unstable Score Theater — full-bleed instrumented meadow stage (NOT SloganPrism
   filmstrip, NOT SurveyTwine spine, NOT TeamDune terrain). */
.score-theater {
  --fg: var(--body-dark); --fg-muted: var(--body-muted-dark);
  --title: var(--title-dark); --surface: #223530; --border: var(--border-dark);
  --traj-progress: 0.12;
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - var(--site-top-h));
  overflow: hidden;
  color: var(--fg);
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(340px, 1.15fr);
  gap: 0;
  background:
    radial-gradient(ellipse 70% 55% at 78% 28%, rgba(53, 122, 88, 0.28), transparent 58%),
    radial-gradient(ellipse 48% 50% at 12% 78%, rgba(198, 154, 50, 0.14), transparent 56%),
    radial-gradient(ellipse 40% 42% at 92% 88%, rgba(53, 111, 212, 0.12), transparent 55%),
    linear-gradient(155deg, #1a2c26 0%, var(--ink) 46%, #0c1512 100%);
}
.score-theater-atmosphere {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.score-theater-glow {
  position: absolute; border-radius: 50%; filter: blur(42px); opacity: 0.55;
  animation: meadow-drift 14s ease-in-out infinite alternate;
}
.score-theater-glow--meadow {
  width: min(52vw, 520px); height: min(52vw, 520px);
  right: -6%; top: 8%;
  background: radial-gradient(circle, rgba(53, 166, 119, 0.35), transparent 68%);
}
.score-theater-glow--ochre {
  width: min(38vw, 360px); height: min(38vw, 360px);
  left: -4%; bottom: 4%;
  background: radial-gradient(circle, rgba(198, 154, 50, 0.22), transparent 70%);
  animation-delay: -4s;
}
.score-theater-glow--blue {
  width: min(28vw, 280px); height: min(28vw, 280px);
  right: 28%; bottom: -8%;
  background: radial-gradient(circle, rgba(53, 111, 212, 0.18), transparent 70%);
  animation-delay: -8s;
}
.score-theater-contours {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.22;
}
.score-theater-contours path {
  fill: none; stroke: #7FCB9E; stroke-width: 1.25;
  stroke-dasharray: 4 10;
}
.score-theater-contour-accent {
  stroke: #E0C56A !important; stroke-width: 1.6 !important; opacity: 0.9;
  stroke-dasharray: 2 8 !important;
}
.score-theater-calibration {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(245, 248, 244, 0.035) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(245, 248, 244, 0.028) 0 1px, transparent 1px 48px);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 45%, #000 20%, transparent 75%);
}
@keyframes meadow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 3%, 0) scale(1.06); }
}
.score-theater-band {
  position: absolute; top: 0; left: 0; right: 0; height: 5px; z-index: 2;
  background: repeating-linear-gradient(90deg,
    var(--border-dark) 0 1px, transparent 1px 8px,
    var(--green) 8px 9px, transparent 9px 36px);
}
.score-theater-overlay {
  position: relative; z-index: 1;
  padding: 2.25rem 1.75rem 2.25rem clamp(1.25rem, 4vw, 3.25rem);
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid rgba(53, 75, 68, 0.45);
  background:
    linear-gradient(105deg, rgba(12, 21, 18, 0.72) 0%, rgba(12, 21, 18, 0.28) 62%, transparent 100%);
}
.score-theater-brand { margin-bottom: 0.35rem; }
.score-theater-brand h1 { margin: 0; font-size: clamp(2rem, 3.4vw, 2.65rem); color: var(--title-dark); }
.score-theater-brand .logo-mark { color: var(--title-dark); }
.score-theater-overlay .mono-label { color: var(--body-muted-dark); }
.score-theater-overlay .brand-slogan-inline { margin: 0.35rem 0 0.55rem; color: #7FCB9E; }
.score-theater-headline { margin: 0 0 0.65rem; max-width: 16ch; font-size: clamp(1.85rem, 3.6vw, 2.55rem); color: var(--title-dark); }
.score-theater-sub { max-width: 42ch; font-size: 0.98rem; color: var(--body-dark); margin: 0 0 1rem; }
.score-theater-actions { margin-top: 0.25rem; }
.score-theater-core {
  position: relative; z-index: 1;
  padding: 1.65rem clamp(1rem, 3vw, 2.15rem) 1.9rem;
  display: flex; flex-direction: column; gap: 0.95rem; justify-content: center;
  background:
    linear-gradient(250deg, rgba(18, 29, 26, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, rgba(34, 53, 48, 0.22), transparent 40%);
}

/* Score path 82 → 54 → 68 — fills the stage, ties the three tabs together */
.score-trajectory {
  position: relative;
  height: 3.1rem;
  margin: 0 0.15rem -0.15rem;
}
.score-trajectory-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible;
}
.score-trajectory-rail {
  fill: none; stroke: rgba(143, 160, 152, 0.35); stroke-width: 2;
  stroke-linecap: round;
}
.score-trajectory-ink {
  fill: none; stroke: #7FCB9E; stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: calc(420 - (420 * var(--traj-progress)));
  transition: stroke-dashoffset 0.55s var(--ease-instrument), stroke 0.35s ease;
}
.score-theater[data-active-step="initial"] { --traj-progress: 0.18; }
.score-theater[data-active-step="unsupported"] { --traj-progress: 0.55; }
.score-theater[data-active-step="unsupported"] .score-trajectory-ink { stroke: var(--pending); }
.score-theater[data-active-step="rebuilt"] { --traj-progress: 1; }
.score-theater[data-active-step="rebuilt"] .score-trajectory-ink { stroke: var(--confirm); }
.score-trajectory-mark {
  position: absolute; top: 0;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  color: var(--body-muted-dark);
  transition: color 0.3s ease, transform 0.3s var(--ease-instrument);
}
.score-trajectory-mark--initial { left: 4%; color: var(--conflict); }
.score-trajectory-mark--unsupported { left: 46%; top: 1.55rem; }
.score-trajectory-mark--rebuilt { right: 4%; top: 0.35rem; }
.score-theater[data-active-step="initial"] .score-trajectory-mark--initial,
.score-theater[data-active-step="unsupported"] .score-trajectory-mark--unsupported,
.score-theater[data-active-step="rebuilt"] .score-trajectory-mark--rebuilt {
  color: var(--title-dark);
  transform: translateY(-2px) scale(1.08);
}
.score-theater[data-active-step="unsupported"] .score-trajectory-mark--unsupported { color: var(--pending); }
.score-theater[data-active-step="rebuilt"] .score-trajectory-mark--rebuilt { color: var(--confirm); }

.score-step-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.score-step-tab {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  padding: 0.75rem 0.55rem; border-radius: var(--radius-m); border: 1px solid var(--border);
  background: linear-gradient(180deg, #2a4039 0%, var(--surface) 100%);
  cursor: pointer; font-family: var(--font-sans); color: inherit;
  box-shadow: inset 0 1px 0 rgba(245, 248, 244, 0.04);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-instrument), box-shadow 0.2s ease;
}
.score-step-tab:hover { border-color: rgba(127, 203, 158, 0.45); transform: translateY(-1px); }
.score-step-tab.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue) inset, 0 10px 28px rgba(0, 0, 0, 0.28);
  background: linear-gradient(180deg, #314d44 0%, #243832 100%);
}
.score-step-tab-num { font-family: var(--font-mono); font-weight: 700; font-size: 1.55rem; line-height: 1; }
.score-step-tab-num--unstable { color: var(--conflict); }
.score-step-tab-num--dropped { color: var(--pending); }
.score-step-tab-num--stable { color: var(--confirm); }
.score-step-tab-label { font-size: 0.68rem; color: var(--fg-muted); text-align: center; }
.score-step-stage { position: relative; min-height: 15.5rem; }
.score-step-panel {
  display: none;
  grid-template-columns: minmax(148px, 0.42fr) minmax(0, 1fr);
  gap: 1.35rem; align-items: center;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-l);
  border: 1px solid rgba(127, 203, 158, 0.18);
  background:
    radial-gradient(ellipse 60% 80% at 12% 30%, rgba(53, 122, 88, 0.12), transparent 55%),
    linear-gradient(145deg, rgba(29, 43, 39, 0.92), rgba(18, 29, 26, 0.88));
  box-shadow: var(--shadow-night);
}
.score-step-panel.is-active { display: grid; animation: fade-up 0.35s var(--ease-instrument); }

/* Instrumented ring dial */
.score-dial {
  --score-pct: 68;
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  padding: 0.85rem 0.55rem 0.75rem;
  border-radius: var(--radius-l);
  border: 1px solid rgba(53, 75, 68, 0.85);
  background:
    radial-gradient(circle at 50% 40%, rgba(53, 122, 88, 0.16), transparent 62%),
    linear-gradient(180deg, #2a3f38, #1a2924);
}
.score-dial-ring {
  position: relative;
  width: clamp(7.5rem, 14vw, 9rem);
  aspect-ratio: 1;
  display: grid; place-items: center;
}
.score-dial-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.score-dial-track {
  fill: none; stroke: rgba(143, 160, 152, 0.22); stroke-width: 7;
}
.score-dial-arc {
  fill: none; stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: var(--score-pct) 100;
  transition: stroke-dasharray 0.55s var(--ease-instrument), stroke 0.35s ease;
}
.score-dial--unstable .score-dial-arc { stroke: var(--conflict); }
.score-dial--dropped .score-dial-arc { stroke: var(--pending); }
.score-dial--stable .score-dial-arc { stroke: var(--confirm); }
.score-dial-value {
  position: relative; z-index: 1;
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(2.15rem, 4.4vw, 2.85rem); line-height: 1;
  color: var(--title-dark);
}
.score-dial-tag { font-size: 0.72rem; text-align: center; color: var(--fg-muted); max-width: 12ch; }
.score-dial-ticks {
  display: flex; justify-content: space-between; width: 78%;
  height: 0.45rem; pointer-events: none; opacity: 0.4; margin-top: 0.1rem;
}
.score-dial-ticks i {
  display: block; width: 1px; height: 100%; background: var(--body-muted-dark);
}
.score-dial-ticks i:nth-child(odd) { height: 65%; align-self: flex-end; }
.score-dial--unstable .score-dial-value { color: var(--conflict); animation: needle-jitter 0.42s linear infinite; }
.score-dial--dropped .score-dial-value { color: var(--pending); }
.score-dial--stable .score-dial-value { color: var(--confirm); }
.score-dial--stable {
  box-shadow: 0 0 0 1px rgba(53, 166, 119, 0.25), 0 12px 32px rgba(0, 0, 0, 0.28);
}

.score-step-body { min-width: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.score-step-body .mono-label { display: block; color: #A8BDB3; }
.score-step-body .lead { margin: 0; font-size: 0.98rem; max-width: none; color: var(--body-dark); }
.score-step-body .fact-lines { gap: 0.45rem; }
.score-step-body .fact-lines li {
  flex-direction: column; align-items: flex-start; gap: 0.15rem;
  color: var(--body-dark);
  padding: 0.4rem 0.55rem 0.4rem 0.7rem;
  border-left: 2px solid rgba(127, 203, 158, 0.35);
  background: rgba(245, 248, 244, 0.03);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.score-theater[data-active-step="unsupported"] .score-step-body .fact-lines li { border-left-color: rgba(217, 157, 53, 0.55); }
.score-theater[data-active-step="rebuilt"] .score-step-body .fact-lines li { border-left-color: rgba(53, 166, 119, 0.55); }
.score-theater .hint-line {
  background: rgba(29, 43, 39, 0.9); border-color: var(--border-dark);
  color: var(--body-muted-dark); border-left-color: var(--green);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
@media (max-width: 960px) {
  .score-theater { grid-template-columns: 1fr; min-height: 0; }
  .score-theater-overlay { border-right: none; border-bottom: 1px solid rgba(53, 75, 68, 0.55); padding-bottom: 1.25rem; }
  .score-step-panel { grid-template-columns: 1fr; }
  .score-step-tabs { grid-template-columns: 1fr; }
  .score-trajectory { height: 2.4rem; }
  .score-theater-glow { opacity: 0.35; }
}
.score-conclusion { background: rgba(198, 154, 50, 0.06); border-bottom: 1px solid var(--border-light); }
.score-conclusion-inner { border-left: 3px solid var(--ochre); padding-left: 1.1rem; }
.score-conclusion-inner .mono-label { display: block; color: #8A6414; margin-bottom: 0.5rem; }
.score-conclusion-text { font-size: 1.05rem; max-width: 76ch; }

.score-coverage { background: #F7F8F4; border-bottom: 1px solid var(--border-light); }
.score-meter-rail { display: grid; gap: 1rem; margin-top: 0.85rem; }
.score-meter { display: grid; gap: 0.35rem; }
.score-meter-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--body-muted-light); }
.score-meter-track {
  position: relative; height: 10px; border-radius: 999px;
  background: #E2E6DE; border: 1px solid var(--border-light); overflow: hidden;
}
.score-meter-fill { display: block; height: 100%; border-radius: inherit; }
.score-meter-fill--green { background: linear-gradient(90deg, #2F6A4C, var(--green)); }
.score-meter-fill--ochre { background: linear-gradient(90deg, #A87E1F, var(--ochre)); }
.score-meter-fill--blue { background: linear-gradient(90deg, #2A5BB0, var(--blue)); }
.score-meter-notch {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  background: var(--ink); opacity: 0.55;
}
.score-meter-notch--target { background: var(--orange); opacity: 0.9; }
.score-meter-readout { font-size: 0.88rem; color: var(--body-muted-light); }
.score-meter-readout b { color: var(--title-light); font-family: var(--font-mono); }
.score-verdict { background: var(--ink); color: var(--body-dark); border-bottom: 1px solid var(--border-dark); }
.score-verdict .mono-label { color: var(--body-muted-dark); }
.score-verdict-rail {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0; margin-top: 0.85rem; border: 1px solid var(--border-dark); border-radius: var(--radius-l); overflow: hidden;
}
.score-verdict-cell {
  padding: 1rem 0.9rem; border-left: 1px solid var(--border-dark);
  display: flex; flex-direction: column; gap: 0.4rem; min-height: 7.5rem;
  background: #17231f;
}
.score-verdict-cell:first-child { border-left: none; }
.score-verdict-cell span:last-child { font-size: 0.82rem; color: var(--body-muted-dark); line-height: 1.45; }
.score-verdict-key {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--title-dark);
}
.score-verdict-cell.is-active {
  background: linear-gradient(180deg, rgba(53, 122, 88, 0.28), rgba(53, 122, 88, 0.08));
  box-shadow: inset 0 0 0 2px var(--green);
}
.score-verdict-cell.is-active .score-verdict-key { color: #7FCB9E; }
@media (max-width: 900px) {
  .score-verdict-rail { grid-template-columns: 1fr 1fr; }
  .score-verdict-cell:nth-child(3) { border-left: none; border-top: 1px solid var(--border-dark); }
  .score-verdict-cell:nth-child(4) { border-top: 1px solid var(--border-dark); }
}
@media (max-width: 560px) {
  .score-verdict-rail { grid-template-columns: 1fr; }
  .score-verdict-cell { border-left: none; border-top: 1px solid var(--border-dark); min-height: 0; }
  .score-verdict-cell:first-child { border-top: none; }
}

.score-instruments { border-bottom: 1px solid var(--border-light); }
.score-instrument-row { display: flex; flex-wrap: wrap; gap: 0; margin-top: 0.75rem; border-top: 1px solid var(--border-light); }
.score-instrument {
  flex: 1 1 140px; padding: 0.9rem 1rem 0.2rem; border-left: 1px solid var(--border-light);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.score-instrument:first-child { border-left: none; padding-left: 0; }
.score-instrument b { font-size: 0.88rem; color: var(--title-light); }
.score-instrument span { font-size: 0.76rem; color: var(--body-muted-light); }
.score-instrument-notch { display: block; width: 28px; height: 4px; border-radius: 2px; margin-bottom: 0.35rem; }
.score-instrument-notch--green { background: var(--green); }
.score-instrument-notch--blue { background: var(--blue); }
.score-instrument-notch--ochre { background: var(--ochre); }
.score-instrument-notch--orange { background: var(--orange); }
.score-instrument-notch--confirm { background: var(--confirm); }
.score-instrument-notch--ink { background: var(--ink); }
@media (max-width: 700px) {
  .score-instrument { flex: 1 1 45%; border-left: none; border-top: 1px solid var(--border-light); }
}

/* ════════════════════════ PLATFORM — PILOT TABLETOP ════════════════════════ */
.pilot-tabletop { position: relative; }
.tabletop-surface {
  position: absolute; inset: -1rem -1rem auto -1rem; height: 2.4rem;
  background: repeating-linear-gradient(90deg, var(--border-light) 0 1px, transparent 1px 9px, var(--blue) 9px 10px, transparent 10px 45px);
  opacity: 0.4; pointer-events: none;
}
.tabletop-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }
.tabletop-item {
  padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light);
  border-top: 3px solid var(--border-light); background: var(--card-light); cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.tabletop-item:hover, .tabletop-item.is-open { box-shadow: var(--shadow-soft); }
.tabletop-item--complete { border-top-color: var(--confirm); }
.tabletop-item--gap { border-top-color: var(--pending); }
.tabletop-item--empty { border-top-color: var(--conflict); }
.tabletop-item-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.4rem; }
.tabletop-item-status { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.15rem 0.45rem; border-radius: 999px; font-weight: 700; flex-shrink: 0; }
.tabletop-item-status--complete { background: rgba(53, 166, 119, 0.16); color: var(--confirm); }
.tabletop-item-status--gap { background: rgba(217, 157, 53, 0.18); color: #8A6414; }
.tabletop-item-status--empty { background: rgba(215, 79, 96, 0.16); color: var(--conflict); }
.tabletop-item p { margin: 0; font-size: 0.84rem; color: var(--body-muted-light); }
.tabletop-item-detail { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--border-light); }
.tabletop-gap-note { margin: 0.6rem 0 0; padding: 0.5rem 0.65rem; border-radius: var(--radius-s); background: rgba(217, 157, 53, 0.1); border-left: 3px solid var(--pending); font-size: 0.78rem; color: var(--body-light); }

@media (max-width: 900px) { .tabletop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tabletop-grid { grid-template-columns: 1fr; } }

/* ════════════════════════ CRITERIA — THRESHOLD LADDER ════════════════════════ */
.threshold-ladder { display: flex; flex-direction: column; gap: 1.1rem; }
.ladder-card { padding: 1.1rem 1.2rem; border-radius: var(--radius-l); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.ladder-card-head { margin-bottom: 1rem; }
.ladder-card-head p { margin: 0.3rem 0 0; font-size: 0.84rem; color: var(--body-muted-light); }

.ladder-rail { position: relative; height: 5.5rem; margin: 0 0.5rem; }
.ladder-rung { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; transform: translateX(-50%); white-space: nowrap; }
.ladder-rung span { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-muted); }
.ladder-rung b { font-family: var(--font-mono); font-size: 0.86rem; color: var(--title-light); }
.ladder-rung--minimum { left: 0%; align-items: flex-start; transform: none; }
.ladder-rung--stretch { left: 100%; align-items: flex-end; transform: translateX(-100%); }
.ladder-rung--target { left: var(--rung-pct, 50%); }
.ladder-rung--target span { color: var(--blue); }

.ladder-track { position: absolute; left: 0; right: 0; bottom: 0.7rem; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--conflict) 0%, var(--pending) 50%, var(--confirm) 100%); opacity: 0.28; }
.ladder-marker, .ladder-baseline {
  position: absolute; bottom: 0.7rem; left: var(--marker-pct, 0%); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem; white-space: nowrap;
}
.ladder-marker { z-index: 2; }
.ladder-marker::before { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid var(--card-light); box-shadow: 0 0 0 1px var(--blue); margin-bottom: 0.35rem; }
.ladder-marker b { font-family: var(--font-mono); font-size: 0.86rem; color: var(--title-light); }
.ladder-marker span { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-muted); }
.ladder-baseline { bottom: -0.65rem; }
.ladder-baseline::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 2px; background: var(--border-light); border: 1px solid var(--body-muted-light); margin-bottom: 0.3rem; }
.ladder-baseline span { font-family: var(--font-mono); font-size: 0.6rem; color: var(--fg-muted); }

.ladder-status { margin: 1.6rem 0 0; padding: 0.5rem 0.7rem; border-radius: var(--radius-s); background: rgba(217, 157, 53, 0.1); border-left: 3px solid var(--pending); font-size: 0.82rem; }

/* ════════════════════════ BASELINE — CALIBRATION BENCH ════════════════════════ */
.calibration-bench { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.bench-block { padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); transition: border-color 0.2s, box-shadow 0.2s; }
.bench-block.is-modified { border-color: var(--ochre); box-shadow: 0 0 0 1px var(--ochre) inset; }
.bench-block-head p { margin: 0.3rem 0 0; font-size: 0.82rem; color: var(--body-muted-light); }
.bench-block-body { margin-top: 0.85rem; display: flex; flex-direction: column; gap: 0.75rem; }
.bench-slot-label { display: block; font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-muted); margin-bottom: 0.35rem; }
.bench-baseline input { max-width: 12rem; font-weight: 700; }
.bench-target-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.bench-target-row label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.68rem; font-weight: 700; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.bench-target-row input { font-family: var(--font-mono); font-size: 0.8rem; background: rgba(211, 206, 194, 0.18); cursor: default; }
.bench-block-note { margin: 0.75rem 0 0; font-size: 0.78rem; color: var(--body-muted-light); }

@media (max-width: 900px) { .calibration-bench { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .bench-target-row { grid-template-columns: 1fr; } }

/* ════════════════════════ EVIDENCE — EVIDENCE LOCKERS ════════════════════════ */
.evidence-import { padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); margin-bottom: 1rem; }
.evidence-import .lead { margin: 0.35rem 0 0.85rem; }

.evidence-lockers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.locker-card {
  padding: 0; border-radius: var(--radius-m); border: 1px solid var(--border-light);
  background: var(--card-light); cursor: pointer; transition: box-shadow 0.2s, border-color 0.2s; overflow: hidden;
}
.locker-card:hover, .locker-card.is-open { box-shadow: var(--shadow-soft); border-color: var(--blue); }
.locker-card--gap { border-top: 3px solid var(--pending); }
.locker-card-face { padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; position: relative; }
.locker-num { font-family: var(--font-mono); font-size: 0.66rem; color: var(--fg-muted); }
.locker-card-face b { font-size: 0.88rem; color: var(--title-light); }
.locker-count { font-size: 0.74rem; color: var(--body-muted-light); }
.locker-flag { position: absolute; top: 0.75rem; right: 0.85rem; font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.12rem 0.4rem; border-radius: 999px; background: rgba(217, 157, 53, 0.18); color: #8A6414; font-weight: 700; }
.locker-card-detail { padding: 0 1rem 1rem; }

@media (max-width: 900px) { .evidence-lockers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .evidence-lockers { grid-template-columns: 1fr; } }

/* ════════════════════════ SCORING — SCORE ASSEMBLY ════════════════════════ */
.score-assembly { display: flex; flex-direction: column; gap: 1.1rem; }
.assembly-bar { display: flex; border-radius: var(--radius-m); overflow: hidden; height: 3.2rem; border: 1px solid var(--border-light); }
.assembly-segment { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05rem; color: #fff; font-size: 0.68rem; transition: width 0.3s var(--ease-instrument); min-width: 3rem; }
.assembly-segment span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.02em; opacity: 0.85; }
.assembly-segment b { font-family: var(--font-mono); font-size: 0.86rem; }
.assembly-segment--completion { background: var(--blue); }
.assembly-segment--handling { background: var(--green); }
.assembly-segment--volume { background: var(--orange); }
.assembly-segment--exceptions { background: var(--ochre); }

.assembly-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.assembly-row { display: grid; grid-template-columns: minmax(160px, 1fr) auto auto auto; align-items: center; gap: 1rem; padding: 0.75rem 0.9rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); }
.assembly-row-label b { display: block; font-size: 0.86rem; color: var(--title-light); }
.assembly-row-label span { display: block; font-size: 0.74rem; color: var(--body-muted-light); }
.assembly-weight-field, .assembly-score-field, .assembly-contribution-field { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-muted); font-weight: 700; }
.assembly-weight-field input { width: 4rem; text-align: right; font-family: var(--font-mono); }
.assembly-score-field b, .assembly-contribution-field b { font-family: var(--font-mono); font-size: 0.95rem; color: var(--title-light); text-transform: none; letter-spacing: 0; }

.assembly-total { margin-top: 0.25rem; padding: 1.1rem 1.2rem; border-radius: var(--radius-l); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.assembly-total-value { font-family: var(--font-mono); font-weight: 700; font-size: 2.3rem; color: var(--title-light); }
.assembly-total-note { margin: 0; font-size: 0.82rem; color: var(--body-muted-light); flex: 1 1 240px; }

@media (max-width: 768px) { .assembly-row { grid-template-columns: 1fr; text-align: left; } .assembly-weight-field, .assembly-score-field, .assembly-contribution-field { justify-content: space-between; } }

/* ════════════════════════ PILOT CONTROL — CHECKPOINT RUNBOARD ════════════════════════ */
.checkpoint-runboard { display: flex; flex-direction: column; gap: 0.9rem; }
.runboard-filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.runboard-filter {
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 0.45rem 0.85rem; border-radius: 999px; border: 1px solid var(--border-light); background: var(--card-light); color: var(--fg-muted); cursor: pointer;
}
.runboard-filter.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.runboard-rows { display: flex; flex-direction: column; gap: 0.65rem; }
.runboard-row { padding: 0.9rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); border-left: 4px solid var(--border-light); background: var(--card-light); }
.runboard-row--done { border-left-color: var(--confirm); }
.runboard-row--at-risk { border-left-color: var(--conflict); }
.runboard-row--planned { border-left-color: var(--border-light); opacity: 0.85; }
.runboard-row-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.35rem; }
.runboard-phase { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-muted); }
.runboard-status-tag { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.15rem 0.5rem; border-radius: 999px; font-weight: 700; }
.runboard-status-tag--done { background: rgba(53, 166, 119, 0.16); color: var(--confirm); }
.runboard-status-tag--at-risk { background: rgba(215, 79, 96, 0.16); color: var(--conflict); }
.runboard-status-tag--planned { background: rgba(211, 206, 194, 0.4); color: var(--body-muted-light); }
.runboard-title { display: block; font-size: 0.95rem; color: var(--title-light); margin-bottom: 0.3rem; }
.runboard-meta { display: flex; gap: 0.4rem; font-size: 0.78rem; color: var(--body-muted-light); margin-bottom: 0.5rem; }
.runboard-meta b { color: var(--title-light); }
.runboard-note { margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--body-muted-light); padding-top: 0.5rem; border-top: 1px dashed var(--border-light); }

/* ════════════════════════ STAKEHOLDERS — MARGIN TESTIMONY ════════════════════════ */
.margin-testimony { display: flex; flex-direction: column; gap: 1.1rem; }
.role-filter-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; }
.role-chip {
  padding: 0.6rem 0.6rem; border-radius: var(--radius-m); border: 1px solid var(--border-light);
  background: var(--card-light); cursor: pointer; text-align: center; transition: box-shadow 0.2s, border-color 0.2s;
}
.role-chip b { display: block; font-size: 0.78rem; color: var(--title-light); }
.role-chip span { display: block; font-size: 0.66rem; color: var(--body-muted-light); margin-top: 0.15rem; }
.role-chip.is-active { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue) inset; }

.testimony-rows { display: flex; flex-direction: column; gap: 0.9rem; }
.testimony-row { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.1fr) minmax(0, 0.85fr); gap: 0.9rem; align-items: start; }
.testimony-margin { display: flex; flex-direction: column; gap: 0.5rem; }
.testimony-margin--right { align-items: flex-end; }
.testimony-margin--right .margin-note { text-align: right; }
.testimony-scenario { padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.testimony-scenario p { margin: 0.4rem 0 0; font-size: 0.92rem; color: var(--title-light); }
.margin-note { padding: 0.6rem 0.75rem; border-radius: var(--radius-s); border: 1px solid var(--border-light); background: rgba(53, 111, 212, 0.05); transition: opacity 0.2s, background 0.2s, border-color 0.2s; }
.margin-note-role { display: block; font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-muted); margin-bottom: 0.2rem; }
.margin-note p { margin: 0; font-size: 0.8rem; font-style: italic; color: var(--body-light); }
.margin-note.is-highlighted { border-color: var(--ochre); background: rgba(198, 154, 50, 0.12); }
.margin-note.is-dimmed { opacity: 0.35; }
.margin-note--product-user, .margin-note--team-lead, .margin-note--it { border-left: 3px solid var(--blue); }
.margin-note--security, .margin-note--finance, .margin-note--executive { border-left: 3px solid var(--green); }

@media (max-width: 1024px) { .testimony-row { grid-template-columns: 1fr; } .testimony-margin--right { align-items: flex-start; } .testimony-margin--right .margin-note { text-align: left; } }
@media (max-width: 768px) { .role-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .role-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ════════════════════════ CONTRADICTION — CROSS-EXAMINATION DESK ════════════════════════ */
.cross-exam-desk-wrap { display: flex; flex-direction: column; gap: 0.9rem; }
.cross-exam-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cross-exam-tab {
  font-size: 0.78rem; font-weight: 600; padding: 0.55rem 0.85rem; border-radius: var(--radius-m);
  border: 1px solid var(--border-light); background: var(--card-light); color: var(--body-light); cursor: pointer; max-width: 22rem;
}
.cross-exam-tab.is-active { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue) inset; color: var(--title-light); }
.cross-exam-panel { display: none; flex-direction: column; gap: 0.9rem; }
.cross-exam-panel.is-active { display: flex; animation: fade-up 0.25s var(--ease-instrument); }
.cross-exam-claim { font-family: var(--font-serif); font-size: 1.15rem; color: var(--title-light); margin: 0; }
.cross-exam-desk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.cross-exam-col { padding: 0.9rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); }
.cross-exam-col--support { border-left: 3px solid var(--confirm); }
.cross-exam-col--oppose { border-left: 3px solid var(--conflict); }
.cross-exam-verdict { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); }
.cross-exam-verdict-tag { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: var(--radius-s); flex-shrink: 0; }
.cross-exam-verdict--upheld { border-left: 4px solid var(--confirm); }
.cross-exam-verdict--upheld .cross-exam-verdict-tag { background: rgba(53, 166, 119, 0.16); color: var(--confirm); }
.cross-exam-verdict--narrowed { border-left: 4px solid var(--pending); }
.cross-exam-verdict--narrowed .cross-exam-verdict-tag { background: rgba(217, 157, 53, 0.18); color: #8A6414; }
.cross-exam-verdict--rejected { border-left: 4px solid var(--conflict); }
.cross-exam-verdict--rejected .cross-exam-verdict-tag { background: rgba(215, 79, 96, 0.16); color: var(--conflict); }
.cross-exam-verdict p { margin: 0; font-size: 0.86rem; }

@media (max-width: 900px) { .cross-exam-desk { grid-template-columns: 1fr; } }

/* ════════════════════════ DECISION BRIEF — DECISION SHEET ════════════════════════ */
.decision-sheet { display: flex; flex-direction: column; gap: 1.1rem; }
.decision-sheet-summary { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 1.1rem; align-items: center; padding: 1.1rem 1.2rem; border-radius: var(--radius-l); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.decision-score-block { text-align: center; }
.decision-score-value { display: block; font-family: var(--font-mono); font-weight: 700; font-size: 3rem; color: var(--title-light); line-height: 1; }
.decision-score-block p { margin: 0.35rem 0 0; font-size: 0.76rem; color: var(--body-muted-light); }

.decision-criteria-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.decision-criteria-table th, .decision-criteria-table td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border-light); text-align: left; }
.decision-criteria-table th { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--body-muted-light); }
.decision-pass-tag { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 0.15rem 0.5rem; border-radius: 999px; font-weight: 700; background: rgba(217, 157, 53, 0.18); color: #8A6414; }

.decision-call-block { padding: 1.1rem 1.2rem; border-radius: var(--radius-l); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.decision-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; margin: 0.75rem 0 1rem; }
.decision-option { position: relative; padding: 0.8rem 0.85rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); cursor: pointer; display: flex; flex-direction: column; gap: 0.2rem; }
.decision-option input { position: absolute; top: 0.7rem; right: 0.7rem; margin: 0; }
.decision-option b { font-size: 0.86rem; color: var(--title-light); }
.decision-option span { font-size: 0.72rem; color: var(--body-muted-light); }
.decision-option.is-recommended { border-color: var(--ochre); }
.decision-option:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue) inset; background: rgba(53, 111, 212, 0.05); }
.decision-recommended-tag { position: absolute; top: -0.5rem; left: 0.7rem; font-family: var(--font-mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 999px; background: var(--ochre); color: #fff; }

@media (max-width: 900px) { .decision-sheet-summary { grid-template-columns: 1fr; text-align: center; } .decision-criteria-table { display: block; overflow-x: auto; } }
@media (max-width: 768px) { .decision-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ════════════════════════ DEVELOPERS — CONNECTOR PATCH PANEL ════════════════════════ */
.connector-panel { display: grid; grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.6fr) minmax(120px, 0.7fr); gap: 1rem; align-items: start; }
.patch-column { display: flex; flex-direction: column; gap: 0.5rem; }
.patch-jack {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 700; padding: 0.6rem 0.8rem;
  border-radius: var(--radius-s); border: 1px solid var(--border); background: var(--surface); color: var(--fg); cursor: pointer; text-align: center;
}
.patch-jack.is-active { border-color: var(--green); background: rgba(53, 122, 88, 0.22); color: var(--title-dark); }
.patch-matrix-wrap { min-width: 0; }
.patch-matrix { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.patch-matrix th, .patch-matrix td { padding: 0.5rem; text-align: center; border: 1px solid var(--border); }
.patch-matrix th { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-muted); }
.patch-matrix th:first-child, .patch-matrix td:first-child { text-align: left; font-weight: 700; color: var(--title); }
.patch-matrix td.is-patched { color: var(--green); font-size: 1rem; }
.patch-matrix td.is-highlighted { background: rgba(53, 122, 88, 0.28); }

@media (max-width: 900px) { .connector-panel { grid-template-columns: 1fr; } .patch-column { flex-direction: row; flex-wrap: wrap; } }

/* ════════════════════════ PRICING — PLAN INSTRUMENT ════════════════════════ */
.plan-instrument { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 1.1rem; align-items: start; margin-bottom: 1.1rem; }
.plan-instrument-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-top: 0.6rem; }
.plan-instrument-fields input { max-width: 8rem; }
.plan-instrument-counts { padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.plan-instrument-note { font-size: 0.8rem; color: var(--body-muted-light); margin: 0.65rem 0 0; }

.plan-recommendation {
  padding: 1.1rem 1.2rem; border-radius: var(--radius-l); border: 1px solid var(--border-light);
  background: var(--card-light); box-shadow: var(--shadow-soft);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem;
}
.plan-summary .mono-label { margin-bottom: 0.35rem; }
.plan-price { font-family: var(--font-serif); font-size: 2rem; color: var(--title-light); margin: 0 0 0.6rem; }
.plan-price span { font-family: var(--font-sans); font-size: 0.85rem; color: var(--body-muted-light); font-weight: 600; }
.plan-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.85rem; }
.plan-feats li { padding-left: 1.1rem; position: relative; }
.plan-feats li::before { content: "\2713"; position: absolute; left: 0; color: var(--confirm); font-weight: 700; }
.plan-quotas { display: grid; gap: 0.85rem; align-content: start; }
.plan-trial-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.ladder-note { font-size: 0.78rem; color: var(--body-muted-light); margin: 0; }

@media (max-width: 1024px) { .plan-instrument, .plan-recommendation { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .plan-instrument-fields { grid-template-columns: 1fr; } }

/* ════════════════════════ EVALUATE A PILOT (3-step intake) ════════════════════════ */
.intake-step-rail { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.intake-step-tab {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 700;
  padding: 0.5rem 0.8rem; border-radius: var(--radius-s); border: 1px solid var(--border);
  background: var(--surface); color: var(--fg-muted); cursor: pointer;
}
.intake-step-tab.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.intake-step-tab.is-done { border-left: 3px solid var(--confirm); }
.intake-pane.is-active { animation: fade-up 0.3s var(--ease-instrument); }
.intake-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.intake-criteria-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.75rem 0; }
.intake-criteria-row { padding: 0.65rem 0.8rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); align-items: flex-start; }
.intake-criteria-row b { display: block; color: var(--title-light); }
.intake-criteria-row span { display: block; font-size: 0.78rem; color: var(--body-muted-light); }
.intake-note { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: rgba(53, 111, 212, 0.06); }
.intake-note p { margin: 0.3rem 0 0; font-size: 0.84rem; }

@media (max-width: 640px) { .intake-field-row { grid-template-columns: 1fr; } }

/* ————————————————— About ————————————————— */
.about-ground-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 1.75rem; align-items: start; }
.mission-sentence { padding: 0.75rem 0.95rem; border-left: 3px solid var(--ochre); background: rgba(198, 154, 50, 0.08); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.about-keywords { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.about-keywords li { font-family: var(--font-mono); font-size: 0.72rem; padding: 0.3rem 0.6rem; border-radius: 999px; border: 1px solid var(--border-light); background: var(--card-light); color: var(--body-muted-light); }

.about-force-map { padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.force-map-grid { display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.force-map-node { padding: 0.7rem 0.85rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--paper); }
.force-map-node b { display: block; color: var(--title-light); font-size: 0.84rem; margin-bottom: 0.25rem; }
.force-map-node p { margin: 0; font-size: 0.8rem; color: var(--body-muted-light); }

.ground-history { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ground-history-node { padding: 0.85rem 0.95rem; border-top: 3px solid var(--blue); background: var(--card-light); border-radius: 0 0 var(--radius-m) var(--radius-m); box-shadow: var(--shadow-soft); }
.ground-history-node h3 { margin: 0.4rem 0 0.4rem; font-size: 1.05rem; }
.ground-history-node p { margin: 0; font-size: 0.84rem; color: var(--body-light); }

.about-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.about-model-card { padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.about-model-card ul { margin: 0.5rem 0 0; padding-left: 1.2em; font-size: 0.86rem; }
.source-object-list, .about-not-list, .about-capability-list { list-style: none; padding-left: 0 !important; display: grid; gap: 0.45rem; }
.source-object-list li {
  padding: 0.45rem 0.65rem; border-left: 3px solid var(--blue);
  background: rgba(53, 111, 212, 0.06); font-size: 0.84rem; color: var(--fg);
}
.about-not-list li, .about-capability-list li { padding: 0.4rem 0.6rem 0.4rem 1.1em; position: relative; font-size: 0.84rem; }
.about-not-list li::before { content: "\2715"; position: absolute; left: 0; color: var(--conflict); font-weight: 700; }
.about-capability-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--confirm); font-weight: 700; }
.about-not-note { font-size: 0.82rem; color: var(--body-muted-light); margin-top: 0.5rem; }

@media (max-width: 1024px) { .about-ground-grid { grid-template-columns: 1fr; } .ground-history { grid-template-columns: repeat(2, minmax(0, 1fr)); } .about-model-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ground-history { grid-template-columns: 1fr; } }

/* ————————————————— Security ————————————————— */
.boundary-groups { display: flex; flex-direction: column; gap: 1.25rem; }
.boundary-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.6rem; }
.boundary-card { padding: 0.85rem 0.95rem; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); }
.boundary-card b { display: block; color: var(--title); font-size: 0.86rem; margin-bottom: 0.3rem; }
.boundary-card p { margin: 0; font-size: 0.84rem; color: var(--fg-muted); }
.security-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.86rem; }

@media (max-width: 768px) { .boundary-card-grid { grid-template-columns: 1fr; } }

/* ————————————————— Integrations (list boilerplate) ————————————————— */
.integrations-list { display: flex; flex-direction: column; gap: 0.6rem; }
.hub-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); }
.hub-row span { color: var(--body-muted-light); font-size: 0.84rem; }
.hub-row small { color: var(--body-muted-light); font-family: var(--font-mono); font-size: 0.72rem; }

@media (max-width: 768px) { .hub-row { grid-template-columns: 1fr; } }

/* ————————————————— Contact ————————————————— */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 1.75rem; align-items: start; }
.contact-form { max-width: 46ch; }
.contact-aside { padding: 1rem 1.1rem; border-radius: var(--radius-l); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ————————————————— Help / changelog / status boilerplate ————————————————— */
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.help-list li a { display: block; padding: 0.8rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); color: var(--title-light); text-decoration: none; font-weight: 600; }
.help-list li a:hover { border-color: var(--blue); color: var(--blue); }

.changelog { display: flex; flex-direction: column; gap: 1.1rem; }
.changelog article { padding-left: 1.1rem; border-left: 2px solid var(--border-light); }
.changelog time { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; color: var(--body-muted-light); }
.changelog h3 { margin: 0.3rem 0 0.35rem; font-size: 1.05rem; }
.changelog p { margin: 0; }

.status-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.55rem; font-size: 0.9rem; }
.status-list i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.55rem; background: var(--border); }
.status-list i.ok { background: var(--confirm); box-shadow: 0 0 0 3px rgba(53, 166, 119, 0.2); }

.legal-body { max-width: 68ch; color: var(--fg); }
.cookie-settings-panel { max-width: 46ch; margin-top: 1.5rem; padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); }

/* ————————————————— Footer ————————————————— */
.site-footer {
  --fg: var(--body-dark); --fg-muted: var(--body-muted-dark);
  --title: var(--title-dark); --surface: var(--card-dark); --border: var(--border-dark);
  background: var(--ink);
  color: var(--fg);
  padding-top: 2rem;
}

.footer-grid { width: var(--container-wide); margin-inline: auto; padding: 0 1rem 1.75rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.footer-col h4 { color: var(--title); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; font-family: var(--font-sans); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--fg); text-decoration: none; font-size: 0.86rem; }
/* Dark surface: override the global a:hover { color: var(--ink) } which would
   otherwise print black ink on Decision Black. Footer links go ochre instead. */
.footer-col a:hover, .footer-col a:focus-visible { color: var(--ochre); }

.footer-bar { border-top: 1px solid var(--border); padding: 1.1rem 0; }
.footer-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.footer-bar-inner > span { font-size: 0.8rem; color: var(--fg-muted); }
.footer-tagline { flex: 1 1 320px; font-size: 0.8rem; color: var(--fg-muted); margin: 0; max-width: 56ch; }
.footer-legal { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-legal a { color: var(--fg-muted); text-decoration: none; font-size: 0.8rem; }
.footer-legal a:hover, .footer-legal a:focus-visible { color: var(--ochre); }

@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ————————————————— Sign-in — Instrument shell ————————————————— */
.auth-body { margin: 0; background: var(--paper); }
.auth-shell { min-height: 100dvh; display: grid; }
.auth-shell--instrument { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }

.auth-instrument-track {
  --fg: var(--body-dark); --fg-muted: var(--body-muted-dark); --title: var(--title-dark);
  padding: clamp(2rem, 6vw, 4rem);
  display: flex; flex-direction: column; justify-content: center; gap: 0.85rem;
  background: linear-gradient(150deg, #17231f 0%, var(--ink) 60%, #101a17 100%);
  color: var(--fg);
  position: relative;
  overflow: hidden;
}
.auth-instrument-track::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(198, 154, 50, 0.14) 11px 12px),
    repeating-linear-gradient(90deg, transparent 0 55px, rgba(53, 122, 88, 0.18) 55px 56px);
  pointer-events: none;
}
.auth-brand {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; margin-bottom: 0.4rem;
}
.auth-brand--light { color: #F5F8F4; }
.auth-brand--light .brand-name { font-size: 1.1rem; color: inherit; }
.auth-brand--light .logo-mark { color: #F5F8F4; }
/* Dark strip: override global a:hover { color: var(--ink) } (black-on-decision-black bug). */
.auth-instrument-track a:hover, .auth-instrument-track a:focus-visible { color: #F5F8F4; }
.auth-instrument-track .auth-brand--light:hover,
.auth-instrument-track .auth-brand--light:focus-visible,
.auth-instrument-track .auth-brand--light:hover .brand-name,
.auth-instrument-track .auth-brand--light:focus-visible .brand-name { color: var(--ochre); }

.auth-instrument-kicker { position: relative; z-index: 1; color: var(--body-muted-dark); }
.auth-instrument-title { position: relative; z-index: 1; color: var(--title-dark); font-size: clamp(1.4rem, 2.8vw, 1.85rem); }
.auth-instrument-lead { position: relative; z-index: 1; color: var(--body-dark); max-width: 46ch; }

.instrument-readings { position: relative; z-index: 1; display: grid; gap: 0.4rem; margin-top: 0.3rem; }
.instrument-reading { display: grid; grid-template-columns: auto 1fr; column-gap: 0.6rem; align-items: baseline; padding: 0.4rem 0.6rem; border-radius: var(--radius-s); border: 1px solid var(--border-dark); background: rgba(29, 43, 39, 0.75); }
.instrument-reading span { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ochre); grid-row: 1 / 3; align-self: center; }
.instrument-reading b { font-size: 0.82rem; color: var(--title-dark); }
.instrument-reading em { font-style: normal; font-size: 0.74rem; color: var(--body-muted-dark); grid-column: 2; }

.auth-instrument-outcome { position: relative; z-index: 1; margin-top: 0.6rem; padding-top: 0.85rem; border-top: 1px solid var(--border-dark); }

.auth-form-pane { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 6vw, 4rem); }
.auth-form-pane--paper { background: var(--paper); }
.auth-form-inner { max-width: 380px; width: 100%; margin-inline: auto; }
.auth-form-inner h2 { font-size: 1.55rem; }
.form-stack--underline input {
  border: none; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding: 0.5rem 0.1rem;
}
.auth-submit { width: 100%; margin-top: 0.3rem; }
.auth-alt { font-size: 0.85rem; color: var(--body-muted-light); margin-top: 0.9rem; }
.auth-alt--secondary { font-size: 0.8rem; }
.auth-alt a { color: var(--blue); text-decoration: none; font-weight: 600; }
.auth-alt a:hover, .auth-alt a:focus-visible { color: #2A5CB8; text-decoration: underline; text-underline-offset: 0.18em; }
.auth-form-pane--paper .btn-primary:hover { color: #fff; }
.auth-foot { margin-top: 1.5rem; font-size: 0.74rem; color: var(--body-muted-light); }

@media (max-width: 900px) { .auth-shell--instrument { grid-template-columns: 1fr; } }

/* ————————————————— Responsive: nav/header ————————————————— */
@media (max-width: 1024px) {
  .nav-main { display: none; }
  .header-inner { grid-template-columns: auto auto; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-sm, .header-signin { display: none; }
}


/* Spec gap-fill styles */
.brand-concept-line {
  margin: 0.2rem 0 0.65rem;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--ochre);
  font-style: italic;
}
.score-theater .brand-concept-line { color: #E0C56A; }
.ladder-meta { margin-top: 0.75rem; }
.bench-cred-tag {
  display: inline-block; margin-top: 0.35rem;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem; border-radius: 999px;
  background: rgba(53, 166, 119, 0.15); color: #1F6B4A;
}
.bench-cred-tag.is-warn, .bench-block--low-cred .bench-cred-tag {
  background: rgba(217, 157, 53, 0.2); color: #8A6414;
}
.bench-cycle { display: block; margin-top: 0.55rem; font-size: 0.78rem; color: var(--fg-muted); }
.bench-cycle select { display: block; width: 100%; margin-top: 0.25rem; }
.bench-sample { display: block; margin-top: 0.45rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--fg-muted); }
.locker-clip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.locker-clip-title { display: block; font-weight: 700; color: var(--title); margin-bottom: 0.35rem; }
.locker-conflict {
  margin: 1.25rem 0; padding: 1rem; border: 1px dashed var(--border);
  border-radius: var(--radius-l); background: rgba(215, 79, 96, 0.05);
}
.locker-conflict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.55rem; }
.locker-conflict-col { padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.locker-conflict-col b { display: block; margin-bottom: 0.25rem; color: var(--title); }
@media (max-width: 700px) { .locker-conflict-grid { grid-template-columns: 1fr; } }
.assembly-metric { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--fg-muted); font-family: var(--font-mono); font-weight: 700; }
.assembly-metric b { font-size: 0.9rem; color: var(--title); text-transform: none; letter-spacing: 0; }
.assembly-unproven-tag {
  display: inline-block; margin-top: 0.25rem;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem; border-radius: 999px;
  background: rgba(217, 157, 53, 0.2); color: #8A6414;
}
.assembly-row--unproven { opacity: 0.92; border-color: var(--pending); }
.assembly-total-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 0.5rem 0 0.75rem; }
.assembly-total-grid span { display: block; font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; color: var(--fg-muted); }
.assembly-total-grid b { font-family: var(--font-mono); font-size: 1.45rem; color: var(--title); }
@media (max-width: 700px) { .assembly-total-grid { grid-template-columns: 1fr; } }
.cross-exam-desk { grid-template-columns: 1fr 1fr 1fr; }
.cross-exam-col--middle { background: rgba(53, 111, 212, 0.06); }
.cross-exam-verdict--unresolved { border-color: var(--pending); }
@media (max-width: 900px) { .cross-exam-desk { grid-template-columns: 1fr; } }
.runboard-row--critical { flex: 1.45 1 280px; box-shadow: inset 0 0 0 2px var(--orange); }
.runboard-row--low, .runboard-row--planned { flex: 0.75 1 180px; opacity: 0.9; }
.decision-fixed-top {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.55rem;
  margin-bottom: 1.1rem; padding: 0.85rem; border: 1px solid var(--border);
  border-radius: var(--radius-l); background: var(--surface); position: sticky; top: calc(var(--site-top-h) + 0.5rem); z-index: 5;
}
.decision-fixed-cell { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.decision-fixed-cell span { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-muted); }
.decision-fixed-cell b { font-size: 0.9rem; color: var(--title); line-height: 1.3; }
.decision-fixed-cell .decision-score-value { font-size: 1.6rem; }
.decision-section {
  border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 0.65rem 0.85rem; margin-bottom: 0.55rem; background: var(--surface);
}
.decision-section summary {
  cursor: pointer; font-weight: 700; color: var(--title);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.evidence-ref {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  border: 1px solid var(--border); background: var(--paper); color: var(--blue);
  border-radius: 999px; padding: 0.12rem 0.45rem; cursor: pointer;
}
.evidence-ref:hover { border-color: var(--blue); }
@media (max-width: 960px) { .decision-fixed-top { grid-template-columns: 1fr 1fr; position: static; } }
.sample-event { margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--border-dark); border-radius: var(--radius-l); background: #17231f; }
.sample-event .mono-label { color: var(--body-muted-dark); }
.sample-event-note { color: var(--body-muted-dark); font-size: 0.86rem; }
.patch-matrix td.is-error { color: var(--conflict); font-weight: 700; background: rgba(215, 79, 96, 0.12); }
.tabletop-item.is-related { box-shadow: inset 0 0 0 2px var(--blue); }
.margin-note--empty { border-style: dashed; opacity: 0.85; }
.margin-empty { font-style: italic; color: var(--fg-muted); margin: 0; }
.intake-sample-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
