/* website/style.css — ObserverLauncher Asymmetric Control-Surface Editorial (ENERGY 3 / RHYTHM 3 / MOTION 2) */
:root {
  --bg: #0C0D0F;
  --bg-elev: #111317;
  --surface: #15171B;
  --surface-2: #1B1E23;
  --field: #101216;
  --border: #242830;
  --border-strong: #383E48;

  --text: #F4F1EA;
  --text-2: #C8C4BC;
  --text-3: #A4A097;
  --text-4: #8B877F;

  --brand: #22C55E;
  --brand-hover: #1EB855;
  --brand-soft: rgba(34, 197, 94, .12);
  --brand-ink: #04160A;
  --danger: #FF667D;

  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-xl: 12px;

  --dur-micro: 90ms;
  --dur-fast: 140ms;
  --dur-tab: 190ms;
  --dur-modal: 210ms;
  --dur-slow: 300ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-crisp: cubic-bezier(.22, 1, .36, 1);
  --ease-snap: cubic-bezier(.2, 0, 0, 1);

  --font-ui: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.62;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Accessible base interaction semantics (R-39 & R-32) */
a[href], button, summary, select, [role="tab"] { cursor: pointer; }
button:disabled, select:disabled { cursor: not-allowed; opacity: 0.55; }

a[href]:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

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

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

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Header (solid obsidian matte — 0 glass blur to preserve R-10 budget for Mobile Dock) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  transform-origin: left center;
  transform: scaleX(var(--scroll-p, 0));
  pointer-events: none;
  will-change: transform;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
}

.ver-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(34, 197, 94, .28);
  padding: 2px 7px;
  border-radius: var(--r-xs);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-3);
  transition: color var(--dur-micro) var(--ease-crisp);
}

.nav-links a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-subnav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}

.mobile-subnav-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 6px;
  padding-bottom: 6px;
}

.mobile-subnav-inner::-webkit-scrollbar { display: none; }

.mobile-subnav a {
  flex-shrink: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  touch-action: manipulation;
}

.mobile-subnav a:active { background: var(--surface); color: var(--text); }

.lang-select {
  appearance: none;
  background: var(--field);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 26px 6px 10px;
  min-height: 38px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  touch-action: manipulation;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.lang-select:hover { border-color: var(--border-strong); }

/* Audience Register Switcher (Player / End-User vs Technical / Power-User) */
.tone-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 3px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  gap: 2px;
  flex-shrink: 0;
}

.tone-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 64px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  transform-origin: left center;
  transform: translate3d(var(--tx, 0px), 0, 0) scaleX(var(--tsx, 1));
  transition: transform var(--dur-tab) var(--ease-crisp);
  pointer-events: none;
}

.tone-btn {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: var(--r-xs);
  white-space: nowrap;
  touch-action: manipulation;
  transition: color var(--dur-micro) var(--ease-crisp);
}

.tone-btn:hover { color: var(--text-2); }
.tone-btn.active { color: var(--text); }

.tone-switch-mobile { display: none; }

/* Inline technical receipt fold (unfolds in Power-User / Tech mode) */
.tech-receipt {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows var(--dur-tab) var(--ease-crisp), opacity var(--dur-fast) var(--ease-crisp), margin-top var(--dur-tab) var(--ease-crisp);
}

.tech-receipt-inner {
  overflow: hidden;
  min-height: 0;
}

html[data-tone="tech"] .tech-receipt {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
  transition: background var(--dur-micro) var(--ease-crisp), border-color var(--dur-micro) var(--ease-crisp), transform var(--dur-micro) var(--ease-snap);
}

.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
}

.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

.btn.sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}

.btn-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  opacity: 0.86;
}

/* Signature Mechanical Motion (Hardware Shutter, Register Morph, SVG Convergence & Rule Traces) */
@keyframes shutterWipe {
  from { clip-path: inset(0 0 100% 0); transform: translate3d(0, 6px, 0); }
  to { clip-path: inset(0 0 0 0); transform: none; }
}

