:root {
  --bg: #010204;
  --bg2: #05070a;
}

/* The warm palette belongs to the Edit Bay tier (css/edit-bay-pipeline.css on
   the tool page, edit-bay-support.css on the guide), which declares --eb-* on
   body. These are aliases onto that single source of truth — the literals are
   fallbacks only, so a change to the tier flows through instead of drifting. */
body.cf-page {
  --cf-gold: var(--eb-gold, #d7a945);
  --cf-gold-soft: var(--eb-gold-soft, #f2d38a);
  --cf-copper: var(--eb-copper, #ff6b35);
  --cf-text: var(--eb-warm-text, #f6ead6);
  --cf-muted: var(--eb-warm-muted, #b9aa91);
  --cf-panel: rgba(8, 9, 13, .7);
  --cf-field: #08090d;
  --cf-border: rgba(255, 255, 255, .07);
  --cf-border2: var(--eb-gold-line, rgba(255, 255, 255, .14));
  --cf-body: #e3d5be;
  --cf-dim: #8d8371;
  --cf-danger: #e05252;
}

body {
  background: var(--bg);
  color: var(--cf-text);
  font-family: var(--font-body, "Hanken Grotesk", system-ui, sans-serif);
  margin: 0;
  /* No padding here — it squeezes the injected sticky chrome and fails audit check 14. */
}

.cf-wrap {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 4rem;
}

.dvp-orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(18px); }
.dvp-orb-1 { width: 44rem; height: 44rem; top: -22rem; right: -12rem; opacity: .16; background: var(--cf-gold); }
.dvp-orb-2 { width: 32rem; height: 32rem; top: 38%; left: -18rem; opacity: .1; background: var(--cf-copper); }
.dvp-orb-3 { width: 28rem; height: 28rem; bottom: -14rem; right: 12%; opacity: .08; background: var(--cf-gold); }

@media (max-width: 720px) { .dvp-orb { display: none; } }

* { box-sizing: border-box; }
.cf-page a, .cf-page button, .cf-page input, .cf-page textarea, .cf-page select { font-family: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 30;
  transform: translateY(-160%);
  background: var(--cf-gold);
  color: #08090d;
  padding: .7rem 1rem;
  border-radius: .3rem;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .75rem;
  text-decoration: none;
  transition: transform .2s;
}
.skip-link:focus { transform: translateY(0); }

/* Hero */
.cf-hero { padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--cf-border); }
.cf-kicker, .cf-g-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .6rem;
  color: var(--cf-gold);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.cf-kicker::after, .cf-g-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cf-border2);
}
.cf-title {
  margin: 0;
  color: var(--cf-text);
  font-family: var(--font-display, "Archivo", sans-serif);
  font-stretch: expanded;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  letter-spacing: -.03em;
  line-height: .95;
  text-transform: uppercase;
}
/* The wordmark accent comes from the Edit Bay tier (body.eb-pipeline-page
   h1 span), the same copper CinePrompt uses. Do not restate it here. */
.cf-lede { max-width: 46rem; margin: 1.1rem 0 0; color: var(--cf-muted); font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.7; }

/* Record library */
.cf-library {
  margin-top: 2rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: .5rem;
  background: var(--cf-panel);
  padding: clamp(1rem, 2.5vw, 1.4rem);
}
.cf-library-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .9rem; }
.cf-library-title {
  margin: 0;
  font-family: var(--font-display, "Archivo", sans-serif);
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.cf-library-count, .cf-library-empty {
  margin: 0;
  color: var(--cf-dim);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .66rem;
  letter-spacing: .05em;
}
.cf-library-empty { font-family: var(--font-body, "Hanken Grotesk", sans-serif); font-size: .84rem; line-height: 1.6; letter-spacing: 0; }
.cf-library-list { display: grid; gap: .45rem; }
.cf-library-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .6rem .75rem;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: .35rem;
  background: var(--cf-field);
}
.cf-library-row.is-current { border-color: var(--cf-gold); background: rgba(215, 169, 69, .08); }
.cf-library-meta { display: grid; gap: .15rem; min-width: 0; }
.cf-library-name { color: var(--cf-text); font-size: .9rem; font-weight: 600; }
.cf-library-sub {
  color: var(--cf-dim);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .6rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.cf-library-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.cf-library-btn { min-height: 2.1rem; padding: .4rem .7rem; font-size: .6rem; }

/* Undo toast — a delete you can take back, the CastLock pattern. */
.cf-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .9rem;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: .75rem 1rem;
  border: 1px solid rgba(215, 169, 69, .4);
  border-radius: .4rem;
  background: rgba(6, 13, 24, .96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  color: var(--cf-text);
  font-size: .84rem;
}
.cf-toast-action {
  flex: 0 0 auto;
  border: 1px solid var(--cf-gold);
  border-radius: .3rem;
  background: transparent;
  color: var(--cf-gold);
  padding: .35rem .7rem;
  cursor: pointer;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.cf-toast-action:hover { background: var(--cf-gold); color: #08090d; }

/* Confirm modal — the spend gate and the clear-record gate */
.cf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 5, 10, .72);
  backdrop-filter: blur(6px);
}
.cf-modal {
  width: min(30rem, 100%);
  border: 1px solid rgba(215, 169, 69, .35);
  border-radius: .5rem;
  background: var(--cf-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  padding: clamp(1.2rem, 3vw, 1.8rem);
}
.cf-modal-title {
  margin: 0 0 .7rem;
  font-family: var(--font-display, "Archivo", sans-serif);
  font-stretch: expanded;
  font-size: 1.2rem;
  letter-spacing: -.01em;
}
.cf-modal-body { margin: 0; color: var(--cf-text); font-size: .92rem; line-height: 1.6; }
.cf-modal-detail { margin: .6rem 0 0; color: var(--cf-muted); font-size: .82rem; line-height: 1.6; }
.cf-modal-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }

/* Workbench grid */
.cf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.cf-form, .cf-run, .cf-output {
  border: 1px solid var(--cf-border);
  background: var(--cf-panel);
  border-radius: .5rem;
  padding: clamp(1rem, 2.5vw, 1.6rem);
}

.cf-form { display: grid; gap: .9rem; align-content: start; }

.cf-form-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.cf-history { display: flex; gap: .35rem; }
.cf-start-methods,
.cf-new-asset-menu > div,
.cf-advanced > div {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.cf-start-methods { align-items: center; }
.cf-new-asset-menu,
.cf-advanced {
  border: 1px solid var(--cf-border);
  border-radius: .35rem;
  padding: .45rem;
}
.cf-new-asset-menu summary,
.cf-advanced summary { cursor: pointer; color: var(--cf-gold); font: 600 .66rem/1.4 var(--font-mono, "JetBrains Mono", monospace); letter-spacing: .08em; text-transform: uppercase; }
.cf-new-asset-menu summary:focus-visible,
.cf-advanced summary:focus-visible { outline: 2px solid var(--cf-gold); outline-offset: 2px; }
.cf-new-asset-menu[open] summary,
.cf-advanced[open] summary { margin-bottom: .55rem; }
.cf-history-btn { min-height: 2.1rem; padding: .4rem .8rem; font-size: .6rem; }
.cf-save-status {
  margin: 0;
  color: var(--cf-dim);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .6rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.cf-save-status[data-state="saved"] { color: #39d98a; }
.cf-save-status[data-state="error"] { color: var(--cf-danger); }
.cf-run { display: grid; gap: 1.1rem; align-content: start; }

.cf-field { display: grid; gap: .4rem; color: var(--cf-muted); font-family: var(--font-mono, "JetBrains Mono", monospace); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; }
.cf-field small { display: block; margin-top: .2rem; color: var(--cf-dim); font-size: .58rem; letter-spacing: .04em; text-transform: none; }
.cf-field input, .cf-field textarea, .cf-field select {
  width: 100%;
  border: 1px solid var(--cf-border);
  border-radius: .35rem;
  background: var(--cf-field);
  color: var(--cf-text);
  padding: .7rem .8rem;
  font-size: .85rem;
  resize: vertical;
}
.cf-field input:focus, .cf-field textarea:focus, .cf-field select:focus {
  outline: none;
  border-color: var(--cf-gold);
  box-shadow: 0 0 0 3px rgba(215, 169, 69, .07);
}
.cf-field input:hover, .cf-field textarea:hover, .cf-field select:hover { border-color: var(--cf-border2); }
.cf-field-inline { grid-template-columns: 1fr auto; align-items: center; }
.cf-field-inline input { width: 8rem; }

.cf-byok { display: grid; gap: .7rem; padding-bottom: 1rem; border-bottom: 1px solid var(--cf-border); }
.cf-note { margin: 0; color: var(--cf-dim); font-size: .76rem; line-height: 1.6; }

.cf-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  /* Groups size to their own contents — now that the fieldsets have a visible
     border, a stretched-to-row-height empty box reads as a mistake. */
  align-items: start;
  gap: .5rem;
}

/* Panel option groups render as <fieldset>/<legend> (form.js), which without
   styling fall back to the browser's default beveled box. */
.cf-option-group {
  min-width: 0;
  margin: 0;
  padding: .7rem .8rem .8rem;
  border: 1px solid var(--cf-border);
  border-radius: .4rem;
  background: var(--cf-field);
}
.cf-option-group legend {
  padding: 0 .35rem;
  color: var(--cf-gold);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Each checkbox + its own label as one flex row: the label text can still
   wrap onto a second line for long options ("Collar / neckwear"), but the
   checkbox is a fixed flex child of that same row, so it can never end up
   paired with a neighboring option's text. */
.cf-option { display: flex; align-items: flex-start; gap: .4rem; padding: .15rem 0; color: var(--cf-body); font-size: .8rem; line-height: 1.35; cursor: pointer; }
.cf-option input[type="checkbox"] { flex: 0 0 auto; margin-top: .2rem; accent-color: var(--cf-gold); }

/* The flat-object toggle's .cf-option lives inside a .cf-field wrapper (for
   the "Turnaround style" caption) — unlike #cf-panel-options's checkboxes,
   which never have a .cf-field ancestor. Without this, .cf-field input
   (width:100%, padding, dark box) and .cf-field's mono/uppercase text win on
   specificity for everything .cf-option itself doesn't set. */
.cf-prop-only .cf-option { text-transform: none; letter-spacing: normal; font-family: var(--font-body, "Hanken Grotesk", system-ui, sans-serif); }
.cf-prop-only input[type="checkbox"] { width: auto; padding: 0; border: 0; background: none; border-radius: 0; }

.cf-cost { margin: 0; color: var(--cf-muted); font-family: var(--font-mono, "JetBrains Mono", monospace); font-size: .72rem; }

.cf-status { min-height: 1.3rem; margin: 0; color: var(--cf-gold-soft); font-size: .8rem; }
.cf-storage-note {
  margin: 0;
  padding: .6rem .75rem;
  border: 1px solid rgba(224, 82, 82, .32);
  border-left: 3px solid var(--cf-danger);
  border-radius: .3rem;
  background: rgba(224, 82, 82, .07);
  color: var(--cf-body);
  font-size: .78rem;
  line-height: 1.55;
}
.cf-status[data-state="error"] { color: var(--cf-danger); }

.cf-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

.cf-sheet-scale select {
  min-height: 2.7rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: .35rem;
  background: var(--cf-field);
  color: var(--cf-muted);
  padding: 0 .7rem;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .66rem;
}
.cf-sheet-scale select:focus { outline: none; border-color: var(--cf-gold); }

/* premium-core does not define one and the select needs a name a screen
   reader can announce without a visible label crowding the button row. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.cf-btn-primary, .cf-btn-ghost {
  min-height: 2.7rem;
  border-radius: .35rem;
  padding: .7rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform .15s, border-color .15s, background .15s, color .15s;
}
.cf-btn-primary:hover:not(:disabled), .cf-btn-ghost:hover:not(:disabled) { transform: translateY(-1px); }
.cf-btn-primary:disabled, .cf-btn-ghost:disabled { cursor: not-allowed; opacity: .45; transform: none; }

/* Colour comes from .eb-primary / .eb-ghost in premium-core — the house
   buttons. Restating the gradient here is what made the suite read as a dozen
   different sites; these rules carry geometry and type only. */


/* Stop reads as the interrupt it is, not as another way to spend money. */
.cf-btn-stop {
  min-height: 2.7rem;
  border-radius: .35rem;
  padding: .7rem 1.1rem;
  cursor: pointer;
  border: 1px solid var(--cf-danger);
  background: rgba(224, 82, 82, .12);
  color: #ff8fb8;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.cf-btn-stop:hover:not(:disabled) { background: var(--cf-danger); color: #08090d; }
.cf-btn-stop:disabled { cursor: not-allowed; opacity: .45; }

/* .cf-btn-primary / .cf-btn-ghost also do double duty as <a> buttons on the
   guide page — inline-flex keeps min-height/centering working on an anchor,
   which is inline by default, without touching the <button> usage above. */
.cf-btn-primary, .cf-btn-ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* === Shared pipeline band, warmed for this page only ===
   js/character-pipeline-band.js ships the suite's orange. Scoping the override
   to .cf-page keeps CastLock, CinePrompt and Consistency Keeper untouched. */
.cf-page .cpb { --cpb-accent: var(--cf-gold); border-color: var(--cf-border); background: linear-gradient(180deg, rgba(215, 169, 69, .05), rgba(246, 234, 214, .015)); }
.cf-page .cpb-title, .cf-page .cpb-name { color: var(--cf-text); }
.cf-page .cpb-desc { color: var(--cf-muted); }
.cf-page .cpb-loopnote { color: var(--cf-dim); }
.cf-page .cpb-step { border-color: var(--cf-border); }
.cf-page a.cpb-step:hover { border-color: rgba(215, 169, 69, .45); }
.cf-page .cpb-step.is-current { border-color: var(--cf-gold); background: rgba(215, 169, 69, .1); }
.cf-page .cpb-n, .cf-page .cpb-cta:hover { color: #08090d; }

/* === Guide page (guide.html) === */
.cf-guide-nav {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  gap: .3rem;
  overflow-x: auto;
  padding: .8rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--cf-border);
  background: rgba(1, 2, 4, .92);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}
.cf-guide-nav::-webkit-scrollbar { display: none; }
.cf-guide-navlink {
  flex: 0 0 auto;
  padding: .4rem .7rem;
  border-radius: .3rem;
  color: var(--cf-muted);
  text-decoration: none;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .62rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: color .15s, background .15s;
}
.cf-guide-navlink:hover, .cf-guide-navlink:focus-visible { color: var(--cf-text); background: rgba(215, 169, 69, .12); }

.cf-g-section { padding: 3rem 0; border-top: 1px solid var(--cf-border); }
.cf-g-section:first-of-type { padding-top: 1.5rem; border-top: none; }
.cf-g-label { margin-bottom: .5rem; }
.cf-g-title { margin: 0 0 .9rem; font-family: var(--font-display, "Archivo", sans-serif); font-stretch: expanded; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.01em; line-height: 1.15; }
.cf-g-lede { max-width: 48rem; margin: 0; color: var(--cf-muted); font-size: 1rem; line-height: 1.75; }
.cf-g-lede strong { color: var(--cf-text); }

.cf-g-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.cf-g-tablecard { border: 1px solid var(--cf-border); border-radius: .5rem; padding: 1.2rem; background: var(--cf-panel); }
.cf-g-tablecard h3 { margin: 0 0 .2rem; font-family: var(--font-display, "Archivo", sans-serif); font-size: 1.05rem; }
.cf-g-count { margin: 0 0 .9rem; color: var(--cf-gold); font-family: var(--font-mono, "JetBrains Mono", monospace); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.cf-g-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.cf-g-table th, .cf-g-table td { text-align: left; padding: .5rem .3rem; border-bottom: 1px solid var(--cf-border); vertical-align: top; }
.cf-g-table th { color: var(--cf-dim); font-family: var(--font-mono, "JetBrains Mono", monospace); font-size: .58rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }
.cf-g-table td { color: var(--cf-body); line-height: 1.5; }
.cf-g-table tr:last-child td { border-bottom: none; }

.cf-g-callout { margin-top: 1.2rem; padding: 1rem 1.2rem; border: 1px solid rgba(215, 169, 69, .28); border-left: 3px solid var(--cf-gold); border-radius: .4rem; background: rgba(215, 169, 69, .05); font-size: .86rem; line-height: 1.65; color: var(--cf-body); }
.cf-g-callout strong { color: var(--cf-text); }

.cf-g-list { margin: 1.1rem 0 0; padding-left: 1.2rem; color: var(--cf-body); font-size: .92rem; line-height: 1.75; }
.cf-g-list li { margin-bottom: .55rem; }
.cf-g-list strong { color: var(--cf-text); }

.cf-g-cta { margin-top: 1.3rem; display: flex; flex-wrap: wrap; gap: .7rem; }

@media (max-width: 640px) {
  .cf-g-tables { grid-template-columns: 1fr; }
}

/* Panels — read like contact sheets */
.cf-panels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: .6rem;
}
.cf-panels:empty { display: none; }
.cf-panels-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, .14);
  border-radius: .35rem;
  color: var(--cf-muted);
  font-size: .84rem;
  line-height: 1.6;
}

.cf-panel {
  display: grid;
  gap: .4rem;
  align-content: start;
  padding: .5rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: .35rem;
  background: var(--cf-field);
}
.cf-panel img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .25rem; }
.cf-panel-label {
  color: var(--cf-dim);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .58rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cf-panel-note { margin: 0; color: var(--cf-muted); font-size: .72rem; line-height: 1.45; }
.cf-panel-retry { min-height: 2.1rem; padding: .4rem .6rem; font-size: .6rem; }
.cf-panel-approval { min-height: 2.1rem; padding: .4rem .6rem; font-size: .6rem; }

/* Panel states. `queued` is the one that says "your money is lined up but not
   yet spent" — without it a batch showed one working card and no evidence the
   rest were coming. */
.cf-panel.is-queued { border-style: dashed; border-color: rgba(255, 255, 255, .16); opacity: .72; }
.cf-panel.is-queued .cf-panel-note::before { content: "· "; color: var(--cf-dim); }
.cf-panel.is-generating { border-color: rgba(215, 169, 69, .55); }
.cf-panel.is-generating .cf-panel-note { color: var(--cf-gold); }
.cf-panel.is-failed { border-color: rgba(224, 82, 82, .55); }
.cf-panel.is-failed .cf-panel-note { color: #ff8fb8; }
.cf-panel.is-done { border-color: rgba(255, 255, 255, .14); }

@media (prefers-reduced-motion: no-preference) {
  .cf-panel.is-generating { animation: cf-pulse 1.4s ease-in-out infinite; }
  @keyframes cf-pulse { 50% { border-color: rgba(215, 169, 69, .18); } }
}

/* Output */
.cf-output { margin-top: 1.25rem; display: grid; gap: 1rem; }
.cf-sheet { display: block; max-width: 100%; height: auto; margin: 0 auto; background: var(--cf-field); border-radius: .35rem; }

@media (max-width: 960px) {
  .cf-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cf-hero { padding: 2rem 0 1.6rem; }
  .cf-field-inline { grid-template-columns: 1fr; }
  .cf-field-inline input { width: 100%; }
}

/* === Guide imagery === */
.cf-g-figure { margin: 1.6rem 0 0; }
/* Below ~700px the diagram would shrink its own labels to noise, so the frame
   scrolls instead of the drawing collapsing. */
.cf-g-figframe { overflow-x: auto; border: 1px solid var(--cf-border); border-radius: .5rem; background: var(--cf-panel); }
.cf-g-figure svg { display: block; width: 100%; min-width: 42rem; height: auto; }
/* Font family only — each label sets its own size via the SVG font-size attribute. */
.cf-g-figure text { font-family: var(--font-mono, "JetBrains Mono", monospace); letter-spacing: .04em; }
.cf-g-figcaption { margin: .6rem 0 0; color: var(--cf-dim); font-family: var(--font-mono, "JetBrains Mono", monospace); font-size: .62rem; letter-spacing: .06em; line-height: 1.6; text-transform: uppercase; }

.cf-g-kindicon { display: block; margin-bottom: .6rem; color: var(--cf-gold); }

.cf-g-outputs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.cf-g-output {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .75rem;
  border: 1px solid var(--cf-border);
  border-radius: 2rem;
  background: var(--cf-panel);
  color: var(--cf-body);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cf-g-output svg { flex: 0 0 auto; width: 15px; height: 15px; color: var(--cf-gold); }

/* === Scroll reveal === */
.cf-reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2, .7, .3, 1), transform .7s cubic-bezier(.2, .7, .3, 1); }
.cf-reveal.in { opacity: 1; transform: none; }
.cf-reveal[data-delay="1"] { transition-delay: .08s; }
.cf-reveal[data-delay="2"] { transition-delay: .16s; }
.cf-reveal[data-delay="3"] { transition-delay: .24s; }

/* The reference arrows draw themselves on once the hero-first diagram is in view. */
.cf-g-figure .cf-g-ray { opacity: 0; transition: opacity .5s ease .25s; }
.cf-g-figure.in .cf-g-ray { opacity: 1; }
.cf-g-figure .cf-g-ray:nth-of-type(2) { transition-delay: .35s; }
.cf-g-figure .cf-g-ray:nth-of-type(3) { transition-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
  .cf-btn-primary, .cf-btn-ghost, .skip-link { transition: none; }
  .cf-btn-primary:hover:not(:disabled), .cf-btn-ghost:hover:not(:disabled) { transform: none; }
  /* Shown outright, never faded in — the observer may not have run yet. */
  .cf-reveal, .cf-g-figure .cf-g-ray { opacity: 1; transform: none; transition: none; }
}
