/* Latent-KWS Audit Studio — borderless, open, Apple / Gemini / OpenAI keynote rhythm. */
:root {
  color-scheme: light;
  --canvas: #fbfbfd;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --hairline: rgba(29, 29, 31, 0.08);
  --blue: #0071e3;
  --blue-soft: rgba(0, 113, 227, 0.09);
  --teal: #2b9c94;
  --teal-soft: rgba(43, 156, 148, 0.10);
  --coral: #e66a4e;
  --coral-soft: rgba(230, 106, 78, 0.11);
  --amber: #b7791f;
  --violet: #7b6bb0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Google Sans Text", "Google Sans", "DM Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Google Sans Display", "Google Sans", "DM Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Roboto Mono", "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% 0%, rgba(0, 113, 227, 0.055), transparent 32rem),
    radial-gradient(circle at 86% 14%, rgba(43, 156, 148, 0.045), transparent 28rem),
    var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  line-height: 1.68;
  letter-spacing: 0.012em;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

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

/* Borderless translucent sticky topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

.topbar__inner {
  width: min(1240px, calc(100% - 48px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: var(--blue-soft);
}

.brand__mark svg {
  width: 17px;
  height: 17px;
}

.brand__text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  font-size: 14px;
}

.brand__text strong {
  font-weight: 650;
}

.brand__text span {
  color: var(--muted);
  font-weight: 450;
}

.topbar__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.live-pill,
.compact-button {
  border: 0;
  background: rgba(29, 29, 31, 0.045);
  color: var(--ink-soft);
  border-radius: 999px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 540;
  white-space: nowrap;
}

.compact-button {
  cursor: pointer;
  transition: background-color 220ms var(--ease), color 220ms var(--ease), transform 180ms var(--ease);
}

.compact-button:hover {
  background: rgba(29, 29, 31, 0.085);
  color: var(--ink);
}

.compact-button:active {
  transform: scale(0.975);
}

.compact-button svg {
  width: 13.5px;
  height: 13.5px;
}

.compact-button--accent {
  color: var(--blue);
  background: var(--blue-soft);
}

.compact-button--accent:hover {
  background: rgba(0, 113, 227, 0.16);
  color: var(--blue);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(43, 156, 148, 0.12);
}

/* Main open scroll story */
.story {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 0 0 96px;
}

/* Borderless Local JSONL Drawer */
.drawer-shell {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-6px);
  transition: grid-template-rows 520ms var(--ease), opacity 280ms var(--ease), transform 520ms var(--ease);
}

.drawer-shell.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.drawer-shell__inner {
  min-height: 0;
  overflow: hidden;
}

.drawer.drawer--plain {
  padding: 34px 0 22px;
}

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.drawer__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 620;
}

.drawer__head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.drawer__close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.06);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.drawer__close svg {
  width: 13px;
  height: 13px;
}

.dropzone {
  border: 0;
  border-radius: 18px;
  padding: 22px 24px;
  background: rgba(0, 113, 227, 0.045);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  transition: background-color 240ms var(--ease);
}

.dropzone.is-over {
  background: rgba(0, 113, 227, 0.11);
}

