:root {
  color-scheme: dark;
  --background: #09090b;
  --background-deep: #050506;
  --surface-1: #0d0d10;
  --surface-2: #111114;
  --surface-3: #16161a;
  --surface-hover: #19191e;
  --foreground: #f4f4f5;
  --foreground-secondary: #b4b4bd;
  --foreground-muted: #777780;
  --foreground-faint: #52525b;
  --accent: #d8d8e8;
  --accent-strong: #eeeef8;
  --accent-muted: #a7a7bd;
  --accent-subtle: rgba(216, 216, 232, 0.10);
  --accent-faint: rgba(216, 216, 232, 0.05);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(216, 216, 232, 0.22);
  --row-line: rgba(255, 255, 255, 0.045);
  --success: #7fc8a0;
  --warning: #d6b36a;
  --danger: #d87878;
  --info: #829acb;
  --success-bg: rgba(127, 200, 160, 0.08);
  --warning-bg: rgba(214, 179, 106, 0.08);
  --danger-bg: rgba(216, 120, 120, 0.08);
  --info-bg: rgba(130, 154, 203, 0.08);
  --primary-surface: #ededf2;
  --primary-text: #101012;
  --shadow-overlay: 0 18px 60px rgba(0, 0, 0, 0.45);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --motion-slow: 280ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --page: 1160px;
  --bar-height: 56px;
}

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

[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 400 14px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--accent-subtle); color: var(--foreground); }

a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--foreground-muted); }

:focus-visible {
  outline: 2px solid var(--border-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.wrap {
  width: min(100%, var(--page));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  margin: 0 0 14px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--foreground-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: 500 14px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}
.button svg { width: 15px; height: 15px; }
.button-primary { background: var(--primary-surface); color: var(--primary-text); }
.button-primary:hover { background: #ffffff; }
.button-primary svg { transition: transform var(--motion-base) var(--ease); }
.button-primary:hover svg { transform: translateX(2px); }
.button-secondary { background: var(--surface-3); color: #e4e4e7; border-color: rgba(255, 255, 255, 0.08); }
.button-secondary:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.button-ghost { background: transparent; color: var(--foreground-secondary); }
.button-ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--foreground); }
.button-small { height: 30px; padding: 0 11px; font-size: 13px; border-radius: var(--radius-sm); }

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background var(--motion-slow) var(--ease), border-color var(--motion-slow) var(--ease);
}
.bar.is-solid {
  background: rgba(9, 9, 11, 0.94);
  border-bottom-color: var(--border);
}
.bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--bar-height);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 560;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--motion-slow) var(--ease), transform var(--motion-slow) var(--ease);
}
.bar.show-brand .brand { opacity: 1; transform: none; }
.brand img { width: 22px; height: 22px; }
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--foreground-muted);
  font-size: 14px;
}
.crumbs a { text-decoration: none; color: var(--foreground-secondary); }
.crumbs a:hover { color: var(--foreground); }
.crumb-sep { color: var(--foreground-faint); }
.bar-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.bar-links a {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--foreground-muted);
  text-decoration: none;
  transition: color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}
.bar-links a:hover { color: var(--foreground); background: rgba(255, 255, 255, 0.04); }

