/* ═══════════════════════════════════════════════════════════
   JEWEL LABS STUDIO  |  style.css
   Icy-black liquid glass. Cinematic Mode A on a graphite canvas.
   Tokens: dark base + icy-blue accent. No gold.
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --graphite-0: #000000;
  --graphite-1: #070a0f;
  --graphite-2: #0d1219;
  --ink: #e9eef4;
  --ink-2: #b8c3ce;
  --muted: #8593a1;
  --dim: #75828f;
  --accent: #8ab1d2;
  --accent-bright: #b9d7ef;
  --accent-deep: #33475c;
  --hair: rgba(232, 238, 244, 0.09);
  --hair-strong: rgba(232, 238, 244, 0.16);
  --danger: #e0685f;
  --ok: #46b98f;
  --warn: #e3b341;
  --block: #e0576a;

  --paper: #f6f2e9;
  --paper-edge: #ece5d5;
  --paper-ink: #201d16;
  --paper-muted: #6a6353;
  --paper-line: rgba(32, 29, 22, 0.16);
  --platinum: #7f8c9a;

  --bg: var(--graphite-0);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--muted);

  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui: 'Geist', system-ui, -apple-system, sans-serif;
  --font-doc: 'Newsreader', Georgia, serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  --font-sign: 'Newsreader', Georgia, serif;

  --t-micro: 160ms;
  --t-panel: 300ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-pill: 999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

#webgl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(125% 95% at 50% -12%, #0b0b0b 0%, #050505 45%, #000000 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

#cursorGlow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(233, 238, 244, 0.045) 0%, transparent 60%);
  transition: opacity 0.3s;
}

.glass {
  background: linear-gradient(180deg, rgba(30, 30, 33, 0.55), rgba(12, 12, 14, 0.62));
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  backdrop-filter: blur(28px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.55), 0 30px 72px rgba(0, 0, 0, 0.5);
}

.eyebrow,
.section-label,
.ws-kicker,
.spec-signal-label,
.cred-label,
.br-section-label,
.priority-label,
.sample-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

em {
  font-style: italic;
}

/* ═══════ BUTTONS ═══════ */
.btn-primary,
.btn-ghost,
.btn-enter,
.nav-book,
.tool-btn,
.chip,
.btn-sm {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  transition: transform var(--t-micro) var(--ease-premium),
    background var(--t-micro) var(--ease-out), box-shadow var(--t-micro) var(--ease-out),
    border-color var(--t-micro) var(--ease-out), color var(--t-micro) var(--ease-out);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 46%, rgba(255, 255, 255, 0.035) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(1.7);
  backdrop-filter: blur(26px) saturate(1.7);
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-pill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -9px 22px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.42);
}

.btn-primary:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 10px 28px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.085) 46%, rgba(255, 255, 255, 0.05) 100%);
}

.btn-primary:active {
  transform: translateY(0) scale(0.99);
}

/* Poppy CTA: bright icy-blue fill on black. High contrast, one per screen.
   Compound selectors so this wins over .btn-enter / .btn-primary defaults. */
.btn-poppy,
.btn-enter.btn-poppy,
.btn-primary.btn-poppy {
  background: var(--accent);
  color: #06131f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-poppy:hover,
.btn-enter.btn-poppy:hover,
.btn-primary.btn-poppy:hover {
  background: #93b7dd;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-poppy:active { background: #7aa4cc; }
.btn-poppy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-poppy svg { color: #06131f; }

/* no attention pulse; a solid accent CTA stands on its own like a real product button */
.btn-pop { animation: none; }
@media (prefers-reduced-motion: reduce) { .btn-pop { animation: none; } }

/* plain-language explainer under the demo title */
.sol-explain {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 60ch;
}

/* visible free-run counter (proves the localStorage rate limit) */
.runs-note {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--accent-bright);
  text-align: center;
  margin: -4px 0 2px;
}
.runs-note.is-locked { color: var(--danger); font-weight: 500; }
.try-free.is-locked {
  color: var(--danger);
  border-color: rgba(224, 104, 95, 0.4);
  background: rgba(224, 104, 95, 0.1);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.03) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(1.55);
  backdrop-filter: blur(22px) saturate(1.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 -1px 1px rgba(255, 255, 255, 0.04), 0 5px 18px rgba(0, 0, 0, 0.35);
}

.btn-sm:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 215, 239, 0.42);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border-color: rgba(185, 215, 239, 0.4);
  transform: translateY(-1px);
}

.btn-ring {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(6, 16, 25, 0.35);
  border-top-color: #061019;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

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

/* ═══════ LANDING + GATE (in-flow, scrollable) ═══════ */
.landing {
  position: relative;
  z-index: 3;
}

.landing.landing-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
}

#gate {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 28px 76px;
}

.gate-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gate-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  margin-bottom: 34px;
  opacity: 0;
  animation: gateUp 0.9s var(--ease-premium) 0.1s forwards;
}

.gate-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 20px;
  text-wrap: balance;
  opacity: 0;
  animation: gateUp 1s var(--ease-premium) 0.24s forwards;
}

.gate-title em {
  color: var(--accent-bright);
  font-style: normal;
}

.gate-sub {
  max-width: 620px;
  max-width: 560px;
  color: var(--text-muted);
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.7;
  margin-bottom: 40px;
  opacity: 0;
  animation: gateUp 1s var(--ease-premium) 0.4s forwards;
}

.gate-cta-row {
  opacity: 0;
  animation: gateUp 1s var(--ease-premium) 0.56s forwards;
}