.dropzone__copy {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dropzone__copy strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.dropzone__copy span {
  font-size: 12px;
  color: var(--muted);
}

.dropzone__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hero */
.hero.hero--story {
  min-height: calc(100svh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 58px 0 54px;
  text-align: center;
}

.hero__center {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero--story h1,
.showcase h2 {
  font-family: var(--display);
  font-weight: 540;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

.hero--story h1 {
  max-width: 1000px;
  margin: 0 auto;
  font-size: clamp(46px, 6.4vw, 86px);
  line-height: 1.14;
  letter-spacing: 0.002em;
}

.hero--story h1 span,
.showcase h2 span {
  color: var(--faint);
}

.hero--story .hero__lede {
  max-width: 660px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.88;
  letter-spacing: 0.018em;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.btn {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 560;
  cursor: pointer;
  transition: background-color 220ms var(--ease), transform 200ms var(--ease), box-shadow 220ms var(--ease);
}

.btn--sm {
  min-height: 35px;
  padding: 0 15px;
  font-size: 12.5px;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn--primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 22px rgba(0, 113, 227, 0.20);
}

.btn--primary:hover {
  background: #0077ed;
  transform: translateY(-1px);
}

.btn--secondary {
  color: var(--ink-soft);
  background: rgba(29, 29, 31, 0.055);
}

.btn--secondary:hover {
  background: rgba(29, 29, 31, 0.095);
}

.btn--quiet {
  color: var(--muted);
  background: transparent;
}

.btn--quiet:hover {
  color: var(--ink);
  background: rgba(29, 29, 31, 0.04);
}

/* Borderless Open KPI Strip */
.kpi-strip {
  max-width: 880px;
  margin: 46px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi-item {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.kpi-item__num {
  font-family: var(--mono);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 600;
  color: var(--blue);
  letter-spacing: -0.025em;
}

.kpi-item__num--teal {
  color: var(--teal);
}

.kpi-item__num--coral {
  color: var(--coral);
}

.kpi-item__label {
  font-size: 11.5px;
  color: var(--faint);
}

/* Borderless Case Switcher Rail */
.phrase-rail {
  max-width: 900px;
  margin: 36px auto 0;
  text-align: center;
}

.phrase-rail__head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin-bottom: 12px;
  color: var(--faint);
  font-size: 11px;
}

.phrase-rail__meta {
  font-family: var(--mono);
  font-size: 10px;
}

.phrase-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.phrase-chip {
  min-height: 33px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  background: rgba(29, 29, 31, 0.045);
  font-size: 12px;
  font-weight: 540;
  cursor: pointer;
  transition: background-color 220ms var(--ease), color 220ms var(--ease), transform 180ms var(--ease);
}

.phrase-chip:hover {
  background: rgba(29, 29, 31, 0.08);
}

.phrase-chip.is-active {
  color: var(--blue);
  background: var(--blue-soft);
}

.phrase-chip.is-failure {
  color: var(--coral);
  background: var(--coral-soft);
}

.phrase-chip.is-failure.is-active {
  color: #fff;
  background: var(--coral);
}

.phrase-chip__tag {
  font-family: var(--mono);
  font-size: 9.5px;
  opacity: 0.72;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 46px;
  color: #a1a1a6;
  font-size: 9px;
  font-weight: 560;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-cue svg {
  width: 16px;
  height: 24px;
  animation: scroll-cue 2.2s var(--ease) infinite;
}

@keyframes scroll-cue {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  45% { transform: translateY(5px); opacity: 0.9; }
}

/* Open Scroll-Linked Showcase Sections (Smooth Apple/OpenAI Fade-In & Fade-Out) */
.showcase {
  position: relative;
  min-height: 96svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh 0;
  will-change: opacity, transform;
}

.showcase__head {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.98fr);
  gap: clamp(32px, 6.5vw, 96px);
  align-items: end;
}

.showcase h2 {
  max-width: 680px;
  font-size: clamp(38px, 4.9vw, 66px);
  line-height: 1.16;
  letter-spacing: 0.006em;
}

.showcase__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 4px;
}

.showcase__lede {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.88;
  letter-spacing: 0.016em;
  text-wrap: pretty;
}

.showcase__metric {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
}

/* Borderless mode switch pills */
.mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.045);
}

.mode-pill {
  min-height: 31px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 560;
  cursor: pointer;
  transition: background-color 240ms var(--ease), color 240ms var(--ease);
}

.mode-pill:hover {
  color: var(--ink);
}

.mode-pill.is-active {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
}

.mode-pill.is-danger.is-active {
  color: #fff;
  background: var(--coral);
}

/* Borderless Leakage Status Line */
.audit-banner {
  width: min(1120px, 100%);
  margin: 34px auto 0;
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.audit-banner__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.audit-badge {
  padding: 3px 11px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--teal);
  background: var(--teal-soft);
  transition: background-color 280ms var(--ease), color 280ms var(--ease);
}

.audit-banner.is-leaking .audit-badge {
  color: #fff;
  background: var(--coral);
}

.audit-banner__prefix {
  font-size: 13px;
  color: var(--muted);
}

.audit-banner__prefix code {
  padding: 2px 6px;
  color: var(--ink);
  font-size: 13.5px;
  background: transparent;
}

.leak-char {
  display: inline-block;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 6px;
  background: rgba(230, 106, 78, 0.20);
  color: #c23318;
  font-weight: 700;
}

.audit-banner__meter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--faint);
}

.mini-bar {
  width: 112px;
  height: 5px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.07);
  overflow: hidden;
}

.mini-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
  transition: width 460ms var(--ease), background-color 280ms var(--ease);
}

.audit-banner.is-leaking .mini-bar__fill {
  background: var(--coral);
}

/* Borderless Slopegraph Control Strip */
.control-strip {
  width: min(1120px, 100%);
  margin: 34px auto 0;
  padding: 4px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 28px;
  align-items: center;
}

.control__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 560;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.control__value {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--blue);
  font-weight: 600;
}

.control__hint {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--faint);
}

input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.12);
}

input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(0, 113, 227, 0.14);
}

.control-strip__toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.soft-button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ink-soft);
  background: rgba(29, 29, 31, 0.05);
  font-size: 11.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 220ms var(--ease), color 220ms var(--ease);
}

.soft-button:hover {
  background: rgba(29, 29, 31, 0.09);
}

.soft-button.is-on {
  color: var(--blue);
  background: var(--blue-soft);
}

.soft-button--warn {
  color: var(--coral);
  background: var(--coral-soft);
}

.soft-button--warn:hover {
  background: rgba(230, 106, 78, 0.18);
}

/* Borderless Failure Note */
.failure-banner {
  width: min(1120px, 100%);
  margin: 14px auto 0;
  padding: 6px 0 6px 14px;
  border-left: 2.5px solid var(--coral);
  color: #a6351c;
  font-size: 12.5px;
  line-height: 1.65;
}

