/* ============================================================
 * Figma page — local stylesheet (fg- prefix)
 * Design vocabulary: editorial · dusk · Figma-purple primary · Auto-Layout-driven
 * Mirrors the Design Systems (ds-) conventions so the Graphics discipline
 * reads as one studio. LIME stays the site-wide primary accent;
 * purple (--fg-purple) flavors the Figma demo surfaces only.
 * ============================================================ */

.fg-page {
  --fg-purple: #A259FF;
  --fg-violet: #C9A6FF;
  --fg-blue: #1ABCFE;
  --fg-green: #0ACF83;
  --fg-paper: #F5EFE6;
  --fg-ink: #0A0A0F;
  --fg-lime: #d4ff3a;
  --fg-paper-soft: rgba(245, 239, 230, 0.04);
  --fg-line: rgba(245, 239, 230, 0.12);
  --fg-line-strong: rgba(245, 239, 230, 0.22);
  --fg-mono: 'JetBrains Mono', ui-monospace, monospace;
  --fg-display: 'Fraunces', 'Bodoni Moda', serif;
  --fg-sans: 'Space Grotesk', system-ui, sans-serif;
  background: var(--fg-ink);
  color: var(--fg-paper);
}

/* ===== shared atoms ===== */
.fg-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--fg-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245, 239, 230, 0.62);
  padding: 8px 12px;
  border: 1px solid var(--fg-line);
  border-radius: 999px;
  background: var(--fg-paper-soft);
}
.fg-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: fgPulse 2.4s ease-in-out infinite;
}
@keyframes fgPulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.45 } }

.fg-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--fg-sans);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  border: 1px solid var(--fg-line-strong);
  border-radius: 999px;
  color: var(--fg-paper);
  background: transparent;
  text-decoration: none;
  transition: background-color 0.35s cubic-bezier(0.16,1,0.3,1),
              color 0.35s cubic-bezier(0.16,1,0.3,1),
              border-color 0.35s cubic-bezier(0.16,1,0.3,1);
}
.fg-btn:hover {
  background: var(--fg-paper);
  color: var(--fg-ink);
  border-color: var(--fg-paper);
}
/* Primary CTA — LIME per site convention (matches .v2-btn--lime, .ds-btn--lime).
 * Reserve purple for hover-state backgrounds, demo art, and tags.
 * --fg-purple alias kept so existing markup can opt into a "purple" name
 * without ever colouring a primary CTA purple. Both --lime and --purple
 * button modifiers render LIME so a page-level primary CTA is never purple. */
