/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/*
 * ── Design tokens ─────────────────────────────────────────────
 *
 *  Colors
 *  bg:                 #040714
 *  surface-1 (cards):  rgba(255,255,255,.03)
 *  surface-2 (hover):  rgba(255,255,255,.06)
 *  border-subtle:      rgba(255,255,255,.07)
 *  border:             rgba(255,255,255,.1)
 *  border-strong:      rgba(255,255,255,.22)
 *  accent (doorman):   #c2904a gold — the one domain accent
 *  text primary:       #f9f9f9
 *  text secondary:     #cacaca
 *  text muted:         rgba(255,255,255,.55)
 *  header gradient:    in oklch 135deg, #B015B0 0%, #3D0080 50%, #040714 100%
 *
 *  Strategy colors (open-source vs managed)
 *  OSS green:          #34d399
 *  freemium amber:     #fbbf24
 *  paid rose:          #f87171
 *  rev-share violet:   #c084fc
 */

:root {
  --bg: #040714;
  --surface-1: rgba(255,255,255,.03);
  --surface-2: rgba(255,255,255,.06);
  --surface-toast: #1a1730;
  --border-subtle: rgba(255,255,255,.07);
  --border: rgba(255,255,255,.1);
  --border-strong: rgba(255,255,255,.22);
  --text-primary: #f9f9f9;
  --text-secondary: #cacaca;
  --text-muted: rgba(255,255,255,.55);
  --accent: #c2904a;
  --accent-bright: #d8a85f;
  --accent-soft: rgba(194, 144, 74, .14);
  --oss: #34d399;
  --oss-soft: rgba(52, 211, 153, .12);
  --freemium: #fbbf24;
  --freemium-soft: rgba(251, 191, 36, .12);
  --paid: #f87171;
  --paid-soft: rgba(248, 113, 113, .12);
  --revshare: #c084fc;
  --revshare-soft: rgba(192, 132, 252, .12);
  --danger: #e11d48;
  --danger-hover: #f43f5e;
  --font: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem;
  --text-lg: 1.125rem; --text-xl: 1.25rem; --text-2xl: 1.5rem;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px;
  --radius-sm: 6px; --radius: 10px; --radius-lg: 15px;
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 120ms; --dur: 200ms;
  --control-height: 44px;
  --control-height-sm: 36px;
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.5);
  --shadow-modal: 0 24px 48px rgba(2, 6, 23, 0.58);
  --z-sticky-header: 200;
  --z-modal: 400;
  --z-toast: 500;
}

html { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  min-height: 100%;
  color: var(--text-primary);
  display: flex; flex-direction: column;
}

main#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

/* ── Layout ────────────────────────────────────────────────── */
/*
 * GOTCHA: body { display:flex; flex-direction:column } + margin: 0 auto
 * on a child collapses its width — always pair with width: 100%.
 */
.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-6);
  flex: 1;
}
.container--wide { max-width: 1100px; }

/* ── Buttons (canonical) ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  transition:
    background-color var(--dur),
    color var(--dur),
    border-color var(--dur),
    box-shadow var(--dur),
    transform var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn--sm {
  min-height: var(--control-height-sm);
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}
.btn--primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn--primary:hover { background: var(--accent-bright); }
.btn--secondary { background: var(--surface-2); color: var(--text-primary); border-color: var(--border-strong); }
.btn--secondary:hover { background: rgba(255, 255, 255, 0.1); }
.btn--ghost { background: transparent; color: rgba(255,255,255,0.92); border-color: rgba(255,255,255,0.18); }
.btn--ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

button:active, .btn:active {
  transform: scale(0.98);
  transition-duration: var(--dur-fast);
}

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

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  max-width: min(360px, calc(100vw - var(--space-8)));
  background: var(--surface-toast);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  pointer-events: none;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.toast.visible { opacity: 1; transform: translateY(0); }

/* ── Footer ────────────────────────────────────────────────── */