.hero {
  --hero: 0;
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(620px, 94svh, 1000px);
  padding-block: calc(var(--bar-height) + 48px) 96px;
  text-align: center;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(38% 34% at 50% 30%, rgba(210, 210, 235, 0.085), transparent 72%);
  opacity: calc(1 - var(--hero));
}
.hero-inner {
  display: grid;
  justify-items: center;
  gap: 20px;
  transform: translateY(calc(var(--hero) * -72px));
  opacity: calc(1 - var(--hero) * 1.15);
}
.hero-mark {
  width: clamp(92px, 11vw, 136px);
  margin-bottom: 8px;
  transform: translateY(calc(var(--hero) * -56px)) scale(calc(1 - var(--hero) * 0.45));
  transform-origin: 50% 0;
}
.hero-symbol {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(210, 210, 235, 0.10));
  animation: rise 1200ms var(--ease) both;
}
.hero-eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--foreground-muted);
  animation: rise 1200ms 80ms var(--ease) both;
}
.hero-title {
  margin: 0;
  font-size: clamp(76px, 15vw, 184px);
  font-weight: 620;
  line-height: 0.86;
  letter-spacing: -0.058em;
  padding-bottom: 0.06em;
  background: linear-gradient(135deg, #ffffff 0%, #dedee9 55%, #aaaabd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 1200ms 140ms var(--ease) both;
}
.hero-lede {
  max-width: 36ch;
  margin: 0;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
  color: var(--foreground-secondary);
  animation: rise 1200ms 220ms var(--ease) both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  animation: rise 1200ms 300ms var(--ease) both;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--foreground-muted);
  animation: rise 1200ms 380ms var(--ease) both;
}
.hero-status b { font-weight: 500; color: var(--foreground-secondary); }
.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(127, 200, 160, 0.4);
  animation: pulse 2400ms var(--ease) infinite;
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: var(--border);
  opacity: calc(1 - var(--hero) * 3);
}
.scroll-cue span {
  display: block;
  width: 100%;
  height: 40%;
  background: var(--accent-muted);
  animation: cue 2200ms var(--ease) infinite;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(127, 200, 160, 0.35); }
  70% { box-shadow: 0 0 0 7px rgba(127, 200, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 200, 160, 0); }
}
@keyframes cue {
  from { transform: translateY(-100%); }
  to { transform: translateY(260%); }
}

.pipeline {
  --progress: 0;
  padding-block: 64px 32px;
}
.pipeline-sticky {
  display: grid;
  gap: 36px;
}
.pipeline-title {
  margin: 0 0 28px;
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.steps {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  transition: opacity var(--motion-slow) var(--ease);
}
.step-index {
  padding-top: 5px;
  font-size: 12px;
  color: var(--foreground-faint);
}
.step h3 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 560;
  letter-spacing: -0.012em;
}
.step p {
  max-width: 40ch;
  margin: 0;
  color: var(--foreground-muted);
}
.step.is-active .step-index { color: var(--accent); }
.pipeline-progress {
  display: none;
  height: 2px;
  margin-top: 32px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.pipeline-progress span {
  display: block;
  height: 100%;
  background: var(--accent-muted);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress));
}
.pipeline-stage {
  display: grid;
  gap: 16px;
}
.panel {
  margin: 0;
  padding: 18px 20px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  overflow: hidden;
}
.panel-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font: 500 12px/1.4 var(--font-mono);
  color: var(--foreground-faint);
}
.code {
  margin: 0;
  font: 400 13px/1.8 var(--font-mono);
  color: var(--foreground-secondary);
  tab-size: 2;
}
.code-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  white-space: pre;
}
.code-line > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.line-number { color: var(--foreground-faint); user-select: none; }
.tk-k { color: #8b8b96; }
.tk-t { color: var(--foreground-muted); }
.tk-n { color: var(--foreground); }
.tk-v { color: var(--accent); }
.tk-p { color: var(--foreground-faint); }

.parsed-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 56px minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: center;
  padding: 9px 2px;
  border-top: 1px solid var(--row-line);
  font-size: 14px;
}
.parsed-row:first-of-type { border-top: 0; }
.parsed-row .type { font: 12px var(--font-mono); color: var(--foreground-faint); }
.parsed-row .value { font: 13px var(--font-mono); }
.parsed-row .kind { font-size: 12px; color: var(--foreground-muted); text-align: right; }

.decode-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 2px;
  border-top: 1px solid var(--row-line);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: opacity 360ms var(--ease), transform 420ms var(--ease);
}
.decode-row:first-of-type { border-top: 0; }
.decode-row .index { color: var(--foreground-faint); font-size: 12px; }
.decode-row .op { color: var(--foreground-secondary); }
.decode-row .op b { font-weight: 500; color: var(--foreground); }
.decode-row .result { color: var(--foreground-secondary); font-variant-numeric: tabular-nums; }
.decode-row.is-final .result { color: var(--accent-strong); }
.decode-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--foreground-faint);
}