.fg-btn--lime,
.fg-btn--purple {
  background: var(--fg-lime);
  color: var(--fg-ink);
  border-color: var(--fg-lime);
}
.fg-btn--lime:hover,
.fg-btn--purple:hover {
  background: transparent;
  color: var(--fg-lime);
  border-color: var(--fg-lime);
}
.fg-btn .arr { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.fg-btn:hover .arr { transform: translateX(4px); }

.fg-section {
  position: relative;
  padding: 140px 6vw 160px;
  z-index: 2;
}
/* Interactive sections sit above the rich.js ambient layer + any leftover
 * stacking context from earlier sticky sections (fg-pass__pin, fg-process
 * are 400–600vh tall with sticky children that make their own stacking
 * contexts). Belt-and-braces pointer-events on the interactive children. */
.fg-style, .fg-tools, .fg-sys, .fg-ledger, .fg-cta {
  z-index: 5;
  /* isolate so these form their own stacking context, guaranteed above the
   * leftover stacking from the 460vh/600vh sticky pins. */
  isolation: isolate;
}
/* Keep the tall sticky-pin sections strictly below the live interactive
 * sections so a released sticky child can never intercept their clicks. */
.fg-pass, .fg-process { z-index: 1; }
.fg-pass__sticky, .fg-process__sticky { z-index: 1; }
.fg-style__stage,
.fg-style__board,
.fg-style__panel,
.fg-style__tab-row,
.fg-style__tab,
.fg-style__slider-wrap,
.fg-style__slider,
.fg-style__tokens,
.fg-tools__grid,
.fg-tool,
.fg-sys__grid,
.fg-sys__panel {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.fg-section__head {
  max-width: 880px;
  margin: 0 auto 80px;
  text-align: center;
}
.fg-section__title {
  font-family: var(--fg-display);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 24px 0 24px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 1;
}
.fg-section__title em {
  font-style: italic;
  color: var(--fg-lime);
}
.fg-section__lede {
  font-family: var(--fg-sans);
  font-size: 17px;
  line-height: 1.62;
  color: rgba(245, 239, 230, 0.70);
  max-width: 640px;
  margin: 0 auto;
}
.fg-section__lede em {
  font-family: var(--fg-display);
  font-style: italic;
  color: var(--fg-paper);
  font-weight: 500;
}

/* ============================================================
 * 01 — HERO (frame playground)
 * ============================================================ */
.fg-hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 6vw 60px;
  overflow: hidden;
  z-index: 1;
}
.fg-hero__grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    radial-gradient(rgba(245, 239, 230, 0.6) 1px, transparent 1px),
    radial-gradient(rgba(245, 239, 230, 0.6) 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
  background-position: 0 0, 2px 3px;
  mix-blend-mode: overlay;
}
.fg-hero__three {
  position: absolute;
  top: 6%; right: -8%;
  width: 72vw; max-width: 1000px;
  height: 76vh;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}
.fg-hero__inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: calc(100vh - 240px);
}
.fg-hero__left { padding-right: 20px; }
.fg-hero__right { position: relative; }
.fg-hero__title {
  font-family: var(--fg-display);
  font-weight: 400;
  font-size: clamp(48px, 6.4vw, 108px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 28px 0 28px;
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
}
.fg-hero__title em {
  font-style: italic;
  color: var(--fg-lime);
}
.fg-hero__lede {
  font-family: var(--fg-sans);
  font-size: 18px;
  line-height: 1.62;
  color: rgba(245, 239, 230, 0.72);
  max-width: 540px;
}
.fg-hero__cta-row {
  margin-top: 32px;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.fg-hero__caption {
  margin-top: 38px;
  font-family: var(--fg-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.45);
  display: flex; gap: 14px; align-items: baseline;
}
.fg-hero__caption .n {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 16px;
  color: var(--fg-lime);
}

/* playground chrome */
.fg-hero__play {
  position: relative;
  width: 100%;
  min-height: min(620px, 70vh);
  background:
    linear-gradient(180deg, #14110b 0%, #0e0c08 100%);
  border-radius: 14px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(245, 239, 230, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fg-play__chrome {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--fg-line);
  background: rgba(245, 239, 230, 0.03);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.fg-play__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--fg-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245, 239, 230, 0.7);
}
.fg-play__pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: fgPulse 1.6s ease-in-out infinite;
}
.fg-play__counter {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 13px;
  color: rgba(245, 239, 230, 0.55);
}
.fg-play__counter span { font-weight: 600; color: var(--fg-purple); margin-right: 4px; }

/* frame selector row — sits between chrome and the stage */
.fg-play__frames {
  flex: 0 0 auto;
  display: flex; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--fg-line);
  background: rgba(245, 239, 230, 0.02);
  z-index: 3;
}
.fg-play__frame-btn {
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 14px;
  border: 1px solid var(--fg-line);
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 239, 230, 0.6);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.fg-play__frame-btn:hover { color: var(--fg-paper); }
.fg-play__frame-btn.is-on {
  border-color: var(--fg-purple);
  color: var(--fg-purple);
  background: color-mix(in srgb, var(--fg-purple) 12%, transparent);
}

.fg-play__stageWrap {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: 30px 26px;
  min-height: 0;
  z-index: 1;
}

/* The sample component — every surface painted by a CSS custom property
 * set on #fg-sample by the playground JS. */
.fg-play__sample {
  --c-accent: #A259FF;
  --c-surface: #16130E;
  --c-text: #F5EFE6;
  --c-muted: rgba(245, 239, 230, 0.6);
  --r-md: 14px;
  --sp: 16px;
  --fs-h: 22px;
  --fs-body: 14px;
  width: 100%;
  max-width: 340px;
}
.fg-card {
  background: var(--c-surface);
  border: 1px solid rgba(245, 239, 230, 0.1);
  border-radius: var(--r-md);
  padding: calc(var(--sp) * 1.25);
  display: flex; flex-direction: column;
  gap: var(--sp);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
  transition: border-radius 0.18s ease, padding 0.18s ease;
}
.fg-card__top {
  display: flex; align-items: center; justify-content: space-between;
}
.fg-card__badge {
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 10px;
  border-radius: calc(var(--r-md) * 0.6);
  background: color-mix(in srgb, var(--c-accent) 18%, transparent);
  color: var(--c-accent);
}
.fg-card__dots { display: flex; gap: 5px; }
.fg-card__dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(245, 239, 230, 0.22);
  display: inline-block;
}
.fg-card__title {
  font-family: var(--fg-sans);
  font-weight: 600;
  font-size: var(--fs-h);
  line-height: 1.15;
  color: var(--c-text);
  margin: 0;
}
.fg-card__text {
  font-family: var(--fg-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--c-muted);
  margin: 0;
}
.fg-card__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp);
}
.fg-card__btn {
  font-family: var(--fg-sans);
  font-size: var(--fs-body);
  font-weight: 600;
  padding: calc(var(--sp) * 0.6) calc(var(--sp) * 1.1);
  border: 0;
  border-radius: calc(var(--r-md) * 0.7);
  background: var(--c-accent);
  color: #0A0A0F;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.fg-card__btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.fg-card__meta {
  font-family: var(--fg-mono);
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--c-muted);
}

