/* Spatial Future 2035 — Luminous Optical Ceramic & Liquid Chrome Design Layer */

:root {
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --space-section: clamp(56px, 7vw, 108px);
  --control-size: 44px;
  --focus-ring: var(--accent-2);
  --shadow-control: 0 4px 14px -4px rgb(15 23 42 / 10%), inset 0 1px 0 rgb(255 255 255 / 72%);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==================== WORLD 1: PRISM (LUMINOUS OPTICAL CERAMIC) ==================== */
html[data-theme="prism"] {
  --bg-void: #ebf0f8;
  --bg-deep: #dde6f4;
  --bg-topbar: rgb(247 250 255 / 78%);
  --bg-panel: rgb(255 255 255 / 74%);
  --bg-raised: rgb(255 255 255 / 92%);
  --bg-sunken: rgb(228 236 249 / 72%);
  --bg-chip: rgb(15 23 42 / 5.5%);
  --bg-chip-hover: rgb(29 78 216 / 12%);
  --bg-input: rgb(255 255 255 / 92%);
  --bg-stage: radial-gradient(ellipse 84% 72% at 50% 42%, rgb(255 255 255 / 94%) 0%, rgb(229 238 252 / 86%) 54%, rgb(210 223 245 / 90%) 100%);
  --ink: #101b33;
  --ink-strong: #050a18;
  --muted: #3c4d6b;
  --subtle: #5a6c8b;
  --line: rgb(15 30 66 / 11%);
  --line-strong: rgb(29 78 216 / 34%);
  --accent-1: #ff4418;
  --accent-1-ink: #b92403;
  --accent-1-bg: rgb(255 68 24 / 11%);
  --accent-2: #1d4ed8;
  --accent-2-ink: #163ca8;
  --accent-2-bg: rgb(29 78 216 / 11%);
  --accent-3: #6d28d9;
  --accent-3-ink: #5b21b6;
  --accent-4: #059669;
  --accent-4-ink: #047857;
  --shadow-card: 0 20px 50px -22px rgb(15 29 66 / 16%), 0 2px 10px -2px rgb(15 29 66 / 6%), inset 0 1px 0 rgb(255 255 255 / 90%);
  --shadow-float: 0 34px 80px -20px rgb(15 29 66 / 26%), 0 4px 16px -4px rgb(29 78 216 / 12%), inset 0 1px 0 rgb(255 255 255 / 95%);
  --nebula-a: rgb(37 99 235 / 17%);
  --nebula-b: rgb(255 72 32 / 14%);
  --nebula-c: rgb(124 58 237 / 13%);
  --holo-glare: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / 55%), rgb(29 78 216 / 10%) 34%, rgb(255 68 24 / 6%) 55%, transparent 72%);
}

html[data-theme="atelier"] {
  --bg-topbar: rgb(252 248 241 / 80%);
  --bg-panel: rgb(255 252 246 / 76%);
  --bg-raised: rgb(255 253 249 / 94%);
  --shadow-card: 0 20px 50px -22px rgb(42 26 12 / 16%), 0 2px 10px -2px rgb(42 26 12 / 6%), inset 0 1px 0 rgb(255 255 255 / 90%);
  --shadow-float: 0 34px 80px -20px rgb(42 26 12 / 24%), inset 0 1px 0 rgb(255 255 255 / 95%);
  --nebula-a: rgb(240 62 6 / 14%);
  --nebula-b: rgb(217 119 6 / 13%);
  --nebula-c: rgb(29 78 216 / 10%);
}

html[data-theme="aurora"] {
  --bg-topbar: rgb(248 245 255 / 80%);
  --bg-panel: rgb(255 255 255 / 74%);
  --bg-raised: rgb(255 255 255 / 92%);
  --shadow-card: 0 20px 50px -22px rgb(34 18 82 / 16%), 0 2px 10px -2px rgb(34 18 82 / 6%), inset 0 1px 0 rgb(255 255 255 / 92%);
  --shadow-float: 0 34px 80px -20px rgb(79 70 229 / 26%), inset 0 1px 0 rgb(255 255 255 / 95%);
  --nebula-a: rgb(236 72 153 / 16%);
  --nebula-b: rgb(79 70 229 / 16%);
  --nebula-c: rgb(8 145 178 / 14%);
}

html[data-theme="obsidian"] {
  --bg-void: #050812;
  --bg-deep: #090f21;
  --bg-topbar: rgb(7 11 23 / 82%);
  --bg-panel: rgb(13 20 38 / 76%);
  --bg-raised: rgb(19 28 52 / 90%);
  --bg-sunken: rgb(8 13 27 / 86%);
  --line: rgb(148 163 184 / 15%);
  --line-strong: rgb(56 189 248 / 38%);
  --shadow-card: 0 26px 64px -20px rgb(0 0 0 / 64%), inset 0 1px 0 rgb(255 255 255 / 11%);
  --shadow-float: 0 40px 96px -20px rgb(0 0 0 / 82%), 0 0 0 1px rgb(56 189 248 / 24%), 0 0 42px -12px rgb(99 102 241 / 28%), inset 0 1px 0 rgb(255 255 255 / 16%);
  --nebula-a: rgb(124 58 237 / 24%);
  --nebula-b: rgb(255 94 43 / 17%);
  --nebula-c: rgb(56 189 248 / 22%);
  --holo-glare: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgb(56 189 248 / 20%), rgb(167 139 250 / 12%) 38%, rgb(255 94 43 / 6%) 60%, transparent 74%);
}

/* ==================== CORE MOTION & ATMOSPHERE ==================== */
@keyframes nebulaDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(1.5%, -1.8%, 0) scale(1.045); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes spectralShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes viewSpringIn {
  from { opacity: 0; transform: translateY(14px) scale(0.992); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes laserSweep {
  0%   { top: -8%; opacity: 0; }
  12%  { opacity: 0.9; }
  88%  { opacity: 0.9; }
  100% { top: 108%; opacity: 0; }
}

@keyframes orbSpinSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes beamTravel {
  0%   { transform: translateX(-120%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateX(340%); opacity: 0; }
}

@keyframes pulseHalo {
  0%, 100% { box-shadow: 0 0 0 0 rgb(29 78 216 / 38%); }
  50%      { box-shadow: 0 0 0 9px rgb(29 78 216 / 0%); }
}

html {
  scroll-padding-top: 106px;
  font-size: calc(16px * var(--font-scale, 1));
}
body {
  line-height: 1.65;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
}
.view { animation: viewSpringIn .52s var(--spring) both; }
.studio-workspace, .target-gate { animation: viewSpringIn .45s var(--spring) both; }

button, a, summary { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { touch-action: manipulation; }
button, a.button, summary { scroll-margin-block: 110px 24px; }
:is(h1, h2, h3) { text-wrap: balance; font-family: var(--display); }
:is(p, li) { text-wrap: pretty; }
svg { width: 20px; height: 20px; stroke-width: 1.8; }
svg text, svg tspan { stroke: none !important; }
button svg, a svg { pointer-events: none; }

/* Living Optical Backdrop (GPU-friendly: static ambient nebula, zero idle repaint) */
.matrix-canvas { opacity: .78; contain: strict; }
.ambient-nebula {
  opacity: 1;
  inset: -4%;
  animation: none;
  will-change: auto;
  contain: strict;
}

/* ==================== SPATIAL OPTICAL GLASS CARDS (60-120FPS COMPOSITOR SAFE) ==================== */
:is(.panel, .holo-card, .bento-card, .hardware-card, .sim-panel, .gate-machine, .eco-card, .metric-tile, .fleet-card, .launchpad-banner, .studio-command-bar, .site-footer, .telemetry-marquee, .hud-chip) {
  position: relative;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  transition: transform .24s var(--spring), box-shadow .24s ease, border-color .22s ease, background-color .22s ease;
}
:root[data-theme="obsidian"] :is(.panel, .holo-card, .bento-card, .hardware-card, .sim-panel, .gate-machine, .eco-card, .metric-tile, .fleet-card, .launchpad-banner, .studio-command-bar, .site-footer, .telemetry-marquee) {
  background-color: rgba(11, 18, 34, 0.92);
}

:is(.holo-card, .bento-card, .hardware-card, .sim-panel, .eco-card, .gate-machine)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--holo-glare);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
  z-index: 2;
}

:is(.holo-card, .bento-card, .hardware-card, .sim-panel, .eco-card, .gate-machine):hover::before {
  opacity: 1;
}

:is(.bento-card, .hardware-card, .principle-card, .guide-card, .eco-card):hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
  border-color: var(--line-strong);
}

/* Skip off-screen layout/paint while scrolling long landing view */
.landing-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

/* Keep light blur only on sticky topbar & transient dropdowns/modals */
.topbar {
  backdrop-filter: blur(10px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%) !important;
}
.nav, .hero-stage-controls, .hero-heads-pill, .hero-telemetry-card, .viewport-empty, .preview-complete {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.lang-menu, .optics-menu, .engine-popover, .cmd-overlay, .cmd-modal, .toast {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

:is(button, a, summary, input, select, textarea, canvas):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

:is(input, textarea, select) {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  min-height: var(--control-size);
  background: var(--bg-input);
  color: var(--ink-strong);
}
:is(input, textarea)::placeholder { color: var(--subtle); opacity: 0.85; }
select option, select optgroup { background: var(--bg-raised); color: var(--ink-strong); }
:is(input, textarea, select):focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-2-bg); }
select { padding-inline-end: 30px; }
textarea { resize: vertical; line-height: 1.6; }
button:disabled { opacity: .48; box-shadow: none; transform: none !important; }

/* ==================== TACTILE MAGNETIC BUTTONS ==================== */
.button {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  min-height: var(--control-size);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform .26s var(--spring), box-shadow .28s ease, background .28s ease, border-color .24s ease;
}
.button > span { min-width: 0; }

.button.primary {
  background: linear-gradient(125deg, #ff4818 0%, #e12d16 52%, #ff6a2b 100%);
  background-size: 180% 180%;
  border: 1px solid rgb(255 255 255 / 26%);
  color: #fff;
  box-shadow: 0 12px 30px -8px rgb(255 68 24 / 46%), inset 0 1px 0 rgb(255 255 255 / 42%);
}
.button.primary:hover:not(:disabled) {
  background-position: 100% 50%;
  transform: translate3d(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px), 0);
  box-shadow: 0 18px 38px -8px rgb(255 68 24 / 58%), inset 0 1px 0 rgb(255 255 255 / 55%);
}
.button.glow-cta {
  transform: translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0);
}
.button.glow-cta::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -65%;
  width: 48%;
  background: linear-gradient(105deg, transparent 20%, rgb(255 255 255 / 46%) 50%, transparent 80%);
  transform: skewX(-20deg);
  animation: beamTravel 4.8s ease-in-out infinite;
  pointer-events: none;
}

.button.secondary, .button.download {
  background: linear-gradient(120deg, #1d4ed8 0%, #3730a3 55%, #2563eb 100%);
  background-size: 180% 180%;
  border: 1px solid rgb(255 255 255 / 22%);
  color: #fff;
  box-shadow: 0 12px 28px -8px rgb(29 78 216 / 44%), inset 0 1px 0 rgb(255 255 255 / 35%);
}
.button.secondary:hover:not(:disabled), .button.download:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -8px rgb(29 78 216 / 56%);
}

.button.outline {
  background: var(--bg-raised);
  color: var(--ink-strong);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-control);
}
.button.outline:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--accent-2);
  box-shadow: 0 12px 24px -10px rgb(29 78 216 / 26%);
}
.button.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.button.quiet:hover:not(:disabled) { background: var(--bg-chip); transform: translateY(-1px); }
html[data-theme="obsidian"] :is(.docs-nav-btn.active, .plate-tab.active, .preview-switch button.active, .rig-pill.active) {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .71rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.6;
  text-transform: uppercase;
}
.eyebrow > i {
  width: 24px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

/* ==================== FLOATING OPTICAL TOPBAR ==================== */
main { max-width: 1460px; padding-inline: clamp(18px, 3.2vw, 48px); }

.topbar {
  min-height: 76px;
  gap: 16px;
  padding-inline: max(24px, calc((100vw - 1412px) / 2));
  background: var(--bg-topbar);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px -18px rgb(15 23 42 / 14%);
}

.brand { font-family: var(--display); font-size: 1.24rem; gap: 11px; font-weight: 800; letter-spacing: -0.03em; }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  border: 1px solid rgb(255 255 255 / 60%);
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent-3) 56%, var(--accent-1) 100%);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgb(29 78 216 / 45%);
}
.brand-mark svg { stroke: #fff; }
.brand-text small { font-family: var(--mono); font-size: .60rem; letter-spacing: .08em; font-weight: 600; margin-top: 4px; opacity: .78; }
.prism-pill {
  display: inline-flex;
  font-family: var(--mono);
  font-size: .67rem;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  background: var(--accent-2-bg);
  color: var(--accent-2-ink);
  border-radius: 999px;
  padding: 3px 9px;
}

.nav {
  background: var(--bg-chip);
  border: 1px solid var(--line);
  gap: 3px;
  padding: 4px;
  border-radius: 14px;
  backdrop-filter: blur(12px);
}
.nav button {
  min-height: 40px;
  padding-inline: 14px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 650;
  transition: background .22s ease, color .22s ease, box-shadow .22s ease;
}
.nav button.active {
  background: var(--bg-raised);
  color: var(--accent-2-ink);
  box-shadow: 0 4px 12px -4px rgb(15 23 42 / 14%), inset 0 1px 0 rgb(255 255 255 / 90%);
}

.topbar-controls { gap: 8px; }
.hud-chip-btn {
  min-height: 42px;
  min-width: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  box-shadow: var(--shadow-control);
  transition: transform .22s var(--spring), border-color .22s ease, box-shadow .22s ease;
}
.hud-chip-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }

/* Live 4-World Switcher Pill in Topbar */
#theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  box-shadow: var(--shadow-control);
}
#theme-switcher button {
  min-height: 32px;
  min-width: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  transition: background .2s ease, transform .2s var(--spring);
}
#theme-switcher button span { display: none; }
#theme-switcher button:hover { background: var(--bg-chip); transform: scale(1.06); }
#theme-switcher button.active {
  background: var(--accent-2-bg);
  box-shadow: inset 0 0 0 1.5px var(--accent-2);
}
.swatch-dot { width: 12px; height: 12px; border-radius: 50%; display: block; box-shadow: inset 0 1px 2px rgb(255 255 255 / 60%), 0 2px 6px rgb(0 0 0 / 18%); }
.swatch-dot.prism    { background: linear-gradient(135deg, #f8fafc 0%, #2563eb 55%, #ff4820 100%); }
.swatch-dot.atelier  { background: linear-gradient(135deg, #faf3e8 0%, #d97706 55%, #f03e06 100%); }
.swatch-dot.aurora   { background: linear-gradient(135deg, #f5f3ff 0%, #7c3aed 50%, #ec4899 100%); }
.swatch-dot.obsidian { background: linear-gradient(135deg, #0b1122 0%, #38bdf8 60%, #a78bfa 100%); }

#coffee-trigger { background: var(--bg-raised); }
.connection-status {
  border: 1px solid var(--line);
  background: var(--bg-raised);
  border-radius: 999px;
  padding: 7px 13px;
  font-family: var(--mono);
  font-size: .70rem;
  font-weight: 700;
  box-shadow: var(--shadow-control);
}
.connection-status > svg { display: none; }
.nav-toggle { display: none; }
.lang-menu, .optics-menu {
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--shadow-float);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  max-height: min(74dvh, 650px);
  overflow-y: auto;
}
.lang-option, .opt-pill { min-height: 44px; border-radius: 10px; font-family: var(--sans); }
.optics-label { letter-spacing: .08em; font-family: var(--mono); }

/* ==================== KINETIC TELEMETRY MARQUEE ==================== */
.telemetry-marquee {
  display: block;
  margin-top: 16px;
  padding: 10px 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  overflow: hidden;
}
.telemetry-marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track { gap: 38px; font-family: var(--mono); font-size: .71rem; letter-spacing: .06em; }
.marquee-track span b { font-weight: 700; color: var(--muted); }

/* ==================== HERO: CENTERED EDITORIAL MASTHEAD + BORDERLESS FLOW THEATER ==================== */
.landing-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-block: 10px 18px;
  align-items: start;
}
.hero-masthead {
  display: grid;
  justify-items: center;
  text-align: center;
  max-width: 840px;
  margin-inline: auto;
  min-width: 0;
}
.landing-title {
  font-family: var(--display);
  font-size: clamp(2.1rem, 3.55vw, 3.35rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.04em;
  margin-block: 6px 8px;
  color: var(--ink-strong);
}
.landing-title em {
  font-style: normal;
  display: inline-block;
  background: linear-gradient(115deg, #0f172a 0%, #1e3a8a 60%, #334155 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="obsidian"] .landing-title em {
  background: linear-gradient(115deg, #f8fafc 0%, #cbd5e1 54%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-lead {
  font-size: .92rem;
  line-height: 1.58;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: 14px;
  color: var(--muted);
}
.landing-cta-row {
  gap: 12px;
  margin-bottom: 0;
  align-items: center;
  justify-content: center;
}
.landing-cta-row .button { padding-inline: 22px; min-height: 44px; }
.landing-cta-row .button.quiet {
  flex-basis: auto;
  font-size: .82rem;
  min-height: 38px;
  border: 0;
  padding-inline: 10px;
}

.hud-chips { gap: 8px 10px; display: flex; flex-wrap: wrap; justify-content: center; }
.hud-chip {
  font-family: var(--mono);
  font-weight: 600;
  font-size: .72rem;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  border-radius: 999px;
  padding: 6px 13px;
  box-shadow: var(--shadow-control);
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; }

/* Borderless Open-Space Flow Theater */
.hero-flow-theater {
  position: relative;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0 6px;
  display: grid;
  gap: 12px;
}

@keyframes flowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes flowSwapIn {
  0% { opacity: 0.2; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes flowHubBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.024); }
}
@keyframes flowDashStream {
  from { stroke-dashoffset: 48; }
  to { stroke-dashoffset: 0; }
}
@keyframes flowOrbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes flowOrbitSpinRev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.flow-stage-canvas {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  min-height: 320px;
  display: grid;
  grid-template-columns: 1fr 1.04fr 1fr;
  align-items: center;
  gap: 0;
}

.flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.flow-orbit-ring {
  fill: none;
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 7;
  transform-box: fill-box;
  transform-origin: center;
}
.flow-orbit-ring.outer {
  animation: flowOrbitSpin 38s linear infinite;
}
.flow-orbit-ring.inner {
  stroke: rgba(125, 211, 252, 0.22);
  stroke-dasharray: 7 9;
  animation: flowOrbitSpinRev 26s linear infinite;
}

.flow-rail-base {
  fill: none;
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1.5;
  stroke-dasharray: 3 6;
}
.flow-rail-pulse {
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 10 14;
  animation: flowDashStream 1.6s linear infinite;
}
.flow-rail-pulse.in { stroke: url(#flow-grad-in); }
.flow-rail-pulse.out { stroke: url(#flow-grad-out); }
.flow-rail-pulse.slow {
  stroke-width: 1.5;
  opacity: .72;
  animation-duration: 2.2s;
}

.flow-node-dot {
  fill: #94a3b8;
  opacity: .55;
  stroke: none;
}
.flow-node-dot.in-hit { fill: #7dd3fc; opacity: .78; }
.flow-node-dot.out-hit { fill: #34d399; opacity: .82; }
#hero-flow-svg circle[id^="flow-"] {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 1;
}
html:not([data-theme="obsidian"]) #hero-flow-svg circle[id^="flow-"] {
  stroke: rgba(15, 23, 42, 0.22);
}

.flow-capsule-bg {
  fill: rgba(12, 18, 32, 0.94);
  stroke: rgba(125, 211, 252, 0.72);
  stroke-width: 1.3;
}
.flow-capsule-ico {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.flow-capsule-txt {
  fill: #e2e8f0;
  stroke: none;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-anchor: middle;
}

.flow-capsule-out-bg {
  fill: rgba(9, 24, 21, 0.95);
  stroke: rgba(52, 211, 153, 0.8);
  stroke-width: 1.35;
}
.flow-capsule-out-chk {
  fill: none;
  stroke: #34d399;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-capsule-out-txt {
  fill: #ecfdf5;
  stroke: none;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-anchor: middle;
}

html:not([data-theme="obsidian"]) .flow-orbit-ring {
  stroke: rgba(15, 23, 42, 0.14);
}
html:not([data-theme="obsidian"]) .flow-orbit-ring.inner {
  stroke: rgba(2, 132, 199, 0.24);
}
html:not([data-theme="obsidian"]) .flow-rail-base {
  stroke: rgba(15, 23, 42, 0.16);
}
html:not([data-theme="obsidian"]) .flow-node-dot {
  fill: #64748b;
  opacity: .65;
}
html:not([data-theme="obsidian"]) .flow-node-dot.in-hit {
  fill: #0284c7;
  opacity: .85;
}
html:not([data-theme="obsidian"]) .flow-node-dot.out-hit {
  fill: #059669;
  opacity: .88;
}
html:not([data-theme="obsidian"]) .flow-capsule-bg {
  fill: #ffffff;
  stroke: #2563eb;
}
html:not([data-theme="obsidian"]) .flow-capsule-ico {
  stroke: #0284c7;
}
html:not([data-theme="obsidian"]) .flow-capsule-txt {
  fill: #0f172a;
}
html:not([data-theme="obsidian"]) .flow-capsule-out-bg {
  fill: #ecfdf5;
  stroke: #059669;
}
html:not([data-theme="obsidian"]) .flow-capsule-out-chk {
  stroke: #059669;
}
html:not([data-theme="obsidian"]) .flow-capsule-out-txt {
  fill: #065f46;
}

/* Open Stations */
.flow-station {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  padding-inline: 8px;
}

.flow-figure-wrap {
  position: relative;
  width: 184px;
  height: 184px;
  display: grid;
  place-items: center;
}
.flow-floor-shadow {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 106px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(2, 6, 23, 0.56) 0%, transparent 72%);
  pointer-events: none;
}

.flow-fig-img {
  width: 170px;
  height: 170px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.42));
  transition: opacity .26s ease, transform .38s var(--spring);
}
.flow-station-source .flow-fig-img {
  animation: flowFloat 4.6s ease-in-out infinite;
}
.flow-figure-wrap.is-swap,
.flow-fig-img.flow-out-fig.is-swap {
  animation: flowSwapIn 360ms var(--spring) both;
}

.flow-cluster-wrap {
  position: relative;
  width: 188px;
  height: 184px;
  display: grid;
  place-items: center;
}
.flow-cluster-aura {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 48%, rgba(56, 189, 248, 0.14) 0%, rgba(56, 189, 248, 0.03) 52%, transparent 74%);
  pointer-events: none;
}
.flow-cluster-img {
  width: 172px;
  height: 172px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.52));
  animation: flowHubBreathe 4.2s ease-in-out infinite;
}

/* Right Station: Figurine Standing on PEI Build Plate */
.flow-plate-composite {
  position: relative;
  width: 248px;
  height: 184px;
}
.flow-bed-img {
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 238px;
  height: 238px;
  transform: translateX(-50%);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.48));
  pointer-events: none;
}
.flow-plate-contact-shadow {
  position: absolute;
  left: 44%;
  bottom: 50px;
  width: 78px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.68) 0%, transparent 72%);
  pointer-events: none;
}
.flow-fig-img.flow-out-fig {
  position: absolute;
  left: calc(44% - 62px);
  bottom: 52px;
  width: 124px;
  height: 124px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.42));
}

/* Floating Labels Underneath Each Station (Pill/Inline Only, Never Square Boxes) */
.flow-station-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.flow-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-panel);
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  box-shadow: var(--shadow-control);
}
html[data-theme="obsidian"] .flow-file-chip {
  background: rgba(14, 20, 36, 0.9);
  border-color: rgba(148, 163, 184, 0.24);
}
.flow-file-chip svg {
  width: 13px;
  height: 13px;
  stroke: #7dd3fc;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
.flow-file-chip.ready {
  border-color: rgba(52, 211, 153, 0.36);
}
.flow-file-chip.ready > svg {
  stroke: #34d399;
}

.flow-swatch-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-inline-start: 4px;
  border-inline-start: 1px solid var(--line);
}
.flow-swatch-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.flow-ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #10b981;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .05em;
}
html[data-theme="obsidian"] .flow-ready-pill {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}
.flow-ready-pill svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.6;
}

.flow-node-sub {
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--muted);
}

.flow-cluster-label {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
}
.flow-cluster-label strong {
  color: var(--ink-strong);
}
html[data-theme="obsidian"] .flow-cluster-label strong {
  color: #e2e8f0;
}

.flow-telemetry-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  max-width: 340px;
}
.flow-micro-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  background: transparent;
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.flow-micro-pill svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
}
.flow-micro-pill.active {
  color: var(--ink-strong);
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(125, 211, 252, 0.08);
}

.flow-out-subrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.flow-try-link {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent-2-ink, #0284c7);
  cursor: pointer;
}
html[data-theme="obsidian"] .flow-try-link {
  color: #7dd3fc;
}
.flow-try-link svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}
.flow-try-link:hover { text-decoration: underline; }

/* Bottom Floating Model + Ecosystem Control Dock */
.flow-dock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-inline: auto;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow-control);
}
html[data-theme="obsidian"] .flow-dock {
  background: rgba(12, 18, 32, 0.88);
  border-color: rgba(148, 163, 184, 0.2);
}
.flow-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.flow-pill-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.flow-pill-btn:hover { color: var(--ink-strong); }
.flow-pill-btn.active {
  background: rgba(148, 163, 184, 0.16);
  color: var(--ink-strong);
}
html[data-theme="obsidian"] .flow-pill-btn.active {
  background: rgba(125, 211, 252, 0.14);
  color: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.26);
}
.flow-dock-sep {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}
.flow-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: .58rem;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.flow-play-btn:hover { color: var(--ink-strong); border-color: var(--line-strong); }