.btn-enter {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.04) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
  backdrop-filter: blur(26px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0 38px;
  height: 54px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), inset 0 -1px 1px rgba(255, 255, 255, 0.05), 0 12px 34px rgba(0, 0, 0, 0.5);
}

.btn-enter:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-enter svg {
  transition: transform var(--t-micro) var(--ease-out);
}

.btn-enter:hover svg {
  transform: translateX(3px);
}

.gate-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 46px;
  opacity: 0;
  animation: gateUp 1s var(--ease-premium) 0.72s forwards;
}

.gate-foot a,
.gate-link {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: color var(--t-micro);
}

.gate-foot a:hover,
.gate-link:hover {
  color: var(--accent-bright);
}

/* ── landing vision prompt (before the welcome reveal) ── */
.vision {
  width: 100%;
  max-width: 604px;
  margin: 2px auto 34px;
  padding: 20px 22px;
  text-align: left;
  opacity: 0;
  animation: gateUp 1s var(--ease-premium) 0.46s forwards;
}
.vision-ask {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--hair);
}
.vision-tag {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.vision-ask p {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.vision-answer { display: flex; gap: 13px; align-items: flex-start; }
.vision-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.vision-answer-body { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.vision.glass {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 30px 70px rgba(0, 0, 0, 0.55);
}

.vision-sub {
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  margin-top: -3px;
}
.vision-stream {
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--text-secondary);
  animation: visionReveal 2.5s var(--ease-out) 0.8s both;
}
.vision-kicker {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  opacity: 0;
  animation: visionFade 0.9s var(--ease-premium) 3s forwards;
}
@keyframes visionReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes visionFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .vision, .vision-stream, .vision-kicker { animation: none; opacity: 1; clip-path: none; transform: none; }
}

.gate-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
}

.gate-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 215, 239, 0.5), transparent);
  animation: scan 7s linear infinite;
  opacity: 0.6;
}

@keyframes scan {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes gateUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════ REVEAL ═══════ */
.reveal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  pointer-events: none;
  background: #000000;
  opacity: 1;
  transition: opacity 0.9s var(--ease-out);
}

.reveal-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 57%;
  z-index: 2;
  text-align: center;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(21px, 3.2vw, 34px);
  letter-spacing: 0.18em;
  color: var(--ink);
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  transition: clip-path 1s var(--ease-out), opacity 0.5s var(--ease-out);
}

.reveal-line strong { font-weight: 300; font-style: normal; }
.reveal-line em { font-weight: 300; font-style: italic; }

.reveal-line.in {
  clip-path: inset(0 0 0 0);
  opacity: 0.92;
}

.reveal.reveal-on { display: block; pointer-events: auto; }
.reveal.reveal-hide { opacity: 0; }

.reveal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ═══════ STUDIO SHELL ═══════ */
.studio-root {
  position: relative;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}

.studio-root.studio-in { opacity: 1; }

#nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 48px);
  transition: background var(--t-panel), border-color var(--t-panel);
  border-bottom: 1px solid transparent;
}

#nav.solid {
  background: rgba(6, 9, 14, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--hair);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-logo svg { color: var(--accent); }
.nav-logo em { color: var(--muted); font-weight: 400; font-style: normal; }

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  color: var(--text-muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: color var(--t-micro);
}

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

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

.nav-ghost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  padding: 8px 12px;
  border-radius: var(--r-pill);
  transition: color var(--t-micro), background var(--t-micro);
}

.nav-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }

.nav-book {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.03) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(1.55);
  backdrop-filter: blur(22px) saturate(1.55);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-pill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 -1px 1px rgba(255, 255, 255, 0.04);
}

.nav-book:hover { transform: translateY(-1px); border-color: rgba(185, 215, 239, 0.42); }

/* HERO */
.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 130px) clamp(18px, 4vw, 48px) clamp(72px, 11vh, 124px);
  text-align: center;
}

.eyebrow { margin-bottom: 22px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.07;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 26px;
}

.hero-title em { color: inherit; font-style: normal; }

.hero-lede {
  max-width: 620px;
  margin: 0 auto 34px;
  color: var(--text-muted);
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-metrics {
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
  padding: 20px 34px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.02);
}

.metric { display: flex; flex-direction: column; gap: 5px; }

.metric-n {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.metric-l { font-size: 11px; color: var(--dim); letter-spacing: 0.04em; }
.metric-sep { width: 1px; height: 34px; background: var(--hair-strong); }

.reveal-el { opacity: 0; transform: translateY(16px); }

.reveal-el.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-premium);
}

/* SECTION HEADS */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-label { display: block; margin-bottom: 16px; }

.section-head h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(23px, 3vw, 33px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 14px;
}

.section-sub { color: var(--text-muted); font-size: 15px; line-height: 1.65; }

/* ═══════ DESK / TABS ═══════ */
.desk {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 80px) clamp(16px, 4vw, 48px);
  scroll-margin-top: 80px;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 30px;
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--hair);
  cursor: pointer;
  font-family: var(--font-ui);
  color: var(--text-muted);
  transition: background var(--t-micro), border-color var(--t-micro), transform var(--t-micro);
}

.tab:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--hair-strong);
  transform: translateY(-1px);
}

