:root {
  --ink: #10241f;
  --ink-2: #18332b;
  --paper: #f3efdf;
  --paper-2: #e8e1cc;
  --lime: #d8ff68;
  --coral: #ff735f;
  --muted: #9ca99f;
  --line: rgba(243, 239, 223, 0.18);
  --shadow: 0 24px 70px rgba(4, 14, 11, 0.28);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 320px;
  overflow-x: hidden;
}

button, textarea { font: inherit; }
button { color: inherit; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  z-index: 20;
  background-image:
    repeating-radial-gradient(circle at 17% 31%, transparent 0 1px, #fff 1px 2px, transparent 2px 5px),
    repeating-radial-gradient(circle at 73% 67%, transparent 0 2px, #000 2px 3px, transparent 3px 6px);
  background-size: 9px 11px, 13px 15px;
  mix-blend-mode: soft-light;
}

.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -0.03em;
  font-size: 19px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px 12px 16px 12px;
  background: var(--paper);
  display: grid;
  place-items: center;
  transform: rotate(-4deg);
}

.brand-mark img { width: 31px; height: 31px; display: block; }

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8c4ba;
}

.status-dot { width: 7px; height: 7px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 5px rgba(216,255,104,.1); }
.header-rule { width: 24px; height: 1px; background: var(--line); }

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 72px;
  padding-block: 82px 96px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .14em;
  font-weight: 800;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.045em; }

h1 { font-size: clamp(54px, 6.2vw, 88px); line-height: .96; margin-bottom: 28px; }
h2 { font-size: clamp(38px, 4vw, 58px); line-height: 1; margin-bottom: 0; }

.lede { max-width: 610px; color: #b8c4ba; font-size: 18px; line-height: 1.65; }

.hero-metrics {
  display: flex;
  gap: 42px;
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-metrics div { display: flex; flex-direction: column; gap: 4px; }
.hero-metrics strong { font-family: Georgia, serif; font-size: 29px; font-weight: 500; color: var(--lime); }
.hero-metrics span { color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }

.hero-specimen { position: relative; min-height: 440px; display: grid; place-items: center; }
.specimen-card {
  position: relative;
  z-index: 2;
  width: min(330px, 72vw);
  aspect-ratio: 1;
  padding: 42px;
  border-radius: 38% 62% 58% 42% / 45% 38% 62% 55%;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(4deg);
  transition: transform .6s cubic-bezier(.2,.8,.2,1), border-radius .6s ease;
}

.specimen-card:hover { transform: rotate(-2deg) scale(1.025); border-radius: 58% 42% 38% 62% / 40% 60% 40% 60%; }
.specimen-card svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 12px 18px rgba(16,36,31,.12)); }

.orbit { position: absolute; border: 1px solid rgba(216,255,104,.25); border-radius: 50%; }
.orbit-one { width: 420px; height: 420px; animation: orbit 18s linear infinite; }
.orbit-two { width: 505px; height: 305px; transform: rotate(34deg); animation: orbitReverse 23s linear infinite; }
.orbit::before { content: ""; position: absolute; top: 14%; left: 5%; width: 10px; height: 10px; border-radius: 3px; background: var(--coral); }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes orbitReverse { to { transform: rotate(-326deg); } }

.spec-label {
  position: absolute;
  z-index: 3;
  padding: 8px 11px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--lime);
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .12em;
}
.label-a { left: 2%; top: 21%; }
.label-b { right: 0; top: 35%; }
.label-c { bottom: 12%; left: 15%; }

.playground { padding-bottom: 132px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 48px; margin-bottom: 40px; }
.section-heading > div { max-width: 760px; }
.section-note { max-width: 330px; color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 0; }