html:not([data-theme="obsidian"]) .flow-floor-shadow {
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.22) 0%, transparent 72%);
}
html:not([data-theme="obsidian"]) .flow-fig-img {
  filter: drop-shadow(0 14px 20px rgba(15, 23, 42, 0.18));
}
html:not([data-theme="obsidian"]) .flow-cluster-img {
  filter: drop-shadow(0 16px 22px rgba(15, 23, 42, 0.2));
}
html:not([data-theme="obsidian"]) .flow-bed-img {
  filter: drop-shadow(0 14px 20px rgba(15, 23, 42, 0.18));
}
html:not([data-theme="obsidian"]) .flow-fig-img.flow-out-fig {
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.24));
}
html:not([data-theme="obsidian"]) .flow-file-chip svg {
  stroke: #0284c7;
}
html:not([data-theme="obsidian"]) .flow-file-chip.ready {
  border-color: rgba(5, 150, 105, 0.36);
}
html:not([data-theme="obsidian"]) .flow-file-chip.ready > svg {
  stroke: #059669;
}
html:not([data-theme="obsidian"]) .flow-swatch-dots i {
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.22);
}
html:not([data-theme="obsidian"]) .flow-ready-pill {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}
html:not([data-theme="obsidian"]) .flow-micro-pill.active {
  color: var(--ink-strong);
  border-color: rgba(2, 132, 199, 0.42);
  background: rgba(2, 132, 199, 0.09);
}
html:not([data-theme="obsidian"]) .flow-pill-btn.active {
  background: var(--bg-raised);
  color: var(--ink-strong);
  box-shadow: var(--shadow-control), inset 0 0 0 1px var(--line-strong);
}

.flow-caption {
  margin: 0;
  text-align: center;
  font-size: .8rem;
  line-height: 1.48;
  color: var(--muted);
  max-width: 760px;
  margin-inline: auto;
  min-height: 1.48em;
}

.flow-mobile-arrow {
  display: none;
  color: var(--muted);
  opacity: .58;
}
.flow-mobile-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transform: rotate(90deg);
}

/* Phase Subtle Station Emphasis */
.hero-flow-theater[data-active-phase="0"] .flow-station-source .flow-file-chip,
.hero-flow-theater[data-active-phase="1"] .flow-station-cluster .flow-cluster-label,
.hero-flow-theater[data-active-phase="2"] .flow-station-cluster .flow-cluster-label,
.hero-flow-theater[data-active-phase="3"] .flow-station-ready .flow-file-chip {
  border-color: rgba(125, 211, 252, 0.45);
}

@media (max-width: 960px) {
  .flow-stage-canvas {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
  }
  .flow-svg { display: none; }
  .flow-mobile-arrow { display: grid; place-items: center; }
  .flow-dock { border-radius: 18px; }
  .flow-dock-sep { display: none; }
}
@media (max-width: 680px) {
  .flow-pill-group { flex-wrap: wrap; justify-content: center; }
}
.hero-flow-theater.is-paused .flow-station-source .flow-fig-img,
.hero-flow-theater.is-paused .flow-cluster-img,
.hero-flow-theater.is-paused .flow-rail-pulse,
.hero-flow-theater.is-paused .flow-orbit-ring {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .flow-station-source .flow-fig-img,
  .flow-figure-wrap.is-swap,
  .flow-fig-img.flow-out-fig.is-swap,
  .flow-cluster-img,
  .flow-rail-pulse,
  .flow-orbit-ring { animation: none !important; }
}

/* ==================== METRICS GALLERY STRIP ==================== */
.metrics-strip {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(24px) saturate(165%);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.metric-tile {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 26px 20px;
  background: transparent;
  transition: background .26s ease;
}
.metric-tile:hover { background: var(--accent-2-bg); }
.metric-tile + .metric-tile { border-inline-start: 1px solid var(--line); }
.metric-tile b {
  font-family: var(--display);
  font-size: clamp(1.9rem, 2.5vw, 2.45rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  background: linear-gradient(125deg, var(--ink-strong) 35%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metric-tile span { font-size: .78rem; line-height: 1.55; color: var(--muted); font-weight: 500; }

/* ==================== SECTION HEADINGS & SCROLL REVEAL ==================== */
.landing-section { margin-top: var(--space-section); }
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .68s var(--spring), transform .68s var(--spring);
}
.reveal-item.is-visible { opacity: 1; transform: translateY(0); }

.section-intro { margin-bottom: 30px; }
.section-intro h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.1vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink-strong);
}
.section-intro p { max-width: 720px; font-size: 1rem; line-height: 1.8; color: var(--muted); }

/* ==================== QUANTUM TELEMETRY SIMULATOR ==================== */
.sim-panel { padding: 30px; border-radius: var(--radius-lg); }
.sim-tabs { gap: 8px; }
.sim-tab {
  min-height: 44px;
  border-radius: 12px;
  font-size: .84rem;
  font-weight: 700;
  font-family: var(--sans);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  transition: all .24s var(--spring);
}
.sim-tab:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.sim-tab.active {
  background: linear-gradient(125deg, var(--accent-2), var(--accent-3));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px -8px rgb(29 78 216 / 48%);
}

.sim-node {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  box-shadow: var(--shadow-control);
}
.sim-node.core {
  border-color: var(--accent-3);
  background: linear-gradient(145deg, var(--accent-2-bg), var(--accent-3-bg), var(--bg-raised));
  box-shadow: 0 14px 32px -12px rgb(109 40 217 / 28%);
}
.sim-node.target {
  border-color: var(--accent-1);
  background: linear-gradient(145deg, var(--accent-1-bg), var(--bg-raised));
}
.sim-beam {
  position: relative;
  height: 3px;
  border-radius: 99px;
  background: var(--line-strong);
  overflow: hidden;
}
.sim-beam .beam-pulse {
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, var(--accent-2), var(--accent-1), transparent);
  animation: beamTravel 2.2s linear infinite;
}
.sim-beam .beam-pulse.delay { animation-delay: 1.1s; }

.sim-tensor-card, .sim-telemetry-card {
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
}
.purge-cell {
  border-radius: 11px;
  transition: transform .22s var(--spring), box-shadow .22s ease;
  font-variant-numeric: tabular-nums;
}
.purge-cell:hover { transform: scale(1.06); z-index: 2; box-shadow: 0 10px 22px -8px rgb(29 78 216 / 34%); }
.purge-pair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: .64rem;
}
.purge-pair i {
  display: inline-block;
  width: 7px;
  height: 7px;
  min-width: 7px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid rgb(15 23 42 / 24%);
  flex-shrink: 0;
}
.sim-note { font-size: .88rem; line-height: 1.7; }
.bar-fill { transition: width .65s var(--spring); }
.sim-example-note { display: flex; gap: 8px; margin-top: 18px; color: var(--subtle); font-size: .78rem; align-items: flex-start; }
.sim-example-note svg { width: 16px; height: 16px; margin-top: 3px; }

/* ==================== PIPELINE X-RAY + OPTICAL RETICLE ==================== */
.pipeline-visual {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
}
.pipeline-visual img {
  height: 100%;
  max-height: 600px;
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s var(--spring);
}
.pipeline-visual[data-active-stage="0"] img { transform: scale(1.00); }
.pipeline-visual[data-active-stage="1"] img { transform: scale(1.05) translateY(-1.5%); }
.pipeline-visual[data-active-stage="2"] img { transform: scale(1.06) translateY(1.5%); }
.pipeline-visual[data-active-stage="3"] img { transform: scale(1.03); }

.pipeline-laser-scan {
  position: absolute;
  inset-inline: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-2), var(--accent-1), transparent);
  box-shadow: 0 0 18px 3px rgb(255 68 24 / 36%);
  pointer-events: none;
  animation: laserSweep 6.2s ease-in-out infinite;
  z-index: 3;
}

.pipeline-reticle {
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / 88%);
  box-shadow: 0 0 0 1px rgb(29 78 216 / 45%), 0 0 28px rgb(29 78 216 / 32%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
  transition: top .55s var(--spring), left .55s var(--spring);
  top: 22%;
  left: 50%;
}
.pipeline-reticle span {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px dashed var(--accent-1);
  animation: orbSpinSlow 12s linear infinite;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
}
.pipeline-visual[data-active-stage="0"] .pipeline-reticle { top: 22%; left: 50%; }
.pipeline-visual[data-active-stage="1"] .pipeline-reticle { top: 47%; left: 50%; }
.pipeline-visual[data-active-stage="2"] .pipeline-reticle { top: 68%; left: 48%; }
.pipeline-visual[data-active-stage="3"] .pipeline-reticle { top: 82%; left: 52%; }

.pipeline-stage {
  text-align: start;
  padding: 22px;
  border-radius: var(--radius-md);
  transition: all .3s var(--spring);
}
.pipeline-stage:hover { transform: translateX(4px); border-color: var(--line-strong); }
.pipeline-stage.active {
  border-color: var(--accent-2);
  background: linear-gradient(125deg, var(--accent-2-bg), var(--bg-raised));
  box-shadow: inset 4px 0 0 var(--accent-2), var(--shadow-card);
}
.pipeline-stage h3 { font-size: 1.06rem; line-height: 1.45; font-weight: 750; }
.pipeline-stage p { font-size: .86rem; line-height: 1.75; }

/* ==================== BENTO GALLERY & HARDWARE MONOLITHS ==================== */
.bento-grid { gap: 20px; }
.bento-card { border-radius: var(--radius-lg); overflow: hidden; }
.bento-media { overflow: hidden; }
.bento-media img {
  object-position: center;
  transition: transform .65s var(--spring);
}
.bento-card:hover .bento-media img { transform: scale(1.06); }
.bento-copy { padding: 26px; }
.bento-copy h3 { font-size: 1.24rem; line-height: 1.38; font-weight: 800; }
.bento-copy p { font-size: .9rem; line-height: 1.8; }

.hardware-card {
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}
.hardware-card.flagship {
  border-color: var(--line-strong);
  background: var(--bg-flagship);
}
.hardware-card h3 { font-size: 1.5rem; font-weight: 800; }
.hardware-card dl { gap: 10px; font-variant-numeric: tabular-nums; }
.hardware-card dt { font-size: .82rem; }
.hardware-card dd { font-size: .86rem; font-weight: 650; }
.hardware-card .hw-launch {
  margin-top: auto;
  width: 100%;
  justify-content: space-between;
  padding-inline: 20px;
}

/* ==================== MULTI-ECOSYSTEM FLEET & GATE ==================== */
.fleet-showcase {
  margin-top: 8px;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: var(--bg-panel);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-card);
}
.fleet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.eco-filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.eco-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--ink);
  font-family: var(--sans);
  font-size: .81rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .24s var(--spring);
}
.eco-pill em { font-style: normal; }
.eco-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bg-sunken);
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--subtle);
}
.eco-pill:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.eco-pill.active {
  background: linear-gradient(120deg, #2563eb, #7c3aed);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 10px 26px -6px rgb(59 130 246 / 52%);
}
.eco-pill.active span {
  background: rgb(255 255 255 / 22%);
  color: #ffffff;
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.fleet-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .3s var(--spring), border-color .22s ease, box-shadow .3s ease;
}
.fleet-card::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 18px;
  height: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, #38bdf8, #818cf8, transparent);
  opacity: .55;
  transition: opacity .25s ease, inset-inline .28s var(--spring);
}
.fleet-card[data-eco="snapmaker_orca"]::after {
  background: linear-gradient(90deg, transparent, #fb923c, #f43f5e, transparent);
}
.fleet-card:hover {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-float);
}
.fleet-card:hover::after { opacity: 1; inset-inline: 0; }
.fleet-card.flagship {
  background: var(--bg-flagship);
  border-color: var(--line-strong);
}
.fleet-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fleet-thumb, .gate-machine-art {
  flex-shrink: 0;
  border-radius: 15px;
  border: 1px solid rgb(255 255 255 / 22%);
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #eaf0f8 72%, #d5dfee 100%);
  box-shadow: 0 10px 26px -10px rgb(0 0 0 / 48%), inset 0 1px 0 rgb(255 255 255 / 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 5px;
}
.fleet-thumb { width: 78px; height: 78px; }
.fleet-thumb img, .gate-machine-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  transition: transform .36s var(--spring);
}
.fleet-card:hover .fleet-thumb img,
.gate-machine:hover .gate-machine-art img { transform: scale(1.07); }
.fleet-meta { min-width: 0; }
.fleet-meta h4 {
  margin: 5px 0 3px;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
}
.fleet-meta p {
  margin: 0;
  font-size: .79rem;
  color: var(--muted);
}
.fleet-eco-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--accent-2-bg);
  color: var(--accent-2-ink);
  border: 1px solid rgb(56 189 248 / 26%);
}
.fleet-eco-tag.snapmaker_orca {
  background: rgb(234 88 12 / 12%);
  color: #c2410c;
  border-color: rgb(234 88 12 / 24%);
}
[data-theme="obsidian"] .fleet-eco-tag.snapmaker_orca {
  background: rgb(251 146 60 / 16%);
  color: #fdba74;
  border-color: rgb(251 146 60 / 34%);
}
.fleet-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.fleet-specs span {
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fleet-launch {
  margin-top: auto;
  width: 100%;
  min-height: 40px;
  padding: 9px 15px;
  justify-content: space-between;
  font-size: .83rem;
}

/* Docs Profile Matrix Ecosystem Pills & Obsidian Table Polish */
.tbl-eco {
  display: inline-block;
  margin-inline-end: 8px;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .05em;
  vertical-align: middle;
}
.tbl-eco.flash {
  background: var(--accent-2-bg);
  color: var(--accent-2-ink);
  border: 1px solid rgb(56 189 248 / 28%);
}
.tbl-eco.snap {
  background: rgb(234 88 12 / 14%);
  color: #c2410c;
  border: 1px solid rgb(234 88 12 / 28%);
}
[data-theme="obsidian"] .tbl-eco.snap {
  background: rgb(251 146 60 / 16%);
  color: #fdba74;
  border-color: rgb(251 146 60 / 34%);
}
[data-theme="obsidian"] .profile-matrix-table tbody tr:hover {
  background: rgb(56 189 248 / 6%);
}
[data-theme="obsidian"] .hud-printer-img,
[data-theme="obsidian"] #hud-printer-img,
[data-theme="obsidian"] .printer-option img,
[data-theme="obsidian"] .gate-machine-art {
  background: radial-gradient(circle at 50% 35%, #eef2f7 0%, #cbd5e1 100%);
  border-color: rgba(148, 163, 184, 0.28);
  padding: 5px;
  border-radius: 11px;
}

.gate-eco-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 14px;
}
.gate-action-bar {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.gate-engine-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.engine-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  font-size: .74rem;
  color: var(--ink);
}
.engine-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgb(52 211 153 / 80%);
}
.engine-chip.offline i {
  background: #64748b;
  box-shadow: none;
}
.engine-chip small {
  font-family: var(--mono);
  color: var(--subtle);
  font-size: .68rem;
}
.hw-badge.snap {
  background: rgb(234 88 12 / 14%);
  color: #c2410c;
  border-color: rgb(234 88 12 / 26%);
}
[data-theme="obsidian"] .hw-badge.snap {
  background: rgb(251 146 60 / 16%);
  color: #fdba74;
  border-color: rgb(251 146 60 / 32%);
}