.tab.is-active {
  background: linear-gradient(178deg, rgba(154, 189, 219, 0.14), rgba(154, 189, 219, 0.04));
  border-color: rgba(185, 215, 239, 0.42);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tab-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.tab.is-active .tab-idx { color: var(--accent-bright); }
.tab-name { font-size: 17px; font-weight: 600; color: var(--ink); }
.tab-sub { font-size: 12.5px; color: var(--dim); }

.tabpanel { animation: panelIn 0.4s var(--ease-premium); }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ws-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ws-kicker { display: block; margin-bottom: 10px; }

.ws-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 18ch;
}

.ws-note { max-width: 400px; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }

.ws-grid {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  gap: 20px;
  align-items: start;
}

.ws-panel { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.ws-output { min-height: 100%; }

.ws-guard {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--dim);
  border-top: 1px solid var(--hair);
  padding-top: 14px;
}

/* FIELDS */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-in,
.field-ta,
.field-sel {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  background: rgba(8, 8, 10, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 13px 15px;
  width: 100%;
  transition: border-color var(--t-micro), box-shadow var(--t-micro), background var(--t-micro);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.36), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.field-ta { resize: none; line-height: 1.55; min-height: 84px; }
.field-in::placeholder, .field-ta::placeholder { color: var(--dim); }

.field-in:hover,
.field-ta:hover,
.field-sel:hover { border-color: rgba(255, 255, 255, 0.2); }

.field-in:focus,
.field-ta:focus,
.field-sel:focus {
  outline: none;
  border-color: rgba(154, 189, 219, 0.62);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(154, 189, 219, 0.16);
  background: rgba(8, 14, 22, 0.55);
}

.field-sel {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238ba0b4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}

.field-sel option { background: var(--graphite-2); color: var(--ink); }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  font-size: 12.5px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hair-strong);
  padding: 7px 13px;
  border-radius: var(--r-pill);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(185, 215, 239, 0.4);
  color: var(--ink);
}

.chip-warn { color: #e7b3ac; border-color: rgba(224, 104, 95, 0.35); }
.chip-warn:hover { background: rgba(224, 104, 95, 0.14); border-color: rgba(224, 104, 95, 0.55); color: #f0c9c3; }
.chip-wide { width: 100%; justify-content: center; padding: 11px; }

.sample-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sample-label { margin-right: 2px; }

.or-split {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.or-split::before, .or-split::after { content: ""; flex: 1; height: 1px; background: var(--hair); }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26px 18px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--hair-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--t-micro);
}

.drop svg { color: var(--accent); }
.drop p { font-size: 14px; color: var(--text-secondary); }
.drop span { font-size: 12px; color: var(--dim); }
.drop:hover, .drop.drag { border-color: rgba(185, 215, 239, 0.55); background: rgba(255, 255, 255, 0.045); }

.sketch-prev {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--hair-strong);
}

.sketch-prev img { width: 100%; max-height: 200px; object-fit: cover; display: block; }

.sketch-x {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  cursor: pointer;
  font-family: var(--font-ui);
}

.sketch-x:hover { background: rgba(224, 104, 95, 0.25); }

/* RENDER + VIZ STAGE */
.render-stage,
.viz-stage {
  position: relative;
  min-height: 420px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage-empty,
.viz-empty,
.cert-empty,
.readout-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--text-muted);
  padding: 30px;
}

.stage-empty svg, .viz-empty svg, .cert-empty svg { color: var(--accent); opacity: 0.6; margin-bottom: 6px; }
.stage-empty p, .viz-empty p, .cert-empty p { font-size: 15px; color: var(--text-secondary); }
.stage-empty span, .viz-empty span, .cert-empty span { font-size: 12.5px; color: var(--dim); max-width: 34ch; }

.render-img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
  animation: imgIn 0.7s var(--ease-out);
}

@keyframes imgIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.render-toolbar {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  background: rgba(6, 9, 14, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 6px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair-strong);
}

.tool-btn {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hair-strong);
  padding: 7px 13px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--font-ui);
}

.tool-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); border-color: rgba(185, 215, 239, 0.4); }

.stage-loading { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 40px; }

.load-orb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-bright), var(--accent-deep));
  box-shadow: 0 0 30px rgba(154, 189, 219, 0.5);
  animation: pulseOrb 1.4s var(--ease-out) infinite;
}

@keyframes pulseOrb {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}

.load-steps { display: flex; flex-direction: column; gap: 8px; align-items: center; }

.lstep {
  font-size: 12.5px;
  color: var(--dim);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  transition: color var(--t-micro);
}

.lstep.active { color: var(--accent-bright); }
.lstep.done { color: var(--accent-bright); }

.mini-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--hair-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* SPEC CARD / SIGNAL */
.spec-card {
  margin-top: 20px;
  padding: 26px clamp(20px, 3vw, 34px);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  align-items: start;
}

.spec-signal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 26px;
  border-right: 1px solid var(--hair);
}

.spec-signal-label { display: block; }

.signal-value {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 400;
  line-height: 1;
  color: var(--accent-bright);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.signal-value.pulse { animation: signalPulse 1s var(--ease-premium); }

@keyframes signalPulse {
  0% { opacity: 0; transform: scale(0.9); filter: blur(6px); }
  55% { opacity: 1; transform: scale(1.06); filter: blur(0); }
  100% { transform: scale(1); }
}

.spec-signal-note { font-size: 11px; color: var(--dim); line-height: 1.5; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px 24px;
}

.spec-item { display: flex; flex-direction: column; gap: 4px; }
.spec-k { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.spec-v { font-size: 14px; color: var(--ink); font-weight: 500; }

.spec-cost {
  grid-column: 1 / -1;
  margin-top: 6px;
  border-top: 1px solid var(--hair);
  padding-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 20px;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--hair);
  padding-bottom: 6px;
}

.cost-row span:last-child { color: var(--ink); }

.spec-prov {
  grid-column: 1 / -1;
  font-size: 11px;
  line-height: 1.5;
  color: var(--dim);
  margin-top: 2px;
}

.plan-prov {
  grid-column: 1 / -1;
  font-size: 11px;
  line-height: 1.5;
  color: var(--dim);
  border-top: 1px solid var(--hair);
  padding-top: 12px;
  margin-top: 4px;
}

.spec-cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
  border-top: 1px solid var(--hair);
  padding-top: 18px;
  flex-wrap: wrap;
}

