@import url('https://fonts.googleapis.com/css2?family=Geist:wght@200..800&family=Geist+Mono:wght@400;500&display=swap');

/* GDD Tool Theme "Heat": inky night + thermal glow (violet -> pink -> coral -> orange).
   Put data-theme="dark" or "light" on <html>. */
:root, [data-theme="dark"] {
  --bg: #060609;
  --surface: #0d0d15;
  --surface-raised: #161625;
  --border: #24233a;
  --border-strong: #4a4870;
  --ink: #f6f5ff;
  --ink-muted: #b6b3d2;
  --ink-subtle: #8f8cae;
  --accent: #ff7a59;
  --accent-hover: #ff9a7e;
  --accent-ink: #14070a;
  --accent-soft: #2a1322;
  --violet: #7a6bff;
  --violet-soft: #191640;
  --pink: #ff4f8b;
  --moss: #7fe0a8;
  --moss-soft: #0f2419;
  --highlight: #ffb347;
  --warning: #ffb347;
  --danger: #ff5c7a;
  --focus: #9a8dff;
  --heat: #ff6b4a;
  --heat-glow: 0 0 18px rgba(255, 107, 74, .45), 0 0 44px rgba(255, 107, 74, .2);
  --btn-bg: #ffffff;
  --btn-ink: #0b0b14;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.05) inset, 0 18px 48px rgba(0,0,0,0.55);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f3fa;
  --surface: #ffffff;
  --surface-raised: #ebe8f7;
  --border: #dcd8ee;
  --border-strong: #9692b8;
  --ink: #12102a;
  --ink-muted: #4a4668;
  --ink-subtle: #67638a;
  --accent: #c7401c;
  --accent-hover: #a8330f;
  --accent-ink: #ffffff;
  --accent-soft: #fde4ea;
  --violet: #4b3bdb;
  --violet-soft: #e6e2ff;
  --pink: #c8235f;
  --moss: #1f7a4a;
  --moss-soft: #ddf3e6;
  --highlight: #e08a00;
  --warning: #8a5a00;
  --danger: #b4233c;
  --focus: #4b3bdb;
  --heat: #d24a26;
  --heat-glow: 0 0 14px rgba(199, 64, 28, .25);
  --btn-bg: #12102a;
  --btn-ink: #ffffff;
  --shadow-card: 0 1px 2px rgba(18,16,42,0.06), 0 14px 36px rgba(40,30,110,0.10);
  color-scheme: light;
}
:root {
  --font-display: "Geist", "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-18: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --measure: 68ch;
  --container: 1120px;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Typography helpers ---------- */
.g-eyebrow {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.4; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle);
}
.g-title {
  font-family: var(--font-display); font-weight: 650; font-size: 32px; line-height: 1.2;
  letter-spacing: -0.015em; color: var(--ink); margin: 0; text-wrap: balance;
}
.g-lead { font-size: 19px; line-height: 1.65; color: var(--ink-muted); margin: 0; max-width: var(--measure); }

