/* ============================================================
   THEFA Core — Homepage section styles
   Visual language derived from the official logo:
   command prompt `>_` · ascending block/stair motif · execution
   nodes · thin connector lines · verified receipt cards
   ============================================================ */

/* ================= HERO ================= */

.hero {
  position: relative;
  background: var(--ink-900);
  padding-top: clamp(44px, 6vw, 84px);
  padding-bottom: clamp(34px, 4vw, 56px);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1240px 580px at 72% 2%, rgba(214, 190, 136, 0.075), transparent 64%),
    radial-gradient(860px 480px at 2% 100%, rgba(214, 190, 136, 0.035), transparent 68%),
    linear-gradient(180deg, #21201D 0%, #1C1B19 58%, #1B1A18 100%);
}
.hero__grid-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 132px 132px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 68%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  gap: clamp(30px, 4vw, 60px);
  align-items: center;
}
@media (min-width: 1081px) {
  /* nudge the copy up slightly so the eyebrow still sits near the top
     of the visual rather than floating in the vertical middle */
  .hero__copy { margin-top: -34px; }
}
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
  .hero__copy { margin-top: 0; }
}

.hero__copy .eyebrow { margin-bottom: 22px; }
.hero__h1 { font-size: var(--fs-display); line-height: var(--lh-tight); }
.hero__h1 .line { display: block; }
/* Primary message: "검증된 실행" carries the logo's own metallic gold.
   The solid colour is declared first and the transparent fill is applied
   only inside @supports, so a browser without background-clip:text shows
   champagne type instead of an invisible word. */
.hero__h1 em {
  font-style: normal;
  color: var(--gold-text);
  padding-right: 0.06em;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__h1 em {
    background: var(--gold-text-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
/* Forced-colors mode throws away the gradient; keep the word visible. */
@media (forced-colors: active) {
  .hero__h1 em { -webkit-text-fill-color: currentColor; background: none; }
}
.hero__sub {
  margin-top: 26px;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--tx-on-dark);
  font-weight: 550;
  letter-spacing: -0.012em;
}
.hero__sub .line { display: block; }
.hero__body {
  margin-top: 18px;
  max-width: 52ch;
  font-size: var(--fs-small);
}
.hero__cta { margin-top: 32px; }
.hero__micro { margin-top: 22px; max-width: 46ch; }

/* hero stat-free trust strip */
.trust-strip {
  margin-top: clamp(30px, 3.4vw, 46px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.trust-strip__item {
  background: var(--ink-800);
  padding: 16px 18px;
}
.trust-strip__item dt {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0;
  text-transform: none;
  color: var(--tx-on-dark-dim);
  margin-bottom: 7px;
}
.trust-strip__item dd {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--tx-on-dark);
}
@media (max-width: 760px) {
  .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .trust-strip { grid-template-columns: minmax(0, 1fr); }
}

/* --- flow chip --- */
.flowchip {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.flowchip li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.04em;
  color: var(--tx-on-dark-muted);
  background: rgba(255, 255, 255, 0.028);
}
.flowchip li[data-on="true"] {
  border-color: var(--ink-line-strong);
  color: var(--tx-on-dark);
  background: rgba(255, 255, 255, 0.035);
}
.flowchip li:last-child {
  border-color: var(--gold-edge-strong);
  color: var(--gold-text);
}
.flowchip li::after {
  content: "→";
  color: var(--tx-on-dark-dim);
  font-size: var(--fs-meta);
}
.flowchip li:last-child::after { display: none; }
@media (max-width: 620px) {
  .flowchip li { font-size: var(--fs-meta); padding: 6px 10px; }
}

/* --- hero visual: shared chrome --- */
.hero__visual { min-width: 0; }

.pane {
  background: var(--ink-850);
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-card-lg);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.pane__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-line);
  background: rgba(255, 255, 255, 0.028);
}
.pane__dots { display: flex; gap: 6px; flex: none; }
.pane__dots i { width: 9px; height: 9px; border-radius: 50%; background: #3A3A3A; display: block; }
.pane__title {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx-on-dark-dim);
}
.pane__bar .badge { margin-left: auto; }
.pane__body { padding: clamp(16px, 2vw, 22px); }

/* command line */
.cmd {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-ctl);
  background: var(--ink-950);
  font-size: var(--fs-small);
}
.cmd__prompt {
  font-family: var(--font-mono);
  color: var(--gold-text);
  font-weight: 700;
  flex: none;
  line-height: 1.6;
}
.cmd__text { color: var(--tx-on-dark); line-height: 1.6; }
.cmd__caret {
  display: inline-block;
  width: 7px; height: 1.05em;
  vertical-align: -0.14em;
  background: var(--gold);
  margin-left: 2px;
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cmd__caret { animation: none; } }

/* work unit list */
.units { margin-top: 14px; display: grid; gap: 8px; }
.unit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-ctl);
  background: rgba(255, 255, 255, 0.026);
  position: relative;
  transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.unit[data-state="running"] { border-color: var(--gold-edge-strong); background: var(--gold-wash); }
.unit[data-state="verified"] { border-color: rgba(95, 169, 122, 0.34); }
.unit__id {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--tx-on-dark-dim);
  letter-spacing: 0.05em;
}
.unit__title { font-size: var(--fs-small); font-weight: 600; }
.unit__meta { font-size: var(--fs-caption); color: var(--tx-on-dark-dim); font-family: var(--font-mono); }

/* the ascending stair motif — used as a progress/verification marker */
.stair { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; flex: none; }
.stair i { width: 4px; background: var(--ink-line-strong); border-radius: 1px; display: block; }
.stair i:nth-child(1) { height: 5px; }
.stair i:nth-child(2) { height: 9px; }
.stair i:nth-child(3) { height: 14px; }
.unit[data-state="running"] .stair i:nth-child(1),
.unit[data-state="running"] .stair i:nth-child(2) { background: var(--gold); }
.unit[data-state="running"] .stair i:nth-child(3) { background: var(--ink-line-strong); }
.unit[data-state="verified"] .stair i { background: var(--state-ok); }