@keyframes stepScan {
  from { clip-path: inset(0 100% 0 0); opacity: 0.55; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes busFlow {
  0% { stroke-dashoffset: 100; opacity: 0.35; }
  55% { opacity: 1; }
  100% { stroke-dashoffset: -104; opacity: 0.25; }
}

@keyframes toneMorph {
  from { clip-path: inset(0 16% 0 0); opacity: 0.55; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes calcSnap {
  from { opacity: 0.45; transform: translate3d(0, 4px, 0); }
  to { opacity: 1; transform: none; }
}

.has-motion-js .hero-shutter {
  animation: shutterWipe var(--dur-tab) var(--ease-crisp) both;
  animation-delay: calc(var(--si, 0) * 45ms);
}

.tone-morph { animation: toneMorph var(--dur-fast) var(--ease-crisp) both; }
.diff-list li {
  animation: stepScan var(--dur-fast) var(--ease-crisp) both;
  animation-delay: calc(var(--di, 0) * 26ms);
}

.calc-snap { animation: calcSnap var(--dur-fast) var(--ease-crisp) both; }

/* Band 1: Asymmetric Split Hero (44% Copy / 56% Interactive App Deck) */
.hero-band {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 44px;
  align-items: start;
}

.hero-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-3);
}

h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.lead {
  margin: 0 0 24px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.release-status {
  margin: 0 0 18px;
  font-size: 12px;
  color: var(--text-3);
}

.hero-source-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.cli-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  flex-wrap: wrap;
  padding: 6px 10px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 12px;
}

.cli-pill code {
  font-family: var(--font-mono);
  color: var(--text-2);
  overflow-wrap: anywhere;
  min-width: 0;
}

.cli-copy {
  background: transparent;
  border: 0;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 6px;
  min-height: 32px;
  touch-action: manipulation;
}

.cli-copy:hover { text-decoration: underline; }

.inline-anchor {
  font-size: 13px;
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-anchor:hover { color: var(--brand); }

.hero-facts {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.hero-facts dt {
  font-size: 11.5px;
  color: var(--text-4);
  margin-bottom: 2px;
}

.hero-facts dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Interactive Hero App Deck (Scroll-Linked Depth + Viewport Coordinate Crosshair HUD) */
.hero-deck {
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: var(--bg-elev);
  overflow: hidden;
  transform: perspective(1200px) rotateX(calc(var(--hero-p, 0) * 2.2deg)) scale(calc(1 - var(--hero-p, 0) * 0.016));
  transform-origin: center top;
  will-change: transform;
}

.deck-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.deck-tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.deck-tabs::-webkit-scrollbar { display: none; }

.deck-glide {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 2px;
  background: var(--brand);
  transform-origin: left center;
  transform: translate3d(var(--dgx, 0px), 0, 0) scaleX(var(--dgsx, 1));
  transition: transform var(--dur-tab) var(--ease-crisp);
  pointer-events: none;
}

.deck-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: var(--r-xs);
  white-space: nowrap;
  touch-action: manipulation;
  transition: color var(--dur-micro) var(--ease-crisp), background var(--dur-micro) var(--ease-crisp);
}

.deck-tab:hover { color: var(--text); }
.deck-tab.active { color: var(--text); background: var(--surface-2); }

.deck-inspect-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: var(--r-xs);
  flex-shrink: 0;
  touch-action: manipulation;
  transition: border-color var(--dur-micro) var(--ease-crisp), color var(--dur-micro) var(--ease-crisp);
}

.deck-inspect-btn:hover { border-color: var(--brand); color: var(--brand); }

.deck-stage {
  position: relative;
  background: var(--bg);
  aspect-ratio: 1360 / 860;
  overflow: hidden;
}

.stage-hud {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-crisp);
}

@media (hover: hover) and (pointer: fine) {
  .stage-hud { display: block; }
  .deck-stage:hover .stage-hud { opacity: 1; }
}

.hud-line {
  position: absolute;
  background: rgba(34, 197, 94, 0.34);
  will-change: transform;
}

.hud-x {
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  transform: translate3d(var(--hx, 50%), 0, 0);
}

.hud-y {
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  transform: translate3d(0, var(--hy, 50%), 0);
}

.hud-coords {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  background: rgba(12, 13, 15, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  color: var(--brand);
  font-size: 10.5px;
}

.shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.deck-stage img,
.spot-media img,
.film-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1360 / 860;
  display: block;
}

@keyframes stageFwd {
  from { opacity: 0; transform: translate3d(10px, 0, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes stageBack {
  from { opacity: 0; transform: translate3d(-10px, 0, 0); }
  to { opacity: 1; transform: none; }
}

.stage-enter-fwd { animation: stageFwd var(--dur-tab) var(--ease-crisp) both; }
.stage-enter-back { animation: stageBack var(--dur-tab) var(--ease-crisp) both; }

.deck-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}

.deck-caption h2 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.deck-caption p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
}

.deck-index {
  font-size: 11.5px;
  color: var(--brand);
  flex-shrink: 0;
}

/* Band 2: Contrast Obsidian-Slate Workbench (RHYTHM 3 without jarring white block) */
.band-stone {
  --s-bg: #111317;
  --s-surface: #15171B;
  --s-elev: #1B1E23;
  --s-ink: #F4F1EA;
  --s-muted: #A4A097;
  --s-border: #242830;
  --s-border-strong: #383E48;
  --s-brand: #22C55E;

  background: var(--s-bg);
  color: var(--s-ink);
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.band-code {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 10px;
}

.band-stone .band-code { color: var(--s-brand); }

.band-stone h2,
.band-dark h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.8vw, 31px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.band-dark h2 { color: var(--text); }

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
}

.workbench-intro p {
  margin: 0 0 22px;
  color: var(--s-muted);
  font-size: 15px;
}

.wb-scenarios {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wb-glide {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 44px;
  background: var(--brand);
  border-radius: 2px;
  pointer-events: none;
  transform: translate3d(0, var(--wgy, 0px), 0) scaleY(var(--wgsy, 1));
  transform-origin: top center;
  transition: transform var(--dur-tab) var(--ease-crisp);
  z-index: 2;
}

.wb-btn {
  appearance: none;
  text-align: left;
  min-height: 44px;
  padding: 11px 14px 11px 18px;
  background: transparent;
  border: 1px solid var(--s-border);
  border-radius: var(--r-sm);
  color: var(--s-muted);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  touch-action: manipulation;
  transition: background var(--dur-micro) var(--ease-crisp), border-color var(--dur-micro) var(--ease-crisp), color var(--dur-micro) var(--ease-crisp);
}

.wb-btn:hover { background: var(--s-surface); color: var(--s-ink); border-color: var(--s-border-strong); }

.wb-btn.active {
  background: var(--s-elev);
  border-color: var(--s-border-strong);
  color: var(--s-ink);
}

.workbench-diff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  border: 1px solid var(--s-border-strong);
  border-radius: var(--r);
  background: var(--bg);
  overflow: hidden;
}

.wb-bus-col {
  display: flex;
  align-items: stretch;
  background: var(--s-bg);
  border-left: 1px solid var(--s-border);
}

.wb-bus {
  width: 100%;
  height: 100%;
  display: block;
}

.bus-track {
  fill: none;
  stroke: var(--s-border-strong);
  stroke-width: 1.25;
}

.bus-pulse {
  fill: none;
  stroke: var(--s-brand);
  stroke-width: 1.8;
  stroke-dasharray: 28 76;
  stroke-dashoffset: 100;
}

.workbench-diff.bus-firing .bus-pulse {
  animation: busFlow 520ms var(--ease-snap) forwards;
}

.diff-col { padding: 20px; }
.diff-observer {
  border-left: 1px solid var(--s-border);
  background: var(--s-surface);
  transition: border-color var(--dur-fast) var(--ease-crisp);
}

.workbench-diff.bus-firing .diff-observer {
  border-left-color: rgba(34, 197, 94, 0.55);
}

.diff-col-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--s-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--s-muted);
}