.global-lang-panel, .launchpad-banner { border-radius: var(--radius-lg); }
.lang-pill { min-height: 44px; font-family: var(--sans); border-radius: 12px; transition: all .22s var(--spring); }
.lang-pill:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.eco-card { padding: 28px; border-radius: var(--radius-lg); }
.eco-card p { line-height: 1.8; }

.page-heading { padding-top: 44px; margin-bottom: 34px; }
.page-heading h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.page-heading h1 > span:not(.h1-plain) {
  background: linear-gradient(110deg, var(--accent-2), var(--accent-3), var(--accent-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-heading p { max-width: 760px; font-size: 1.02rem; line-height: 1.8; }

/* ==================== STUDIO COMMAND COCKPIT ==================== */
.studio-command-bar,
:root[data-theme="obsidian"] .studio-command-bar {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow-card);
  border-radius: 16px;
  padding: 11px 18px;
  margin: 12px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
}
:root[data-theme="obsidian"] .studio-command-bar {
  background: rgba(11, 18, 34, 0.92);
  border-color: rgba(148, 163, 184, 0.18);
}
.workflow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  max-width: 100%;
  min-width: 0;
}
.workflow > i { width: 14px; flex-shrink: 0; }
.workflow-step { padding: 3px 5px; gap: 0 8px; }
.workflow-step > b { font-size: .83rem; font-weight: 700; }
.workflow-step small { font-family: var(--mono); letter-spacing: .04em; font-size: .6rem; }
.gate-status-pill {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--mono);
  font-size: .71rem;
  font-weight: 700;
  flex-shrink: 0;
}

.target-gate {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-float);
}
.gate-top {
  gap: 20px;
  margin-bottom: 18px;
}
.gate-top h1 { font-size: clamp(1.7rem, 2.5vw, 2.25rem); font-weight: 800; letter-spacing: -0.035em; }
.gate-top p { line-height: 1.65; }
.gate-rig-grid {
  padding: 12px 16px;
  margin-bottom: 18px;
  gap: 14px 18px;
}
.gate-machines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 18px;
  align-items: stretch;
}
.gate-machine {
  padding: 18px;
  border-width: 1.5px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  cursor: pointer;
}
.gate-machine:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-float);
}
.gate-machine.flagship { background: var(--bg-flagship); }
.gate-machine.selected,
.gate-machine[aria-checked="true"] {
  border-color: var(--accent-2);
  box-shadow: 0 18px 38px -18px rgb(29 78 216 / 38%), inset 0 0 0 1px var(--accent-2);
  background: linear-gradient(145deg, var(--accent-2-bg), var(--bg-raised));
}
.gate-machine[data-eco="snapmaker_orca"].selected,
.gate-machine[data-eco="snapmaker_orca"][aria-checked="true"] {
  border-color: #ea580c;
  box-shadow: 0 18px 38px -18px rgba(234, 88, 12, 0.34), inset 0 0 0 1px #ea580c;
  background: linear-gradient(145deg, rgba(234, 88, 12, 0.14), var(--bg-raised));
}
.gate-machine[data-gate-printer="creator5_pro"].selected,
.gate-machine[data-gate-printer="creator5_pro"][aria-checked="true"] {
  border-color: var(--accent-1);
  box-shadow: 0 18px 38px -18px rgba(255, 72, 32, 0.35), inset 0 0 0 1px var(--accent-1);
  background: linear-gradient(145deg, var(--accent-1-bg), var(--accent-3-bg) 45%, var(--bg-raised));
}
.gate-machine h2 { font-size: 1.06rem; font-weight: 800; line-height: 1.25; }
.gate-machine p { font-size: .78rem; line-height: 1.5; }
.gate-machine-art { width: 68px; height: 68px; flex-shrink: 0; }
.gate-machine-art img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.gate-spec-pills { gap: 6px; }
.gate-spec-pills span { padding: 4px 8px; }
.gate-card-action {
  margin-top: auto;
  padding-top: 4px;
}
.gate-card-continue {
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sunken);
  color: var(--muted);
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.gate-card-continue svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; flex-shrink: 0; }
.gate-card-continue:hover {
  border-color: var(--accent-2);
  color: var(--ink-strong);
  background: var(--bg-chip-hover);
}
.gate-machine.selected .gate-card-continue,
.gate-machine[aria-checked="true"] .gate-card-continue {
  background: var(--accent-2);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.55);
}
.gate-machine[data-eco="snapmaker_orca"].selected .gate-card-continue,
.gate-machine[data-eco="snapmaker_orca"][aria-checked="true"] .gate-card-continue {
  background: #ea580c;
  box-shadow: 0 8px 18px -6px rgba(234, 88, 12, 0.55);
}
.gate-machine[data-gate-printer="creator5_pro"].selected .gate-card-continue,
.gate-machine[data-gate-printer="creator5_pro"][aria-checked="true"] .gate-card-continue {
  background: var(--accent-1);
  box-shadow: 0 8px 18px -6px rgba(255, 72, 32, 0.55);
}

.gate-footer {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.gate-lock-hint svg { flex-shrink: 0; }
#unlock-studio-btn { min-height: 40px; padding: 8px 18px; font-size: .84rem; }
#unlock-studio-btn svg { flex-shrink: 0; }

.printer-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.printer-option {
  padding: 10px 34px 10px 12px;
  gap: 10px;
  min-height: 62px;
  height: auto;
}
.printer-option > span { min-width: 0; }
.printer-option img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}
@media (max-width: 1340px) {
  .workflow-step > small { display: none; }
}
@media (max-width: 1180px) {
  .studio-command-bar,
  :root[data-theme="obsidian"] .studio-command-bar {
    flex-wrap: wrap;
    padding: 12px 16px;
    row-gap: 12px;
  }
  .workflow { flex-wrap: wrap; }
}
@media (max-width: 1040px) {
  .fleet-grid, .gate-machines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .fleet-grid, .gate-machines, .printer-options { grid-template-columns: 1fr; }
  .fleet-showcase { padding: 18px; }
}
.rig-pills button {
  min-height: 40px;
  border-radius: 10px;
  font-weight: 650;
  transition: all .22s var(--spring);
}
.rig-pills button.active {
  background: linear-gradient(120deg, #2563eb, #7c3aed);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 22px -6px rgb(59 130 246 / 52%);
}

.locked-target-hud {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-control);
  background: var(--bg-sunken);
  margin-bottom: 0;
  padding: 6px 9px;
  flex-wrap: wrap;
  gap: 8px 10px;
  max-width: 100%;
}
.hud-target-identity { gap: 9px; }
.hud-chamber-pill {
  border-color: var(--line);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  font-family: var(--mono);
  padding: 3px 8px;
  font-size: .66rem;
  border-radius: 8px;
}
.hud-action-btn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 9px;
  font-weight: 650;
  font-size: .76rem;
}
.hud-action-btn svg { flex-shrink: 0; }

/* Balanced Zero-Whitespace Studio Workbench */
.target-drawer {
  padding: 18px 20px 20px;
  margin-bottom: 18px;
}
.workbench {
  gap: 20px;
  grid-template-columns: minmax(340px, 386px) minmax(0, 1fr);
  align-items: start;
}
.control-column, .studio-column { gap: 16px; }
.studio-column { position: sticky; top: 90px; }

.panel-heading { padding: 13px 18px; }
.panel-heading h2 { font-size: .95rem; font-weight: 750; }
.section-number { font-family: var(--mono); color: var(--accent-2-ink); font-size: .72rem; font-weight: 800; }
.file-type { font-family: var(--mono); font-size: .67rem; letter-spacing: .08em; }
.dropzone {
  margin: 14px 16px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 15px;
  background: var(--bg-sunken);
  transition: border-color .25s ease, background-color .25s ease;
}
.dropzone:hover { border-color: var(--accent-2); background: var(--accent-2-bg); }
.dropzone.loaded { border-style: solid; border-color: var(--line); background: var(--bg-raised); }
.source-empty { padding: 18px 16px 16px; }
.source-empty h3 { font-size: 1.02rem; font-weight: 750; }
.source-empty p { font-size: .84rem; margin-block: 5px 13px; }
.source-empty small { font-family: var(--mono); font-size: .72rem; margin-top: 8px; }
.upload-art {
  width: 46px;
  height: 46px;
  margin-bottom: 10px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  box-shadow: var(--shadow-control);
}
.upload-art > i { display: grid; place-items: center; }
.upload-art > i svg { width: 12px; height: 12px; }
.source-loaded-row { gap: 12px; padding: 14px; }
.source-file-info h3 { font-size: .85rem; line-height: 1.55; }
.source-file-info { overflow-wrap: anywhere; }
.source-file-info p { font-size: .76rem; }
.source-status { font-family: var(--mono); font-size: .72rem; color: var(--accent-4-ink); font-weight: 700; }
.replace-file { min-height: 40px; margin: 0 14px 14px; width: calc(100% - 28px); border-color: var(--line); }

.compile-panel { border-color: var(--line-strong); overflow: hidden; }
.compile-panel .primary-action {
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}
.compile-panel .primary-action > .button {
  width: 100%;
  min-height: 48px;
  margin: 0;
}
.compile-panel .primary-action > .button + button { margin-top: 0; min-height: 38px; }
.compile-panel .primary-action > p {
  margin: 0;
  font-size: .79rem;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}
.compile-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
}
.compile-summary-bar {
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}
.compile-route { font-family: var(--sans); font-size: .8rem; flex-wrap: wrap; line-height: 1.45; }
.compile-route strong { white-space: normal; }
#material-choice.material-choice {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-sunken);
}
.material-choice > strong, .material-choice > b { display: block; font-size: .84rem; color: var(--ink-strong); }
.material-choice p { font-size: .78rem; line-height: 1.65; margin: 6px 0 0; }
.material-choice-summary { font-size: .82rem; color: var(--accent-2-ink); margin-top: 8px; }
.private-note { padding: 4px 8px; gap: 8px; }
.private-note svg { flex-shrink: 0; }

/* Elevated 3D Stage */
.preview-panel { overflow: hidden; border-color: var(--line-strong); }
.preview-heading { padding: 13px 18px; }
.preview-heading h2 { font-size: 1rem; font-weight: 750; }
.preview-heading .segmented button { min-height: 36px; }
.preview-status { font-family: var(--mono); font-size: .73rem; }
.stage {
  border-radius: 0;
  min-height: 460px;
  height: clamp(460px, calc(100vh - 300px), 585px);
  background: var(--bg-stage);
}
.preview-footer { padding: 12px 18px; }
.viewport-empty {
  background: rgb(255 255 255 / 46%);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 26px 32px;
  box-shadow: var(--shadow-float);
  max-width: 420px;
  margin: auto;
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
html[data-theme="obsidian"] .viewport-empty {
  background: rgb(10 16 32 / 52%);
}
.viewport-toolbar {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg-topbar);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-float);
}
.viewport-toolbar button { min-width: 42px; min-height: 42px; }
.stage-top { font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; }
.plate-tabs button { min-height: 42px; border-radius: 10px; font-family: var(--sans); font-weight: 650; }
.preview-complete {
  border-radius: 16px;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-float);
  border: 1px solid var(--line-strong);
}
.preview-complete .button { min-height: 46px; }
.preview-complete .button span { color: inherit; margin: 0; font-size: inherit; }
.live-mark { background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.status-pill.warning { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-ink); }