.spec-cta p { font-family: var(--font-display); font-size: 18px; color: var(--text-secondary); font-style: italic; }

/* OPTIMIZE */
.priority-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

.strat-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hair);
}

.strat {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--t-micro);
}

.strat:hover { color: var(--ink); }
.strat.is-active { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(185, 215, 239, 0.42); color: var(--ink); font-weight: 600; }

.viz-canvas { width: 100%; height: auto; display: block; }

.viz-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: linear-gradient(0deg, rgba(6, 9, 14, 0.85), transparent);
  font-family: var(--font-mono);
}

.opt-table-wrap { grid-column: 1 / -1; overflow-x: auto; }
.opt-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.opt-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--hair-strong);
}

.opt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hair);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.opt-table tr.is-best td { background: rgba(154, 189, 219, 0.09); color: var(--ink); }
.opt-table tr.is-best td:first-child { border-left: 2px solid var(--accent-bright); font-weight: 600; }

.opt-cut-name { display: flex; align-items: center; gap: 8px; }

.best-tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(154, 189, 219, 0.14);
  border: 1px solid rgba(185, 215, 239, 0.4);
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-weight: 600;
}

/* CERTIFICATE */
.cert-empty { min-height: 460px; border-radius: var(--r-lg); }

.cert-scroll {
  max-height: 640px;
  overflow-y: auto;
  border-radius: var(--r-lg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.certificate {
  position: relative;
  background: var(--paper);
  background-image:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.6), transparent),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-edge) 100%);
  color: var(--paper-ink);
  font-family: var(--font-doc);
  padding: 44px clamp(28px, 4vw, 52px) 40px;
  border: 1px solid var(--paper-edge);
}

.cert-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--paper-line);
}

.cert-issuer { display: flex; flex-direction: column; gap: 3px; }

.cert-crest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--platinum);
}

.cert-issuer-sub {
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.cert-refbox {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper-muted);
  line-height: 1.7;
}

.cert-refbox strong { color: var(--paper-ink); }

.cert-title {
  font-family: var(--font-doc);
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 24px 0 6px;
  color: var(--paper-ink);
}

.cert-subtitle {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--paper-muted);
  margin-bottom: 22px;
}

.cert-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; margin-bottom: 24px; }
.cert-party { display: flex; flex-direction: column; gap: 3px; }

.cert-party-k {
  font-family: var(--font-ui);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.cert-party-v { font-size: 16px; color: var(--paper-ink); }

.cert-section-label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--platinum);
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--paper-line);
}

.cert-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-family: var(--font-ui); }

.cert-table th {
  text-align: left;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-muted);
  font-weight: 600;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--paper-line);
}

.cert-table td {
  padding: 9px 10px 9px 0;
  border-bottom: 1px solid var(--paper-line);
  color: var(--paper-ink);
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

.cert-flag {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #8a3b1f;
  background: rgba(180, 90, 40, 0.08);
  border-left: 2px solid #b45a28;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 0 4px 4px 0;
}

.cert-oos { font-family: var(--font-ui); font-size: 12px; color: var(--paper-muted); line-height: 1.6; }

.cert-attest {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--paper-ink);
  margin: 8px 0 4px;
  font-style: italic;
}

.cert-warranty {
  font-family: var(--font-ui);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--paper-muted);
  margin-top: 10px;
}

.cert-sign {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1.5px solid var(--paper-line);
}

.cert-sign-name {
  font-family: var(--font-sign);
  font-size: 38px;
  line-height: 1;
  color: #1c3350;
  margin-bottom: 4px;
}

.cert-sign-line {
  border-top: 1px solid var(--paper-ink);
  padding-top: 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--paper-muted);
  max-width: 280px;
}

.cert-sign-line strong { color: var(--paper-ink); font-size: 13px; display: block; }

.cert-seal {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--platinum);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--platinum);
  font-family: var(--font-ui);
  transform: rotate(-9deg);
  position: relative;
  opacity: 0.9;
}

.cert-seal::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid var(--platinum);
  opacity: 0.5;
}

.cert-seal-top { font-size: 7px; letter-spacing: 0.14em; text-transform: uppercase; }
.cert-seal-mid { font-family: var(--font-doc); font-size: 17px; font-weight: 700; margin: 2px 0; }
.cert-seal-bot { font-size: 6.5px; letter-spacing: 0.1em; text-transform: uppercase; }

.cert-guard {
  font-family: var(--font-ui);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--paper-muted);
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--paper-line);
}

.verdict-stamp {
  position: absolute;
  top: 128px;
  right: clamp(28px, 4vw, 52px);
  border: 3px solid;
  border-radius: var(--r-sm);
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-11deg);
  opacity: 0;
  animation: stampDrop 0.5s var(--ease-premium) 0.5s forwards;
}