/* receipt mini card */
.receipt-mini {
  margin-top: 14px;
  border: 1px dashed var(--ink-line-strong);
  border-radius: var(--r-ctl);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.014);
}
.receipt-mini__label {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.receipt-mini__text { font-size: var(--fs-caption); color: var(--tx-on-dark-muted); }

/* pipeline variant */
.pipe { display: grid; gap: 7px; }
.pipe__row {
  display: grid;
  grid-template-columns: 34px auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-ctl);
  background: rgba(255, 255, 255, 0.026);
}
.pipe__row[data-state="active"] { border-color: var(--gold-edge-strong); background: var(--gold-wash); }
.pipe__row[data-state="done"] { border-color: rgba(95, 169, 122, 0.3); }
.pipe__no { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--tx-on-dark-dim); }
.pipe__en { font-family: var(--font-mono); font-size: var(--fs-meta); font-weight: 600; letter-spacing: 0.05em; color: var(--tx-on-dark); min-width: 78px; }
.pipe__row[data-state="active"] .pipe__en { color: var(--gold-text); }
.pipe__note { font-size: var(--fs-caption); color: var(--tx-on-dark-dim); text-align: right; }

/* ================= WHY ================= */

.prob-card { display: grid; gap: 10px; align-content: start; }
.prob-card__n {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  color: var(--gold-text);
}
.prob-card h3 { font-size: var(--fs-h4); }
.prob-card p { font-size: var(--fs-small); color: var(--tx-on-light-muted); }
.prob-card__detail {
  font-size: var(--fs-caption);
  color: var(--tx-on-light-dim);
  padding-top: 10px;
  border-top: 1px solid var(--paper-line);
}

.closing-line {
  margin-top: clamp(26px, 3vw, 40px);
  padding: 20px 24px;
  border-left: 2px solid var(--gold);
  background: var(--paper-100);
  border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
  font-weight: 600;
  font-size: var(--fs-lead);
  max-width: 62ch;
}

/* ================= CORE FLOW ================= */

.flow-rail {
  position: relative;
  margin-bottom: 26px;
  padding-top: 30px;
}
.flow-rail__line {
  position: absolute;
  left: 0; right: 0; top: 8px;
  height: 1px;
  background: var(--ink-line-strong);
}
.flow-rail__fill {
  position: absolute;
  left: 0; top: 8px;
  height: 1px;
  width: 0;
  background: var(--gold);
  transition: width 1200ms var(--ease-out);
}
.flow-rail__nodes {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}
.flow-rail__nodes li {
  position: relative;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tx-on-dark-dim);
  text-align: center;
}
.flow-rail__nodes li::before {
  content: "";
  position: absolute;
  top: 3px; left: 50%;
  transform: translateX(-50%);
  width: 11px; height: 11px;
  border: 1px solid var(--ink-line-strong);
  border-radius: 3px;
  background: var(--ink-800);
  transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.flow-rail__nodes li[data-on="true"] { color: var(--gold-text); }
.flow-rail__nodes li[data-on="true"]::before { border-color: var(--gold-text); background: var(--gold); }

.flow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.flow-grid .stage {
  background: var(--ink-700);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card);
  padding: clamp(18px, 2vw, 24px);
  display: grid;
  gap: 12px;
  align-content: start;
  transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.flow-grid .stage[data-on="true"] { border-color: var(--gold-edge); background: #191813; }
/* wrap, or the mono English tag collides with a long Korean/translated
   stage name once the card is in a two-up or one-up grid */
.stage__top { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; }
.stage__no { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--gold-text); letter-spacing: 0.1em; flex: none; }
.stage__en {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tx-on-dark-dim);
  margin-left: auto;
}
.stage__ko { font-size: var(--fs-h4); font-weight: 700; letter-spacing: -0.02em; min-width: 0; }
.stage__body { font-size: var(--fs-small); color: var(--tx-on-dark-muted); }
.stage__human {
  font-size: var(--fs-caption);
  color: var(--tx-on-dark-dim);
  padding-top: 11px;
  border-top: 1px solid var(--ink-line);
}

.flow-statement {
  margin-top: clamp(26px, 3vw, 40px);
  padding: 20px 24px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card);
  background: var(--ink-850);
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  color: var(--tx-on-dark-muted);
  overflow-wrap: anywhere;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.flow-statement strong { color: var(--gold-text); font-weight: 600; }

@media (max-width: 1080px) {
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The horizontal rail needs ~150px per node to keep "WORK UNIT" on one
   line. Below 1080 that no longer holds and the eight labels used to
   collide, so the rail becomes a vertical timeline there — not at 860,
   where it was already broken for 220px of viewport width. */
@media (max-width: 1080px) {
  .flow-rail { padding-top: 0; margin-bottom: 20px; }
  .flow-rail__line, .flow-rail__fill { display: none; }
  .flow-rail__nodes {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border-left: 1px solid var(--ink-line-strong);
    margin-left: 5px;
    padding-left: 18px;
  }
  .flow-rail__nodes li {
    text-align: left;
    padding: 7px 0;
  }
  .flow-rail__nodes li::before {
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
  }
}
@media (max-width: 860px) {
  .flow-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ================= INTERACTIVE DEMO ================= */

.demo {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}
@media (max-width: 1024px) { .demo { grid-template-columns: minmax(0, 1fr); } }

.demo__controls {
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card);
  background: var(--ink-900);
  padding: clamp(16px, 2vw, 22px);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
@media (max-width: 1024px) { .demo__controls { position: static; } }

.demo-request {
  border: 1px solid var(--gold-edge);
  border-radius: var(--r-ctl);
  background: var(--gold-wash);
  padding: 14px;
  margin-bottom: 16px;
}
.demo-request__label {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--tx-on-dark-dim);
  display: block;
  margin-bottom: 8px;
}
.demo-request p { font-size: var(--fs-small); font-weight: 600; line-height: 1.6; }

.demo-steps { display: grid; gap: 5px; }
.demo-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  text-align: left;
  color: var(--tx-on-dark-muted);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.demo-step:hover { background: rgba(255, 255, 255, 0.04); color: var(--tx-on-dark); }
.demo-step[aria-current="step"] {
  border-color: var(--gold-edge);
  background: var(--gold-wash-strong);
  color: var(--tx-on-dark);
}
.demo-step__n {
  width: 26px; height: 26px;
  border: 1px solid var(--ink-line-strong);
  border-radius: 7px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--fs-meta); font-weight: 600;
  color: var(--tx-on-dark-dim);
  flex: none;
}
.demo-step[aria-current="step"] .demo-step__n { border-color: var(--gold-text); color: var(--gold-text); }
.demo-step[data-done="true"] .demo-step__n { border-color: rgba(95, 169, 122, 0.5); color: #8FD3A8; }
.demo-step__label { font-size: var(--fs-small); font-weight: 600; }
.demo-step__en {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx-on-dark-dim);
  display: block;
  margin-top: 2px;
}
.demo-step__tick { opacity: 0; color: #8FD3A8; font-size: 13px; }
.demo-step[data-done="true"] .demo-step__tick { opacity: 1; }

.demo__player {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-line);
  display: grid;
  gap: 12px;
}
.demo__progress {
  height: 2px;
  background: var(--ink-line);
  border-radius: 2px;
  overflow: hidden;
}
.demo__progress i {
  display: block;
  height: 100%;
  background: var(--gold);
  width: 0;
  transition: width 420ms var(--ease-out);
}
.demo__player-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.demo__count { font-family: var(--font-sans); font-size: var(--fs-caption); font-weight: 600; color: var(--tx-on-dark-dim); }