.http-block {
  padding: 12px 0;
  border-top: 1px solid var(--row-line);
  font: 13px/1.7 var(--font-mono);
  transition: opacity 360ms var(--ease), transform 420ms var(--ease);
}
.http-block:first-of-type { border-top: 0; padding-top: 2px; }
.http-request { color: var(--foreground-secondary); }
.http-request b { color: var(--foreground); font-weight: 500; }
.http-header { color: var(--foreground-muted); }
.http-status { display: inline-flex; align-items: center; gap: 8px; }
.status-pill {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.status-200 { color: var(--success); background: var(--success-bg); }
.status-304 { color: var(--info); background: var(--info-bg); }
.http-body { margin-top: 6px; color: var(--foreground-muted); white-space: pre; overflow: hidden; text-overflow: ellipsis; }

.pipeline.is-pinned {
  height: 440vh;
  padding-block: 0;
}
.pipeline.is-pinned .pipeline-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 560px;
  grid-template-columns: minmax(250px, 380px) minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding-top: var(--bar-height);
}
.pipeline.is-pinned .pipeline-progress { display: block; }
.pipeline.is-pinned .step { opacity: 0.32; }
.pipeline.is-pinned .step.is-active { opacity: 1; }
.pipeline.is-pinned .pipeline-stage {
  position: relative;
  height: min(430px, 62svh);
}
.pipeline.is-pinned .panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  pointer-events: none;
  transition: opacity 460ms var(--ease), transform 560ms var(--ease);
}
.pipeline.is-pinned .panel.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.pipeline.is-pinned .panel[data-panel="1"] .parsed-row {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 360ms var(--ease), transform 420ms var(--ease);
  transition-delay: calc(var(--i) * 45ms);
}
.pipeline.is-pinned .panel[data-panel="1"].is-active .parsed-row { opacity: 1; transform: none; }
.pipeline.is-pinned .decode-row:not(.is-shown),
.pipeline.is-pinned .http-block:not(.is-shown) {
  opacity: 0;
  transform: translateY(10px);
}

.section {
  padding-block: 120px 40px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 36px;
}
.section-title {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 60px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}
.section-note {
  max-width: 34ch;
  margin: 0;
  color: var(--foreground-muted);
}

.game-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  gap: 16px 32px;
  align-items: center;
  padding: 34px 12px;
  border-block: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--motion-base) var(--ease);
}
.game-row:hover { background: var(--accent-faint); }
.game-name {
  display: block;
  font-size: clamp(52px, 9vw, 104px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 16px;
  color: var(--foreground-muted);
  font-size: 13px;
}
.game-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}
.game-version { font: 500 15px var(--font-mono); color: var(--foreground-secondary); }
.game-date { font-size: 13px; color: var(--foreground-muted); }
.game-go {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--foreground-secondary);
  transition: transform var(--motion-base) var(--ease), border-color var(--motion-base) var(--ease), color var(--motion-base) var(--ease);
}
.game-go svg { width: 16px; height: 16px; }
.game-row:hover .game-go { transform: translateX(4px); border-color: var(--border-accent); color: var(--foreground); }

.integrate {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.integrate-copy p {
  max-width: 44ch;
  margin: 18px 0 0;
  color: var(--foreground-secondary);
  font-size: 15px;
}
.endpoints {
  display: grid;
  margin: 32px 0 0;
}
.endpoints div {
  display: grid;
  gap: 2px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.endpoints dt {
  font: 400 13px var(--font-mono);
  color: var(--foreground);
  overflow-wrap: anywhere;
}
.endpoints dd { margin: 0; font-size: 13px; color: var(--foreground-muted); }
.code-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  overflow: hidden;
}
.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 0 12px;
  border-bottom: 1px solid var(--border);
}
.tabs { display: flex; gap: 2px; }
.tab {
  padding: 8px 10px 10px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--foreground-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease);
}
.tab:hover { color: var(--foreground-secondary); }
.tab[aria-selected="true"] { color: var(--foreground); border-bottom-color: var(--accent); }
.snippet {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  font: 400 13px/1.75 var(--font-mono);
  color: var(--foreground-secondary);
  white-space: pre;
}
.snippet .out { color: var(--info); }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 96px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--border);
  color: var(--foreground-muted);
  font-size: 13px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { width: 20px; height: 20px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--foreground); }
.footer-note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--foreground-faint); }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(44px); }
  to { opacity: 1; transform: none; }
}