.diff-col-head > span:first-child { white-space: nowrap; }

.diff-observer .diff-col-head span:first-child { color: var(--s-brand); }

.diff-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.diff-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--s-border);
  font-size: 13.5px;
  color: var(--text-3);
}

.diff-list li:last-child { border-bottom: 0; }

.diff-summary {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.58;
  margin-bottom: 14px;
}

.diff-module {
  margin: 0;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--s-border);
  border-radius: var(--r-xs);
  font-size: 11.5px;
  color: var(--text-3);
}

/* Dark Bands */
.band-dark {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.section-head-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}

.section-head-split p {
  margin: 0;
  color: var(--text-3);
  font-size: 14.5px;
}

/* Section Hairline Rule Trace (Architectural Band Boundary) */
.rule-band {
  position: relative;
}

.has-motion-js .rule-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.55) 0%, var(--border-strong) 45%, transparent 100%);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 520ms var(--ease-out);
  pointer-events: none;
}

.has-motion-js .rule-band.is-banded::after {
  transform: scaleX(1);
}

/* Band 3: Asymmetric Flagship Spotlights */
.spot-row-a {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 24px;
  margin-bottom: 40px;
  align-items: stretch;
}

.spot-media {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-elev);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.spot-media-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.spot-media-bar .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.spot-media-bar h3 {
  margin: 0 0 3px;
  font-size: 15px;
  color: var(--text);
}