.demo__stage {
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-card);
  background: var(--ink-850);
  min-height: 420px;
  overflow: hidden;
}
.demo__stage-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-line);
  flex-wrap: wrap;
}
.demo__stage-head .badge { margin-left: auto; }
.demo__stage-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-text);
}
.demo-panel { padding: clamp(18px, 2.4vw, 28px); }
.demo-panel__head { margin-bottom: 18px; }
.demo-panel__head h3 { font-size: var(--fs-h3); margin-bottom: 10px; }
.demo-panel__summary { font-size: var(--fs-lead); color: var(--tx-on-dark); font-weight: 600; }
.demo-panel__detail {
  margin-top: 12px;
  font-size: var(--fs-small);
  color: var(--tx-on-dark-muted);
  max-width: 68ch;
}
.demo-panel__foot {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--ink-line);
  font-size: var(--fs-caption);
  color: var(--tx-on-dark-dim);
}

/* demo payload blocks */
.kv { display: grid; gap: 1px; background: var(--ink-line); border: 1px solid var(--ink-line); border-radius: var(--r-ctl); overflow: hidden; }
.kv__row { display: grid; grid-template-columns: minmax(96px, 0.5fr) minmax(0, 1.5fr); gap: 14px; padding: 11px 14px; background: var(--ink-800); }
.kv__k {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--tx-on-dark-dim);
}
.kv__v { font-size: var(--fs-small); color: var(--tx-on-dark); }
@media (max-width: 480px) { .kv__row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 13px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-ctl);
  font-size: var(--fs-small);
  color: var(--tx-on-dark);
  background: rgba(255, 255, 255, 0.028);
}
.chip--gold { border-color: var(--gold-edge); color: var(--gold-text); }

.worker-list { display: grid; gap: 8px; }
.worker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-ctl);
  background: rgba(255, 255, 255, 0.024);
}
.worker-row__name { font-weight: 600; font-size: var(--fs-small); }
.worker-row__role { font-size: var(--fs-caption); color: var(--tx-on-dark-dim); display: block; margin-top: 2px; }

.units-table { display: grid; gap: 1px; background: var(--ink-line); border: 1px solid var(--ink-line); border-radius: var(--r-ctl); overflow: hidden; }
.unit-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--ink-800);
}
.unit-row__id { font-family: var(--font-mono); font-size: var(--fs-meta); letter-spacing: 0.05em; color: var(--gold-text); }
.unit-row__title { font-size: var(--fs-small); font-weight: 600; display: block; }
.unit-row__sub { display: block; font-size: var(--fs-caption); color: var(--tx-on-dark-dim); font-family: var(--font-sans);
  font-weight: 600; margin-top: 3px; }
@media (max-width: 560px) {
  .unit-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .unit-row__id { order: -1; }
}

.receipt-trail-wrap { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ink-line); }

.stream { display: grid; gap: 0; border-left: 1px solid var(--ink-line-strong); margin-left: 6px; }
.stream li { position: relative; padding: 0 0 16px 20px; }
.stream li::before {
  content: "";
  position: absolute; left: -4.5px; top: 7px;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--ink-line-strong);
}
.stream li[data-state="done"]::before { background: var(--state-ok); }
.stream li[data-state="running"]::before { background: var(--gold); }
.stream li[data-state="waiting"]::before { background: var(--state-wait); }
.stream__t { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--tx-on-dark-dim); margin-right: 10px; }
.stream__x { font-size: var(--fs-small); color: var(--tx-on-dark); }

.qa-list { display: grid; gap: 8px; }
.qa-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ink-line);
  border-left-width: 2px;
  border-radius: var(--r-ctl);
  background: rgba(255, 255, 255, 0.024);
}
.qa-row[data-state="verified"] { border-left-color: var(--state-ok); }
.qa-row[data-state="qa"] { border-left-color: var(--gold-soft); }
.qa-row[data-state="waiting"] { border-left-color: var(--state-wait); }
.qa-row__name { font-size: var(--fs-small); font-weight: 600; }
.qa-row__scope { font-size: var(--fs-caption); color: var(--tx-on-dark-dim); display: block; margin-top: 2px; }

/* ================= BEFORE / AFTER ================= */

.ba-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
@media (max-width: 820px) { .ba-grid { grid-template-columns: minmax(0, 1fr); } }

.ba-card { border-radius: var(--r-card); padding: clamp(20px, 2.4vw, 30px); border: 1px solid var(--paper-line); background: var(--paper-000); }
.ba-card[data-kind="after"] { border-color: var(--charcoal); background: var(--ink-800); color: var(--tx-on-dark); }
.ba-card__label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0;
  text-transform: none;
  color: var(--tx-on-light-dim);
  display: block;
  margin-bottom: 18px;
}
.ba-card[data-kind="after"] .ba-card__label { color: var(--gold-text); }
.ba-steps { display: grid; gap: 0; }
.ba-steps li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed var(--paper-line);
  font-size: var(--fs-small);
}
.ba-card[data-kind="after"] .ba-steps li { border-bottom-color: var(--ink-line); }
.ba-steps li:last-child { border-bottom: 0; }
.ba-steps__mark {
  width: 22px; height: 22px;
  border: 1px solid var(--paper-line-strong);
  border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--fs-meta);
  color: var(--tx-on-light-dim);
}
.ba-card[data-kind="after"] .ba-steps__mark { border-color: var(--gold-edge-strong); color: var(--gold-text); }
.ba-card__note { margin-top: 18px; font-size: var(--fs-caption); color: var(--tx-on-light-muted); }
.ba-card[data-kind="after"] .ba-card__note { color: var(--tx-on-dark-muted); }

/* ================= ORCHESTRATION ================= */

.orch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1024px) { .orch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .orch-grid { grid-template-columns: minmax(0, 1fr); } }

.orch-card {
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card);
  background: var(--ink-700);
  padding: 20px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.orch-card__tag {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-text);
}
.orch-card__title { font-family: var(--font-mono); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.03em; }
.orch-card__body { font-size: var(--fs-caption); color: var(--tx-on-dark-muted); }