.fg-play__hud {
  flex: 0 0 auto;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  border-top: 1px solid var(--fg-line);
  background: rgba(245, 239, 230, 0.03);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.fg-play__ctrl {
  display: flex; flex-direction: column; gap: 8px;
}
/* Swatch + layout controls span the full HUD width below the two sliders. */
.fg-play__ctrl--swatches,
.fg-play__ctrl--scale { grid-column: span 2; }
.fg-play__ctrl label {
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(245, 239, 230, 0.5);
}
.fg-play__ctrl input[type="range"] {
  appearance: none;
  width: 100%; height: 4px;
  background: var(--fg-line);
  border-radius: 2px;
  outline: none;
  cursor: ew-resize;
}
.fg-play__ctrl input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  box-shadow: 0 4px 10px rgba(212, 255, 58, 0.5);
}
.fg-play__ctrl input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--lime);
  border: 0;
  cursor: ew-resize;
  box-shadow: 0 4px 10px rgba(212, 255, 58, 0.5);
}
.fg-play__swatches { display: flex; gap: 8px; }
.fg-play__swatches button {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(245, 239, 230, 0.2);
  background: var(--sw);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fg-play__swatches button:hover { transform: scale(1.12); }
.fg-play__swatches button.is-on {
  box-shadow: 0 0 0 2px var(--fg-ink), 0 0 0 4px var(--sw);
  transform: scale(1.1);
}
.fg-play__layout { display: flex; gap: 6px; }
.fg-play__layout button {
  flex: 1;
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 6px;
  border: 1px solid var(--fg-line);
  border-radius: 6px;
  background: transparent;
  color: rgba(245, 239, 230, 0.6);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.fg-play__layout button:hover { color: var(--fg-paper); }
.fg-play__layout button.is-on {
  border-color: var(--fg-purple);
  color: var(--fg-purple);
  background: color-mix(in srgb, var(--fg-purple) 10%, transparent);
}

/* hero metrics row */
.fg-hero__metrics {
  position: relative; z-index: 2;
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--fg-line);
}
.fg-hero__metric {
  padding: 22px 24px;
  border-right: 1px solid var(--fg-line);
  display: flex; flex-direction: column; gap: 8px;
}
.fg-hero__metric:last-child { border-right: 0; }
.fg-hero__metric .k {
  font-family: var(--fg-mono);
  font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.5);
}
.fg-hero__metric .v {
  font-family: var(--fg-display);
  font-size: 38px; font-weight: 500;
  color: var(--fg-paper);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.fg-hero__metric .v em {
  font-style: italic;
  color: var(--fg-lime);
}

/* ============================================================
 * 02 — LEDGER
 * ============================================================ */
.fg-ledger__table {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--fg-line-strong);
}
.fg-ledger__row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 2.4fr 1fr;
  gap: 30px;
  padding: 26px 18px;
  border-bottom: 1px solid var(--fg-line);
  transition: background 0.3s ease, padding 0.3s ease;
  align-items: baseline;
}
.fg-ledger__row:hover {
  background: rgba(245, 239, 230, 0.03);
  padding-left: 28px;
}
.fg-ledger__name {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 28px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
  color: var(--fg-paper);
}
.fg-ledger__type {
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.55);
}
.fg-ledger__beat {
  font-family: var(--fg-sans);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(245, 239, 230, 0.72);
}
.fg-ledger__metric {
  text-align: right;
  display: flex; flex-direction: column; gap: 4px;
}
.fg-ledger__metric em {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 32px;
  font-weight: 500;
  color: var(--fg-lime);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.fg-ledger__metric span {
  font-family: var(--fg-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.45);
}

/* ============================================================
 * 03 — FOUR PASSES (sticky scroll: wireframe → component → prototype → dev mode)
 * ============================================================ */
.fg-pass__intro { max-width: 880px; margin: 0 auto 60px; text-align: center; }
.fg-pass__pin {
  position: relative;
  height: 460vh;
}
.fg-pass__stage {
  position: relative;
  width: 100%;
  height: 100%;
}
.fg-pass__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.fg-pass__rail {
  position: absolute;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px;
  background: rgba(245, 239, 230, 0.05);
  border: 1px solid var(--fg-line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  z-index: 5;
}
.fg-pass__counter {
  font-family: var(--fg-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  display: flex; gap: 6px;
}
.fg-pass__counter span:first-child { color: var(--fg-lime); font-weight: 600; }
.fg-pass__counter .sep { color: rgba(245, 239, 230, 0.3); }
.fg-pass__progress {
  width: 240px;
  height: 2px;
  background: rgba(245, 239, 230, 0.12);
  border-radius: 1px;
  overflow: hidden;
}
.fg-pass__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--fg-lime);
  transition: width 0.3s ease;
}
.fg-pass__label {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 13px;
  color: rgba(245, 239, 230, 0.78);
  min-width: 180px;
}
.fg-pass__art {
  position: relative;
  width: min(640px, 84vw);
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
}
.fg-pass__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 600 / 460;
  border-radius: 12px;
  overflow: hidden;
  background: #0e0c08;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(245, 239, 230, 0.06);
}
/* Each pass layer fades in cumulatively; the wireframe layer recedes as the
 * dev-mode pass arrives so the frame reads finished, not raw. JS sets data-pass. */