/* BridgeAI Panel */
.ai-advisor { padding: 20px; border-color: var(--line-strong); }
.advisor-head { flex-wrap: wrap; }
.advisor-brand b { font-size: .92rem; font-family: var(--display); }
.advisor-orb {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3), var(--accent-1));
  box-shadow: 0 6px 18px -4px rgb(29 78 216 / 45%);
  animation: pulseHalo 3s ease-out infinite;
}
.advisor-head-meta { margin-inline-start: auto; }
.advisor-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-sunken);
}
.advisor-item.warn { border-color: var(--warn-border); background: var(--warn-bg); }
.advisor-item.ok { border-color: rgba(5, 150, 105, 0.32); background: var(--accent-4-bg); }
.advisor-copy strong { font-size: .86rem; }
.advisor-copy p { font-size: .8rem; line-height: 1.65; }
.advisor-disclosure { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; font-size: .72rem; line-height: 1.65; color: var(--subtle); }
.private-note { font-size: .76rem; line-height: 1.7; }
.button svg, .hud-action-btn svg, .gate-lock-hint svg, .private-note svg { flex-shrink: 0; }
.material-panel > summary { min-height: 52px; padding: 14px 18px; }
.material-intro { padding: 0 18px 12px; }
.filament-list { padding: 0 18px 18px; }
.trust-strip { margin: 20px 0 16px; padding: 16px 20px; gap: 18px; }
.trust-strip svg { flex-shrink: 0; }
.report-details { box-shadow: none; border-radius: var(--radius-md); }
.report-details > summary { min-height: 52px; padding: 16px 20px; font-size: .93rem; }
.result-intro > div { min-width: 0; }
.result-intro p { overflow-wrap: anywhere; }
.advisor-chip { min-height: 36px; font-family: var(--sans); font-size: .75rem; border-radius: 9px; }
.preflight { gap: 12px; }
.preflight > div { border-radius: 14px; box-shadow: var(--shadow-control); }
.filament-card { border-radius: 14px; padding: 18px; box-shadow: var(--shadow-control); }
.filament-title b { font-size: .95rem; }
.filament-card label { font-size: .82rem; margin-block: 12px 7px; }
.filament-card p { font-size: .8rem; }
.result-panel { border-radius: var(--radius-md); }
.result-intro { gap: 20px; }
.result-intro h2 { font-size: 1.55rem; }
.result-intro p, .notice p, .tech-tool p { font-size: .87rem; line-height: 1.8; }
.result-disclosure > summary, .advanced > summary, .material-panel > summary { min-height: 52px; padding-block: 15px; font-size: .9rem; }
.audit-group > summary { min-height: 48px; }
.audit-entry { border-radius: 12px; }
.audit-entry > summary { min-height: 44px; font-size: .84rem; }
.notice { border-radius: 14px; }
.tech-tools { gap: 14px; }
.tech-tool { box-shadow: var(--shadow-control); border-radius: 14px; }

/* ==================== DOCS / ABOUT / POLICY / SUPPORT ==================== */
.docs-sidebar { padding: 12px; border-radius: 18px; }
.docs-nav-btn { min-height: 44px; border-radius: 10px; font-weight: 650; }
.docs-content { min-width: 0; }
.docs-pane { padding: 30px; border-radius: var(--radius-md); }
.docs-pane p, .docs-step-card p, .policy-card p, .guide-card p { font-size: .92rem; line-height: 1.85; }
.docs-step-card h3 { font-size: 1.04rem; line-height: 1.5; }
.docs-step-card .step-num { font-family: var(--mono); color: var(--accent-2-ink); }
.docs-step-card, .policy-card { border-radius: 16px; padding: 24px; }
.cli-block { border-radius: 12px; gap: 14px; }
.cli-block code { overflow-wrap: anywhere; white-space: pre-wrap; font-family: var(--mono); }
.copy-cmd-btn { min-height: 40px; }
.profile-table { font-size: .82rem; }
.cl-badge { font-family: var(--mono); border-radius: 8px; font-size: .76rem; }
.about-photo-frame { border-radius: var(--radius-lg); overflow: hidden; }
.about-photo-frame img { max-height: 460px; object-fit: cover; }
.console-chip { min-height: 44px; border-radius: 11px; font-family: var(--sans); }
.console-answer { border-radius: 16px; box-shadow: var(--shadow-control); }
.console-answer p { font-size: .92rem; line-height: 1.85; }
.guide-faq summary { min-height: 54px; line-height: 1.65; }
.guide-faq p { line-height: 1.85; }
.support-ready-card { padding: 38px; max-width: 860px; margin-inline: auto; border-radius: var(--radius-lg); }
.support-ready-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--accent-1-ink); background: var(--accent-1-bg); border-radius: 16px; margin-bottom: 20px; }
.support-ready-card h2 { font-size: 1.7rem; margin-bottom: 12px; }
.support-ready-card p { max-width: 650px; color: var(--muted); font-size: .96rem; line-height: 1.85; }
.support-ready-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  margin-top: 64px;
  padding: 44px max(24px, calc((100vw - 1380px) / 2));
}
.footer-brand { font-family: var(--display); font-size: 1rem; gap: 9px; font-weight: 800; }
.footer-brand b { font-family: var(--mono); font-size: .70rem; letter-spacing: 0; }
.footer-intro p { font-size: .82rem; max-width: 340px; line-height: 1.8; }
.footer-col h3 { font-family: var(--mono); font-size: .74rem; letter-spacing: .09em; }
.footer-col button { min-height: 36px; text-align: start; }
.footer-bottom { font-size: .74rem; line-height: 1.8; gap: 18px; }