/* ── Focus styles ──────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--accent-bright);
  color: #000;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top var(--dur);
}
.skip-link:focus { top: 0; }

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Intro ─────────────────────────────────────────────────── */
.intro {
  max-width: 640px;
  margin: 0 auto var(--space-8);
  padding: var(--space-8) 0 var(--space-6);
  position: relative;
}
.intro__hook {
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: oklch(95% 0.006 72);
  margin: 0 0 var(--space-4);
}
.intro__body {
  font-size: var(--text-base);
  line-height: 1.7;
  color: oklch(66% 0.006 255);
  margin: 0 0 20px;
  max-width: 54ch;
}
.intro__cta {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0;
  padding-top: var(--space-3);
  border-top: 1px solid oklch(55% 0.09 58 / 0.3);
}

/* ── Cookbook steps ────────────────────────────────────────── */
.cookbook { display: flex; flex-direction: column; gap: var(--space-8); animation: fadeIn 0.35s ease-out both; }

.step-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.step-head__n {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-size: var(--text-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(3px);
}
.step-head__title { font-size: var(--text-xl); font-weight: 600; letter-spacing: 0.02em; }
.step-head__lead { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.45; flex-basis: 100%; }
.step-head__aside { margin-left: auto; }

/* ── Segmented switch (tiers, strategies) ──────────────────── */
.switch {
  display: inline-flex; padding: 3px; gap: 3px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.switch__btn {
  font-family: var(--font); font-size: var(--text-sm); font-weight: 600;
  padding: 6px 16px; border: 0; border-radius: 4px; background: transparent;
  color: var(--text-muted); cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast);
  white-space: nowrap;
}
.switch__btn:hover { color: var(--text-primary); }
.switch__btn.is-active { background: var(--accent-soft); color: var(--accent-bright); }
.switch__btn--oss.is-active { background: var(--oss-soft); color: var(--oss); }
.switch__btn--paid.is-active { background: var(--paid-soft); color: var(--paid); }

/* ── Recipe picker (dropdown + glance) ─────────────────────── */
.recipe-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.recipe-bar__icon { display: inline-flex; color: var(--accent-bright); }
.recipe-bar__icon .ic { width: 22px; height: 22px; }
.recipe-bar__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.recipe-select {
  appearance: none;
  flex: 1;
  /* a select's min-width resolves to its longest option, so without this the
     recipe labels push the page into horizontal scroll on a phone */
  min-width: 0;
  max-width: 520px;
  min-height: var(--control-height);
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 40px 10px 14px;
  cursor: pointer;
  transition: border-color var(--dur-fast);
}
.recipe-select:hover { border-color: var(--accent); }
.recipe-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.recipe-select option { background: var(--surface-1); color: var(--text-primary); }

.glance {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  padding: var(--space-4);
}
.glance__blurb {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}
.glance__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.glance__cell {
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: var(--space-3);
}
.glance__v { display: block; font-size: var(--text-lg); font-weight: 800; color: var(--text-primary); }
.glance__k { display: block; font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

/* ── Icons ─────────────────────────────────────────────────── */
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.ic--warn { width: 14px; height: 14px; color: var(--freemium); vertical-align: -2px; }
.favicon { width: 16px; height: 16px; border-radius: 3px; vertical-align: -3px; margin-right: 4px; }

.chip {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.chip--best { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-soft); }

/* ── Type badges ───────────────────────────────────────────── */
.badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--oss { color: var(--oss); background: var(--oss-soft); }
.badge--freemium { color: var(--freemium); background: var(--freemium-soft); }
.badge--paid { color: var(--paid); background: var(--paid-soft); }
.badge--revshare { color: var(--revshare); background: var(--revshare-soft); }
.badge--rec { color: var(--accent-bright); background: var(--accent-soft); }

/* ── Ingredient rows (the stack) ───────────────────────────── */
.stack-list { display: flex; flex-direction: column; gap: var(--space-3); }

.ing {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  overflow: hidden;
  transition: border-color var(--dur-fast);
}
.ing:hover { border-color: var(--border-strong); }
.ing.is-open { border-color: var(--accent); }

.ing__main {
  width: 100%;
  font-family: var(--font);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: 0;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}
.ing__icon { display: inline-flex; color: var(--text-muted); }
.ing__icon .ic { width: 20px; height: 20px; }
.ing.is-open .ing__icon { color: var(--accent-bright); }
.ing__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ing__cat {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
.ing__pick {
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.ing__cost { font-size: var(--text-sm); color: var(--text-secondary); text-align: right; white-space: nowrap; }
.ing__cost small { display: block; font-size: 10px; color: var(--text-muted); }
.ing__chev {
  color: var(--text-muted);
  font-size: var(--text-xs);
  transition: transform var(--dur-fast);
}
.ing.is-open .ing__chev { transform: rotate(90deg); }

/* Swap panel: two columns — open source vs managed */
.ing__alts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, .22);
}
.alt-group { display: flex; flex-direction: column; gap: var(--space-2); }
.alt-group__title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-bottom: var(--space-1);
}
.alt-group--oss .alt-group__title { color: var(--oss); }
.alt-group--managed .alt-group__title { color: var(--freemium); }

.alt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  transition: border-color var(--dur-fast);
}
.alt:hover { border-color: var(--border-strong); }
.alt.is-current { border-color: var(--accent); background: var(--accent-soft); }
.alt__head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.alt__name { font-size: var(--text-sm); font-weight: 700; }
.alt__line { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.45; }
.alt__line strong { color: var(--text-secondary); font-weight: 600; }
.alt__free { color: var(--oss); }
.alt__gotcha { color: var(--freemium); }
.alt__actions { display: flex; gap: var(--space-2); margin-top: auto; padding-top: var(--space-1); }
.alt__link {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height-sm);
}
.alt__link:hover { color: var(--text-secondary); text-decoration: underline; }