.game-view {
  padding-top: calc(var(--bar-height) + env(safe-area-inset-top, 0px) + 28px);
  padding-bottom: 96px;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground-secondary);
}
.chip-latest { color: var(--accent-strong); border-color: var(--border-accent); background: var(--accent-faint); }
.chip-sample { color: var(--warning); border-color: rgba(214, 179, 106, 0.24); background: var(--warning-bg); }
.block { margin-top: 40px; }
.block-title {
  margin: 0;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.01em;
}
.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.version-summary { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.count {
  padding: 1px 7px;
  border-radius: 999px;
  font: 500 12px/1.6 var(--font-mono);
}
.count-changed { color: var(--warning); background: var(--warning-bg); }
.count-added { color: var(--success); background: var(--success-bg); }
.count-removed { color: var(--danger); background: var(--danger-bg); }
.count-chains { color: var(--info); background: var(--info-bg); }

.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
  padding-block: 12px 22px;
}
.sheet-head h1 {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 52px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.042em;
}
.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 12px 0 0;
  color: var(--foreground-muted);
}
.sheet-meta b { font-weight: 500; color: var(--foreground-secondary); }
.build-picker { display: grid; gap: 6px; min-width: min(100%, 300px); }
.build-picker .field-label { color: var(--foreground-muted); font-weight: 400; }

.check-build {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 12px 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
}
.check-build svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--accent-muted); }
.check-build p { flex: 1 1 360px; margin: 0; color: var(--foreground-secondary); }
.check-build code, .guide code, .strip code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--foreground);
  font: 13px var(--font-mono);
}

.guide {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.guide-item {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr);
  gap: 8px 28px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--bar-height) + 16px);
  transition: background 600ms var(--ease);
}
.guide-item:first-child { border-top: 0; }
.guide-item.is-target { background: var(--accent-faint); }
.guide-item h3 { margin: 0; font-size: 14px; font-weight: 560; }
.guide-item p { max-width: 70ch; margin: 0; color: var(--foreground-secondary); }
.formula {
  display: block;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--foreground);
  font: 13px/1.7 var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.helper {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
}
.helper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--foreground-muted);
}
.helper pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  color: var(--foreground-secondary);
  font: 13px/1.7 var(--font-mono);
}

.strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 16px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.strip p { margin: 0; color: var(--foreground-secondary); }
.strip b { font-weight: 560; color: var(--foreground); }
.strip .counts { display: flex; flex-wrap: wrap; gap: 6px; }
.strip .spacer { flex: 1 1 auto; }
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--foreground-muted);
  font-size: 13px;
  cursor: pointer;
}
.switch input { margin: 0; accent-color: #d8d8e8; }
.changes {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.change-list { margin: 0; padding: 0; list-style: none; }
.change {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 6px 16px;
  align-items: baseline;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.change:first-child { border-top: 0; }
.change-kind { font: 500 12px var(--font-mono); }
.change-kind.changed { color: var(--warning); }
.change-kind.added { color: var(--success); }
.change-kind.removed { color: var(--danger); }
.change-kind.chains { color: var(--info); }
.change-path { overflow-wrap: anywhere; font-family: var(--font-mono); }
.change-value {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  font: 13px var(--font-mono);
  color: var(--foreground-secondary);
}
.change-value .old { color: var(--foreground-faint); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.18); }
.change-value .arrow { color: var(--foreground-faint); }
.change-value .new { color: var(--foreground); }
.chain-compare { display: grid; gap: 6px; }
.chain-compare .chain.old { opacity: 0.55; }
.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 12px var(--font-mono);
}
.chain li { display: inline-flex; align-items: center; gap: 6px; }
.chain li + li::before { content: "\2192"; color: var(--foreground-faint); }
.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--foreground);
}
.step-chip i { font-style: normal; color: var(--foreground-faint); }