.verdict-stamp .vs-sub {
  display: block;
  font-size: 8px;
  letter-spacing: 0.12em;
  font-weight: 500;
  text-align: center;
  margin-top: 2px;
  opacity: 0.85;
}

.verdict-READY { color: #1f7a54; border-color: #1f7a54; }
.verdict-NEEDS_REVIEW { color: #a97514; border-color: #a97514; }
.verdict-CANNOT_CERTIFY { color: #a83246; border-color: #a83246; }

@keyframes stampDrop {
  0% { opacity: 0; transform: rotate(-11deg) scale(2.4); }
  70% { opacity: 1; transform: rotate(-11deg) scale(0.92); }
  100% { opacity: 0.92; transform: rotate(-11deg) scale(1); }
}

.cert-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* SOLUTIONS */
.solutions {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(60px, 10vh, 110px) clamp(16px, 4vw, 48px);
  scroll-margin-top: 80px;
}

.sol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 32px; }

.sol.glass {
  background: none;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: 0;
  border-top: 1px solid var(--hair-strong);
  padding: 24px 0 0;
  position: relative;
  transition: border-color var(--t-panel) var(--ease-premium);
}
.sol.glass:hover { border-top-color: rgba(185, 215, 239, 0.38); }

.sol-n { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.14em; }

.sol h4 { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--ink); margin: 12px 0 8px; letter-spacing: -0.01em; }

.sol p { font-size: 13.5px; line-height: 1.65; color: var(--text-muted); }

/* BACKGROUND */
.background {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 6vh, 70px) clamp(16px, 4vw, 48px) clamp(60px, 9vh, 100px);
  scroll-margin-top: 80px;
}

.bg-quote.glass {
  background: none;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: 0;
  border-top: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair);
  padding: clamp(48px, 7vw, 72px) 0;
  margin-bottom: 48px;
}

.bg-quote-text {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 780px;
  margin-bottom: 34px;
}

.bg-cred {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  border-top: 1px solid var(--hair);
  padding-top: 28px;
}

.cred-block { display: flex; flex-direction: column; gap: 6px; }
.cred-label { color: var(--accent); }
.cred-val { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

.bg-cta { text-align: center; padding: 30px 0 0; }

.bg-cta h3 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 4vw, 40px);
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.bg-cta-sub { max-width: 620px; margin: 0 auto 26px; font-size: 14px; line-height: 1.65; color: var(--text-muted); }
.bg-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--hair);
  padding: 48px clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.footer-brand svg { color: var(--accent); }
.footer-links { display: flex; gap: 22px; }

.footer-links a { color: var(--text-muted); font-size: 13px; text-decoration: none; transition: color var(--t-micro); }
.footer-links a:hover { color: var(--accent-bright); }

.footer-copy {
  font-size: 11.5px;
  color: var(--dim);
  width: 100%;
  text-align: center;
  border-top: 1px solid var(--hair);
  padding-top: 18px;
  margin-top: 4px;
}

/* MODALS */
.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 7, 11, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s var(--ease-out);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-x {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hair-strong);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-micro);
}

.modal-x:hover { background: rgba(224, 104, 95, 0.18); color: var(--ink); }

.trial-card, .wall-card {
  position: relative;
  max-width: 440px;
  width: 100%;
  padding: 34px;
  animation: cardIn 0.35s var(--ease-premium);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.trial-eyebrow, .wall-eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.trial-title, .wall-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 12px;
}

.trial-copy, .wall-copy { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin-bottom: 20px; }
.trial-card .field { margin-bottom: 14px; }
.trial-error { font-size: 12.5px; color: var(--danger); margin-bottom: 12px; }
.trial-card .btn-primary { margin-top: 6px; }

.trial-cancel {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 12.5px;
  cursor: pointer;
  font-family: var(--font-ui);
}

.trial-cancel:hover { color: var(--text-muted); }

.wall-card { max-width: 500px; }

.wall-prev {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hair);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.wall-prev-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.wall-prev-value { font-family: var(--font-display); font-size: 20px; color: var(--accent-bright); }

.wall-pricing {
  background: rgba(154, 189, 219, 0.07);
  border: 1px solid rgba(185, 215, 239, 0.2);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 18px;
}

.wall-pricing-title { font-family: var(--font-display); font-size: 20px; color: var(--ink); margin-bottom: 4px; }
.wall-pricing-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }

.wall-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wall-actions .btn-primary, .wall-actions .btn-ghost { flex: 1; }

/* BROCHURE */
.brochure {
  position: relative;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #0c1219, #080c12);
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
  animation: cardIn 0.35s var(--ease-premium);
}

.brochure .modal-x { position: absolute; top: 18px; right: 18px; }

.br-hero { text-align: center; padding-bottom: 26px; border-bottom: 1px solid var(--hair); margin-bottom: 26px; }
.br-brand { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }

.br-headline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.br-sub { font-size: 14px; color: var(--text-muted); max-width: 440px; margin: 0 auto; line-height: 1.6; }

.br-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; margin-bottom: 34px; }
.br-pillar-t { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.br-pillar-d { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.br-section-label { text-align: center; margin-bottom: 20px; }
.br-sol { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; margin-bottom: 32px; }

.br-sol-item h4 { font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--accent-bright); margin-bottom: 6px; }
.br-sol-item p { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

.br-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; border-top: 1px solid var(--hair); padding-top: 24px; margin-bottom: 28px; }
.br-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--hair); padding-top: 24px; }
.br-cta a:first-child { font-family: var(--font-mono); font-size: 13px; color: var(--accent); text-decoration: none; letter-spacing: 0.04em; }