/* ── Frontend approach cards ───────────────────────────────── */
/* auto-fit, not a fixed count: the fourth approach (no-code) must not squeeze
   the other three into unreadable columns on a narrow desktop window. */
.fe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); }
.fe-card {
  font-family: var(--font);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.fe-card:hover { border-color: var(--border-strong); }
.fe-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.fe-card__name { font-size: var(--text-sm); font-weight: 700; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.fe-card__blurb { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.45; }
.fe-card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.fe-card__list li { font-size: var(--text-xs); line-height: 1.4; padding-left: 16px; position: relative; color: var(--text-secondary); }
.fe-card__list li::before { content: '+'; position: absolute; left: 0; color: var(--oss); font-weight: 700; }
.fe-card__list li.is-con { color: var(--text-muted); }
.fe-card__list li.is-con::before { content: '−'; color: var(--paid); }

/* ── Cost tables ───────────────────────────────────────────── */
.cost-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--space-6); align-items: start; }

.cost-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  padding: var(--space-4);
}
.cost-card__title { font-size: var(--text-base); font-weight: 700; margin-bottom: 2px; }
.cost-card__sub { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-3); line-height: 1.45; }

.cost-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.cost-table th, .cost-table td {
  text-align: right;
  padding: 7px var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: baseline;
}
.cost-table th:first-child, .cost-table td:first-child { text-align: left; }
.cost-table thead th { color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.cost-table td { color: var(--text-secondary); }
.cost-table .is-tier { background: var(--accent-soft); color: var(--accent-bright); font-weight: 700; }
.cost-table tfoot td { border-bottom: 0; border-top: 1px solid var(--border-strong); font-weight: 800; color: var(--text-primary); font-size: var(--text-sm); }
.cost-cat { color: var(--text-muted); }
.cost-pick { color: var(--text-primary); font-weight: 600; }

.cost-total-big {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  margin-top: var(--space-3);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.cost-total-big__k { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-bright); }
.cost-total-big__v { font-size: var(--text-2xl); font-weight: 800; color: var(--text-primary); }
.cost-total-big__v small { font-size: var(--text-xs); color: var(--text-muted); font-weight: 400; }

.model-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.model-table th, .model-table td {
  text-align: right;
  padding: 7px var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}
.model-table th:first-child, .model-table td:first-child { text-align: left; }
.model-table thead th { color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; }
.model-table td { color: var(--text-secondary); }
.model-table td:first-child { color: var(--text-primary); font-weight: 600; }
.model-table tr.is-best td { color: var(--oss); }
.model-table tr.is-best td:first-child { color: var(--oss); }

.cost-note { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; margin-top: var(--space-3); font-style: italic; }
.cost-note a { color: var(--text-muted); }
.sub-note {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
}
.sub-note strong { color: var(--accent-bright); }

/* ── Challenges ────────────────────────────────────────────── */
.chal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; }