.fg-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fg-pass__frame[data-pass="0"] .fg-layer--wireframe { opacity: 1; }
.fg-pass__frame[data-pass="1"] .fg-layer--wireframe,
.fg-pass__frame[data-pass="1"] .fg-layer--component { opacity: 1; }
.fg-pass__frame[data-pass="1"] .fg-layer--wireframe { opacity: 0.55; }
.fg-pass__frame[data-pass="2"] .fg-layer--wireframe,
.fg-pass__frame[data-pass="2"] .fg-layer--component,
.fg-pass__frame[data-pass="2"] .fg-layer--prototype { opacity: 1; }
.fg-pass__frame[data-pass="2"] .fg-layer--wireframe { opacity: 0.28; }
.fg-pass__frame[data-pass="2"] .fg-layer--component { opacity: 0.45; }
.fg-pass__frame[data-pass="3"] .fg-layer--component,
.fg-pass__frame[data-pass="3"] .fg-layer--prototype,
.fg-pass__frame[data-pass="3"] .fg-layer--devmode { opacity: 1; }
.fg-pass__frame[data-pass="3"] .fg-layer--wireframe { opacity: 0; }
.fg-pass__frame[data-pass="3"] .fg-layer--component { opacity: 0; }
.fg-pass__frame[data-pass="3"] .fg-layer--prototype { opacity: 0.18; }

/* pass 01 — low-fi wireframe: gray boxes/lines, labeled placeholders */
.fg-wf {
  width: min(420px, 92%);
  display: flex; flex-direction: column; gap: 14px;
}
.fg-wf__box {
  border: 1.5px dashed rgba(245, 239, 230, 0.3);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(245, 239, 230, 0.03);
}
.fg-wf__box span {
  font-family: var(--fg-mono);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(245, 239, 230, 0.4);
}
.fg-wf__box--hero { height: 96px; }
.fg-wf__box--cta { height: 44px; width: 140px; align-self: flex-start; }
.fg-wf__rows { display: flex; flex-direction: column; gap: 8px; }
.fg-wf__box--list { height: 34px; }

/* pass 02 — one hi-fi component styled by real values, flat, no interaction */
.fg-art-card {
  width: min(300px, 80%);
  background: #16130E;
  border: 1px solid rgba(245, 239, 230, 0.1);
  border-radius: 14px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
}
.fg-art-card__badge {
  align-self: flex-start;
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--fg-purple) 18%, transparent);
  color: var(--fg-purple);
}
.fg-art-card__title {
  font-family: var(--fg-sans);
  font-weight: 600; font-size: 22px; line-height: 1.15;
  color: var(--fg-paper);
  margin: 0;
}
.fg-art-card__text {
  font-family: var(--fg-sans);
  font-size: 14px; line-height: 1.55;
  color: rgba(245, 239, 230, 0.6);
  margin: 0;
}
.fg-art-card__btn {
  align-self: flex-start;
  font-family: var(--fg-sans);
  font-size: 14px; font-weight: 600;
  padding: 9px 18px;
  border: 0; border-radius: 10px;
  background: var(--fg-purple);
  color: #0A0A0F;
  cursor: pointer;
}

/* pass 03 — prototype: hotspot arrow/connector to a second small frame, cursor, Smart Animate badge */
.fg-art-proto {
  display: flex; align-items: center; gap: 8px;
  width: min(460px, 96%);
}
.fg-art-proto__frame {
  position: relative;
  flex: 0 0 auto;
  width: 168px; height: 200px;
  background: #16130E;
  border: 2px solid var(--fg-blue);
  border-radius: 12px;
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
}
.fg-art-proto__badge {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--fg-mono);
  font-size: 8px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--fg-blue) 22%, transparent);
  color: var(--fg-blue);
}
.fg-art-proto__hotspot {
  position: absolute; bottom: 18px; left: 50%;
  transform: translateX(-50%);
  width: 76px; height: 30px;
  border: 1.5px solid var(--fg-purple);
  border-radius: 8px;
  background: color-mix(in srgb, var(--fg-purple) 14%, transparent);
}
.fg-art-proto__cursor {
  position: absolute; bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fg-lime);
  box-shadow: 0 0 10px var(--fg-lime);
  animation: fgCursorTap 1.8s ease-in-out infinite;
}
@keyframes fgCursorTap { 0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; } 50% { transform: translateX(-50%) scale(1.6); opacity: 0.5; } }
.fg-art-proto__connector { flex: 0 0 auto; width: 60px; }
.fg-art-proto__connector svg {
  width: 100%; height: 24px;
  fill: none;
  stroke: rgba(245, 239, 230, 0.4);
  stroke-width: 1.6;
}
.fg-art-proto__detail {
  flex: 0 0 auto;
  width: 110px; height: 130px;
  background: #16130E;
  border: 1px solid rgba(245, 239, 230, 0.12);
  border-radius: 10px;
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.fg-art-proto__detail-label {
  font-family: var(--fg-mono);
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(245, 239, 230, 0.5);
}
.fg-art-proto__detail-line {
  height: 7px; border-radius: 4px;
  background: rgba(245, 239, 230, 0.14);
  width: 80%;
}
.fg-art-proto__detail-line--med { width: 55%; }

/* pass 04 — Dev Mode inspect panel: CSS snippet + Code Connect tag */
.fg-art-dev {
  width: min(420px, 96%);
  background: #16130E;
  border: 1px solid rgba(245, 239, 230, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
}
.fg-art-dev__header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(245, 239, 230, 0.08);
  font-family: var(--fg-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(245, 239, 230, 0.6);
}
.fg-art-dev__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fg-green);
  box-shadow: 0 0 8px var(--fg-green);
}
.fg-art-dev__code {
  margin: 0;
  padding: 16px;
  font-family: var(--fg-mono);
  font-size: 12px;
  line-height: 1.7;
  color: rgba(245, 239, 230, 0.85);
  text-align: left;
  white-space: pre;
}
.fg-art-dev__code .dk { color: var(--fg-blue); }
.fg-art-dev__code .dv { color: var(--fg-green); }
.fg-art-dev__tag {
  display: block;
  margin: 0 16px 16px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.1em;
  background: color-mix(in srgb, var(--fg-purple) 16%, transparent);
  color: var(--fg-purple);
  width: fit-content;
}