.hub {
  margin-top: 22px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-card);
  background: var(--ink-900);
  padding: clamp(18px, 2.2vw, 26px);
  display: grid;
  gap: 16px;
}
.hub__core {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--gold-edge);
  border-radius: var(--r-ctl);
  background: var(--gold-wash);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  color: var(--gold-text);
  width: fit-content;
}
.hub__principle { font-size: var(--fs-lead); font-weight: 600; }

/* ================= MODES ================= */

.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); }
@media (max-width: 900px) { .mode-grid { grid-template-columns: minmax(0, 1fr); } }

.mode-card {
  border: 1px solid var(--paper-line);
  border-radius: var(--r-card);
  background: var(--paper-000);
  padding: clamp(20px, 2.4vw, 28px);
  display: grid;
  gap: 12px;
  align-content: start;
}
.mode-card__id {
  font-family: var(--font-mono);
  font-size: var(--fs-h4);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--charcoal);
}
.mode-card__ko { font-size: var(--fs-small); font-weight: 600; color: var(--gold-on-light); }
.mode-card__body { font-size: var(--fs-small); color: var(--tx-on-light-muted); }
.mode-card__meta { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--paper-line); }
.mode-card__meta div { font-size: var(--fs-caption); color: var(--tx-on-light-dim); }
.mode-card__meta span { color: var(--charcoal); font-weight: 600; }

/* ================= VERIFY ================= */

.neq-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); }
@media (max-width: 900px) { .neq-grid { grid-template-columns: minmax(0, 1fr); } }

.neq-card {
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-card);
  background: var(--ink-700);
  padding: clamp(18px, 2.2vw, 26px);
  display: grid;
  gap: 14px;
}
.neq-card__en {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tx-on-dark);
  overflow-wrap: anywhere;
}
.neq-card__en s { text-decoration-color: var(--state-wait); text-decoration-thickness: 2px; }
.neq-card__ko { font-size: var(--fs-h4); font-weight: 700; color: var(--gold-text); }
.neq-card__body { font-size: var(--fs-small); color: var(--tx-on-dark-muted); }

.receipt-pane {
  margin-top: clamp(20px, 2.6vw, 32px);
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-card);
  background: var(--ink-900);
  overflow: hidden;
}
.receipt-pane__head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-line);
}
.receipt-pane__title { font-family: var(--font-sans);
  font-weight: 600; font-size: var(--fs-caption); letter-spacing: 0; text-transform: none; color: var(--gold-text); }
.receipt-pane__sub { font-size: var(--fs-caption); color: var(--tx-on-dark-dim); }
.receipt-pane__head .badge { margin-left: auto; }
.receipt-pane__body { padding: clamp(16px, 2vw, 22px); display: grid; gap: 18px; }
@media (min-width: 860px) { .receipt-pane__body { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }

.receipt-trail { display: grid; gap: 0; align-self: start; }
.receipt-trail li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  font-size: var(--fs-small);
  color: var(--tx-on-dark-muted);
  position: relative;
}
.receipt-trail li::before {
  content: "";
  width: 10px; height: 10px; border-radius: 3px;
  border: 1px solid var(--ink-line-strong);
}
.receipt-trail li[data-state="done"]::before { background: var(--state-ok); border-color: var(--state-ok); }
.receipt-trail li[data-state="active"]::before { background: var(--gold); border-color: var(--gold-text); }
.receipt-trail li[data-state="active"] { color: var(--gold-text); font-weight: 600; }

/* ================= CONTINUITY ================= */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--ink-line);
}
@media (max-width: 1100px) { .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .timeline { grid-template-columns: minmax(0, 1fr); } }

.timeline li {
  background: var(--ink-800);
  padding: clamp(18px, 2.2vw, 26px);
  display: grid;
  gap: 10px;
  align-content: start;
  border-top: 2px solid var(--ink-line-strong);
}
.timeline li[data-state="running"] { border-top-color: var(--gold-text); }
.timeline li[data-state="waiting"] { border-top-color: var(--state-wait); }
.timeline li[data-state="qa"] { border-top-color: var(--gold-soft); }
.timeline li[data-state="verified"] { border-top-color: var(--state-ok); }
.timeline__id { font-family: var(--font-mono); font-size: var(--fs-meta); letter-spacing: 0.08em; color: var(--tx-on-dark-dim); overflow-wrap: anywhere; }
.timeline li[data-state="verified"] .timeline__id { color: #8FD3A8; }
.timeline__ko { font-size: var(--fs-h4); font-weight: 700; }
.timeline__body { font-size: var(--fs-small); color: var(--tx-on-dark-muted); }

.callout {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--gold-edge);
  border-radius: var(--r-card);
  background: var(--gold-wash);
}
.callout__mark {
  font-family: var(--font-mono);
  color: var(--gold-text);
  font-weight: 700;
  flex: none;
  line-height: 1.6;
}
.callout p { font-size: var(--fs-small); font-weight: 600; }
.callout .caption { margin-top: 6px; }

/* ================= RESOURCE ================= */

.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .res-grid { grid-template-columns: minmax(0, 1fr); } }

.res-card {
  border: 1px solid var(--paper-line);
  border-radius: var(--r-card);
  background: var(--paper-000);
  padding: 20px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.res-card__title { font-size: var(--fs-h4); }
.res-card__body { font-size: var(--fs-caption); color: var(--tx-on-light-muted); }

.quote-line {
  margin: 26px 0 0;
  font-size: clamp(1.25rem, 1.02rem + 1.1vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
  max-width: 30ch;
  color: var(--charcoal);
}
.quote-line .hl { background: linear-gradient(transparent 62%, rgba(226, 195, 132, 0.34) 62%); }

/* ================= USE CASES ================= */

.uc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 20px); }
@media (max-width: 860px) { .uc-grid { grid-template-columns: minmax(0, 1fr); } }

.uc-card {
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card);
  background: var(--ink-700);
  padding: clamp(20px, 2.4vw, 28px);
  display: grid;
  gap: 16px;
  align-content: start;
}
.uc-card__head { display: flex; align-items: center; gap: 12px; }
.uc-card__head h3 { font-size: var(--fs-h4); }
.uc-card__head .badge { margin-left: auto; }
.uc-card__request {
  font-size: var(--fs-small);
  color: var(--tx-on-dark);
  padding: 13px 15px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-ctl);
  background: var(--ink-900);
  line-height: 1.6;
}
.uc-flow { display: grid; gap: 12px; }
.uc-flow__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.uc-flow__k {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
  display: block;
}
.uc-flow__v { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-flow__v span {
  font-size: var(--fs-caption);
  line-height: 1.35;
  padding: 6px 11px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-sm);
  color: var(--tx-on-dark-muted);
  background: rgba(255, 255, 255, 0.022);
  /* nowrap + max-width:100% is a contradiction: the chip could not wrap
     and could not shrink, so a long label overflowed the card instead.
     keep-all alone holds Korean words together and still lets the chip
     wrap when it has to. */
  word-break: keep-all;
  max-width: 100%;
}