.toolbar {
  position: sticky;
  top: calc(var(--bar-height) + env(safe-area-inset-top, 0px));
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}
.formats {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}
.format {
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--foreground-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}
.format:hover { color: var(--foreground-secondary); }
.format[aria-selected="true"] { background: var(--surface-3); color: var(--foreground); box-shadow: inset 0 0 0 1px var(--border-hover); }
.search { position: relative; flex: 1 1 320px; max-width: 560px; }
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 15px;
  height: 15px;
  color: var(--foreground-faint);
  transform: translateY(-50%);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 40px;
  padding: 0 42px 0 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  color: var(--foreground);
  font: 400 15px var(--font-sans);
  transition: border-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);
}
.search input::placeholder { color: var(--foreground-faint); }
.search input:focus {
  outline: none;
  border-color: rgba(216, 216, 232, 0.28);
  box-shadow: 0 0 0 3px rgba(216, 216, 232, 0.06);
}
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  position: absolute;
  right: 11px;
  top: 50%;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: 11px var(--font-mono);
  color: var(--foreground-faint);
  transform: translateY(-50%);
  pointer-events: none;
}
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--foreground-muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}
.search-clear:hover { color: var(--foreground); background: rgba(255, 255, 255, 0.06); }
.search-clear svg { width: 14px; height: 14px; }
.toolbar .copy-all { margin-left: auto; }
.toolbar .copy-all:disabled { opacity: 0.45; cursor: default; }

.feature-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.feature-label { margin-right: 4px; font-size: 13px; color: var(--foreground-muted); }
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--foreground-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}
.feature-chip:hover { color: var(--foreground); border-color: var(--border-hover); }
.feature-chip[aria-pressed="true"] { color: var(--foreground); border-color: var(--border-accent); background: var(--accent-subtle); }
.feature-count { font: 11px var(--font-mono); color: var(--foreground-faint); }
.feature-chip[aria-pressed="true"] .feature-count { color: var(--accent-muted); }
.feature-notes {
  display: grid;
  gap: 6px;
  flex: 1 1 100%;
  margin: 0;
  padding: 10px 0 2px;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: 13px;
}
.feature-notes li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  color: var(--foreground-muted);
}
.feature-notes b { font-weight: 500; color: var(--foreground-secondary); }
.feature-notes .feature-notes-extra { display: block; color: var(--foreground-faint); }

.sheet-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 20px;
}
.toc {
  position: sticky;
  top: calc(var(--bar-height) + env(safe-area-inset-top, 0px) + 82px);
  display: grid;
  align-content: start;
  gap: 1px;
  max-height: calc(100svh - var(--bar-height) - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.ns {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--foreground-muted);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}
.ns:hover { color: var(--foreground-secondary); background: rgba(255, 255, 255, 0.03); }
.ns.is-active { color: var(--foreground); background: var(--surface-2); }
.ns-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-count { font: 11px/1.9 var(--font-mono); color: var(--foreground-faint); }

.code-blocks { display: grid; gap: 16px; min-width: 0; }
.code-block {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  scroll-margin-top: calc(var(--bar-height) + 82px);
}
.code-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 9px 10px 9px 16px;
  border-bottom: 1px solid var(--border);
}
.code-block-head h2 { margin: 0; font: 500 14px var(--font-mono); }
.block-count { font-size: 12px; color: var(--foreground-faint); }
.block-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-button {
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--foreground-muted);
  font-size: 12px;
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease);
}
.tag-button:hover { color: var(--foreground); border-color: var(--border-accent); }
.code-block-head .copy-block { margin-left: auto; }
.code-view {
  padding: 8px 0 10px;
  overflow-x: auto;
  font: 13.5px/1.8 var(--font-mono);
  tab-size: 4;
}
.line {
  display: grid;
  grid-template-columns: 20px max-content 40px;
  align-items: center;
  min-width: 100%;
  width: max-content;
}
.line:hover { background: rgba(255, 255, 255, 0.025); }
.line code { padding-right: 16px; font: inherit; white-space: pre; color: var(--foreground-secondary); }
.mark { display: block; width: 3px; height: 17px; margin-left: 8px; border-radius: 2px; }
.line.is-changed .mark { background: var(--warning); }
.line.is-added .mark { background: var(--success); }
.line.is-chain .mark { background: var(--info); }
.was { margin-left: 14px; font-size: 12px; color: var(--foreground-faint); }
.line.is-changed .was { color: rgba(214, 179, 106, 0.8); }
.line.is-added .was { color: rgba(127, 200, 160, 0.8); }
.line.is-chain .was { color: rgba(130, 154, 203, 0.9); }
.line-copy {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--foreground-faint);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}
.line-copy svg { width: 14px; height: 14px; }
.line:hover .line-copy, .line-copy:focus-visible { opacity: 1; }
.line-copy:hover { color: var(--foreground); background: rgba(255, 255, 255, 0.06); }
.tk-v.copyable {
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}
.tk-v.copyable:hover { background: var(--accent-subtle); color: var(--accent-strong); }
.tk-s { color: var(--foreground); }
.game-view mark {
  border-radius: 3px;
  background: rgba(216, 216, 232, 0.2);
  color: var(--accent-strong);
}
.empty { margin: 32px 0; color: var(--foreground-muted); text-align: center; }
.try {
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--foreground-secondary);
  font: 13px var(--font-mono);
  cursor: pointer;
  transition: color var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease);
}
.try:hover { color: var(--foreground); border-color: var(--border-accent); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--foreground);
  font: 13px var(--font-sans);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity var(--motion-base) var(--ease), transform var(--motion-base) var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.bar-access { margin-left: 6px; }

