:root {
  --ink: #0f1412;
  --ink-2: #19211d;
  --paper: #f0eadb;
  --paper-2: #fffaf0;
  --muted: #69736d;
  --line: #c8bfac;
  --acid: #ceff54;
  --signal: #ff6b45;
  --white: #ffffff;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(15, 20, 18, 0.11) 0.65px, transparent 0.65px);
  background-size: 9px 9px;
  content: "";
  opacity: 0.25;
}

button, input, select, textarea { font: inherit; }
a { color: inherit; }
::selection { background: var(--acid); color: var(--ink); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  background: var(--acid);
  color: var(--ink);
  font-weight: 900;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 10px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--ink);
  color: var(--paper-2);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; text-decoration: none; }
.brand img { border-radius: 7px; }
.topbar p { margin: 0; color: rgba(255, 250, 240, 0.54); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.quiet-link { justify-self: end; color: var(--acid); font-size: 0.9rem; font-weight: 800; text-underline-offset: 4px; }

.hero {
  display: grid;
  min-height: 74vh;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: clamp(42px, 7vw, 110px);
  padding: clamp(70px, 10vw, 138px) clamp(24px, 7vw, 105px);
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(15, 20, 18, 0.99), rgba(15, 20, 18, 0.91)),
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(255, 255, 255, 0.06) 24px);
  color: var(--paper-2);
}
.eyebrow { margin: 0 0 16px; color: var(--signal); font-size: 0.76rem; font-weight: 950; letter-spacing: 0.08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -0.055em; }
h1 { max-width: 11ch; margin-bottom: 28px; font-size: clamp(4rem, 8vw, 8rem); line-height: 0.84; }
h1 em { color: var(--acid); font-style: normal; }
h2 { max-width: 12ch; margin-bottom: 20px; font-size: clamp(2.8rem, 5vw, 5.2rem); line-height: 0.91; }
.lede { max-width: 680px; color: rgba(255, 250, 240, 0.73); font-size: clamp(1.04rem, 1.55vw, 1.27rem); line-height: 1.65; }
.hero__signals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.hero__signals span { padding: 8px 11px; border: 1px solid rgba(255, 250, 240, 0.25); color: rgba(255, 250, 240, 0.78); font-size: 0.78rem; font-weight: 800; }

.route-readout { position: relative; padding: 34px; border: 1px solid rgba(206, 255, 84, 0.48); background: rgba(255, 255, 255, 0.045); box-shadow: 22px 22px 0 rgba(206, 255, 84, 0.08); }
.route-readout::before { position: absolute; top: -10px; right: -10px; width: 19px; height: 19px; background: var(--acid); content: ""; }
.readout-label { margin-bottom: 30px; color: rgba(255, 250, 240, 0.52); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.route-readout strong { display: block; margin-bottom: 22px; font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 0.95; letter-spacing: -0.05em; }
.route-readout__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.route-readout__meta span { padding: 7px 9px; background: var(--acid); color: var(--ink); font-size: 0.78rem; font-weight: 950; }
.route-readout p:last-child { margin: 0; color: rgba(255, 250, 240, 0.68); line-height: 1.6; }

.workbench, .sequence { padding: clamp(72px, 9vw, 128px) clamp(24px, 7vw, 105px); }
.section-intro { display: grid; grid-template-columns: minmax(220px, 0.45fr) minmax(300px, 1fr); gap: 28px 70px; align-items: end; margin-bottom: 46px; }
.section-intro .eyebrow { grid-column: 1 / -1; margin: 0; }
.section-intro h2 { margin: 0; }
.section-intro > p:last-child { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.65; }

#brief-form { border-top: 2px solid var(--ink); }
.route-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; border: 0; }
.route-picker legend, .fields__legend { width: 100%; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 0.76rem; font-weight: 950; letter-spacing: 0.08em; text-transform: uppercase; }
.route-card { position: relative; display: grid; min-height: 220px; align-content: start; gap: 8px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; transition: background 180ms ease, color 180ms ease; }
.route-card:first-of-type { border-left: 1px solid var(--line); }
.route-card input { position: absolute; opacity: 0; pointer-events: none; }
.route-card__index { color: var(--signal); font-size: 0.76rem; font-weight: 950; }
.route-card strong { margin-top: 16px; font-size: 1.35rem; letter-spacing: -0.025em; }
.route-card small { font-weight: 900; }
.route-card > span:last-child { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.route-card.is-active { background: var(--ink); color: var(--paper-2); }
.route-card.is-active small { color: var(--acid); }
.route-card.is-active > span:last-child { color: rgba(255, 250, 240, 0.62); }

.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; padding: 0 0 48px; }
.fields__legend { grid-column: 1 / -1; margin: 0 0 8px; }
.field { display: grid; gap: 9px; }
.field--wide { grid-column: 1 / -1; }
.field > span { font-size: 0.82rem; font-weight: 850; }
.field b { color: var(--signal); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 0; background: var(--paper-2); color: var(--ink); padding: 15px 16px; outline: none; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--acid); }
.field [aria-invalid="true"] { border-color: var(--signal); }

