:root {
  color-scheme: dark;
  --bg: #090a0d;
  --panel: rgba(17, 20, 26, 0.88);
  --panel-strong: #181c24;
  --text: #f4f5f7;
  --text-soft: #b6bbc5;
  --text-muted: #858c98;
  --line: rgba(244, 245, 247, 0.1);
  --line-strong: rgba(244, 245, 247, 0.18);
  --accent: #e56a1f;
  --accent-bright: #f47d2b;
  --red: #ff7c88;
  --radius: 28px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page-glow {
  position: fixed;
  inset: -30vmax;
  z-index: -1;
  background:
    radial-gradient(ellipse 34% 34% at 70% 23%, rgba(229, 106, 31, 0.23), transparent 73%),
    radial-gradient(ellipse 32% 30% at 20% 45%, rgba(119, 129, 145, 0.17), transparent 72%);
  filter: blur(28px);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header,
.planner-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 78px;
  margin-top: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 14px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(22px);
}

.brand { font-size: 18px; font-weight: 600; letter-spacing: -0.035em; }
.back-link { color: var(--text-soft); font-size: 13px; font-weight: 600; }
.back-link span { margin-left: 7px; }
.back-link:hover, .back-link:focus-visible { color: var(--text); }

.planner-shell { padding: clamp(60px, 9vw, 112px) 0 88px; }

.planner-intro { max-width: 790px; margin-bottom: clamp(38px, 5vw, 58px); }
.eyebrow, .step-count, .block-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1, h2 { letter-spacing: -0.05em; }
h1 { margin-bottom: 22px; font-size: clamp(46px, 7.2vw, 74px); font-weight: 600; line-height: 0.97; }
.planner-intro > p:not(.eyebrow) { max-width: 680px; color: var(--text-soft); font-size: clamp(17px, 2vw, 20px); }
.privacy-note { margin-top: 20px; color: var(--text-muted) !important; font-size: 13px !important; }

.planner-card,
.plan-result {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(17, 20, 26, 0.86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
}

.planner-card { padding: clamp(24px, 4vw, 48px); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 48px; padding: 0; list-style: none; }
.progress li { display: flex; gap: 9px; align-items: center; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.progress li > span:first-child { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 11px; }
.progress li.is-active { color: var(--text); }
.progress li.is-active > span:first-child, .progress li.is-complete > span:first-child { border-color: var(--accent); background: var(--accent); color: #fff; }

.planner-step { max-width: 760px; min-height: 315px; }
.planner-step h2, .plan-result h2 { margin-bottom: 16px; font-size: clamp(32px, 4.5vw, 48px); font-weight: 600; line-height: 1.03; }
.step-copy { margin-bottom: 34px; color: var(--text-soft); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
label { display: grid; gap: 8px; margin-top: 18px; }
.field-grid label { margin-top: 0; }
label > span { font-size: 12px; font-weight: 500; }
label small { margin-left: 5px; color: var(--text-muted); font-size: 10px; font-weight: 400; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: #10131a;
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
input { height: 50px; padding: 0 14px; }
textarea { min-height: 120px; padding: 14px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #858c98; }
input:focus, textarea:focus { border-color: rgba(255, 142, 59, 0.65); background: #121720; box-shadow: 0 0 0 4px rgba(255, 142, 59, 0.1); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }

.spam-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.planner-actions { display: flex; min-height: 52px; margin-top: 42px; padding-top: 24px; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
.planner-actions p { flex: 1; margin: 0; color: var(--text-muted); font-size: 12px; }
.planner-actions p.is-error { color: var(--red); }

.button { display: inline-flex; min-height: 48px; padding: 0 18px; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover, .button-primary:focus-visible { background: var(--accent-bright); }
.button-primary:disabled { background: var(--panel-strong); color: var(--text-muted); cursor: not-allowed; transform: none; }
.button-quiet { border-color: var(--line-strong); background: transparent; color: var(--text-soft); }
.button-quiet:hover, .button-quiet:focus-visible { border-color: rgba(229, 106, 31, 0.5); color: var(--text); }

.plan-result { margin-top: 30px; padding: clamp(24px, 4vw, 48px); }
.plan-result[hidden] { display: none; }
.plan-result-heading { max-width: 780px; margin-bottom: 30px; }
.plan-result-heading > p:not(.eyebrow) { color: var(--text-soft); font-size: 17px; }
.plan-block { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(9, 10, 13, 0.42); }
.plan-block > p:last-child { margin-bottom: 0; }
.plan-approach { margin-bottom: 16px; }
.plan-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.workflow-list, .stack-list, .decision-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.workflow-list { counter-reset: workflow; }
.workflow-list li { position: relative; min-height: 42px; padding-left: 44px; counter-increment: workflow; }
.workflow-list li::before { position: absolute; top: 0; left: 0; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(229, 106, 31, 0.42); border-radius: 50%; color: var(--accent); content: counter(workflow); font-size: 11px; font-weight: 600; }
.workflow-list strong, .stack-list strong { display: block; margin-bottom: 2px; font-size: 14px; }
.workflow-list span, .stack-list span, .decision-list li, .discovery-focus { color: var(--text-soft); font-size: 13px; line-height: 1.5; }
.stack-list li { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.stack-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.decision-list li { position: relative; padding-left: 18px; }
.decision-list li::before { position: absolute; top: 0.65em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); content: ""; }
.discovery-focus { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.result-footer { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-top: 22px; }
.result-footer > p { max-width: 420px; margin: 0; color: var(--text-muted); font-size: 12px; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

@media (max-width: 720px) {
  .planner-shell { padding-top: 56px; }
  .progress { gap: 4px; margin-bottom: 34px; }
  .progress li { justify-content: center; }
  .progress li > span:last-child { display: none; }
  .field-grid, .plan-columns { grid-template-columns: 1fr; }
  .planner-step { min-height: 0; }
  .planner-actions { flex-wrap: wrap; }
  .planner-actions p { order: 3; flex-basis: 100%; }
  .planner-actions .button-primary { margin-left: auto; }
  .result-footer { align-items: flex-start; flex-direction: column; }
  .result-actions { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .site-header, .planner-shell { width: min(calc(100% - 20px), var(--max-width)); }
  .site-header { padding: 0 14px; }
  .back-link { font-size: 12px; }
  h1 { font-size: 44px; }
  .planner-card, .plan-result { border-radius: 22px; }
  .planner-card, .plan-result { padding: 22px 16px; }
  .button { min-height: 46px; padding: 0 14px; }
}

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