.chal-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); counter-reset: chal; }
.chal-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.45;
}
.chal-item__n {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chal-item strong { color: var(--text-primary); }

.gotcha-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.gotcha-item {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.45;
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid var(--freemium);
  background: var(--surface-1);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.gotcha-item strong { color: var(--freemium); font-weight: 700; }
.gotcha-item .gotcha-item__from { color: var(--text-muted); }

/* ── Prompt export ─────────────────────────────────────────── */
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; }
.export-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }

/* Fit-check usage inputs */
.usage-row { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.usage-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 110px; }
.usage-field span {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted);
}
.usage-field input {
  font-family: var(--font); font-size: var(--text-sm); font-weight: 600;
  color: var(--text-primary); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 10px; width: 100%;
}
.usage-field input:hover { border-color: var(--accent); }
.usage-field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ── Copy-a-real-site presets ───────────────────────────────── */
.preset-bar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.preset-bar__label {
  font-size: var(--text-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
}
.preset-chip {
  font-family: var(--font); font-size: var(--text-xs); font-weight: 600;
  padding: 5px 12px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface-1); color: var(--text-secondary); cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.preset-chip:hover { border-color: var(--accent); color: var(--text-primary); }
.preset-chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-bright); }
.glance__wontget {
  font-size: var(--text-xs); color: var(--text-secondary); line-height: 1.5;
  padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3);
  border-left: 2px solid var(--accent); background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.glance__wontget strong { color: var(--accent-bright); }

/* ── Exit ratings (swap panel) ──────────────────────────────── */
.alt__exit strong { text-transform: capitalize; }
.alt__exit--easy strong { color: var(--oss); }
.alt__exit--sticky strong { color: var(--freemium); }
.alt__exit--rewrite strong { color: var(--paid); }

/* ── Stack compare card ─────────────────────────────────────── */
.cmp-load { display: flex; gap: var(--space-2); }
.cmp-input {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: var(--text-xs);
  color: var(--text-primary); background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 10px;
}
.cmp-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cmp-table td:nth-child(2), .cmp-table td:nth-child(3) { font-size: var(--text-xs); }
.cmp-absent { color: var(--text-muted); font-style: italic; }
.cmp-same { color: var(--text-muted); }
.cmp-up { color: var(--paid); font-weight: 700; }
.cmp-down { color: var(--oss); font-weight: 700; }

/* ── Agent tool list (builder step) ─────────────────────────── */
.tool-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.tool-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.tool-item__head { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); flex-wrap: wrap; }
.tool-item__pay { font-size: var(--text-xs); color: var(--text-muted); }
.tool-item__note { font-size: var(--text-xs); color: var(--text-secondary); line-height: 1.45; }
.prompt-pre {
  font-family: var(--mono);
  font-size: var(--text-xs);
  line-height: 1.55;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4);
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cost-grid, .chal-grid, .export-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .ing__alts { grid-template-columns: 1fr; }
  .ing__main { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ing__cost { display: none; }
  .glance__grid { grid-template-columns: 1fr 1fr; }
  .recipe-bar { flex-wrap: wrap; }
  .recipe-select { max-width: none; flex-basis: 100%; width: 100%; order: 3; }
}
@media (max-width: 600px) {
  .container { padding: var(--space-4); }
  .toast { left: var(--space-4); right: var(--space-4); max-width: none; }
  .step-head__aside { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 420px) {
  .glance__grid { grid-template-columns: 1fr; }
}