.failure-banner[hidden] {
  display: none;
}

/* Borderless KV-Cache Metrics Row */
.kv-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.kv-stats {
  width: min(1120px, 100%);
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.kv-stat {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kv-stat__label {
  font-size: 10.5px;
  color: var(--faint);
}

.kv-stat strong {
  font-size: 15px;
  color: var(--ink);
}

.kv-stat__blue {
  color: var(--blue) !important;
}

.kv-stat__teal {
  color: var(--teal) !important;
}

/* 100% Borderless Floating Canvas Stages (Ambient Radial Glow Only) */
.stage {
  position: relative;
  width: min(1120px, 100%);
  margin: 28px auto 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 8% 4% 6%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, rgba(0, 113, 227, 0.055), rgba(43, 156, 148, 0.018) 46%, transparent 72%);
  filter: blur(28px);
}

.stage > canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.stage--grid {
  height: clamp(320px, 34vw, 410px);
}

.stage--slope {
  height: clamp(410px, 42vw, 490px);
}

.stage--kv {
  height: clamp(290px, 31vw, 355px);
}

/* Borderless Forest Plot + Open Typographic Inspector */
.forest-layout {
  width: min(1120px, 100%);
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(290px, 0.82fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.stage--forest {
  width: 100%;
  margin: 0;
  height: clamp(360px, 38vw, 430px);
  cursor: pointer;
}

.inspector-card {
  padding: 8px 0 8px 26px;
  border: 0;
  border-left: 1.5px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 260ms var(--ease);
}

.inspector-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inspector-card__stage {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

.inspector-card__badge {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}

.inspector-card__badge.is-accepted {
  color: var(--teal);
  background: var(--teal-soft);
}

.inspector-card__badge.is-rejected {
  color: var(--coral);
  background: var(--coral-soft);
}

.inspector-card h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

.inspector-card__numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 6px 0;
}

.inspector-card__num-label {
  display: block;
  font-size: 10px;
  color: var(--faint);
}

.inspector-card__numbers strong {
  font-size: 16px;
  color: var(--ink);
}

.inspector-card__summary {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.72;
}

.inspector-card__why {
  padding-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.72;
}

.inspector-card__why strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
}

.inspector-card__why p {
  margin: 0;
}

.sister-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.075) 0%, rgba(43, 156, 148, 0.075) 100%);
  transition: transform 220ms var(--ease), background-color 220ms var(--ease);
}

.sister-link[hidden] {
  display: none;
}

.sister-link:hover {
  transform: translateX(3px);
}

.sister-link__eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.sister-link strong {
  font-size: 13px;
  color: var(--ink);
}

.sister-link span:last-child {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.inspector-card__source {
  font-size: 10.5px;
  color: var(--faint);
}

/* Stage footer & legends */
.stage-foot {
  width: min(1120px, 100%);
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--faint);
  font-size: 10.5px;
}

.stage-note {
  font-family: var(--mono);
  font-size: 10px;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend__swatch {
  width: 14px;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
}

.legend--blue { color: var(--blue); }
.legend--teal { color: var(--teal); }
.legend--coral { color: var(--coral); }
.legend--violet { color: var(--violet); }
.legend--muted { color: var(--faint); }

/* Footer & Toast */
.footer {
  width: min(1120px, 100%);
  margin: 64px auto 0;
  padding: 22px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--faint);
  font-size: 11px;
}

.footer a:hover {
  color: var(--blue);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(390px, calc(100vw - 48px));
  min-height: 40px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.90);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 11.5px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 260ms var(--ease), transform 340ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

@media (max-width: 980px) {
  .showcase__head,
  .forest-layout,
  .control-strip {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .inspector-card {
    border-left: 0;
    padding-left: 0;
    padding-top: 12px;
  }

  .control-strip__toggles {
    justify-content: flex-start;
  }

  .kv-stats,
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar__inner,
  .story {
    width: min(100% - 32px, 1240px);
  }

  .compact-button--hide-small,
  .brand__text span {
    display: none;
  }

  .stage-foot,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* 00 / 3-Tier Public Benchmark Matrix Cards */
.matrix-grid {
  width: min(1120px, 100%);
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.matrix-card {
  padding: 22px 22px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(29, 29, 31, 0.08);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.matrix-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.matrix-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.09);
}

.matrix-pill--teal {
  color: var(--teal);
  background: var(--teal-soft);
}

.matrix-sub {
  font-size: 11px;
  color: var(--faint);
}

.matrix-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.matrix-row {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(29, 29, 31, 0.025);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--ink-soft);
}

.matrix-row strong {
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}

.matrix-row.is-best {
  background: rgba(0, 113, 227, 0.06);
  border: 1px solid rgba(0, 113, 227, 0.14);
}

.matrix-row.is-best strong {
  color: var(--blue);
}

.matrix-row.is-muted {
  opacity: 0.72;
}

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