.cmd-modal { border-radius: 22px; border: 1px solid var(--line-strong); backdrop-filter: blur(28px); }
.cmd-esc { display: grid; place-items: center; min-width: 40px; min-height: 40px; }
.cmd-item { min-height: 46px; border-radius: 11px; }
.cmd-item-main { min-width: 0; }
.cmd-item-main > span { overflow-wrap: anywhere; }
.cmd-input-row input { border: 0; }

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.toast {
  position: fixed;
  top: 84px;
  bottom: auto;
  left: auto;
  inset-inline-end: 24px;
  transform: none;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 13px 14px 15px 15px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-inline-start: 3px solid #38bdf8;
  background: rgba(14, 23, 42, 0.96);
  color: #f1f5f9;
  box-shadow: 0 20px 44px -12px rgba(2, 6, 23, 0.68);
  animation: toastSlideIn .28s var(--spring) both;
}
html:not([data-theme="obsidian"]) .toast {
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.3);
  border-inline-start-color: #2563eb;
  box-shadow: 0 18px 38px -12px rgba(15, 23, 42, 0.22);
}
.toast.success {
  background: rgba(9, 28, 25, 0.97);
  border-color: rgba(52, 211, 153, 0.48);
  border-inline-start-color: #10b981;
  color: #ecfdf5;
}
html:not([data-theme="obsidian"]) .toast.success {
  background: rgba(246, 254, 250, 0.98);
  border-color: rgba(16, 185, 129, 0.42);
  border-inline-start-color: #059669;
  color: #064e3b;
}
.toast.error {
  background: rgba(42, 14, 24, 0.97);
  border-color: rgba(251, 113, 133, 0.54);
  border-inline-start-color: #f43f5e;
  color: #fff1f2;
}
html:not([data-theme="obsidian"]) .toast.error {
  background: rgba(255, 245, 247, 0.98);
  border-color: rgba(225, 29, 72, 0.42);
  border-inline-start-color: #e11d48;
  color: #881337;
}
.toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
}
html:not([data-theme="obsidian"]) .toast-icon {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}
.toast.success .toast-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
html:not([data-theme="obsidian"]) .toast.success .toast-icon {
  background: rgba(16, 185, 129, 0.16);
  color: #059669;
}
.toast.error .toast-icon {
  background: rgba(244, 63, 94, 0.22);
  color: #fb7185;
}
html:not([data-theme="obsidian"]) .toast.error .toast-icon {
  background: rgba(225, 29, 72, 0.14);
  color: #e11d48;
}
.toast-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.3;
}
#toast-message {
  flex: 1;
  overflow-wrap: anywhere;
  font-size: .85rem;
  font-weight: 500;
  line-height: 1.5;
}
#toast-dismiss {
  background: rgba(148, 163, 184, 0.1);
  border: 0;
  color: inherit;
  opacity: .78;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .16s ease, opacity .16s ease;
}
#toast-dismiss svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}
#toast-dismiss:hover {
  background: rgba(148, 163, 184, 0.24);
  opacity: 1;
}
.toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: #38bdf8;
  transform-origin: left center;
  opacity: .85;
  animation: toastProgress 5.5s linear forwards;
}
.toast.success .toast-progress { background: #10b981; }
.toast.error .toast-progress { display: none; }
.toast:hover .toast-progress { animation-play-state: paused; }
@media (max-width: 680px) {
  .toast {
    top: 76px;
    left: 16px;
    right: 16px;
    inset-inline-end: auto;
    min-width: 0;
    max-width: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast-progress { animation: none !important; }
}

html[dir="rtl"] .pipeline-stage.active { box-shadow: inset -4px 0 0 var(--accent-2), var(--shadow-card); }
html[data-theme="obsidian"] .button.outline { background: var(--bg-raised); }
html[data-theme="obsidian"] .button.primary { background: linear-gradient(125deg, #ff5e2b, #e12d16); }
html[data-theme="obsidian"] .brand-mark { background: linear-gradient(135deg, #38bdf8, #a78bfa, #ff5e2b); }
html[data-theme="obsidian"] .metric-tile b { background: linear-gradient(125deg, #fff 35%, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ==================== RESPONSIVE ARCHITECTURE ==================== */
@media (min-width: 1561px) { .prism-pill { display: inline-flex; } }

@media (max-width: 1260px) {
  .topbar { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
  .topbar-controls { justify-self: end; }
  .nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
  #theme-switcher { display: none; }
  .landing-hero { grid-template-columns: 1fr 1fr; gap: 32px; }
  .landing-hero-visual { max-width: none; }
  .landing-title { font-size: clamp(2.45rem, 4.5vw, 3.7rem); }
  .quantum-frame { height: 430px; }
  .landing-cta-row .button { font-size: .84rem; }
  .workbench { grid-template-columns: 330px minmax(0, 1fr); gap: 18px; }
  .connection-status { display: none; }
}

@media (max-width: 960px) {
  .landing-hero { grid-template-columns: 1fr; padding-block: 36px; }
  .landing-hero-copy { max-width: 710px; }
  .landing-title { font-size: clamp(2.55rem, 6vw, 3.85rem); }
  .quantum-frame { height: 400px; }
  .landing-hero-visual { max-width: none; width: 100%; }
  .workbench { grid-template-columns: 1fr; }
  .studio-column { position: static; }
  .control-column, .studio-column { display: contents; }
  .source-panel { order: 1; }
  .compile-panel { order: 2; }
  .preview-panel { order: 3; }
  .studio-column > :not(.preview-panel) { order: 4; }
  .ai-advisor { order: 5; }
  .private-note { order: 6; }
  .studio-command-bar { padding-top: 18px; }
  .compile-route strong { max-width: none; }
  .gate-top p { max-width: 650px; }
  .docs-pane { padding: 22px; }
  .docs-sidebar { display: flex; flex-wrap: wrap; gap: 4px; }
  .docs-nav-btn { flex: 1 1 140px; }
  .footer-grid { gap: 24px; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 88px; }
  .topbar { display: flex; flex-wrap: wrap; padding: 12px 16px; gap: 10px; min-height: 68px; }
  .brand { margin-inline-end: auto; font-size: 1.07rem; }
  .brand-mark { width: 34px; height: 34px; }
  .prism-pill { display: none; }
  .brand-text small { font-size: .55rem; letter-spacing: .02em; }
  .topbar-controls { width: auto; flex-wrap: nowrap; gap: 5px; }
  .hud-chip-btn { min-width: 40px; padding-inline: 8px; min-height: 40px; }
  #cmd-trigger, #coffee-trigger, #theme-switcher { display: none; }
  .nav-toggle { display: inline-flex; order: 3; }
  .nav { display: none; order: 4; flex-basis: 100%; padding-top: 8px; border-top: 1px solid var(--line); border-radius: 0; width: 100%; overflow-x: auto; justify-content: flex-start; background: transparent; border-inline: 0; border-bottom: 0; }
  .nav-open .nav { display: flex; }
  .nav button { flex: 1 0 auto; min-height: 44px; padding-inline: 12px; font-size: .85rem; }
  .lang-btn { gap: 5px; }
  .lang-btn .chevron { display: none; }
  .lang-menu, .optics-menu { position: fixed; inset-inline: 16px; top: 76px; width: auto; max-height: calc(100dvh - 100px); }
  .telemetry-marquee { display: none; }
  .landing-title { font-size: clamp(2.25rem, 8.6vw, 3.05rem); letter-spacing: -.035em; }
  .landing-lead { font-size: 1rem; line-height: 1.85; }
  .landing-hero { padding-top: 26px; gap: 28px; }
  .landing-cta-row { gap: 10px; }
  .landing-cta-row > .button { flex: 1 1 100%; min-height: 48px; }
  .landing-cta-row > .button.quiet { flex: 0 1 auto; min-height: 36px; }
  .hud-chip { font-size: .71rem; }
  .quantum-frame { height: 320px; }
  .hero-stage-controls { top: 10px; inset-inline-start: 10px; }
  .hero-telemetry-card { inset-inline: 12px; bottom: 12px; padding: 10px 12px; }
  .hero-telemetry-card strong { font-size: .84rem; }
  .hero-orbit-cue { display: none; }
  .metrics-strip { margin-top: 0; }
  .metric-tile { padding: 18px 12px; }
  .metric-tile b { font-size: 1.65rem; }
  .metric-tile span { font-size: .75rem; }
  .metric-tile:nth-child(odd) { border-inline-start: 0; }
  .metric-tile:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-intro h2 { font-size: 1.75rem; }
  .sim-panel, .target-gate { padding: 18px; }
  .sim-tab { flex: 1 1 45%; font-size: .78rem; line-height: 1.6; text-align: center; }
  .sim-tabs { flex-wrap: wrap; }
  .sim-tensor-card, .sim-telemetry-card { padding: 14px; }
  .sim-bar-row { grid-template-columns: 90px 1fr 36px; }
  .pipeline-visual img { max-height: 340px; width: 100%; }
  .pipeline-stage { padding: 18px; }
  .bento-copy, .eco-card { padding: 20px; }
  .gate-machine { padding: 18px; }
  .gate-machine h2 { font-size: 1.1rem; }
  .gate-machine-art { width: 64px; height: 76px; }
  .locked-target-hud { gap: 10px; padding: 12px; }
  .hud-chamber-pill { display: inline-flex; margin-inline-start: 0; font-size: .72rem; }
  .hud-target-actions { width: 100%; border-top: 1px solid var(--line); padding-top: 8px; }
  .hud-target-identity { min-width: 0; }
  .compile-hint { font-size: .82rem; }
  .stage { min-height: 380px; height: 400px; }
  .stage.has-result { height: 480px; min-height: 480px; }
  .viewport-empty { padding: 20px 18px; width: calc(100% - 28px); }
  .preview-heading { flex-wrap: wrap; }
  .preview-heading h2 { flex: 1; }
  .preview-complete { inset-inline: 12px; padding: 14px; }
  .viewport-toolbar { max-width: calc(100% - 24px); gap: 0; }
  .viewport-toolbar button { min-width: 38px; }
  .stage-bottom > span:last-child { font-size: .58rem; max-width: 100%; }
  .stage-top { font-size: .59rem; }
  .stage-top > span:last-child { max-width: 46%; text-align: end; line-height: 1.6; }
  .material-choice p, .advisor-copy p { font-size: .84rem; }
  .source-file-info h3 { font-size: .87rem; }
  .source-cover { width: 72px; height: 82px; }
  .docs-nav-btn { flex: 1 1 42%; font-size: .84rem; }
  .docs-pane { padding: 20px; }
  .docs-pane h2 { font-size: 1.5rem; }
  .profile-table-wrap { overflow: visible; border: 0; background: transparent; }
  .profile-matrix-table, .profile-matrix-table tbody { display: block; width: 100%; min-width: 0; }
  .profile-matrix-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .profile-matrix-table tr { display: grid; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
  .profile-matrix-table td { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; padding: 12px; border: 0; font-size: .79rem; line-height: 1.7; overflow-wrap: anywhere; white-space: normal; }
  .profile-matrix-table td + td { border-top: 1px solid var(--line); }
  .profile-matrix-table td::before { content: attr(data-label); font-weight: 600; color: var(--subtle); }
  .profile-matrix-table td:first-child { display: block; background: var(--bg-sunken); color: var(--ink-strong); }
  .profile-matrix-table td:first-child::before { display: none; }
  .docs-step-card, .policy-card, .guide-card { padding: 20px; }
  .form-pair { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px !important; }
  .support-ready-card { padding: 24px; }
  .support-ready-actions .button { width: 100%; }
  .site-footer { margin-top: 36px; padding: 30px 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .footer-about-col { grid-column: 1 / -1; }
  .footer-col button { min-height: 40px; font-size: .8rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .matrix-canvas, .scan-beam, .pipeline-laser-scan { display: none; }
  .view, .studio-workspace, .target-gate, .ambient-nebula, .landing-title em, .orbit-ring, .button.glow-cta::after, .sim-beam .beam-pulse, .advisor-orb, .hero-telemetry-card .telemetry-dot {
    animation: none !important;
  }
  .reveal-item { opacity: 1; transform: none; transition: none; }
  :is(.bento-card, .hardware-card, .principle-card, .guide-card, .eco-card):hover { transform: none; }
}

@media (forced-colors: active) {
  .button, .panel, .gate-machine, .hud-chip-btn { border: 1px solid ButtonText; }
  .button, .landing-title em, .metric-tile b { forced-color-adjust: auto; color: CanvasText; background: none; }
}


/* ==================== COMMUNITY FEEDBACK & ISSUE TRACKER ==================== */
.support-feedback-card {
  padding: clamp(24px, 3vw, 38px);
  margin-bottom: 24px;
}
.support-fb-head {
  margin-bottom: 22px;
}
.support-fb-head h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: -0.025em;
  margin: 10px 0 8px;
}
.support-fb-head p {
  color: var(--muted);
  max-width: 72ch;
}

.fb-modal {
  max-width: 680px;
  width: min(94vw, 680px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fb-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.fb-modal-head h2 {
  font-family: var(--display);
  font-size: 1.32rem;
  margin: 8px 0 4px;
}
.fb-modal-head p {
  color: var(--muted);
  font-size: .86rem;
  margin: 0;
}
.fb-modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
}

.fb-form {
  display: grid;
  gap: 16px;
}
.fb-field {
  display: grid;
  gap: 7px;
}
.fb-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--subtle);
}
.fb-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fb-cat-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-chip);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .18s var(--spring);
}
.fb-cat-pill:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.fb-cat-pill.active {
  background: var(--accent-2-bg);
  border-color: var(--accent-2);
  color: var(--accent-2-ink);
  box-shadow: 0 0 0 1px var(--accent-2);
}
.fb-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.fb-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--ink-strong);
  font-family: var(--sans);
  font-size: .9rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.fb-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-2-bg);
}
.fb-textarea {
  resize: vertical;
  min-height: 112px;
  line-height: 1.55;
}
.fb-stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
}
.fb-star {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--muted);
  font-size: 1.15rem;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, transform .15s var(--spring);
}
.fb-star:hover { transform: scale(1.08); color: #F59E0B; border-color: rgba(245, 158, 11, .45); }
.fb-star.lit { color: #F59E0B; border-color: rgba(245, 158, 11, .65); background: rgba(245, 158, 11, .12); }

.fb-diag-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-chip);
  font-size: .83rem;
  color: var(--muted);
  cursor: pointer;
}
.fb-diag-check input { margin-top: 3px; accent-color: var(--accent-2); }
.fb-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(244, 63, 94, .12);
  border: 1px solid rgba(244, 63, 94, .35);
  color: #fb7185;
  font-size: .86rem;
  font-weight: 600;
}
.fb-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.fb-receipt {
  text-align: center;
  padding: 28px 16px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.fb-receipt-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(52, 211, 153, .14);
  border: 1px solid rgba(52, 211, 153, .4);
  color: #34D399;
}
.fb-receipt-icon svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.fb-ticket-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-sunken);
  font-family: var(--mono);
  font-size: .86rem;
}
.fb-ticket-pill strong { color: var(--accent-2-ink); letter-spacing: .04em; }

/* ==================== ADMIN OPERATIONS & TELEMETRY CONSOLE ==================== */
.adm-page-heading { margin-bottom: 24px; }
.adm-vault-wrap {
  display: grid;
  place-items: center;
  padding: 24px 0 48px;
}
.adm-vault-card {
  max-width: 480px;
  width: 100%;
  padding: 32px;
  display: grid;
  gap: 14px;
}
.adm-vault-card h2 { font-family: var(--display); font-size: 1.5rem; margin: 0; }
.adm-vault-card p { color: var(--muted); font-size: .9rem; margin: 0; line-height: 1.6; }
.adm-auth-form { display: grid; gap: 12px; margin-top: 6px; }