/* ================= CONSOLE PREVIEW ================= */

.console-frame {
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-card);
  background: var(--ink-900);
  overflow: hidden;
}
.console-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-line);
  background: rgba(255, 255, 255, 0.028);
}
.console-top__path { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--tx-on-dark-muted); overflow-wrap: anywhere; }
.console-top .badge { margin-left: auto; }

.console-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 380px; }
@media (max-width: 900px) { .console-body { grid-template-columns: minmax(0, 1fr); } }

.console-nav { border-right: 1px solid var(--ink-line); padding: 14px 10px; }
@media (max-width: 900px) {
  .console-nav {
    border-right: 0; border-bottom: 1px solid var(--ink-line);
    display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--ink-line-strong) transparent;
  }
  .console-nav li { scroll-snap-align: start; flex: none; }
  .console-nav::-webkit-scrollbar { height: 6px; }
  .console-nav::-webkit-scrollbar-thumb { background: var(--ink-line-strong); border-radius: 3px; }
}
.console-nav li {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: var(--fs-caption);
  color: var(--tx-on-dark-dim);
  white-space: nowrap;
}
.console-nav li[data-active="true"] { background: var(--gold-wash-strong); color: var(--gold-text); font-weight: 600; }
.console-nav i { width: 8px; height: 8px; border: 1px solid currentColor; border-radius: 2px; flex: none; }

.console-main { padding: clamp(16px, 2vw, 22px); display: grid; gap: 16px; align-content: start; }
.console-req {
  border: 1px solid var(--ink-line);
  border-radius: var(--r-ctl);
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.024);
}
.console-req__label {
  font-family: var(--font-sans);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--tx-on-dark-dim);
  display: block;
  margin-bottom: 7px;
}
.console-req p { font-size: var(--fs-small); font-weight: 600; }

.stage-rail {
  display: flex; gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-line-strong) transparent;
}
.stage-rail::-webkit-scrollbar { height: 6px; }
.stage-rail::-webkit-scrollbar-thumb { background: var(--ink-line-strong); border-radius: 3px; }
.stage-rail__item {
  flex: 1 0 auto;
  scroll-snap-align: start;
  min-width: 108px;
  padding: 10px 12px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-ctl);
  display: grid; gap: 6px;
}
.stage-rail__item[data-state="running"] { border-color: var(--gold-edge-strong); background: var(--gold-wash); }
.stage-rail__item[data-state="verified"] { border-color: rgba(95, 169, 122, 0.38); }
.stage-rail__no { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--tx-on-dark-dim); }
.stage-rail__label { font-size: var(--fs-caption); font-weight: 600; }
.stage-rail__state { font-family: var(--font-mono); font-size: var(--fs-meta); letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx-on-dark-dim); }
.stage-rail__item[data-state="running"] .stage-rail__state { color: var(--gold-text); }

.console-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .console-cols { grid-template-columns: minmax(0, 1fr); } }

.panel-box { border: 1px solid var(--ink-line); border-radius: var(--r-ctl); overflow: hidden; }
.panel-box__head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0;
  text-transform: none;
  color: var(--tx-on-dark-dim);
  background: rgba(255, 255, 255, 0.024);
}
.panel-box__head .badge { margin-left: auto; }
.panel-box__body { padding: 12px 14px; display: grid; gap: 9px; }

.mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: var(--fs-caption);
}
.mini-row__k { color: var(--tx-on-dark); overflow-wrap: anywhere; }
.mini-row__sub { color: var(--tx-on-dark-dim); font-size: var(--fs-meta); display: block; }

.console-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.console-tab {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-pill);
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--tx-on-dark-muted);
}
.console-tab[aria-selected="true"] { border-color: var(--gold-text); color: var(--gold-text); background: var(--gold-wash); }
.console-tabpanel { padding: 16px; border: 1px solid var(--ink-line); border-radius: var(--r-ctl); border-top-left-radius: 0; }
.console-tabpanel__row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  font-size: var(--fs-caption);
  color: var(--tx-on-dark-muted);
  border-bottom: 1px dashed var(--ink-line);
  align-items: center;
}
.console-tabpanel__row:last-child { border-bottom: 0; }
/* drawn dot instead of a text glyph, so no spacer element is needed */
.console-tabpanel__row::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-line-strong);
}
.console-tabpanel__row > span { grid-column: 2; word-break: keep-all; }

/* ================= TRUST ================= */

.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .trust-grid { grid-template-columns: minmax(0, 1fr); } }

.trust-card {
  border: 1px solid var(--paper-line);
  border-radius: var(--r-card);
  background: var(--paper-000);
  padding: 20px;
  display: grid; gap: 8px; align-content: start;
}
.trust-card__title { font-size: var(--fs-h4); }
.trust-card__body { font-size: var(--fs-caption); color: var(--tx-on-light-muted); }

/* ================= EARLY ACCESS ================= */

.ea-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1024px) { .ea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ea-grid { grid-template-columns: minmax(0, 1fr); } }

.ea-card {
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card);
  background: var(--ink-700);
  padding: 20px;
  display: grid; gap: 10px; align-content: start;
}
.ea-card__title { font-size: var(--fs-h4); }
.ea-card__body { font-size: var(--fs-caption); color: var(--tx-on-dark-muted); }
.ea-card__need {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0;
  color: var(--gold-text);
  padding-top: 11px;
  border-top: 1px solid var(--ink-line);
  align-self: end;
}
.ea-foot {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border: 1px solid var(--gold-edge);
  border-radius: var(--r-card);
  background: var(--gold-wash);
}
.ea-foot__note { font-size: var(--fs-small); color: var(--tx-on-dark); }
.ea-foot__note strong { color: var(--gold-text); }

/* ================= STAGES ================= */