.fg-pass__caption {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 16px;
  color: rgba(245, 239, 230, 0.66);
  text-align: center;
  max-width: 520px;
  min-height: 24px;
  transition: opacity 0.4s ease;
}

/* ============================================================
 * 04 — PROCESS (sticky pinned scenes)
 * ============================================================ */
.fg-process {
  position: relative;
  padding: 0;
  background: linear-gradient(180deg, transparent, rgba(245, 239, 230, 0.02), transparent);
}
.fg-process__inner {
  position: relative;
  height: 600vh;
}
.fg-process__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.fg-process__num {
  position: absolute;
  top: 8vh; right: 6vw;
  font-family: var(--fg-display);
  font-style: italic;
  font-size: clamp(120px, 18vw, 280px);
  line-height: 1;
  color: rgba(245, 239, 230, 0.05);
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
  pointer-events: none;
}
.fg-process__scene {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  padding: 0 6vw;
}
.fg-process__scene.is-active {
  opacity: 1;
  transform: translateY(0);
}
.fg-process__scene-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}
.fg-process__copy h3 {
  font-family: var(--fg-display);
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 24px 0 20px;
  font-variation-settings: 'opsz' 144, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.fg-process__copy h3 em {
  font-style: italic;
  color: var(--fg-lime);
}
.fg-process__copy p {
  font-family: var(--fg-sans);
  font-size: 17px;
  line-height: 1.62;
  color: rgba(245, 239, 230, 0.72);
  max-width: 480px;
}
.fg-process__step {
  margin-top: 24px;
  font-family: var(--fg-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}
.fg-process__visual {
  position: relative;
  height: 56vh;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(245, 239, 230, 0.03);
  border: 1px solid var(--fg-line);
}

.fg-process__rail {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: rgba(245, 239, 230, 0.12);
  border-radius: 1px;
  overflow: hidden;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.fg-process__rail.is-on { opacity: 1; }
.fg-process__rail-fill {
  height: 100%;
  width: 0%;
  background: var(--fg-lime);
  transition: width 0.2s linear;
}

/* process visual variants */
.fg-pv {
  position: absolute; inset: 0;
  padding: 28px;
  display: flex; flex-direction: column;
  gap: 12px;
  overflow: auto;
}
.fg-pv--audit { gap: 16px; }
.fg-pv__note {
  padding: 18px 22px;
  background: rgba(245, 239, 230, 0.04);
  border-left: 2px solid var(--fg-purple);
  border-radius: 0 6px 6px 0;
}
.fg-pv__note em {
  display: block;
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: var(--fg-paper);
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.fg-pv__note span {
  display: block;
  margin-top: 6px;
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.5);
}
.fg-pv__tags {
  margin-top: auto;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.fg-pv__tags span {
  padding: 6px 12px;
  border: 1px solid var(--fg-line);
  border-radius: 999px;
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.6);
}

.fg-pv--tokens { padding: 18px; }
/* variant grid — size × state tiles, filled by JS, container #fg-variant-grid */
.fg-pv__variant-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  height: 100%;
  align-content: start;
}
.fg-pv__variant-tile {
  background: rgba(245, 239, 230, 0.03);
  border: 1px solid var(--fg-line);
  border-radius: 6px;
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.fg-pv__variant-tile.is-pick {
  background: color-mix(in srgb, var(--fg-purple) 12%, transparent);
  border-color: var(--fg-purple);
  box-shadow: 0 0 0 1px var(--fg-purple);
}
.fg-pv__variant-tile .sw {
  width: 100%; height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(245, 239, 230, 0.12);
}
.fg-pv__variant-tile .tn {
  font-family: var(--fg-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(245, 239, 230, 0.7);
  word-break: break-all;
}
.fg-pv__variant-tile.is-pick .tn { color: var(--fg-purple); }

.fg-pv--line, .fg-pv--color { padding: 22px 26px; }
.fg-pv__sys-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--fg-line);
  align-items: center;
}
.fg-pv__sys-row:last-child { border-bottom: 0; }
.fg-pv__sys-row .k {
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.5);
}
.fg-pv__sys-row .v {
  font-family: var(--fg-sans);
  font-size: 14px;
  color: rgba(245, 239, 230, 0.9);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.fg-pv__sys-row .v i {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(245, 239, 230, 0.18);
}

.fg-pv--render {
  flex-direction: row; flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 8px;
  padding: 28px;
}
.fg-pv__chip {
  padding: 8px 14px;
  border: 1px solid var(--fg-line);
  border-radius: 999px;
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.7);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.fg-pv__chip:hover {
  background: var(--fg-purple);
  color: #0A0A0F;
  border-color: var(--fg-purple);
}

/* checklist — Dev Mode handoff scene */
.fg-pv--deliver-check {
  padding: 28px 30px;
  justify-content: center;
  gap: 14px;
}
.fg-pv__check {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--fg-sans);
  font-size: 14px;
  color: rgba(245, 239, 230, 0.62);
  padding: 4px 0;
}
.fg-pv__check .ck {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--fg-line-strong);
  position: relative;
}
.fg-pv__check.is-done {
  color: var(--fg-paper);
}
.fg-pv__check.is-done .ck {
  background: var(--fg-green);
  border-color: var(--fg-green);
}
.fg-pv__check.is-done .ck::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 9px;
  border-right: 2px solid #0A0A0F;
  border-bottom: 2px solid #0A0A0F;
  transform: rotate(40deg);
}