.brief-output { display: grid; grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr); gap: 24px 60px; padding: clamp(32px, 5vw, 64px); background: var(--ink); color: var(--paper-2); }
.brief-output h2 { font-size: clamp(2.3rem, 4vw, 4.4rem); }
#brief-preview { min-height: 290px; margin: 0; padding: 22px; overflow: auto; border: 1px solid rgba(255, 250, 240, 0.18); background: var(--ink-2); color: rgba(255, 250, 240, 0.82); font: 0.88rem/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.form-status { grid-column: 2; margin: 0; color: rgba(255, 250, 240, 0.56); font-size: 0.82rem; line-height: 1.5; }
.actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 0 19px; border: 1px solid transparent; border-radius: 0; cursor: pointer; font-weight: 900; text-decoration: none; }
.button--primary { background: var(--acid); color: var(--ink); }
.button--secondary { border-color: rgba(255, 250, 240, 0.3); background: transparent; color: var(--paper-2); }
.button:disabled, .button.is-disabled { cursor: not-allowed; opacity: 0.38; }

.sequence { background: var(--paper-2); }
.sequence ol { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; border-top: 2px solid var(--ink); list-style: none; }
.sequence li { min-height: 220px; padding: 28px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sequence li:first-child { border-left: 1px solid var(--line); }
.sequence li span { display: block; margin-bottom: 48px; color: var(--signal); font-size: 0.76rem; font-weight: 950; }
.sequence li strong { display: block; margin-bottom: 12px; font-size: 1.2rem; }
.sequence li p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.repeat-path { display: grid; grid-template-columns: 0.3fr 1fr 0.8fr; gap: 32px; align-items: start; margin-top: 44px; padding: 36px; background: var(--acid); }
.repeat-path .eyebrow { color: var(--ink); }
.repeat-path h3 { margin: 0; font-size: clamp(1.5rem, 2.5vw, 2.5rem); line-height: 1.05; letter-spacing: -0.04em; }
.repeat-path p:last-child { margin: 0; line-height: 1.6; }

footer { display: flex; justify-content: space-between; gap: 32px; padding: 44px clamp(24px, 7vw, 105px); background: var(--ink); color: var(--paper-2); }
footer p { margin: 8px 0 0; color: rgba(255, 250, 240, 0.56); }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
footer a { color: var(--acid); text-underline-offset: 4px; }

a:focus-visible, button:focus-visible, .route-card:focus-within { outline: 3px solid var(--acid); outline-offset: 4px; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr; }
  .topbar p { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .route-readout { max-width: 620px; }
  .section-intro, .brief-output { grid-template-columns: 1fr; }
  .form-status, .actions { grid-column: 1; }
  .route-picker, .sequence ol { grid-template-columns: 1fr; }
  .route-card { min-height: auto; border-left: 1px solid var(--line); }
  .sequence li { min-height: auto; border-left: 1px solid var(--line); }
  .sequence li span { margin-bottom: 22px; }
  .repeat-path { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { gap: 12px; padding-inline: 16px; }
  .quiet-link { font-size: 0.78rem; }
  h1 { font-size: clamp(3.4rem, 18vw, 5.2rem); }
  .hero, .workbench, .sequence { padding-inline: 18px; }
  .fields { grid-template-columns: 1fr; }
  .field--wide, .fields__legend { grid-column: 1; }
  .brief-output { padding: 25px 18px; }
  .actions { display: grid; }
  footer { flex-direction: column; }
}

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