.spot-media-bar p {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

/* Interactive 1:8 Nether Calculator */
.calc-panel {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-elev);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.calc-kicker {
  font-size: 11px;
  color: var(--brand);
  display: block;
  margin-bottom: 6px;
}

.calc-head h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--text);
}

.calc-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

.calc-dir-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.calc-dir-btn {
  appearance: none;
  min-height: 44px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  touch-action: manipulation;
  transition: background var(--dur-micro) var(--ease-crisp), border-color var(--dur-micro) var(--ease-crisp), color var(--dur-micro) var(--ease-crisp);
}

.calc-dir-btn.active {
  background: var(--brand-soft);
  border-color: rgba(34, 197, 94, .45);
  color: var(--text);
}

.calc-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc-field {
  position: relative;
}

.calc-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 4px;
}

/* Eliminate OS-default number spin buttons per DESIGN.md */
.calc-field input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  color-scheme: dark;
  -moz-appearance: textfield;
  appearance: textfield;
  transition: border-color var(--dur-fast) var(--ease-crisp), background var(--dur-fast) var(--ease-crisp);
}

.calc-field input::-webkit-outer-spin-button,
.calc-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-field input:hover {
  border-color: var(--border-strong);
}

.calc-field::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-fast) var(--ease-out);
  pointer-events: none;
}

.calc-field:focus-within::after {
  transform: scaleX(1);
}

/* Interactive Overworld / Nether 1:8 Portal Radar */
.portal-radar {
  padding: 10px 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.radar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.radar-hint {
  color: var(--text-4);
}

.radar-svg {
  width: 100%;
  height: auto;
  display: block;
}

#radarSourcePad {
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.pad-bg {
  fill: var(--bg);
  stroke: var(--border);
  stroke-width: 1;
}

.pad-nether {
  fill: #130F12;
}

.pad-grid {
  stroke: #1C2026;
  stroke-width: 1;
}

.pad-axis {
  stroke: #2B313B;
  stroke-width: 1;
}

.pad-lbl {
  fill: var(--text-4);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.reticle-ring {
  fill: rgba(34, 197, 94, 0.12);
  stroke: var(--brand);
  stroke-width: 1.25;
}

.reticle-box {
  fill: rgba(34, 197, 94, 0.14);
  stroke: var(--brand);
  stroke-width: 1.25;
}

.reticle-core {
  fill: var(--brand);
}

#radarOwDot,
#radarNeDot {
  transition: transform var(--dur-fast) var(--ease-crisp);
}

.portal-radar.is-dragging #radarOwDot,
.portal-radar.is-dragging #radarNeDot {
  transition: none;
}

.bridge-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  animation: radarStream 1.4s linear infinite;
}

.portal-radar.is-n2o .bridge-line {
  animation-direction: reverse;
}

@keyframes radarStream {
  to { stroke-dashoffset: -14; }
}

.bridge-ratio {
  fill: var(--brand);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.calc-output {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.calc-output.is-error {
  border-color: var(--danger);
}

.calc-out-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-4);
  margin-bottom: 4px;
}

.calc-out-coords {
  font-size: 18px;
  color: var(--text);
}

.calc-output.is-error .calc-out-coords {
  font-size: 13.5px;
  color: var(--danger);
}

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

.calc-hint {
  font-size: 11.5px;
  color: var(--text-4);
}

/* Spotlight Row B: Player 3D + Inventory */
.spot-row-b {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: 24px;
  align-items: center;
}

.spot-player-copy h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--text);
}

.spot-player-copy > p {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--text-3);
}

.ply-switch {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 20px;
}

.ply-tab {
  appearance: none;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  touch-action: manipulation;
  transition: background var(--dur-micro) var(--ease-crisp), border-color var(--dur-micro) var(--ease-crisp), color var(--dur-micro) var(--ease-crisp);
}

.ply-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
}

.nbt-ledger {
  margin: 0;
  border-top: 1px solid var(--border);
}

.nbt-ledger > div {
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.nbt-ledger dt {
  font-size: 12px;
  color: var(--text-4);
  margin-bottom: 2px;
}

.nbt-ledger dd {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}

/* Band 4: Horizontal Scroll-Snap Filmstrip */
.filmstrip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.film-rail {
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 38px;
  overflow: hidden;
  display: none;
}

.film-rail-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--brand);
  transform-origin: left center;
  transform: scaleX(var(--rail-p, 0.35));
  transition: transform var(--dur-micro) var(--ease-crisp);
}