.stage-list { display: grid; gap: 1px; background: var(--paper-line); border: 1px solid var(--paper-line); border-radius: var(--r-card); overflow: hidden; }
.stage-list__row {
  background: var(--paper-000);
  padding: 18px 20px;
  display: grid;
  /* auto lets the column fit the badge; a fixed 124px was narrower than the
     badge itself so it spilled over the title beside it. */
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.stage-list__row > span:first-child { justify-self: start; }
@media (max-width: 620px) { .stage-list__row { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.stage-list__title {
  display: block;
  font-size: var(--fs-h4);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.stage-list__body { display: block; font-size: var(--fs-small); color: var(--tx-on-light-muted); }
/* the wrapping cell that holds title + body should stack them */
.stage-list__row > span:last-child { display: block; }

/* ================= THE FA ================= */

.thefa-band {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: center;
}
@media (max-width: 860px) { .thefa-band { grid-template-columns: minmax(0, 1fr); } }
.thefa-lockup {
  border: 1px solid var(--paper-line);
  border-radius: var(--r-card);
  background: var(--paper-000);
  padding: clamp(20px, 2.4vw, 30px);
  display: grid;
  gap: 18px;
  justify-items: start;
}
.thefa-lockup img { height: 42px; width: auto; }
.thefa-tagline {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--tx-on-light-muted);
}

/* ================= FAQ ================= */

.faq-list { border-top: 1px solid var(--ink-line); }
.faq-item { border-bottom: 1px solid var(--ink-line); }
.faq-item h3 { margin: 0; }
.faq-q {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 18px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 20px 2px;
  text-align: left;
  font-size: var(--fs-lead);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--tx-on-dark);
}
.faq-q:hover { color: var(--gold-text); }
.faq-q__icon { position: relative; width: 26px; height: 26px; flex: none; }
.faq-q__icon::before, .faq-q__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: currentColor; transform: translate(-50%, -50%);
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.faq-q__icon::before { width: 13px; height: 1.5px; }
.faq-q__icon::after { width: 1.5px; height: 13px; }
.faq-q[aria-expanded="true"] { color: var(--gold-text); }
.faq-q[aria-expanded="true"] .faq-q__icon::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }

.faq-a { overflow: hidden; }
.faq-a[hidden] { display: none; }
.faq-a__inner {
  padding: 0 46px 26px 2px;
  font-size: var(--fs-small);
  color: var(--tx-on-dark-muted);
  max-width: 76ch;
}
@media (max-width: 620px) { .faq-a__inner { padding-right: 8px; } }

/* ================= FINAL CTA ================= */

.final-cta {
  position: relative;
  background: var(--ink-800);
  overflow: hidden;
  isolation: isolate;
}
.final-cta__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 480px at 50% 114%, rgba(214, 190, 136, 0.14), transparent 66%),
    linear-gradient(180deg, #1B1A18, #242220);
}
.final-cta__inner { text-align: center; display: grid; gap: 24px; justify-items: center; }
.final-cta__h2 { font-size: clamp(1.6rem, 1.15rem + 2.1vw, 3rem); line-height: 1.22; }
.final-cta__h2 .line { display: block; }
.final-cta__h2 .dim { color: var(--tx-on-dark-muted); }
.final-cta__body { font-size: var(--fs-lead); color: var(--tx-on-dark-muted); }
.final-cta__body .line { display: block; }
.final-cta__actions { margin-top: 6px; justify-content: center; }
.final-cta__micro { margin-top: 4px; }

/* ================= AUTH / SHELL PAGES ================= */

.shell-page {
  /* svh, not vh: on mobile Safari and Chrome Android, 100vh is the
     tallest-toolbar height, so a vh-based auth page always overflowed by
     the height of the browser chrome and produced a phantom scroll. */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 80px) 0 max(clamp(32px, 6vw, 80px), env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(760px 400px at 50% 0%, rgba(226, 195, 132, 0.042), transparent 64%),
    var(--ink-800);
}
.auth-card {
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-card-lg);
  background: var(--ink-900);
  padding: clamp(24px, 3vw, 38px);
  box-shadow: var(--shadow-pop);
}
.auth-card--wide { max-width: 680px; }
.auth-card__head { display: grid; gap: 12px; margin-bottom: 26px; }
.auth-card h1 { font-size: clamp(1.45rem, 1.2rem + 1.2vw, 2rem); line-height: 1.22; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: var(--fs-caption); font-weight: 600; color: var(--tx-on-dark-muted); }
.field label .req { color: var(--gold-text); margin-left: 3px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-ctl);
  background: var(--ink-950);
  color: var(--tx-on-dark);
  font: inherit;
  /* 16px exactly. iOS Safari zooms the whole page whenever a focused
     field is under 16px, and the old 14.5px made every form on this site
     jump on tap. */
  font-size: 1rem;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--tx-on-dark-dim) 50%),
                    linear-gradient(135deg, var(--tx-on-dark-dim) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-500); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-edge-strong); }
.field textarea { min-height: 124px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--tx-placeholder); opacity: 1; }
.field input:disabled, .field select:disabled, .field textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.field__hint { font-size: var(--fs-caption); color: var(--tx-on-dark-dim); }
/* validation: only ever shown after the form has been submitted once, so
   a half-typed email is not scolded mid-keystroke */
.field__error { font-size: var(--fs-caption); font-weight: 600; color: #F0A9A0; }
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: #C9736A; background: rgba(201, 115, 106, 0.07); }

.form-status {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-ctl);
  background: rgba(255, 255, 255, 0.025);
  font-size: var(--fs-caption);
  color: var(--tx-on-dark-muted);
  display: grid;
  gap: 6px;
}
.form-status strong { color: var(--gold-text); }
.auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ink-line); display: grid; gap: 10px; }

.link-list { display: grid; gap: 10px; }
.link-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-ctl);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--tx-on-dark);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.link-list a:hover { border-color: var(--gold-text); background: var(--gold-wash); }
.link-list span { font-size: var(--fs-caption); font-weight: 400; color: var(--tx-on-dark-dim); }

/* ================= TWEAKS PANEL ================= */