.fg-pv--deliver { padding: 22px 26px; gap: 0; }
.fg-pv__defense {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--fg-line);
  align-items: baseline;
}
.fg-pv__defense:last-child { border-bottom: 0; }
.fg-pv__defense .k {
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-lime);
}
.fg-pv__defense .v {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 17px;
  color: rgba(245, 239, 230, 0.92);
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}

/* ============================================================
 * 05 — STYLE (live width-driven Auto Layout reflow)
 * ============================================================ */
.fg-style__stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
.fg-style__board {
  position: relative;
  width: min(460px, 92%);
  margin: 0 auto;
  background: #14110b;
  border: 1px solid var(--fg-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(245, 239, 230, 0.05);
}
.fg-style__board-bar,
.fg-style__board-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  font-family: var(--fg-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.6);
}
.fg-style__board-bar { border-bottom: 1px solid var(--fg-line); }
.fg-style__board-foot { border-top: 1px solid var(--fg-line); }
.fg-style__board-dims, .fg-style__board-mood { color: rgba(245, 239, 230, 0.4); }
.fg-style__canvas {
  position: relative;
  display: grid;
  place-items: center;
  padding: 30px 24px;
  overflow: hidden;
}

/* The width-driven sample — CSS vars on #fg-style-sample flip flex-direction/wrap at the breakpoint. */
.fg-style__sample {
  --t-radius: 16px;
  --t-accent: #A259FF;
  --t-surface: #1b1610;
  --t-text: #F5EFE6;
  --t-muted: rgba(245, 239, 230, 0.62);
  --t-gap: 16px;
  --t-pad: 22px;
  --t-fs-h: 22px;
  --t-elev: 0 18px 44px -22px rgba(0, 0, 0, 0.6);
  --t-border: rgba(245, 239, 230, 0.1);
  --t-direction: column;
  --t-wrap: wrap;
  width: 100%;
  max-width: 100%;
  transition: max-width 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.fg-scard {
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  padding: var(--t-pad);
  display: flex; flex-direction: column;
  gap: var(--t-gap);
  box-shadow: var(--t-elev);
  transition: box-shadow 0.18s ease;
}
.fg-scard__top {
  display: flex; align-items: center; justify-content: space-between;
}
.fg-scard__badge {
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 10px;
  border-radius: calc(var(--t-radius) * 0.5);
  background: color-mix(in srgb, var(--t-accent) 18%, transparent);
  color: var(--t-accent);
}
.fg-scard__meta {
  font-family: var(--fg-mono);
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--t-muted);
}
.fg-scard__title {
  font-family: var(--fg-sans);
  font-weight: 600;
  font-size: var(--t-fs-h);
  line-height: 1.15;
  color: var(--t-text);
  margin: 0;
}
.fg-scard__text {
  font-family: var(--fg-sans);
  font-size: 14px; line-height: 1.55;
  color: var(--t-muted);
  margin: 0;
}
.fg-scard__stats {
  display: grid;
  grid-template-columns: var(--t-stats-cols, 1fr 1fr);
  gap: var(--t-gap);
}
.fg-scard__stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: calc(var(--t-gap) * 0.6);
  border-radius: calc(var(--t-radius) * 0.6);
  background: rgba(245, 239, 230, 0.04);
}
.fg-scard__stat .k {
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--t-muted);
}
.fg-scard__stat .v {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 22px;
  color: var(--t-text);
}
.fg-scard__row {
  display: flex;
  flex-direction: var(--t-direction);
  flex-wrap: var(--t-wrap);
  gap: 10px;
}
.fg-scard__btn {
  font-family: var(--fg-sans);
  font-size: 13px; font-weight: 600;
  padding: 10px 16px;
  border: 0;
  border-radius: calc(var(--t-radius) * 0.55);
  background: var(--t-accent);
  color: #0A0A0F;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.fg-scard__btn:hover { filter: brightness(1.08); }
.fg-scard__btn--ghost {
  background: transparent;
  color: var(--t-text);
  border: 1px solid var(--t-border);
}

.fg-style__panel {
  display: flex; flex-direction: column;
  gap: 22px;
  padding: 28px;
  background: rgba(245, 239, 230, 0.03);
  border: 1px solid var(--fg-line);
  border-radius: 12px;
}
.fg-style__tab-row { display: flex; gap: 14px; }
.fg-style__tab {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--fg-line);
  border-radius: 8px;
  cursor: pointer;
  /* Specific transitions only — `transition: all` on a clickable card can
   * drop mid-click activation when the page bg-tone is also transitioning. */
  transition: border-color 0.3s ease, background-color 0.3s ease;
  position: relative;
  z-index: 1;
}
.fg-style__tab.is-on {
  border-color: var(--lime);
  background: rgba(212, 255, 58, 0.05);
}
.fg-style__tab-name {
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.7);
  margin-bottom: 4px;
}
.fg-style__tab-name em {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-paper);
  margin-left: 4px;
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.fg-style__tab-line {
  font-family: var(--fg-sans);
  font-size: 12px;
  color: rgba(245, 239, 230, 0.55);
}
.fg-style__slider-wrap { display: flex; flex-direction: column; gap: 8px; }
.fg-style__slider {
  appearance: none;
  width: 100%; height: 4px;
  background: var(--fg-line);
  border-radius: 2px;
  outline: none;
  cursor: ew-resize;
}
.fg-style__slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  box-shadow: 0 4px 12px rgba(212, 255, 58, 0.5);
}
.fg-style__slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  border: 0;
  box-shadow: 0 4px 12px rgba(212, 255, 58, 0.5);
}
.fg-style__slider-rail {
  display: flex; justify-content: space-between;
  font-family: var(--fg-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.55);
}
.fg-style__tokens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--fg-line);
  border-left: 1px solid var(--fg-line);
}
.fg-style__token {
  padding: 12px 14px;
  border-right: 1px solid var(--fg-line);
  border-bottom: 1px solid var(--fg-line);
  display: flex; flex-direction: column; gap: 4px;
}
.fg-style__token .k {
  font-family: var(--fg-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.5);
}
.fg-style__token .v {
  font-family: var(--fg-sans);
  font-size: 13px;
  color: var(--fg-paper);
}