.app-view {
  padding-top: calc(var(--bar-height) + env(safe-area-inset-top, 0px) + 40px);
  padding-bottom: 96px;
}
.page-head {
  display: grid;
  gap: 12px;
  margin-bottom: 36px;
}
.page-head .eyebrow { margin: 0; }
.page-title {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.042em;
}
.page-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.page-lede {
  max-width: 58ch;
  margin: 0;
  color: var(--foreground-secondary);
  font-size: 15px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
}
.table-scroll { position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-body { padding: 22px; }
.card-title { margin: 0; font-size: 18px; font-weight: 560; letter-spacing: -0.012em; }
.card-text { max-width: 52ch; margin: 6px 0 0; color: var(--foreground-muted); }
.access-signin { display: grid; justify-items: start; gap: 4px; }
.access-signin .button { margin-top: 16px; }

.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.access-facts { display: grid; margin: 0; }
.access-facts div { padding: 16px 0; border-top: 1px solid var(--border); }
.access-facts dt { margin-bottom: 3px; font-weight: 560; }
.access-facts dd { margin: 0; color: var(--foreground-muted); }

.identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-hover);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--foreground-secondary);
  font-size: 13px;
  font-weight: 560;
}
.identity-name { font-weight: 560; }
.identity-meta { font-size: 12px; color: var(--foreground-muted); }

.form { display: grid; gap: 22px; }
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field-label { padding: 0; font-size: 13px; font-weight: 500; color: var(--foreground); }
.field-help { margin: -2px 0 0; font-size: 12px; color: var(--foreground-muted); }
.optional { margin-left: 6px; font-weight: 400; color: var(--foreground-faint); }
.field-error { font-size: 12px; color: var(--danger); }
.input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--foreground);
  font: 400 14px var(--font-sans);
  transition: border-color var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease);
}
.input::placeholder { color: var(--foreground-faint); }
.input:focus {
  outline: none;
  border-color: rgba(216, 216, 232, 0.28);
  box-shadow: 0 0 0 3px rgba(216, 216, 232, 0.06);
}
.input[aria-invalid="true"] { border-color: rgba(216, 120, 120, 0.4); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #777780 50%), linear-gradient(135deg, #777780 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
}
.segmented.is-invalid { border-color: rgba(216, 120, 120, 0.4); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--foreground-muted);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}
.segmented span:hover { color: var(--foreground-secondary); }
.segmented input:checked + span { background: var(--surface-3); color: var(--foreground); box-shadow: inset 0 0 0 1px var(--border-hover); }
.segmented input:focus-visible + span { outline: 2px solid var(--border-accent); outline-offset: 1px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--foreground-secondary);
  font-size: 13px;
  cursor: pointer;
}
.check input { margin: 0; accent-color: #d8d8e8; }
.check.is-disabled { color: var(--foreground-faint); cursor: default; }
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}
.form-foot .field-help { margin: 0; }

.chip-pending { color: var(--warning); border-color: rgba(214, 179, 106, 0.24); background: var(--warning-bg); }
.chip-approved { color: var(--success); border-color: rgba(127, 200, 160, 0.24); background: var(--success-bg); }
.chip-rejected { color: var(--foreground-muted); border-color: var(--border); background: transparent; }