.br-cta-book {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.03) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(1.55);
  backdrop-filter: blur(22px) saturate(1.55);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 -1px 1px rgba(255, 255, 255, 0.04);
  font-weight: 600;
  font-size: 13px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: border-color var(--t-micro);
}

.br-cta-book:hover { border-color: rgba(185, 215, 239, 0.42); }

/* WORKSHOP */
.modal { max-width: 780px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 26px; animation: cardIn 0.35s var(--ease-premium); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-head h3 { font-family: var(--font-display); font-size: 18px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.modal-sub { font-size: 12px; color: var(--dim); font-family: var(--font-ui); margin-left: 6px; }
.ws-cols { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
.ws-base-img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--hair-strong); }
.ws-base-label { font-size: 11px; color: var(--dim); text-align: center; margin-top: 6px; }
.view-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vchip { cursor: pointer; }
.vchip input { display: none; }

.vchip span {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--hair-strong);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  transition: all var(--t-micro);
}

.vchip input:checked + span { background: rgba(255, 255, 255, 0.05); border-color: rgba(185, 215, 239, 0.4); color: var(--ink); }
.ws-gallery { margin-top: 20px; border-top: 1px solid var(--hair); padding-top: 18px; }
.ws-grid-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.ws-thumb { position: relative; }
.ws-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--hair-strong); }
.ws-thumb-label { font-size: 11px; color: var(--text-muted); margin-top: 5px; text-align: center; }

.ws-thumb-save {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  border-radius: var(--r-pill);
  padding: 4px 9px;
  cursor: pointer;
  font-family: var(--font-ui);
}

/* ADMIN */
.admin-view {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 7, 11, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  padding: 40px 20px;
}

.admin-panel { max-width: 960px; margin: 0 auto; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-title { font-family: var(--font-display); font-size: 28px; color: var(--ink); }
.admin-lock { max-width: 380px; margin: 60px auto; display: flex; flex-direction: column; gap: 12px; }
.admin-note { font-size: 11.5px; color: var(--dim); text-align: center; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.admin-table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--hair-strong);
}

.admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--hair); color: var(--text-secondary); }
.admin-rank { color: var(--accent-bright); font-family: var(--font-mono); }
.admin-empty { text-align: center; color: var(--dim); padding: 60px 0; }

/* legacy design output cards (specs) */
.out-card { padding: 18px; margin-bottom: 14px; }
.out-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.out-label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.out-placeholder { font-size: 13px; color: var(--dim); padding: 10px 0; }
.bp-section { margin-bottom: 14px; }
.bp-title { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.bp-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--hair); }
.bp-key { color: var(--dim); }
.bp-val { color: var(--text-secondary); text-align: right; }
.bp-steps { padding-left: 18px; font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.bp-steps li { margin-bottom: 5px; }
.bp-note { font-size: 12px; color: var(--text-muted); background: rgba(255, 255, 255, 0.03); border-radius: var(--r-sm); padding: 10px; line-height: 1.55; }

/* PRINT */
#printRoot { display: none; }

@media print {
  body * { visibility: hidden; }
  #printRoot, #printRoot * { visibility: visible; }
  #printRoot { display: block !important; position: absolute; inset: 0; background: #fff; }
  #printRoot .certificate { box-shadow: none; border: none; }
  #printRoot .verdict-stamp { animation: none; opacity: 0.92; }
  #webgl, .grain, #cursorGlow { display: none; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .ws-grid { grid-template-columns: 1fr; }
  .spec-card { grid-template-columns: 1fr; }
  .spec-signal { border-right: none; border-bottom: 1px solid var(--hair); padding-right: 0; padding-bottom: 18px; }
  .nav-links { display: none; }
  .ws-cols { grid-template-columns: 1fr; }
  .br-sol { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .tabbar { grid-template-columns: 1fr; }
  .tab { flex-direction: row; align-items: center; gap: 12px; }
  .nav-actions .nav-ghost { display: none; }
  .cert-parties { grid-template-columns: 1fr; }
  .hero-metrics { flex-wrap: wrap; gap: 16px; }
  .footer { flex-direction: column; text-align: center; }
}

/* ═══════════════════════ BETA BANNER ═══════════════════════ */
.beta-banner {
  position: relative;
  z-index: 3;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px clamp(16px, 4vw, 48px);
}

.beta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  padding: 13px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}

.beta-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(154, 189, 219, 0.12);
  border: 1px solid rgba(185, 215, 239, 0.3);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}

.beta-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.beta-text strong { color: var(--ink); font-weight: 600; }

.beta-link {
  font-size: 12.5px;
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(185, 215, 239, 0.4);
  padding-bottom: 1px;
}

.beta-link:hover { color: #fff; }

/* ═══════════════════════ SUB-PAGE NAV (back buttons) ═══════════════════════ */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hair-strong);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  transition: all var(--t-micro);
}

.nav-back:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); border-color: rgba(185, 215, 239, 0.4); transform: translateX(-2px); }
.nav-back svg { transition: transform var(--t-micro); }

.page-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 6vh, 60px) clamp(16px, 4vw, 48px) 8px;
}

.page-hero .ws-kicker { margin-bottom: 12px; }

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 14px;
}

.page-hero h1 em { color: inherit; font-style: normal; }

.page-hero p {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.page-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px clamp(16px, 4vw, 48px) clamp(72px, 11vh, 124px);
}