/* GDD document prose */
.g-prose { max-width: var(--measure); color: var(--ink); }
.g-prose h1, .g-prose h2, .g-prose h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
.g-prose h1 { font-size: 48px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 24px; }
.g-prose h2 { font-size: 32px; line-height: 1.2; font-weight: 650; letter-spacing: -0.015em; margin: 48px 0 16px; }
.g-prose h3 { font-size: 22px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; margin: 32px 0 8px; }
.g-prose p, .g-prose li { font-size: 17px; line-height: 1.65; }
.g-prose p { margin: 0 0 16px; }
.g-prose ul, .g-prose ol { padding-left: 1.25em; margin: 0 0 16px; }
.g-prose li + li { margin-top: 6px; }
.g-prose li::marker { color: var(--accent); }
.g-prose strong { font-weight: 700; }
.g-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.g-prose a:hover { color: var(--accent-hover); }
.g-prose code { font-family: var(--font-mono); font-size: .85em; background: var(--surface-raised); padding: 2px 6px; border-radius: var(--radius-sm); }
.g-prose mark { background: var(--highlight); color: #1a1815; padding: 0 4px; border-radius: 3px; }

/* ---------- Button ---------- */
.g-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  font-family: var(--font-body); font-size: 16px; font-weight: 650; line-height: 1.2;
  border: 1px solid transparent; border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.g-btn:active { transform: translateY(1px); }
.g-btn:disabled, .g-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.g-btn--primary { background: var(--accent); color: var(--accent-ink); }
.g-btn--primary:hover { background: var(--accent-hover); }
.g-btn--secondary { background: var(--surface-raised); color: var(--ink); border-color: var(--border); }
.g-btn--secondary:hover { border-color: var(--border-strong); }
.g-btn--ghost { background: transparent; color: var(--ink-muted); }
.g-btn--ghost:hover { color: var(--ink); background: var(--surface-raised); }
.g-btn--lg { min-height: 52px; padding: 14px 28px; font-size: 17px; }

/* ---------- Text field ---------- */
.g-field { display: grid; gap: 8px; }
.g-field__label { font-size: 15px; font-weight: 650; color: var(--ink); }
.g-field__hint { font-size: 14px; line-height: 1.55; color: var(--ink-muted); }
.g-field__error { font-size: 14px; color: var(--danger); font-weight: 600; }
.g-input {
  width: 100%; min-height: 48px; padding: 12px 16px;
  font-family: var(--font-body); font-size: 17px; line-height: 1.5; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.g-input { min-height: 120px; resize: vertical; }
.g-input::placeholder { color: var(--ink-subtle); }
.g-input:hover { border-color: var(--ink-subtle); }
.g-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.g-input[aria-invalid="true"] { border-color: var(--danger); }

/* ---------- Option chip (single / multi choice answers) ---------- */
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.g-chip:hover { border-color: var(--ink-subtle); }
.g-chip[aria-pressed="true"], .g-chip.is-selected { background: var(--accent-soft); border-color: var(--accent); }
.g-chip[aria-pressed="true"]::before, .g-chip.is-selected::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* ---------- Progress ---------- */
.g-progress { display: grid; gap: 8px; }
.g-progress__meta { display: flex; justify-content: space-between; align-items: baseline; }
.g-progress__track { height: 6px; background: var(--surface-raised); border-radius: var(--radius-pill); overflow: hidden; }
.g-progress__bar { height: 100%; background: var(--accent); border-radius: var(--radius-pill); transition: width .3s ease; }

/* ---------- Question card (the wizard step) ---------- */
.g-question {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 32px; display: grid; gap: 24px; max-width: 720px;
}
.g-question__head { display: grid; gap: 8px; }
.g-question__desc { font-size: 17px; color: var(--ink-muted); margin: 0; }
.g-question__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--border); }
@media (max-width: 600px) { .g-question { padding: 24px; } .g-title { font-size: 26px; } }

/* ---------- Tag ---------- */
.g-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink-muted); border: 1px solid var(--border);
}
.g-tag--accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.g-tag--done { background: var(--moss-soft); color: var(--moss); border-color: transparent; }
.g-tag--warn { color: var(--warning); }
.g-tag--key { background: var(--highlight); color: #1a1815; border-color: transparent; }

/* ---------- GDD section ---------- */
.g-section { border-top: 1px solid var(--border); padding-top: 32px; display: grid; grid-template-columns: 160px 1fr; gap: 24px; }
.g-section__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); padding-top: 10px; }
.g-section__body { display: grid; gap: 16px; max-width: var(--measure); }
.g-section__tags { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) { .g-section { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Plan timeline ---------- */
.g-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.g-milestone { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding-bottom: 24px; }
.g-milestone::before { content: ""; position: absolute; left: 107px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.g-milestone:last-child::before { display: none; }
.g-milestone__when { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle); padding-top: 4px; }
.g-milestone__card { position: relative; padding-left: 28px; display: grid; gap: 4px; }
.g-milestone__card::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-strong);
}
.g-milestone.is-done .g-milestone__card::before { background: var(--moss); border-color: var(--moss); }
.g-milestone.is-current .g-milestone__card::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.g-milestone__title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.g-milestone__desc { font-size: 15px; line-height: 1.6; color: var(--ink-muted); margin: 0; }