.status-timeline { display: grid; margin: 20px 0 8px; padding: 0; list-style: none; }
.status-timeline li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.status-timeline b { display: block; font-weight: 560; }
.status-timeline span { font-size: 13px; color: var(--foreground-muted); }
.status-dot { width: 10px; height: 10px; margin-top: 6px; border: 1px solid var(--border-strong); border-radius: 50%; }
.status-timeline .is-done .status-dot { background: var(--accent-muted); border-color: var(--accent-muted); }
.status-timeline .is-current .status-dot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-faint); }

.answers {
  display: grid;
  grid-template-columns: minmax(96px, 150px) minmax(0, 1fr);
  margin: 18px 0 0;
}
.answers dt, .answers dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--border); }
.answers dt { color: var(--foreground-muted); font-size: 13px; }
.answers dd { overflow-wrap: anywhere; }

.key-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.key-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--foreground-faint);
}
.key-table td { padding: 12px 16px; border-bottom: 1px solid var(--row-line); font-size: 13px; }
.key-table tr:last-child td { border-bottom: 0; }
.key-table .numeric { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.key-actions { display: flex; justify-content: flex-end; gap: 6px; }
.danger-confirm { color: var(--danger); border-color: rgba(216, 120, 120, 0.3); }
.danger-confirm:hover { color: var(--danger); border-color: rgba(216, 120, 120, 0.45); background: var(--danger-bg); }
.new-key {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--accent-faint);
}
.new-key p { margin: 0; }
.new-key code {
  padding: 10px 12px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--accent-strong);
  font: 13px var(--font-mono);
  overflow-wrap: anywhere;
}
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form .input { flex: 1 1 220px; width: auto; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-note { margin: 0; padding: 22px 18px; color: var(--foreground-muted); }

.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--foreground-muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; }
.swatch-200 { background: var(--accent-muted); }
.swatch-304 { background: rgba(216, 216, 232, 0.18); }
.chart { padding: 16px 16px 8px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--foreground-faint); font: 11px var(--font-mono); }
.chart .bar-200 { fill: var(--accent-muted); }
.chart .bar-304 { fill: rgba(216, 216, 232, 0.18); }
.chart-summary { margin: 4px 4px 8px; font-size: 13px; color: var(--foreground-muted); }

.admin-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.tab-count {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--warning-bg);
  color: var(--warning);
  font: 500 11px/1.7 var(--font-mono);
}
.split {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.app-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  list-style: none;
}
.app-item + .app-item { border-top: 1px solid var(--border); }
.app-item button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease);
}
.app-item button:hover { background: rgba(255, 255, 255, 0.02); }
.app-item.is-active button { background: var(--surface-2); }
.app-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-item-name { font-weight: 560; }
.app-item-meta { font-size: 12px; color: var(--foreground-muted); }
.decision { display: grid; gap: 10px; margin-top: 20px; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.decision-result { margin: 18px 0 0; color: var(--foreground-secondary); }
.builds-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.builds-table th { padding: 10px 16px; border-bottom: 1px solid var(--border); text-align: left; font-size: 12px; font-weight: 500; color: var(--foreground-faint); }
.builds-table td { padding: 12px 16px; border-bottom: 1px solid var(--row-line); font-size: 13px; }
.builds-table tr:last-child td { border-bottom: 0; }
.dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 26px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--foreground-muted);
  text-align: center;
}
.dropzone b { color: var(--foreground); font-weight: 560; }

@media (max-width: 900px) {
  .access-layout, .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .bar-access { display: none; }
  .answers { grid-template-columns: minmax(0, 1fr); }
  .answers dt { padding-bottom: 0; }
  .answers dd { border-top: 0; padding-top: 2px; }
}

.numeric { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.integrate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 26px;
}
.integrate-actions .muted { font-size: 13px; }
.footer-note a { color: var(--foreground-muted); }
.footer-note a:hover { color: var(--foreground); }

@media (max-width: 900px) {
  .integrate { grid-template-columns: minmax(0, 1fr); }
  .pipeline.is-pinned .pipeline-sticky {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 24px;
  }
  .pipeline.is-pinned .pipeline-title { display: none; }
  .pipeline.is-pinned .step:not(.is-active) { display: none; }
  .pipeline.is-pinned .pipeline-stage { height: min(400px, 52svh); }
  .pipeline.is-pinned .pipeline-progress { margin-top: 18px; }
}