/* ═══════════════════════ HUB: TRY BUTTONS ═══════════════════════ */
.try-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.try-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  text-decoration: none;
  padding: 36px 32px;
  border-radius: var(--r-md);
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform var(--t-panel) var(--ease-premium), border-color var(--t-panel) var(--ease-premium), background var(--t-panel) var(--ease-premium), box-shadow var(--t-panel) var(--ease-premium);
  overflow: hidden;
}

.try-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  opacity: 0;
  transition: opacity var(--t-panel) var(--ease-premium);
  pointer-events: none;
}

.try-btn:hover { transform: translateY(-4px); border-color: rgba(185, 215, 239, 0.35); background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 22px 52px rgba(0, 0, 0, 0.5); }
.try-btn:hover::after { opacity: 1; }
.try-btn:hover .try-go { border-color: rgba(185, 215, 239, 0.5); background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)); }
.try-btn:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.try-btn:hover::after { opacity: 1; }

.try-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.try-idx { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.14em; }
.try-free { font-size: 9.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-bright); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(185, 215, 239, 0.3); padding: 3px 9px; border-radius: var(--r-pill); }
.try-ico { width: 40px; height: 40px; color: var(--accent-bright); }
.try-btn h4 { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.try-btn p { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

.try-go {
  align-self: flex-start;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: border-color var(--t-micro), background var(--t-micro);
}

.try-btn:hover .try-go svg { transform: translateX(3px); }
.try-go svg { transition: transform var(--t-micro); }

/* ═══════════════════════ SERVICES STATEMENT + WORKFLOW ═══════════════════════ */
.svc-statement {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 0 clamp(16px, 4vw, 48px);
  text-align: center;
}

.svc-statement p {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.6vw, 27px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.svc-statement strong { color: var(--ink); font-weight: 600; }

.workflow {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(72px, 11vh, 124px) clamp(16px, 4vw, 48px);
}

.wf-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 32px;
}

.wf-step.glass {
  background: none;
  border: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: 0;
  border-top: 1px solid var(--hair-strong);
  padding: 24px 0 0;
  position: relative;
  transition: border-color var(--t-panel) var(--ease-premium);
}
.wf-step.glass:hover { border-top-color: rgba(185, 215, 239, 0.38); }
.wf-n { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.14em; }
.wf-step h4 { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--ink); margin: 14px 0 10px; letter-spacing: -0.01em; }
.wf-step p { font-size: 14px; line-height: 1.65; color: var(--text-muted); }

/* ═══════════════════════ DISCLAIMER MODAL ═══════════════════════ */
.disc-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.disc-note { font-size: 11.5px; color: var(--dim); text-align: center; margin-top: 10px; line-height: 1.5; }
.disc-continue {
  display: block; width: 100%; text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hair-strong);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500; font-family: var(--font-ui);
  padding: 11px; border-radius: var(--r-pill); cursor: pointer;
  transition: all var(--t-micro);
}
.disc-continue:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }

/* ═══════════════════════ BROCHURE LIGHTBOX ═══════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(3, 5, 9, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  animation: fadeIn 0.25s var(--ease-out);
}

.lightbox-img {
  max-width: min(760px, 94vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-actions { display: flex; gap: 10px; align-items: center; }
.lightbox-hint { position: absolute; top: 20px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--dim); }

/* ═══════════════════════ OPTIMIZE: PLANNING REPORT ═══════════════════════ */
.plan-report {
  margin-top: 20px;
  padding: 26px clamp(20px, 3vw, 34px);
}

.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.plan-title { font-family: var(--font-display); font-size: 18px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.plan-week { font-family: var(--font-mono); font-size: 11px; color: var(--dim); letter-spacing: 0.04em; }

.plan-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.plan-metric {
  padding: 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.02);
}

.plan-metric.hero-metric { border-color: rgba(185, 215, 239, 0.34); background: linear-gradient(178deg, rgba(154, 189, 219, 0.12), rgba(154, 189, 219, 0.03)); }
.plan-metric .pm-k { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); display: block; margin-bottom: 8px; }
.plan-metric .pm-v { font-family: var(--font-display); font-size: 30px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.plan-metric.hero-metric .pm-v { color: var(--accent-bright); font-size: 36px; }
.plan-metric .pm-note { font-size: 11px; color: var(--dim); margin-top: 6px; line-height: 1.45; }
.pm-gain { color: var(--ok); }

.plan-bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.plan-bar-row { display: flex; flex-direction: column; gap: 5px; }
.plan-bar-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-secondary); }
.plan-bar-top .pb-v { font-family: var(--font-mono); color: var(--ink); }
.plan-bar-track { height: 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.plan-bar-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright)); transition: width 0.7s var(--ease-premium); }
.plan-bar-fill.dim { background: rgba(150, 146, 138, 0.4); }
.plan-explain { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; border-top: 1px solid var(--hair); padding-top: 14px; margin-top: 4px; }

/* ═══════════════════════ OPTIMIZE: DIAMOND DETECTION ═══════════════════════ */
.detect-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--hair-strong);
  background: rgba(255, 255, 255, 0.03);
  margin-top: 14px;
}

.detect-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.detect-dot.ok { background: var(--accent-bright); box-shadow: 0 0 8px rgba(185, 215, 239, 0.35); }
.detect-dot.warn { background: var(--warn); box-shadow: 0 0 10px rgba(227, 179, 65, 0.5); }
.detect-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.detect-reason { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.detect-conf { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }

/* ═══════════════════════ CHATBOT ═══════════════════════ */
.chat-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 20px 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.3);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform var(--t-micro), box-shadow var(--t-micro);
}