.film-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-elev);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.film-meta {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.film-meta > span {
  display: block;
  font-size: 11px;
  color: var(--brand);
  margin-bottom: 4px;
}

.film-meta h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  color: var(--text);
}

.film-meta p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
}

/* Runtime Mode Switcher & Engine Grid */
.engines-block {
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.engines-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.engines-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  touch-action: manipulation;
  transition: background var(--dur-micro) var(--ease-crisp), border-color var(--dur-micro) var(--ease-crisp), color var(--dur-micro) var(--ease-crisp);
}

.mode-pill:hover { border-color: var(--border-strong); color: var(--text-2); }
.mode-pill.active { background: var(--brand-soft); border-color: rgba(34, 197, 94, .42); color: var(--text); }

.mode-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-elev);
  margin-bottom: 14px;
  overflow: hidden;
}

.mode-spec {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.mode-spec:last-child { border-right: 0; }

.mode-spec-lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-4);
  margin-bottom: 3px;
}

.mode-spec strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
}

.spec-meter {
  display: block;
  height: 3px;
  margin-top: 8px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.spec-meter-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--brand);
  transform-origin: left center;
  transform: scaleX(var(--meter, 0.5));
  transition: transform 240ms var(--ease-snap);
}

.engine-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.engine-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: opacity var(--dur-fast) var(--ease-crisp), border-color var(--dur-fast) var(--ease-crisp);
}

.engine-item.is-dimmed { opacity: 0.34; }
.engine-item.is-match { border-color: rgba(34, 197, 94, .45); }

.engine-item img {
  width: 24px;
  height: 24px;
  border-radius: var(--r-xs);
  object-fit: contain;
  flex-shrink: 0;
}

.engine-item b {
  display: block;
  font-size: 13px;
  color: var(--text);
  line-height: 1.25;
}

.engine-item span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* Automation & Self-Host Stack Panel (CLI, Docker, Headless, MCP) */
.ops-panel {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-elev);
  overflow: hidden;
}

.ops-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.ops-head h3 {
  margin: 0 0 3px;
  font-size: 15.5px;
  color: var(--text);
}

.ops-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

.ops-tabs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.ops-glide {
  position: absolute;
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: 64px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  transform-origin: left center;
  transform: translate3d(var(--ogx, 0px), 0, 0) scaleX(var(--ogsx, 1));
  transition: transform var(--dur-tab) var(--ease-crisp);
  pointer-events: none;
}

.ops-tab {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--r-xs);
  white-space: nowrap;
  touch-action: manipulation;
  transition: color var(--dur-micro) var(--ease-crisp);
}

.ops-tab:hover { color: var(--text-2); }
.ops-tab.active { color: var(--text); }

.ops-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ops-cmd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.ops-cmd-row code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--brand);
  overflow-wrap: anywhere;
  min-width: 0;
}

.ops-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.58;
}

.ops-desc code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  color: var(--text);
}

/* Band 5: Pre-Flight Technical Sheet */
.preflight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.faq-list { border-top: 1px solid var(--border); }

.faq-item {
  border-bottom: 1px solid var(--border);
  interpolate-size: allow-keywords;
}

.faq-item::details-content {
  opacity: 0;
  block-size: 0;
  overflow: hidden;
  transition: opacity var(--dur-modal) var(--ease-out), block-size var(--dur-modal) var(--ease-out), content-visibility var(--dur-modal) allow-discrete;
}

.faq-item[open]::details-content {
  opacity: 1;
  block-size: auto;
}

.faq-item summary {
  min-height: 52px;
  padding: 14px 4px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); color: var(--text-3); font-size: 16px; }
.faq-item[open] summary::after { content: "-"; color: var(--brand); }

.faq-body {
  padding: 0 4px 16px;
  font-size: 13.5px;
  color: var(--text-3);
}

.faq-body code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: var(--r-xs);
  color: var(--text);
}

.scope-ledger {
  border-top: 1px solid var(--border);
}

.scope-group {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.scope-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.scope-group ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--text-3);
}

.scope-group li + li { margin-top: 5px; }

/* Footer */
.site-footer {
  padding: 30px 0 48px;
  font-size: 13px;
  color: var(--text-3);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-3);
  padding: 6px 0;
}

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