.adm-console { display: grid; gap: 18px; }
.adm-topbar {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.adm-range-group {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}
.adm-range-btn {
  padding: 7px 14px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.adm-range-btn.active {
  background: var(--accent-2-bg);
  color: var(--accent-2-ink);
  box-shadow: inset 0 0 0 1px var(--accent-2);
}
.adm-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.adm-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--muted);
  font-weight: 650;
  font-size: .88rem;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.adm-tab-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.adm-tab-btn.active {
  background: var(--accent-2-bg);
  border-color: var(--accent-2);
  color: var(--accent-2-ink);
}

.adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.adm-kpi-card {
  padding: 18px;
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border-top: 2px solid var(--accent-2);
}
.adm-kpi-card.accent-emerald { border-top-color: #34D399; }
.adm-kpi-card.accent-cyan { border-top-color: #38BDF8; }
.adm-kpi-card.accent-violet { border-top-color: #A78BFA; }
.adm-kpi-card.accent-amber { border-top-color: #F59E0B; }
.adm-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--subtle);
}
.adm-kpi-top svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; opacity: .75; }
.adm-kpi-card strong {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
}
.adm-kpi-card small { font-size: .76rem; color: var(--muted); line-height: 1.4; }
.adm-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}
.adm-pulse.live {
  background: #34D399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .22);
}

.adm-charts-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.adm-span-2 { grid-column: 1 / -1; }
.adm-chart-card {
  padding: 20px 22px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.adm-chart-card h3 {
  font-family: var(--display);
  font-size: 1.04rem;
  margin: 0;
}
.adm-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.adm-card-head p { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.adm-inline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .76rem;
  font-family: var(--mono);
  color: var(--muted);
}
.adm-inline-legend span { display: inline-flex; align-items: center; gap: 6px; }
.adm-inline-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.adm-timeline-canvas { width: 100%; display: block; border-radius: 10px; }

.adm-printer-bars, .adm-mini-bars { display: grid; gap: 10px; }
.adm-printer-meta, .adm-mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  margin-bottom: 4px;
}
.adm-printer-meta b, .adm-mini-head b { margin-left: auto; font-family: var(--mono); color: var(--ink-strong); }
.adm-mini-track {
  height: 7px;
  border-radius: 999px;
  background: var(--bg-sunken);
  overflow: hidden;
}
.adm-mini-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38BDF8, #6366F1);
}
.adm-mini-track i.bar-flash { background: linear-gradient(90deg, #38BDF8, #2563EB); }
.adm-mini-track i.bar-snap { background: linear-gradient(90deg, #A78BFA, #EC4899); }
.adm-mini-track i.bar-emerald { background: linear-gradient(90deg, #34D399, #10B981); }
.adm-mini-track i.bar-amber { background: linear-gradient(90deg, #F59E0B, #F97316); }
.adm-mini-track i.bar-violet { background: linear-gradient(90deg, #8B5CF6, #C084FC); }
.adm-mini-track i.bar-cyan { background: linear-gradient(90deg, #22D3EE, #38BDF8); }

.adm-dual-donuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.adm-donut-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
}
.adm-donut-svg { width: 124px; height: 124px; }
.adm-donut-total { font-family: var(--display); font-size: 20px; font-weight: 800; fill: var(--ink-strong); }
.adm-donut-sub { font-family: var(--mono); font-size: 9px; font-weight: 700; fill: var(--subtle); letter-spacing: .08em; }
.adm-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: grid;
  gap: 5px;
  font-size: .78rem;
}
.adm-legend li { display: flex; align-items: center; gap: 7px; }
.adm-legend i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.adm-legend span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-legend b { margin-left: auto; font-family: var(--mono); font-size: .76rem; }
.adm-legend small { color: var(--subtle); font-weight: 500; }

.adm-bento-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.adm-muted-sm { color: var(--muted); font-size: .84rem; margin: 4px 0; }

/* Admin Conversion Log & Badges */
.adm-log-wrap, .adm-fb-wrap { padding: 20px; display: grid; gap: 16px; }
.adm-filter-bar { display: flex; align-items: center; gap: 12px; }
.adm-count-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 700;
}
.adm-log-table td small { display: block; color: var(--muted); font-family: var(--mono); font-size: .74rem; }
.adm-log-table td.mono { font-family: var(--mono); font-size: .78rem; white-space: nowrap; }
.adm-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  margin-right: 4px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--ink);
}
.adm-badge.ok { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .38); color: #34D399; }
.adm-badge.warn { background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .4); color: #F59E0B; }
.adm-badge.err, .adm-badge.sev-critical, .adm-badge.sev-high { background: rgba(244, 63, 94, .14); border-color: rgba(244, 63, 94, .4); color: #FB7185; }
.adm-badge.cat-bug { background: rgba(244, 63, 94, .12); color: #FB7185; border-color: rgba(244, 63, 94, .32); }
.adm-badge.cat-printer_request { background: rgba(167, 139, 250, .14); color: #C084FC; border-color: rgba(167, 139, 250, .38); }
.adm-badge.cat-feature { background: rgba(56, 189, 248, .14); color: #38BDF8; border-color: rgba(56, 189, 248, .38); }
.adm-badge.muted { color: var(--muted); }

/* Admin Feedback Inbox */
.adm-fb-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.adm-status-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-pill {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 650;
  cursor: pointer;
}
.adm-pill b { font-family: var(--mono); margin-left: 4px; }
.adm-pill.active { background: var(--accent-2-bg); border-color: var(--accent-2); color: var(--accent-2-ink); }
.adm-fb-filters { display: flex; gap: 8px; flex: 1; max-width: 440px; }
.adm-demand-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}
.adm-demand-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(167, 139, 250, .14);
  border: 1px solid rgba(167, 139, 250, .34);
  color: var(--ink-strong);
  font-weight: 600;
}
.adm-ticket-list { display: grid; gap: 12px; }
.adm-ticket-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  display: grid;
  gap: 10px;
}
.adm-ticket-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.adm-ticket-code { font-family: var(--mono); font-size: .82rem; font-weight: 800; color: var(--accent-2-ink); margin-right: 4px; }
.adm-ticket-time { margin-left: auto; font-family: var(--mono); font-size: .74rem; color: var(--subtle); }
.adm-stars { color: #F59E0B; letter-spacing: 1px; font-size: .86rem; }
.adm-ticket-card h4 { margin: 0; font-size: 1rem; font-family: var(--display); }
.adm-ticket-desc { margin: 0; font-size: .88rem; color: var(--muted); white-space: pre-wrap; line-height: 1.55; }
.adm-ticket-contact { font-size: .8rem; color: var(--subtle); }
.adm-diag-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--bg-raised);
  font-size: .78rem;
}
.adm-diag-box pre { margin: 8px 0 0; overflow-x: auto; font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.adm-ticket-controls {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

/* Admin System & Security */
.adm-sys-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.adm-engine-list, .adm-kv-list { display: grid; gap: 10px; }
.adm-engine-item, .adm-kv-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  font-size: .85rem;
}
.adm-engine-item small { display: block; color: var(--muted); font-size: .75rem; }
.adm-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.adm-dot.ok { background: #34D399; box-shadow: 0 0 8px rgba(52, 211, 153, .6); }
.adm-dot.err { background: #FB7185; }
.adm-pass-form { display: grid; gap: 10px; }

@media (max-width: 1380px) {
  .topbar { gap: 10px; padding-inline: 16px; }
  .brand { gap: 8px; font-size: 1.12rem; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .prism-pill { padding: 2px 7px; font-size: .62rem; }
  .nav { padding: 3px; gap: 2px; }
  .nav button { padding-inline: 10px; font-size: .8rem; min-height: 36px; }
  .topbar-controls { gap: 5px; }
  .hud-chip-btn { min-width: 36px; min-height: 36px; padding-inline: 8px; border-radius: 10px; }
  #theme-switcher { padding: 3px; gap: 2px; }
  #theme-switcher button { min-width: 26px; min-height: 28px; padding: 0 5px; }
  .connection-status { padding: 0 10px; font-size: .74rem; min-height: 36px; white-space: nowrap; }
}

@media (max-width: 1340px) {
  .workflow-step > small { display: none; }
}
@media (max-width: 1180px) {
  .adm-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-bento-3, .adm-sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .fb-row-2, .adm-charts-main, .adm-dual-donuts, .adm-bento-3, .adm-sys-grid { grid-template-columns: 1fr; }
  .adm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-ticket-controls { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PRODUCTION HARDENING: ENGINE POPOVER, VERIFICATION MODE, CAPTCHA & ADS
   ========================================================================== */

/* Interactive Engine Status Popover */
.engine-status-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
#engine-status-btn.connection-status {
  cursor: pointer;
  font: inherit;
  color: inherit;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
#engine-status-btn.connection-status:hover {
  border-color: rgba(56, 189, 248, .5);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .12);
}
.engine-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(350px, 90vw);
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong, var(--line));
  box-shadow: 0 24px 64px rgba(0, 0, 0, .42), 0 0 0 1px rgba(56, 189, 248, .12);
  backdrop-filter: blur(20px);
  z-index: 140;
  display: grid;
  gap: 10px;
}
.engine-popover-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .92rem;
  color: var(--ink);
}
.engine-popover-head svg { width: 17px; height: 17px; color: #38BDF8; stroke: currentColor; fill: none; stroke-width: 1.9; }
.engine-popover-sub, .engine-popover-note {
  margin: 0;
  font-size: .78rem;
  line-height: 1.48;
  color: var(--muted);
}
.engine-popover-note {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: .74rem;
}
.engine-popover-list {
  display: grid;
  gap: 8px;
}
.engine-pop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
}
.engine-pop-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.engine-pop-dot.ready { background: #34D399; box-shadow: 0 0 8px rgba(52, 211, 153, .7); }
.engine-pop-dot.offline { background: #FB7185; }
.engine-pop-copy { flex: 1; min-width: 0; }
.engine-pop-copy b { display: block; font-size: .84rem; color: var(--ink); }
.engine-pop-copy small { display: block; font-size: .72rem; color: var(--muted); }
.engine-pop-state {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.engine-pop-state.ready { background: rgba(52, 211, 153, .14); color: #34D399; border: 1px solid rgba(52, 211, 153, .3); }
.engine-pop-state.offline { background: rgba(251, 113, 133, .14); color: #FB7185; border: 1px solid rgba(251, 113, 133, .3); }

/* Studio Verification Mode Selector (Normal Fast vs Deep Verify) */
.verify-mode-box {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
.verify-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.verify-mode-label {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.verify-mode-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.verify-mode-btn {
  text-align: left;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.verify-mode-btn:hover {
  border-color: rgba(56, 189, 248, .42);
}
.verify-mode-btn.active {
  border-color: rgba(56, 189, 248, .72);
  background: linear-gradient(135deg, rgba(56, 189, 248, .12), rgba(167, 139, 250, .08));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, .25) inset;
}
.verify-mode-btn[data-verify-mode="deep"].active {
  border-color: rgba(167, 139, 250, .75);
  background: linear-gradient(135deg, rgba(167, 139, 250, .14), rgba(52, 211, 153, .08));
  box-shadow: 0 0 0 1px rgba(167, 139, 250, .28) inset;
}
.verify-mode-btn .vm-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
}
.verify-mode-btn .vm-title svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  color: #38BDF8;
  flex-shrink: 0;
}
.verify-mode-btn[data-verify-mode="deep"] .vm-title svg { color: #A78BFA; }
.verify-mode-btn small {
  font-size: .71rem;
  line-height: 1.35;
  color: var(--muted);
}
.verify-mode-tip {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(167, 139, 250, .09);
  border: 1px solid rgba(167, 139, 250, .25);
  font-size: .74rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Human Verification CAPTCHA Modal */
.captcha-modal-card {
  max-width: 440px;
  width: min(440px, 94vw);
  padding: 22px;
}
.captcha-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.captcha-visual-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.captcha-svg-frame {
  flex: 1;
  min-width: 220px;
  padding: 6px;
  border-radius: 14px;
  background: #0b1222;
  border: 1px solid rgba(56, 189, 248, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 24px rgba(56, 189, 248, .08);
}
.captcha-svg-frame img {
  display: block;
  width: 220px;
  height: 68px;
  border-radius: 9px;
}
.captcha-refresh-btn {
  min-height: 44px;
  padding-inline: 14px;
}
.captcha-input {
  font-family: var(--mono);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-align: center;
  text-transform: uppercase;
  min-height: 48px;
}
.captcha-submit-btn {
  width: 100%;
  justify-content: center;
}

/* Smart Contextual Sponsor / Partner Cards (Aesthetic & Non-Intrusive) */
.landing-sponsor-slot {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 28px;
}
.studio-sponsor-slot {
  margin-top: 10px;
}
.download-sponsor-slot {
  margin: 14px 0 6px;
}
.sponsor-card {
  position: relative;
  border-radius: 16px;
  padding: 15px 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .62), rgba(15, 23, 42, .38));
  border: 1px solid var(--line);
  border-left: 3px solid #38BDF8;
  display: grid;
  gap: 10px;
  transition: border-color .22s ease, transform .18s ease, box-shadow .22s ease;
  overflow: hidden;
}
:root[data-theme="prism"] .sponsor-card,
:root[data-theme="atelier"] .sponsor-card,
:root[data-theme="aurora"] .sponsor-card {
  background: var(--bg-raised);
}
.sponsor-card.accent-violet { border-left-color: #A78BFA; }
.sponsor-card.accent-emerald { border-left-color: #34D399; }
.sponsor-card.accent-amber { border-left-color: #F59E0B; }
.sponsor-card:hover {
  border-color: rgba(56, 189, 248, .4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.sponsor-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.sponsor-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .12);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, .28);
}
.sponsor-card.accent-violet .sponsor-pill { background: rgba(167, 139, 250, .12); color: #A78BFA; border-color: rgba(167, 139, 250, .28); }
.sponsor-card.accent-emerald .sponsor-pill { background: rgba(52, 211, 153, .12); color: #34D399; border-color: rgba(52, 211, 153, .28); }
.sponsor-card.accent-amber .sponsor-pill { background: rgba(245, 158, 11, .12); color: #F59E0B; border-color: rgba(245, 158, 11, .28); }
.sponsor-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sponsor-disclosure {
  font-size: .7rem;
  color: var(--muted);
  opacity: .85;
}
.sponsor-body-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sponsor-copy { flex: 1; min-width: 200px; }
.sponsor-copy strong {
  display: block;
  font-size: .92rem;
  color: var(--ink);
  margin-bottom: 3px;
}
.sponsor-copy p {
  margin: 0;
  font-size: .8rem;
  line-height: 1.48;
  color: var(--muted);
}
.sponsor-compact .sponsor-body-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.sponsor-compact { padding: 13px 14px; }
.sponsor-compact .sponsor-copy strong { font-size: .85rem; }
.sponsor-compact .sponsor-copy p { font-size: .76rem; }
.sponsor-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s ease, background .2s ease;
}
.sponsor-cta:hover {
  border-color: rgba(56, 189, 248, .55);
  background: rgba(56, 189, 248, .1);
}
.sponsor-cta svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Admin Monetization & Ads Manager */
.adm-kpi-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.adm-ads-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 16px;
  margin-top: 16px;
}
.adm-ads-list-card {
  margin-top: 16px;
}
.adm-ad-row-actions, .adm-ad-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .adm-kpi-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-ads-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .verify-mode-group { grid-template-columns: 1fr; }
}

/* ==========================================================================
   VERIFIED DONATION & SUPPORT HUB (QR + DIRECT LINKS)
   ========================================================================== */
.donate-hub-card {
  padding: 26px;
  display: grid;
  gap: 20px;
}
.donate-hub-head {
  display: grid;
  gap: 6px;
}
.donate-hub-head h2 {
  margin: 0;
  font-size: clamp(1.32rem, 2.2vw, 1.75rem);
}
.donate-hub-head p {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}
.donate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.donate-card {
  border-radius: 18px;
  padding: 18px 16px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-top: 3px solid #38BDF8;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.donate-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, .5);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .24);
}
.donate-card.accent-bmc { border-top-color: #FFDD00; }
.donate-card.accent-kofi { border-top-color: #29ABE0; }
.donate-card.accent-paypal { border-top-color: #3B82F6; }
.donate-card.accent-vietqr { border-top-color: #EF4444; }
.donate-badge {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .12);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, .28);
}
.donate-card.accent-bmc .donate-badge { background: rgba(255, 221, 0, .14); color: #FACC15; border-color: rgba(255, 221, 0, .34); }
.donate-card.accent-kofi .donate-badge { background: rgba(41, 171, 224, .14); color: #38BDF8; border-color: rgba(41, 171, 224, .34); }
.donate-card.accent-paypal .donate-badge { background: rgba(59, 130, 246, .14); color: #60A5FA; border-color: rgba(59, 130, 246, .34); }
.donate-card.accent-vietqr .donate-badge { background: rgba(239, 68, 68, .14); color: #F87171; border-color: rgba(239, 68, 68, .34); }
.donate-qr-frame {
  width: 100%;
  max-width: 210px;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.donate-qr-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.donate-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}
.donate-card p {
  margin: 0;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--muted);
  flex: 1;
}
.donate-bank-meta {
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.5;
  color: var(--ink);
  background: rgba(148, 163, 184, .08);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  width: 100%;
}
.donate-card .button {
  width: 100%;
  justify-content: center;
  min-height: 40px;
  font-size: .82rem;
}
.donate-hub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.donate-hub-footer small {
  color: var(--muted);
  font-size: .78rem;
}

/* Turnstile Widget Host inside CAPTCHA Modal */
.captcha-turnstile-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

@media (max-width: 1120px) {
  .donate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .donate-grid { grid-template-columns: 1fr; }
}

/* 3D Printing Donation Impact Milestones */
.donate-impact-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(148, 163, 184, .05);
  border: 1px solid var(--line);
}
.donate-impact-label {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.donate-impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.donate-impact-card {
  position: relative;
  text-align: left;
  padding: 15px 14px;
  border-radius: 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.donate-impact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, .55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}
.donate-impact-card.featured {
  border-color: rgba(56, 189, 248, .52);
  background: linear-gradient(155deg, rgba(56, 189, 248, .1), rgba(15, 23, 42, .45));
}
.donate-impact-card.selected {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, .65);
}
.impact-popular {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .18);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, .4);
}
.impact-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(56, 189, 248, .12);
  color: #38BDF8;
}
.donate-impact-card.tone-amber .impact-icon { background: rgba(245, 158, 11, .14); color: #F59E0B; }
.donate-impact-card.tone-violet .impact-icon { background: rgba(167, 139, 250, .14); color: #A78BFA; }
.donate-impact-card.tone-emerald .impact-icon { background: rgba(52, 211, 153, .14); color: #34D399; }
.impact-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.impact-price {
  font-family: var(--mono);
  font-size: .86rem;
  font-weight: 800;
  color: #38BDF8;
  margin-top: 2px;
}
.donate-impact-card.tone-amber .impact-price { color: #FBBF24; }
.donate-impact-card.tone-violet .impact-price { color: #C4B5FD; }
.donate-impact-card.tone-emerald .impact-price { color: #34D399; }
.donate-impact-card strong {
  font-size: .9rem;
  line-height: 1.3;
  color: var(--ink);
}
.donate-impact-card small {
  font-size: .75rem;
  line-height: 1.45;
  color: var(--muted);
}
.donate-impact-hint {
  margin: 0;
  font-size: .78rem;
  color: var(--muted);
}
.donate-grid.highlight-pulse .donate-card {
  border-color: rgba(56, 189, 248, .62);
}

@media (max-width: 1120px) {
  .donate-impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .donate-impact-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   MULTI-THEME CONTRAST & LIGHT-THEME PARITY (PRISM / ATELIER / AURORA / OBSIDIAN)
   ========================================================================== */
html[data-theme="obsidian"] .sim-tab.active {
  background: linear-gradient(125deg, #2563eb, #6d28d9);
  color: #ffffff;
  border-color: rgba(125, 211, 252, .35);
}

html:not([data-theme="obsidian"]) .engine-chip i {
  background: #059669;
  box-shadow: 0 0 8px rgba(5, 150, 105, .45);
}
html:not([data-theme="obsidian"]) .engine-chip.offline i {
  background: #94a3b8;
  box-shadow: none;
}

html:not([data-theme="obsidian"]) .engine-popover {
  box-shadow: 0 20px 48px -12px rgba(15, 23, 42, .22), 0 0 0 1px var(--line-strong);
}
html:not([data-theme="obsidian"]) .engine-popover-head svg { color: #0284c7; }
html:not([data-theme="obsidian"]) .engine-pop-dot.ready {
  background: #059669;
  box-shadow: 0 0 6px rgba(5, 150, 105, .45);
}
html:not([data-theme="obsidian"]) .engine-pop-dot.offline { background: #e11d48; }
html:not([data-theme="obsidian"]) .engine-pop-state.ready {
  background: rgba(5, 150, 105, .12);
  color: #047857;
  border-color: rgba(5, 150, 105, .32);
}
html:not([data-theme="obsidian"]) .engine-pop-state.offline {
  background: rgba(225, 29, 72, .11);
  color: #be123c;
  border-color: rgba(225, 29, 72, .3);
}

html:not([data-theme="obsidian"]) .verify-mode-btn { background: var(--bg-raised); }
html:not([data-theme="obsidian"]) .verify-mode-btn:hover { border-color: rgba(2, 132, 199, .45); }
html:not([data-theme="obsidian"]) .verify-mode-btn.active {
  border-color: #0284c7;
  background: linear-gradient(135deg, rgba(2, 132, 199, .10), rgba(109, 40, 217, .06));
  box-shadow: 0 0 0 1px rgba(2, 132, 199, .22) inset;
}
html:not([data-theme="obsidian"]) .verify-mode-btn[data-verify-mode="deep"].active {
  border-color: #7c3aed;
  background: linear-gradient(135deg, rgba(124, 58, 237, .10), rgba(5, 150, 105, .06));
  box-shadow: 0 0 0 1px rgba(124, 58, 237, .24) inset;
}
html:not([data-theme="obsidian"]) .verify-mode-btn .vm-title svg { color: #0284c7; }
html:not([data-theme="obsidian"]) .verify-mode-btn[data-verify-mode="deep"] .vm-title svg { color: #6d28d9; }
html:not([data-theme="obsidian"]) .verify-mode-tip {
  background: rgba(109, 40, 217, .07);
  border-color: rgba(109, 40, 217, .22);
  color: var(--ink);
}
html:not([data-theme="obsidian"]) .captcha-svg-frame {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 16px rgba(15, 23, 42, .3);
}

html:not([data-theme="obsidian"]) .fb-star { background: var(--bg-raised); }
html:not([data-theme="obsidian"]) .fb-star:hover,
html:not([data-theme="obsidian"]) .fb-star.lit {
  color: #b45309;
  border-color: rgba(180, 83, 9, .5);
  background: rgba(245, 158, 11, .14);
}
html:not([data-theme="obsidian"]) .fb-error {
  background: rgba(225, 29, 72, .09);
  border-color: rgba(225, 29, 72, .3);
  color: #be123c;
}
html:not([data-theme="obsidian"]) .fb-receipt-icon {
  background: rgba(5, 150, 105, .11);
  border-color: rgba(5, 150, 105, .36);
  color: #047857;
}

html:not([data-theme="obsidian"]) .adm-kpi-card.accent-emerald { border-top-color: #059669; }
html:not([data-theme="obsidian"]) .adm-kpi-card.accent-cyan { border-top-color: #0284c7; }
html:not([data-theme="obsidian"]) .adm-kpi-card.accent-violet { border-top-color: #7c3aed; }
html:not([data-theme="obsidian"]) .adm-kpi-card.accent-amber { border-top-color: #d97706; }
html:not([data-theme="obsidian"]) .adm-pulse.live {
  background: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, .18);
}
html:not([data-theme="obsidian"]) .adm-badge.ok {
  background: rgba(5, 150, 105, .11);
  border-color: rgba(5, 150, 105, .32);
  color: #047857;
}
html:not([data-theme="obsidian"]) .adm-badge.warn {
  background: rgba(217, 119, 6, .12);
  border-color: rgba(217, 119, 6, .36);
  color: #b45309;
}
html:not([data-theme="obsidian"]) .adm-badge.err,
html:not([data-theme="obsidian"]) .adm-badge.sev-critical,
html:not([data-theme="obsidian"]) .adm-badge.sev-high,
html:not([data-theme="obsidian"]) .adm-badge.cat-bug {
  background: rgba(225, 29, 72, .10);
  border-color: rgba(225, 29, 72, .3);
  color: #be123c;
}
html:not([data-theme="obsidian"]) .adm-badge.cat-printer_request {
  background: rgba(124, 58, 237, .10);
  border-color: rgba(124, 58, 237, .3);
  color: #6d28d9;
}
html:not([data-theme="obsidian"]) .adm-badge.cat-feature {
  background: rgba(2, 132, 199, .10);
  border-color: rgba(2, 132, 199, .3);
  color: #0369a1;
}
html:not([data-theme="obsidian"]) .adm-stars { color: #b45309; }

html:not([data-theme="obsidian"]) .sponsor-card {
  background: var(--bg-raised);
  border-left-color: #0284c7;
}
html:not([data-theme="obsidian"]) .sponsor-card:hover {
  border-color: rgba(2, 132, 199, .38);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .09);
}
html:not([data-theme="obsidian"]) .sponsor-card.accent-violet { border-left-color: #7c3aed; }
html:not([data-theme="obsidian"]) .sponsor-card.accent-emerald { border-left-color: #059669; }
html:not([data-theme="obsidian"]) .sponsor-card.accent-amber { border-left-color: #d97706; }
html:not([data-theme="obsidian"]) .sponsor-pill {
  background: rgba(2, 132, 199, .10);
  color: #0369a1;
  border-color: rgba(2, 132, 199, .28);
}
html:not([data-theme="obsidian"]) .sponsor-card.accent-violet .sponsor-pill {
  background: rgba(124, 58, 237, .10);
  color: #6d28d9;
  border-color: rgba(124, 58, 237, .28);
}
html:not([data-theme="obsidian"]) .sponsor-card.accent-emerald .sponsor-pill {
  background: rgba(5, 150, 105, .10);
  color: #047857;
  border-color: rgba(5, 150, 105, .28);
}
html:not([data-theme="obsidian"]) .sponsor-card.accent-amber .sponsor-pill {
  background: rgba(217, 119, 6, .11);
  color: #b45309;
  border-color: rgba(217, 119, 6, .3);
}
html:not([data-theme="obsidian"]) .sponsor-disclosure {
  opacity: 1;
  color: var(--subtle);
}
html:not([data-theme="obsidian"]) .sponsor-cta {
  background: var(--bg-panel);
  border-color: var(--line-strong);
  color: var(--ink-strong);
}
html:not([data-theme="obsidian"]) .sponsor-cta:hover {
  border-color: #0284c7;
  background: rgba(2, 132, 199, .08);
}

html:not([data-theme="obsidian"]) .donate-card {
  background: var(--bg-raised);
  box-shadow: var(--shadow-control);
}
html:not([data-theme="obsidian"]) .donate-card:hover {
  border-color: rgba(2, 132, 199, .45);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}
html:not([data-theme="obsidian"]) .donate-card.accent-bmc { border-top-color: #d97706; }
html:not([data-theme="obsidian"]) .donate-card.accent-kofi { border-top-color: #0284c7; }
html:not([data-theme="obsidian"]) .donate-card.accent-paypal { border-top-color: #1d4ed8; }
html:not([data-theme="obsidian"]) .donate-card.accent-vietqr { border-top-color: #dc2626; }
html:not([data-theme="obsidian"]) .donate-badge {
  background: rgba(2, 132, 199, .10);
  color: #0369a1;
  border-color: rgba(2, 132, 199, .28);
}
html:not([data-theme="obsidian"]) .donate-card.accent-bmc .donate-badge {
  background: rgba(217, 119, 6, .12);
  color: #92400e;
  border-color: rgba(217, 119, 6, .32);
}
html:not([data-theme="obsidian"]) .donate-card.accent-kofi .donate-badge {
  background: rgba(2, 132, 199, .11);
  color: #0369a1;
  border-color: rgba(2, 132, 199, .3);
}
html:not([data-theme="obsidian"]) .donate-card.accent-paypal .donate-badge {
  background: rgba(29, 78, 216, .10);
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, .28);
}
html:not([data-theme="obsidian"]) .donate-card.accent-vietqr .donate-badge {
  background: rgba(220, 38, 38, .10);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, .28);
}
html:not([data-theme="obsidian"]) .donate-qr-frame {
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}
html:not([data-theme="obsidian"]) .donate-bank-meta {
  background: var(--bg-sunken);
  color: var(--ink-strong);
}
html:not([data-theme="obsidian"]) .donate-impact-section { background: var(--bg-sunken); }
html:not([data-theme="obsidian"]) .donate-impact-card {
  background: var(--bg-raised);
  color: var(--ink-strong);
}
html:not([data-theme="obsidian"]) .donate-impact-card:hover {
  border-color: rgba(2, 132, 199, .5);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
}
html:not([data-theme="obsidian"]) .donate-impact-card.featured {
  border-color: rgba(2, 132, 199, .45);
  background: linear-gradient(155deg, rgba(2, 132, 199, .08), var(--bg-raised));
}
html:not([data-theme="obsidian"]) .donate-impact-card.selected { box-shadow: 0 0 0 2px #0284c7; }
html:not([data-theme="obsidian"]) .impact-popular {
  background: rgba(2, 132, 199, .12);
  color: #0369a1;
  border-color: rgba(2, 132, 199, .32);
}
html:not([data-theme="obsidian"]) .impact-icon {
  background: rgba(2, 132, 199, .11);
  color: #0369a1;
}
html:not([data-theme="obsidian"]) .donate-impact-card.tone-amber .impact-icon {
  background: rgba(217, 119, 6, .12);
  color: #b45309;
}
html:not([data-theme="obsidian"]) .donate-impact-card.tone-violet .impact-icon {
  background: rgba(124, 58, 237, .11);
  color: #6d28d9;
}
html:not([data-theme="obsidian"]) .donate-impact-card.tone-emerald .impact-icon {
  background: rgba(5, 150, 105, .11);
  color: #047857;
}
html:not([data-theme="obsidian"]) .impact-price { color: #0369a1; }
html:not([data-theme="obsidian"]) .donate-impact-card.tone-amber .impact-price { color: #b45309; }
html:not([data-theme="obsidian"]) .donate-impact-card.tone-violet .impact-price { color: #6d28d9; }
html:not([data-theme="obsidian"]) .donate-impact-card.tone-emerald .impact-price { color: #047857; }
html:not([data-theme="obsidian"]) .donate-grid.highlight-pulse .donate-card {
  border-color: rgba(2, 132, 199, .55);
}