/* ============================================================
 * 06 — SYSTEM
 * ============================================================ */
.fg-sys__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.fg-sys__panel {
  padding: 28px;
  background: rgba(245, 239, 230, 0.03);
  border: 1px solid var(--fg-line);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.fg-sys__panel-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.55);
  margin-bottom: 22px;
}
.fg-sys__panel-head .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

/* component variants panel — size × state grid of buttons */
.fg-sys__variant-cells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fg-sys__cell {
  font-family: var(--fg-mono);
  font-size: 11px; letter-spacing: 0.06em;
  padding: 14px 10px;
  border: 1px solid var(--fg-line);
  border-radius: 8px;
  background: rgba(245, 239, 230, 0.02);
  color: rgba(245, 239, 230, 0.65);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.fg-sys__cell:hover { color: var(--fg-paper); border-color: var(--fg-line-strong); }
.fg-sys__cell.is-on {
  border-color: var(--fg-purple);
  color: var(--fg-purple);
  background: color-mix(in srgb, var(--fg-purple) 12%, transparent);
}

/* variables panel */
.fg-sys__tok-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 80px;
  gap: 16px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--fg-line);
}
.fg-sys__tok-row:last-child { border-bottom: 0; }
.fg-sys__tok-row .tk {
  font-family: var(--fg-mono);
  font-size: 12px;
  color: var(--fg-purple);
}
.fg-sys__tok-row .tv {
  font-family: var(--fg-mono);
  font-size: 12px;
  color: rgba(245, 239, 230, 0.85);
  display: flex; align-items: center; gap: 8px;
}
.fg-sys__tok-row .tv i {
  width: 16px; height: 16px; border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(245, 239, 230, 0.18);
}
.fg-sys__tok-row .tc {
  font-family: var(--fg-mono);
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  text-align: right;
  color: rgba(245, 239, 230, 0.45);
}
.fg-sys__vars-mode {
  margin-top: 6px;
  align-self: flex-start;
  font-family: var(--fg-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--fg-line-strong);
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 239, 230, 0.75);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.fg-sys__vars-mode:hover {
  border-color: var(--fg-purple);
  color: var(--fg-purple);
}
.fg-sys__vars-preview {
  margin-top: 14px;
  display: flex; gap: 8px;
}
.fg-sys__vars-preview span {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(245, 239, 230, 0.18);
  transition: background-color 0.3s ease;
}