/* Lightbox Modal (Solid Dimmed Backdrop — No Blur) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 13, 15, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity var(--dur-modal) var(--ease-out);
}

.lightbox[hidden] { display: none; }

@starting-style {
  .lightbox { opacity: 0; }
  .lightbox-card { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.985); }
}

.lightbox-card {
  width: 100%;
  max-width: 1220px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: opacity var(--dur-modal) var(--ease-out), transform var(--dur-modal) var(--ease-out);
}

.lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.lightbox-counter { font-size: 11px; color: var(--brand); display: block; }
.lightbox-head h3 { margin: 0; font-size: 15px; color: var(--text); }
.lightbox-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.lightbox-actions { display: inline-flex; gap: 6px; flex-shrink: 0; }
.lightbox-stage { overflow: auto; background: var(--bg); }
.lightbox-stage img { width: 100%; display: block; aspect-ratio: 1360 / 860; }

/* Single Glass Element Allowed (R-10): Sticky Mobile Download Dock */
.mobile-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(17, 19, 23, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-strong);
  transform: translate3d(0, 110%, 0);
  transition: transform var(--dur-tab) var(--ease-out);
}

.mobile-dock.visible { transform: translate3d(0, 0, 0); }
.dock-dl { flex: 1; }
.dock-faq { flex-shrink: 0; }

/* Responsive Breakpoints */
@media (max-width: 1040px) {
  .hero-split,
  .workbench-layout,
  .section-head-split,
  .spot-row-a,
  .spot-row-b,
  .preflight-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .filmstrip {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 74%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 8px;
    cursor: grab;
  }
  .filmstrip::-webkit-scrollbar { display: none; }
  .filmstrip.is-grabbing { cursor: grabbing; scroll-snap-type: none; }
  .film-rail { display: block; }
  .film-card { scroll-snap-align: start; }
  .engine-strip { grid-template-columns: repeat(3, 1fr); }
  .mode-specs { grid-template-columns: repeat(2, 1fr); }
  .mode-spec:nth-child(2) { border-right: 0; }
  .mode-spec:nth-child(n+3) { border-top: 1px solid var(--border); }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 112px; }
  .nav-links,
  .tone-switch-desktop { display: none; }
  .mobile-subnav { display: block; }
  .tone-switch-mobile { display: inline-grid; flex-shrink: 0; }
  .tone-switch-mobile .tone-btn { min-height: 44px; padding: 6px 10px; font-size: 12.5px; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .mobile-dock { display: flex; }
  .site-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

  .hero-band { padding: 30px 0 42px; }
  .hero-deck { transform: none; }
  .band-stone,
  .band-dark { padding: 48px 0; }
  .header-inner { gap: 8px; }
  .brand { font-size: 14px; min-width: 0; }
  .brand span:not(.ver-badge) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ver-badge { display: none; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .header-actions .btn.sm { padding: 6px 9px; font-size: 12px; }
  .lang-select { padding: 6px 22px 6px 8px; font-size: 12.5px; max-width: 122px; min-height: 40px; }

  .hero-facts { grid-template-columns: 1fr 1fr; }
  .workbench-diff { grid-template-columns: 1fr; }
  .wb-bus-col { display: none; }
  .diff-observer { border-left: 0; border-top: 2px solid var(--s-border-strong); }
  .workbench-diff.bus-firing .diff-observer { border-top-color: var(--s-brand); }
  .filmstrip { grid-auto-columns: 86%; }
  .engine-strip { grid-template-columns: repeat(2, 1fr); }
  .spot-media-bar { flex-direction: column; align-items: flex-start; }
  .lightbox { padding: 10px; }
  .lightbox-head { flex-direction: column; align-items: flex-start; }
}

/* Desktop-only crisp focus borders (no template bounce) */
@media (hover: hover) and (pointer: fine) {
  .hero-deck {
    transition: border-color var(--dur-fast) var(--ease-crisp);
  }
  .hero-deck:hover { border-color: var(--brand); }

  .film-card,
  .engine-item {
    position: relative;
    transition: border-color var(--dur-fast) var(--ease-crisp), opacity var(--dur-fast) var(--ease-crisp);
  }
  .film-card:hover,
  .engine-item:hover { border-color: var(--border-strong); }
  .engine-item.is-match:hover { border-color: rgba(34, 197, 94, .7); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-deck { transform: none !important; }
  .has-motion-js .hero-shutter,
  .has-motion-js .rule-band::after,
  .diff-list li,
  .tone-morph,
  .workbench-diff.bus-firing .bus-pulse,
  .bridge-line,
  .calc-snap,
  .stage-enter-fwd,
  .stage-enter-back {
    animation: none !important;
    clip-path: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *, *::before, *::after { transition-duration: 0ms !important; }
}