.workbench {
  display: grid;
  grid-template-columns: 390px 1fr;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.prompt-panel { padding: 32px; background: #ebe5d3; border-right: 1px solid rgba(16,36,31,.13); }
.prompt-panel > label, .control-group legend { display: block; margin-bottom: 10px; font: 800 11px/1.3 ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }

.prompt-field { position: relative; }
textarea {
  width: 100%;
  min-height: 145px;
  resize: vertical;
  border: 1px solid rgba(16,36,31,.24);
  border-radius: 17px;
  padding: 17px 17px 34px;
  background: rgba(255,255,255,.44);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: box-shadow .2s, border-color .2s;
}
textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(216,255,104,.65); }
#charCount { position: absolute; right: 13px; bottom: 11px; font: 10px ui-monospace, monospace; color: #66746d; }

.example-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 13px 0 28px; }
.example-row > span { font: 10px ui-monospace, monospace; text-transform: uppercase; color: #64716b; margin-right: 2px; }
.example-chip { border: 1px solid rgba(16,36,31,.18); background: transparent; border-radius: 99px; padding: 7px 10px; font-size: 11px; cursor: pointer; }
.example-chip:hover { background: var(--paper); border-color: var(--ink); }

.control-group { border: 0; padding: 0; margin: 0 0 24px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(16,36,31,.22); padding: 4px; border-radius: 14px; }
.segmented button { border: 0; background: transparent; padding: 10px 6px; border-radius: 10px; font-size: 12px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.palette-row { display: flex; gap: 12px; }
.swatch { width: 38px; height: 38px; padding: 0; border: 4px solid #ebe5d3; outline: 1px solid rgba(16,36,31,.2); border-radius: 50%; cursor: pointer; position: relative; }
.swatch::after { content: ""; position: absolute; inset: 8px 6px 6px 10px; border-radius: 50%; background: var(--swatch-accent); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch-lime { background: #15332b; --swatch-accent: #d8ff68; }
.swatch-coral { background: #20211f; --swatch-accent: #ff735f; }
.swatch-cobalt { background: #1f48cc; --swatch-accent: #fff0c9; }
.swatch-plum { background: #512850; --swatch-accent: #87f1ca; }

.grow-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: var(--lime);
  padding: 17px 18px;
  font-weight: 780;
  cursor: pointer;
  box-shadow: 0 8px 0 #a9ca4d;
  transform: translateY(0);
  transition: transform .16s, box-shadow .16s;
}
.grow-button:hover { transform: translateY(-2px); box-shadow: 0 10px 0 #a9ca4d; }
.grow-button:active { transform: translateY(5px); box-shadow: 0 3px 0 #a9ca4d; }
.grow-button:disabled { opacity: .65; cursor: wait; }
.grow-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cost-ticket { margin-top: 28px; border-top: 1px dashed rgba(16,36,31,.25); padding-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cost-ticket div { display: flex; flex-direction: column; gap: 4px; }
.cost-ticket span { font: 9px ui-monospace, monospace; color: #65746c; letter-spacing: .08em; }
.cost-ticket strong { font: 600 19px Georgia, serif; }
.cost-ticket small { grid-column: 1 / -1; color: #68776f; font-size: 10px; line-height: 1.5; }
.cost-ticket strong { font-variant-numeric: tabular-nums; }

.result-panel { min-width: 0; padding: 28px; background: var(--paper); }
.pipeline { display: flex; align-items: center; margin-bottom: 22px; overflow: hidden; }
.pipeline-step { color: #879087; font: 800 9px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; transition: color .25s; }
.pipeline-step.is-active, .pipeline-step.is-done { color: var(--ink); }
.pipeline-step.is-done::before { content: "✓ "; color: #3c6d5c; }
.pipeline-line { height: 1px; background: rgba(16,36,31,.16); flex: 1; margin: 0 9px; }

.candidate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.candidate {
  position: relative;
  border: 1px solid rgba(16,36,31,.16);
  background: rgba(255,255,255,.34);
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: border .2s, transform .2s, background .2s;
}
.candidate:hover { transform: translateY(-3px); border-color: rgba(16,36,31,.5); }
.candidate[aria-pressed="true"] { border: 2px solid var(--ink); padding: 11px; background: white; }
.candidate-art { aspect-ratio: 1; display: grid; place-items: center; border-radius: 13px; background: #ded8c8; overflow: hidden; }
.candidate-art svg { width: 76%; height: 76%; }
.candidate-meta { padding: 12px 3px 3px; }
.candidate-meta span { display: block; color: #65746c; font: 800 9px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.candidate-meta strong { display: block; font-family: Georgia, serif; font-size: 17px; margin-top: 3px; font-weight: 600; }
.candidate-score { position: absolute; right: 20px; top: 20px; min-width: 48px; padding: 5px 7px; border-radius: 99px; background: var(--ink); color: var(--lime); text-align: center; font: 800 8px ui-monospace, monospace; }

.selected-result { display: grid; grid-template-columns: minmax(245px, .9fr) 1.1fr; gap: 26px; margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(16,36,31,.14); }
.selected-preview-wrap { display: flex; flex-direction: column; gap: 12px; }
.selected-preview { aspect-ratio: 1; display: grid; place-items: center; border-radius: 22px; background: var(--ink); overflow: hidden; position: relative; }
.selected-preview::after { content: "128"; position: absolute; right: 12px; bottom: 10px; color: rgba(255,255,255,.4); font: 9px ui-monospace, monospace; }
.selected-preview svg { width: 76%; height: 76%; filter: drop-shadow(0 12px 16px rgba(0,0,0,.18)); }
.size-strip { min-height: 47px; display: flex; align-items: center; gap: 15px; padding: 9px 12px; background: #ded8c8; border-radius: 12px; }
.size-cell { display: flex; align-items: center; gap: 5px; color: #66736b; font: 8px ui-monospace, monospace; }
.size-cell svg { flex: 0 0 auto; }

.recipe-panel { padding: 4px 4px 0; }
.recipe-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recipe-heading .eyebrow { color: #527466; margin-bottom: 11px; }
.gate-pass { display: inline-flex; align-items: center; gap: 6px; color: #46695d; font: 700 9px ui-monospace, monospace; text-transform: uppercase; }
.gate-pass i { width: 7px; height: 7px; border-radius: 50%; background: #56a777; }
.recipe-panel h3 { font: 600 clamp(29px, 3vw, 40px)/1 Georgia, serif; letter-spacing: -.035em; margin-bottom: 24px; }
.recipe-panel dl { margin: 0 0 27px; }
.recipe-panel dl div { display: grid; grid-template-columns: 100px 1fr; padding: 10px 0; border-bottom: 1px solid rgba(16,36,31,.12); }
.recipe-panel dt { color: #6c7a73; font: 800 9px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.recipe-panel dd { margin: 0; font-size: 13px; }
.result-actions { display: flex; gap: 9px; }
.result-actions button { border-radius: 12px; padding: 12px 14px; font-size: 12px; font-weight: 750; cursor: pointer; }
.primary-action { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.secondary-action { border: 1px solid rgba(16,36,31,.24); background: transparent; }

.architecture { padding-block: 20px 132px; }
.architecture-heading .section-note { max-width: 370px; }
.architecture-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.architecture-card { min-height: 310px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--ink-2); display: flex; flex-direction: column; }
.architecture-card.card-ai { color: var(--ink); background: var(--lime); border-color: var(--lime); transform: rotate(-1deg); }
.architecture-card.card-rescue { background: #3e2422; border-color: rgba(255,115,95,.35); }
.card-number { align-self: flex-end; font: 11px ui-monospace, monospace; opacity: .55; }
.card-kicker { margin: 26px 0 10px; font: 800 10px ui-monospace, monospace; letter-spacing: .1em; opacity: .68; }
.architecture-card h3 { font: 500 29px/1.05 Georgia, serif; letter-spacing: -.03em; margin-bottom: 16px; }
.architecture-card > p:not(.card-kicker) { color: #aebcb2; font-size: 13px; line-height: 1.65; }
.architecture-card.card-ai > p:not(.card-kicker) { color: rgba(16,36,31,.72); }
.code-pill { margin-top: auto; padding: 10px 11px; border-radius: 10px; border: 1px solid currentColor; opacity: .62; font: 9px ui-monospace, monospace; }

.budget { padding-bottom: 130px; }
.budget-card { display: grid; grid-template-columns: 1.15fr .9fr; gap: 60px; padding: 56px; color: var(--ink); background: var(--coral); border-radius: var(--radius-xl); transform: rotate(.35deg); }
.budget-card .eyebrow { color: var(--ink); opacity: .68; }
.budget-numbers { display: flex; flex-direction: column; }
.budget-numbers div { display: flex; justify-content: space-between; gap: 30px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid rgba(16,36,31,.25); }
.budget-numbers span { font: 800 10px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.budget-numbers strong { font: 500 26px Georgia, serif; }
.budget-fineprint { grid-column: 2; color: rgba(16,36,31,.68); font-size: 11px; line-height: 1.6; margin-bottom: 0; }
.budget-fineprint a { color: inherit; font-weight: 800; text-underline-offset: 3px; }

.site-footer { min-height: 110px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 30px; color: var(--muted); font-size: 11px; }
.site-footer p { margin: 0; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 24px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 99px; background: var(--lime); color: var(--ink); box-shadow: var(--shadow); font-size: 12px; font-weight: 750; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 25px; padding-top: 64px; }
  .hero-specimen { min-height: 390px; }
  .workbench { grid-template-columns: 1fr; }
  .prompt-panel { border-right: 0; border-bottom: 1px solid rgba(16,36,31,.13); }
  .architecture-grid { grid-template-columns: repeat(2, 1fr); }
  .budget-card { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1180px); }
  .site-header { height: 74px; }
  .header-meta .header-rule, .header-meta span:last-child { display: none; }
  .hero { padding-block: 54px 75px; }
  .hero-metrics { gap: 19px; justify-content: space-between; }
  .hero-metrics strong { font-size: 23px; }
  .hero-metrics span { font-size: 8px; }
  .hero-specimen { min-height: 330px; }
  .hero-specimen { overflow: hidden; }
  .specimen-card { width: 236px; padding: 30px; }
  .orbit-one { width: 305px; height: 305px; }
  .orbit-two { width: 335px; height: 220px; }
  .section-heading { align-items: start; flex-direction: column; gap: 20px; }
  .playground, .architecture { padding-bottom: 85px; }
  .prompt-panel, .result-panel { padding: 20px; }
  .candidate-grid { grid-template-columns: 1fr; }
  .candidate { display: grid; grid-template-columns: 96px 1fr; align-items: center; }
  .candidate-score { right: 14px; top: 14px; }
  .selected-result { grid-template-columns: 1fr; }
  .architecture-grid { grid-template-columns: 1fr; }
  .architecture-card { min-height: 265px; }
  .budget { padding-bottom: 80px; }
  .budget-card { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; }
  .budget-fineprint { grid-column: 1; }
  .site-footer { padding-block: 30px; flex-direction: column; justify-content: center; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