/* governance rules panel */
.fg-sys__rule {
  padding: 14px 0;
  border-bottom: 1px solid var(--fg-line);
  font-family: var(--fg-sans);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(245, 239, 230, 0.78);
}
.fg-sys__rule:last-child { border-bottom: 0; }
.fg-sys__rule em {
  font-family: var(--fg-display);
  font-style: italic;
  color: var(--fg-paper);
  font-size: 15px;
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.fg-sys__rule .ok, .fg-sys__rule .no {
  display: inline-block;
  padding: 3px 9px;
  margin-right: 10px;
  font-family: var(--fg-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
}
.fg-sys__rule .ok { background: var(--fg-green); color: var(--fg-ink); }
.fg-sys__rule .no { background: color-mix(in srgb, var(--fg-purple) 15%, transparent); color: var(--fg-purple); border: 1px solid var(--fg-purple); }

/* plugin jar panel */
.fg-sys__jar { padding: 0; }
.fg-sys__jar .fg-sys__panel-head {
  position: absolute; top: 18px; left: 22px;
  margin: 0;
  z-index: 2;
  /* The head + readout float over the canvas where chips pile up. Let pointer
   * events pass through so every chip stays draggable, not just the ones in
   * the clear middle band. */
  pointer-events: none;
}
.fg-sys__jar-readout { pointer-events: none; }
#fg-sys-jar {
  width: 100%;
  aspect-ratio: 1.4 / 1;
  display: block;
  background: rgba(245, 239, 230, 0.02);
}
.fg-sys__jar-readout {
  position: absolute; bottom: 14px; left: 22px; right: 22px;
  padding: 10px 14px;
  background: rgba(10, 10, 15, 0.65);
  border: 1px solid var(--fg-line);
  border-radius: 6px;
  font-family: var(--fg-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: rgba(245, 239, 230, 0.85);
  backdrop-filter: blur(8px);
}

/* ============================================================
 * 07 — TOOLS
 * ============================================================ */
.fg-tools__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--fg-line);
  border: 1px solid var(--fg-line);
  border-radius: 12px;
  overflow: hidden;
}
.fg-tool {
  background: var(--fg-ink);
  padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  /* Specific transitions only — `transition: all` collides with rich.js's
   * stagger-list animation-fill-mode: forwards. */
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 110px;
  position: relative;
}
.fg-tool:hover {
  background: var(--fg-purple);
  color: #0A0A0F;
}
.fg-tool .cat {
  font-family: var(--fg-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.45);
  margin-bottom: 6px;
}
.fg-tool:hover .cat { color: rgba(10, 10, 15, 0.7); }
.fg-tool .nm {
  font-family: var(--fg-display);
  font-style: italic;
  font-size: 22px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.fg-tool .glyph svg {
  width: 28px; height: 28px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.4;
  transition: stroke 0.3s ease, transform 0.3s ease;
}
.fg-tool:hover .glyph svg {
  stroke: #0A0A0F;
  transform: rotate(8deg);
}

/* ============================================================
 * 08 — CTA
 * ============================================================ */
.fg-cta {
  position: relative;
  padding: 160px 6vw 200px;
  text-align: center;
  overflow: hidden;
}
.fg-cta canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.fg-cta__inner {
  position: relative; z-index: 1;
  max-width: 880px;
  margin: 0 auto;
}
.fg-cta__title {
  font-family: var(--fg-display);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 24px 0 24px;
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
}
.fg-cta__title em {
  font-style: italic;
  color: var(--fg-lime);
}
.fg-cta__lede {
  font-family: var(--fg-sans);
  font-size: 18px;
  line-height: 1.6;
  color: rgba(245, 239, 230, 0.7);
  max-width: 580px;
  margin: 0 auto 36px;
}

/* ============================================================
 * Tweaks panel + sound toggle — hidden on production-facing pages.
 * ============================================================ */
.fg-page .v2-tweaks,
.fg-page .v2-sound { display: none !important; }

/* ============================================================
 * Responsive
 * ============================================================ */
@media (max-width: 1024px) {
  .fg-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .fg-hero__three { display: none; }
  .fg-hero__metrics { grid-template-columns: repeat(2, 1fr); }
  .fg-hero__metric { border-bottom: 1px solid var(--fg-line); }
  .fg-hero__metric:nth-child(2) { border-right: 0; }
  .fg-process__scene-inner { grid-template-columns: 1fr; gap: 30px; }
  .fg-process__visual { height: 38vh; }
  .fg-style__stage { grid-template-columns: 1fr; gap: 30px; }
  .fg-tools__grid { grid-template-columns: repeat(2, 1fr); }
  .fg-sys__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .fg-section { padding: 80px 5vw 100px; }
  .fg-hero { padding: 100px 5vw 40px; }
  .fg-play__hud { grid-template-columns: 1fr; }
  .fg-ledger__row { grid-template-columns: 1fr; gap: 8px; padding: 18px 12px; }
  .fg-ledger__metric { text-align: left; }
  .fg-pv__variant-grid { grid-template-columns: repeat(3, 1fr); }
  .fg-pass__pin { height: auto; }
  .fg-pass__sticky { position: static; height: auto; padding: 40px 0; }
  .fg-process__inner { height: auto; }
  .fg-process__sticky { position: static; height: auto; padding: 60px 0; }
  .fg-process__scene { position: relative; opacity: 1; transform: none; padding: 30px 5vw; height: auto; }
  .fg-process__visual { height: 40vh; }
  .fg-style__tokens { grid-template-columns: 1fr; }
  .fg-process__rail { display: none; }
  .fg-sys__variant-cells { grid-template-columns: repeat(2, 1fr); }
  .fg-art-proto { flex-direction: column; }
  .fg-art-proto__connector { transform: rotate(90deg); width: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .fg-process__scene { transition: none; }
  .fg-layer { transition: none; }
  .fg-play__pulse, .fg-eyebrow .dot { animation: none; }
  .fg-art-proto__cursor { animation: none; }
}