.tweaks {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 130;
  width: min(320px, calc(100vw - 36px));
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-card);
  background: rgba(12, 12, 12, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-pop);
  color: var(--tx-on-dark);
}
.tweaks[hidden] { display: none; }
.tweaks__head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--ink-line);
  cursor: grab;
}
.tweaks__head strong { font-size: var(--fs-small); }
.tweaks__head button { margin-left: auto; width: 30px; height: 30px; border-radius: 7px; color: var(--tx-on-dark-muted); font-size: 15px; }
.tweaks__head button:hover { background: rgba(255, 255, 255, 0.07); color: var(--tx-on-dark); }
.tweaks__body { padding: 14px 15px 18px; display: grid; gap: 16px; max-height: 60vh; overflow-y: auto; }
.tweak__label { font-size: var(--fs-meta); font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx-on-dark-dim); margin-bottom: 8px; display: block; }
.tweak__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.tweak__opt {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--ink-line-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-meta);
  color: var(--tx-on-dark-muted);
}
.tweak__opt[aria-pressed="true"] { border-color: var(--gold-text); color: var(--gold-text); background: var(--gold-wash-strong); }
.tweak__swatches { display: flex; gap: 8px; }
.tweak__swatch {
  width: 34px; height: 34px; border-radius: 9px; border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.tweak__swatch[aria-pressed="true"] { border-color: var(--gold-text); }

/* ================= TWEAK-DRIVEN VARIANTS =================
   These only apply when the user actually changes something in the
   Tweaks panel. The default look is the final look. */

/* Section rhythm alternate takes */
html[data-tweak-rhythm="technical"] .section--light {
  background: #141414;
  color: var(--tx-on-dark);
  border-top-color: var(--ink-line);
}
html[data-tweak-rhythm="technical"] .section--light .lead,
html[data-tweak-rhythm="technical"] .section--light .body-muted { color: var(--tx-on-dark-muted); }
html[data-tweak-rhythm="technical"] .section--light .caption { color: var(--tx-on-dark-dim); }
html[data-tweak-rhythm="technical"] .section--light .eyebrow { color: var(--gold-text); }
html[data-tweak-rhythm="technical"] .section--light .card,
html[data-tweak-rhythm="technical"] .section--light .trust-card,
html[data-tweak-rhythm="technical"] .section--light .res-card,
html[data-tweak-rhythm="technical"] .section--light .mode-card,
html[data-tweak-rhythm="technical"] .section--white .trust-card,
html[data-tweak-rhythm="technical"] .section--white .card {
  background: var(--ink-700);
  border-color: var(--ink-line);
  box-shadow: none;
}
html[data-tweak-rhythm="technical"] .section--light .mode-card__id,
html[data-tweak-rhythm="technical"] .section--light .stage-list__title,
html[data-tweak-rhythm="technical"] .section--light .trust-card__title,
html[data-tweak-rhythm="technical"] .section--light .res-card__title { color: var(--tx-on-dark); }
html[data-tweak-rhythm="technical"] .section--light .mode-card__body,
html[data-tweak-rhythm="technical"] .section--light .stage-list__body,
html[data-tweak-rhythm="technical"] .section--light .trust-card__body,
html[data-tweak-rhythm="technical"] .section--light .res-card__body { color: var(--tx-on-dark-muted); }
html[data-tweak-rhythm="technical"] .section--light .prob-card p { color: var(--tx-on-dark-muted); }
html[data-tweak-rhythm="technical"] .section--light .prob-card__detail { color: var(--tx-on-dark-dim); border-top-color: var(--ink-line); }
html[data-tweak-rhythm="technical"] .section--light .closing-line { background: var(--ink-700); color: var(--tx-on-dark); }
html[data-tweak-rhythm="technical"] .section--light .quote-line { color: var(--tx-on-dark); }
html[data-tweak-rhythm="technical"] .section--light .mode-card__meta div { color: var(--tx-on-dark-dim); }
html[data-tweak-rhythm="technical"] .section--light .mode-card__meta span { color: var(--tx-on-dark); }
html[data-tweak-rhythm="technical"] .section--light .mode-card__meta { border-top-color: var(--ink-line); }
html[data-tweak-rhythm="technical"] .section--light .note,
html[data-tweak-rhythm="technical"] .section--white .note { color: var(--tx-on-dark-dim); }
html[data-tweak-rhythm="technical"] .section--light .badge,
html[data-tweak-rhythm="technical"] .section--white .badge { border-color: var(--ink-line-strong); color: var(--tx-on-dark-muted); }
html[data-tweak-rhythm="technical"] .section--light .stage-list,
html[data-tweak-rhythm="technical"] .section--white .stage-list { background: var(--ink-line); border-color: var(--ink-line); }
html[data-tweak-rhythm="technical"] .section--light .stage-list__row { background: var(--ink-700); }
html[data-tweak-rhythm="technical"] .section--light .ba-card { background: var(--ink-700); border-color: var(--ink-line); color: var(--tx-on-dark); }
html[data-tweak-rhythm="technical"] .section--light .ba-card__label { color: var(--tx-on-dark-dim); }
html[data-tweak-rhythm="technical"] .section--light .ba-steps li { border-bottom-color: var(--ink-line); }
html[data-tweak-rhythm="technical"] .section--light .ba-steps__mark { border-color: var(--ink-line-strong); color: var(--tx-on-dark-dim); }
html[data-tweak-rhythm="technical"] .section--light .ba-card__note { color: var(--tx-on-dark-muted); }
html[data-tweak-rhythm="technical"] .section--white .limit-list li { border-bottom-color: var(--ink-line); color: var(--tx-on-dark-muted); }
html[data-tweak-rhythm="technical"] .section--white .limit-list { border-top-color: var(--ink-line); }
html[data-tweak-rhythm="technical"] .section--white .legal-note { background: var(--ink-700); border-color: var(--ink-line); }
html[data-tweak-rhythm="technical"] .section--white .legal-note h2 { color: var(--tx-on-dark); }
html[data-tweak-rhythm="technical"] .section--white .legal-note p { color: var(--tx-on-dark-muted); }
html[data-tweak-rhythm="technical"] .thefa-lockup { background: var(--ink-700); border-color: var(--ink-line); }

html[data-tweak-rhythm="light"] .section--dark:not(.hero):not(.final-cta) {
  background: var(--paper-050);
  color: var(--tx-on-light);
  border-top-color: var(--paper-line);
}
html[data-tweak-rhythm="light"] .section--dark:not(.hero):not(.final-cta) .lead,
html[data-tweak-rhythm="light"] .section--dark:not(.hero):not(.final-cta) .body-muted { color: var(--tx-on-light-muted); }
html[data-tweak-rhythm="light"] .section--dark:not(.hero):not(.final-cta) .caption { color: var(--tx-on-light-dim); }
html[data-tweak-rhythm="light"] .section--dark:not(.hero):not(.final-cta) .eyebrow { color: var(--gold-on-light); }
html[data-tweak-rhythm="light"] .pane,
html[data-tweak-rhythm="light"] .demo__stage { background: #FFFFFF; border-color: var(--paper-line-strong); }
html[data-tweak-rhythm="light"] .pane__bar,
html[data-tweak-rhythm="light"] .demo__stage-head { background: var(--paper-100); border-bottom-color: var(--paper-line); }
html[data-tweak-rhythm="light"] .pane__title,
html[data-tweak-rhythm="light"] .demo-step__en { color: var(--tx-on-light-dim); }
html[data-tweak-rhythm="light"] .unit,
html[data-tweak-rhythm="light"] .pipe__row,
html[data-tweak-rhythm="light"] .receipt-mini { background: var(--paper-050); border-color: var(--paper-line); }
html[data-tweak-rhythm="light"] .unit__title,
html[data-tweak-rhythm="light"] .pipe__en,
html[data-tweak-rhythm="light"] .cmd__text { color: var(--tx-on-light); }
html[data-tweak-rhythm="light"] .stage,
html[data-tweak-rhythm="light"] .orch-card,
html[data-tweak-rhythm="light"] .neq-card,
html[data-tweak-rhythm="light"] .uc-card { background: #FFFFFF; border-color: var(--paper-line); }
html[data-tweak-rhythm="light"] .stage__ko,
html[data-tweak-rhythm="light"] .neq-card__en,
html[data-tweak-rhythm="light"] .uc-card__head h3 { color: var(--tx-on-light); }

/* Density */
html[data-tweak-density="compact"] { --section-y: clamp(56px, 6.4vw, 100px); --gutter: clamp(18px, 4vw, 30px); }
html[data-tweak-density="compact"] .card,
html[data-tweak-density="compact"] .stage,
html[data-tweak-density="compact"] .uc-card,
html[data-tweak-density="compact"] .mode-card { padding: 18px; }
html[data-tweak-density="compact"] .grid { gap: 12px; }

/* Gold emphasis */
html[data-tweak-gold="strong"] .hero__bg {
  background:
    radial-gradient(1200px 560px at 74% 4%, rgba(226, 195, 132, 0.055), transparent 64%),
    radial-gradient(820px 460px at 4% 98%, rgba(226, 195, 132, 0.028), transparent 68%),
    linear-gradient(180deg, #262320 0%, #1E1C1A 58%, #1B1A18 100%);
}
html[data-tweak-gold="strong"] .final-cta__bg {
  background:
    radial-gradient(860px 460px at 50% 112%, rgba(226, 195, 132, 0.09), transparent 66%),
    linear-gradient(180deg, #1D1B19, #2A2622);
}
html[data-tweak-gold="strong"] .eyebrow::before { opacity: 1; }
html[data-tweak-gold="strong"] .flowchip li[data-on="true"] { background: var(--gold-wash-strong); }

/* Motion variants */
html[data-tweak-motion="minimal"] .cmd__caret { animation: none; }
html[data-tweak-motion="medium"] .card--hover:hover { transform: translateY(-5px); }

/* ================= PRINT / MOTION SAFETY ================= */

@media (prefers-reduced-motion: reduce) {
  .unit, .stage, .flow-rail__fill, .demo__progress i { transition: none !important; }
}

/* ================= SECTION ARTWORK =================
   Original vector scenes, not stock photography: they stay sharp on any
   display, carry no licensing risk, weigh ~4KB each, and are built from
   the same stair / node / receipt vocabulary as the logo. Each one is a
   real <img> with a descriptive alt, so it is also a content image for
   search and for screen readers — not a decorative background.
   ================= */

.figure {
  margin: clamp(26px, 3.4vw, 46px) 0 0;
  display: grid;
  gap: 14px;
}
.figure__frame {
  position: relative;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card-lg);
  overflow: hidden;
  background: var(--ink-850);
  line-height: 0;
}
.section--light .figure__frame, .section--white .figure__frame {
  border-color: var(--paper-line);
  background: var(--paper-000);
  box-shadow: var(--shadow-card);
}
.figure__frame img {
  display: block;
  width: 100%;
  height: auto;
}
.figure__cap {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: var(--tx-on-dark-dim);
}
.section--light .figure__cap, .section--white .figure__cap { color: var(--tx-on-light-dim); }
.figure__cap b {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-text);
}
.section--light .figure__cap b, .section--white .figure__cap b { color: var(--gold-on-light); }

/* Side-by-side variant: copy on one side, artwork on the other. */
.figure--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(22px, 3vw, 48px);
  align-items: center;
}
@media (max-width: 900px) {
  .figure--split { grid-template-columns: minmax(0, 1fr); }
}

/* On the narrowest phones a wide 880x520 scene becomes an unreadable
   smudge. Let it scroll horizontally at its own legible size instead of
   shrinking it to nothing. */
@media (max-width: 560px) {
  .figure__frame--scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .figure__frame--scroll img { width: 560px; max-width: none; }
}

/* ================= AUTH SPLIT LAYOUT =================
   login.html / signup.html use a two-pane layout: the form on the left,
   a product scene on the right. The scene is purely supporting, so it is
   the first thing dropped on tablet and below.
   ================= */

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: center;
  width: 100%;
}
.auth-split__aside { display: grid; gap: 20px; align-content: center; }
.auth-split__art {
  border: 1px solid var(--ink-line);
  border-radius: var(--r-card-lg);
  overflow: hidden;
  background: var(--ink-850);
  line-height: 0;
  box-shadow: var(--shadow-lift);
}
.auth-split__art img { display: block; width: 100%; height: auto; }
.auth-split__points { display: grid; gap: 12px; }
.auth-split__points li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: var(--fs-small);
  color: var(--tx-on-dark-muted);
}
.auth-split__points li::before {
  content: "";
  width: 9px; height: 9px; margin-top: 8px;
  border-radius: 2px;
  background: var(--gold-text);
  opacity: 0.8;
}
.auth-split__points b { color: var(--tx-on-dark); font-weight: 600; }

@media (max-width: 980px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
  .auth-split__aside { display: none; }
}

/* ================= MOBILE POLISH ================= */

@media (max-width: 560px) {
  /* The hero pane is the single tallest block on the page. Trim its
     internal padding so the fold still shows the first work units. */
  .pane__body { padding: 14px; }
  .unit { gap: 10px; padding: 10px 12px; }
  .receipt-mini { padding: 12px; gap: 12px; }
  .flowchip { gap: 6px; margin-top: 26px; }

  .closing-line { padding: 16px 18px; }
  .flow-statement { padding: 16px 18px; gap: 10px; }
  .callout { padding: 16px; gap: 12px; }
  .ea-foot { padding: 18px; }
  .hub { padding: 18px; }

  .demo__stage { min-height: 0; }
  .demo__player-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 400px) {
  .pane__title { display: none; }
  .demo__stage-head { gap: 8px; }
}

/* The Tweaks panel is a design-review tool. On a phone it covers the
   content it is meant to review, so it docks to the bottom edge. */
@media (max-width: 560px) {
  .tweaks {
    right: 8px; left: 8px; bottom: 8px;
    width: auto;
  }
  .tweaks__body { max-height: 52vh; }
}