.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 22px 52px rgba(0, 0, 0, 0.4); }
.chat-fab .chat-fab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 8px rgba(154, 189, 219, 0.5); }
.chat-fab svg { color: var(--accent-bright); }
.chat-fab.hidden { display: none; }

.chat-panel {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 71;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(16, 21, 28, 0.84), rgba(7, 10, 14, 0.92));
  -webkit-backdrop-filter: blur(30px) saturate(1.35);
  backdrop-filter: blur(30px) saturate(1.35);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: chatIn 0.3s var(--ease-premium);
}

.chat-panel.hidden { display: none; }

@keyframes chatIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.chat-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--hair);
}

.chat-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(154, 189, 219, 0.12);
  border: 1px solid rgba(185, 215, 239, 0.28);
  color: var(--accent-bright);
}

.chat-h-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.chat-h-sub { font-size: 11px; color: var(--muted); }
.chat-h-status { display: inline-flex; align-items: center; gap: 5px; }
.chat-h-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.chat-close { margin-left: auto; background: rgba(255,255,255,0.05); border: 1px solid var(--hair-strong); color: var(--text-muted); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.chat-close:hover { color: var(--ink); background: rgba(224,104,95,0.18); }

.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }

.chat-msg { max-width: 84%; font-size: 13.5px; line-height: 1.55; padding: 11px 14px; border-radius: var(--r-lg); }
.chat-msg.bot { align-self: flex-start; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hair); color: var(--text-secondary); border-bottom-left-radius: var(--r-sm); }
.chat-msg.user { align-self: flex-end; background: rgba(154, 189, 219, 0.14); border: 1px solid rgba(185, 215, 239, 0.28); color: var(--ink); font-weight: 500; border-bottom-right-radius: var(--r-sm); }
.chat-msg strong { color: var(--ink); font-weight: 600; }
.chat-msg.user strong { color: var(--ink); }
.chat-msg a { color: var(--accent-bright); }

.chat-suggest { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 12px; }
.chat-chip { font-size: 12px; color: var(--text-secondary); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hair-strong); padding: 7px 12px; border-radius: var(--r-pill); cursor: pointer; font-family: var(--font-ui); transition: all var(--t-micro); }
.chat-chip:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); border-color: rgba(185, 215, 239, 0.4); }

.chat-input-row { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--hair); }
.chat-input { flex: 1; font-family: var(--font-ui); font-size: 13.5px; color: var(--ink); background: rgba(8, 8, 10, 0.45); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--r-pill); padding: 11px 15px; box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.36), inset 0 -1px 0 rgba(255, 255, 255, 0.04); transition: border-color var(--t-micro), box-shadow var(--t-micro); }
.chat-input::placeholder { color: var(--dim); }
.chat-input:focus { outline: none; border-color: rgba(154, 189, 219, 0.6); box-shadow: 0 0 0 3px rgba(154, 189, 219, 0.13); }
.chat-send { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.03)); -webkit-backdrop-filter: blur(22px) saturate(1.55); backdrop-filter: blur(22px) saturate(1.55); color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 1px rgba(255, 255, 255, 0.04); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color var(--t-micro); }
.chat-send:hover { border-color: rgba(185, 215, 239, 0.42); }
.chat-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: chatDot 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 620px) {
  .try-grid { grid-template-columns: 1fr; }
  .plan-metrics { grid-template-columns: 1fr; }
  .chat-panel { bottom: 0; right: 0; width: 100vw; height: 100vh; border-radius: 0; }
  .chat-fab { bottom: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .gate-scanline, .load-orb { display: none; }
  .reveal-el { opacity: 1; transform: none; }
}

/* ── legal page ── */
.gate-hint { margin-top: 15px; font-size: 12.5px; color: var(--dim); letter-spacing: 0.01em; }
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 40px clamp(18px, 4vw, 48px) 90px; }
.legal-wrap h2 { font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; margin: 40px 0 12px; padding-top: 28px; border-top: 1px solid var(--hair); }
.legal-wrap h2:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }
.legal-wrap p { font-size: 14px; line-height: 1.7; color: var(--text-muted); margin-bottom: 12px; }
.legal-wrap a { color: var(--accent-bright); }
.legal-updated { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 34px; }

.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.legal-nav a { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hair-strong); padding: 7px 13px; border-radius: var(--r-pill); text-decoration: none; transition: border-color var(--t-micro), color var(--t-micro); }
.legal-nav a:hover { color: var(--ink); border-color: rgba(185, 215, 239, 0.4); }
.legal-part { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-bright); margin: 56px 0 6px; scroll-margin-top: 90px; }
.legal-part:first-of-type { margin-top: 0; }

/* ═══════════════════════ AGENT RIBBON (tool pages) ═══════════════════════
   "Try the AI yourself" line under each tool-page hero, pointing back to
   the live agent demo on the hub. */
.agent-ribbon {
  max-width: 1180px;
  margin: 6px auto 0;
  padding: 0 clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.agent-ribbon-tag {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(154, 189, 219, 0.1);
  border: 1px solid rgba(185, 215, 239, 0.3);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.agent-ribbon p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.agent-ribbon a {
  font-size: 12.5px;
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(185, 215, 239, 0.4);
  padding-bottom: 1px;
  white-space: nowrap;
}

.agent-ribbon a:hover { color: #fff; }