@media (max-width: 860px) {
  .sheet-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .toc { position: static; display: flex; gap: 6px; max-height: none; overflow-x: auto; padding-bottom: 4px; }
  .toc .ns { flex: 0 0 auto; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; }
  .guide-item { grid-template-columns: minmax(0, 1fr); }
  .change { grid-template-columns: 68px minmax(0, 1fr); }
  .change-value { grid-column: 2; }
  .toolbar .copy-all { margin-left: 0; }
}

@media (max-width: 640px) {
  .bar-links a:not(:first-child) { display: none; }
  .game-row { grid-template-columns: minmax(0, 1fr) 44px; padding-inline: 4px; }
  .game-side { grid-column: 1; justify-items: start; text-align: left; }
  .game-go { grid-column: 2; grid-row: 1; }
  .parsed-row { grid-template-columns: minmax(0, 1.2fr) 44px minmax(0, 1fr); }
  .parsed-row .kind { display: none; }
  .toolbar { position: static; }
  .feature-notes li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .code-view { font-size: 12.5px; }
}

@media (hover: none) {
  .line-copy { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

.chip-draft { color: var(--warning); border-color: rgba(214, 179, 106, 0.24); background: var(--warning-bg); }
.chip-published, .chip-visible { color: var(--success); border-color: rgba(127, 200, 160, 0.24); background: var(--success-bg); }
.chip-hidden { color: var(--foreground-muted); border-style: dashed; }
.chip-revoked { color: var(--danger); border-color: rgba(216, 120, 120, 0.28); background: var(--danger-bg); }
a.chip { text-decoration: none; }
a.chip:hover { border-color: var(--border-hover); }

.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.button.text-danger:hover { color: var(--danger); background: var(--danger-bg); }
.form-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(216, 120, 120, 0.24);
  border-radius: var(--radius-md);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
}
.identity-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.game-row.is-disabled { cursor: default; opacity: 0.7; }
.game-row.is-disabled:hover { background: none; }

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.admin-bar .admin-tabs { margin-bottom: -1px; border-bottom: 0; }
.admin-game { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.admin-game .field-label { color: var(--foreground-muted); font-weight: 400; }
.admin-game .select { width: auto; min-width: 180px; height: 34px; }
.status-filter { display: inline-flex; margin-bottom: 16px; }
.feature-side { display: grid; align-content: start; gap: 12px; }
.feature-side .button { justify-self: start; }
.app-list .empty-note { padding: 18px 16px; }

.card-section { padding: 18px 22px 22px; border-top: 1px solid var(--border); }
.card-section .table-scroll { margin: 0 -22px -22px; }
.card-section-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--foreground-faint);
}

#importCard { margin-bottom: 16px; }
.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.file-input { height: auto; padding: 7px 10px; cursor: pointer; }
.file-input::file-selector-button {
  margin-right: 12px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--foreground);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.file-input::file-selector-button:hover { background: var(--surface-hover); }
textarea.mono { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; tab-size: 4; }

.review { margin-bottom: 16px; border-color: var(--border-accent); }
.review-body { display: grid; gap: 16px; }
.review-body .answers { margin: 0; }
.review-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.review-body .change-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.diagnostics { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.diagnostic {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  font-size: 13px;
}
.diagnostic.is-error { border-left-color: var(--danger); }
.diagnostic.is-warning { border-left-color: var(--warning); }
.diagnostic-where { font: 500 12px var(--font-mono); color: var(--foreground-muted); }
.diagnostic code { font: 12px var(--font-mono); color: var(--foreground-secondary); overflow-wrap: anywhere; }

.builds-table tr.is-muted td { color: var(--foreground-muted); }
.builds-table td:last-child { width: 1%; white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.purge-row td { background: var(--danger-bg); }
.purge-form { display: grid; gap: 10px; padding: 4px 0; }
.purge-form code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--foreground);
  font: 13px var(--font-mono);
}

@media (max-width: 900px) {
  .import-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-bar { align-items: stretch; }
  .admin-game { padding-bottom: 12px; }
}

@media (max-width: 640px) {
  .admin-tabs { overflow-x: auto; scrollbar-width: none; }
  .status-filter { display: flex; overflow-x: auto; }
  .row-actions { justify-content: flex-start; flex-wrap: wrap; }
}
