:root {
  --navy: #08396f;
  --navy-900: #052b54;
  --blue: #1769aa;
  --orange: #f28a1a;
  --orange-dark: #cf6800;
  --cream: #fffaf4;
  --ink: #17314d;
  --muted: #5e7184;
  --line: #dce6ef;
  --white: #ffffff;
  --shadow: 0 22px 55px rgba(5, 43, 84, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(180deg, #f3f8fc 0%, #ffffff 54%, #fffaf4 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button, input, select { font: inherit; }
a { color: inherit; }

.site-header {
  background: var(--navy-900);
  color: var(--white);
  border-bottom: 4px solid var(--orange);
}

.header-inner, .hero, .planner-shell, .trust-strip, .footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--orange);
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--navy-900);
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 0.98rem; letter-spacing: 0.01em; }
.brand-copy span { color: #bcd4e8; font-size: 0.76rem; }
.privacy-label { color: #dbe9f5; font-size: 0.84rem; display: flex; align-items: center; gap: 7px; }
.privacy-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #55d6a5; box-shadow: 0 0 0 4px rgba(85, 214, 165, 0.13); }

.hero {
  padding: 64px 0 42px;
  text-align: center;
}

.kicker {
  margin: 0 0 12px;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0 auto;
  color: var(--navy-900);
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.hero > p:last-child {
  max-width: 650px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.planner-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.form-panel, .result-panel { padding: 38px; }
.form-panel { border-right: 1px solid var(--line); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.step-label { color: var(--orange-dark); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.panel-heading h2 { color: var(--navy-900); font-size: 1.45rem; line-height: 1.2; margin: 4px 0 0; }
.text-button { border: 0; background: none; color: var(--blue); padding: 4px 0; cursor: pointer; font-weight: 700; font-size: 0.86rem; }
.text-button:hover { color: var(--orange-dark); }

.field, .choice-wrap { margin: 0 0 22px; }
.field-label, .choice-wrap legend { display: block; margin: 0 0 9px; padding: 0; color: var(--navy-900); font-weight: 750; font-size: 0.92rem; }
.choice-wrap { border: 0; padding: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choice-card { position: relative; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fbfdff;
  cursor: pointer;
  font-weight: 680;
  transition: 160ms ease;
}
.choice-card input:checked + span { border-color: var(--orange); background: #fff6ea; color: var(--navy-900); box-shadow: inset 0 0 0 1px var(--orange); }
.choice-card input:focus-visible + span { outline: 3px solid rgba(23, 105, 170, 0.24); outline-offset: 2px; }

select, input[type="date"] {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--ink);
  outline: 0;
}
select:focus, input[type="date"]:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.14); }
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 0.78rem; }
.error-message { min-height: 18px; margin: 5px 0 0; color: #b42318; font-size: 0.76rem; font-weight: 650; }
.field-error select, .field-error input[type="date"], .field-error .choice-card span { border-color: #d92d20; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.button-primary { background: var(--orange); color: var(--navy-900); }
.button-primary:hover { background: #ff9f32; transform: translateY(-1px); }
.button-secondary { background: var(--white); color: var(--navy); border-color: #aac0d4; }
.button-secondary:hover { border-color: var(--blue); background: #f5f9fc; }
.form-submit { width: 100%; border: 0; }

.result-panel { position: relative; background: linear-gradient(145deg, #f9fcff 0%, #f5f9fc 100%); }
.result-panel::after { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; top: -86px; right: -75px; background: rgba(242, 138, 26, 0.10); pointer-events: none; }
.result-panel[data-tone="danger"] { background: linear-gradient(145deg, #fff9f7 0%, #fff 100%); }
.result-panel[data-tone="warning"] { background: linear-gradient(145deg, #fffaf2 0%, #fff 100%); }
.result-tools { display: flex; justify-content: flex-end; min-height: 28px; position: relative; z-index: 1; }

.empty-state { min-height: 520px; display: grid; place-items: center; text-align: center; padding: 30px; }
.empty-illustration { width: 110px; height: 110px; border-radius: 28px; background: var(--navy); color: var(--white); margin: 0 auto 24px; display: grid; place-items: center; position: relative; box-shadow: 0 16px 32px rgba(8, 57, 111, 0.2); }
.empty-illustration::before { content: ""; width: 44px; height: 50px; border: 3px solid currentColor; border-radius: 7px; background: linear-gradient(var(--orange), var(--orange)) 9px 13px / 26px 4px no-repeat, linear-gradient(#c9deef, #c9deef) 9px 25px / 26px 3px no-repeat, linear-gradient(#c9deef, #c9deef) 9px 35px / 18px 3px no-repeat; }
.empty-illustration::after { content: "✓"; position: absolute; right: -6px; bottom: -7px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--navy-900); border: 4px solid #f5f9fc; font-weight: 900; }
.empty-state h2 { margin: 0; color: var(--navy-900); font-size: 1.45rem; }
.empty-state p { max-width: 360px; margin: 10px auto 0; color: var(--muted); }

.result-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.result-eyebrow { color: var(--orange-dark); font-size: 0.73rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.timing-pill { border-radius: 999px; background: #e7f4ee; color: #10734f; padding: 6px 10px; font-size: 0.76rem; font-weight: 800; }
[data-tone="warning"] .timing-pill { background: #fff0d5; color: #9a5600; }
[data-tone="danger"] .timing-pill { background: #fee4e2; color: #b42318; }
.result-panel h2 { margin: 13px 0 8px; color: var(--navy-900); font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.12; letter-spacing: -0.025em; }
.result-summary { margin: 0 0 24px; color: var(--muted); }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.answer-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.86); }
.answer-card span, .next-step > span { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 7px; }
.answer-card strong { display: block; color: var(--navy-900); line-height: 1.25; }
.answer-card p { margin: 7px 0 0; color: var(--muted); font-size: 0.82rem; }
.next-step { padding: 19px 20px 17px; border-radius: 14px; background: var(--navy-900); color: white; }
.next-step > span { color: #a9cce7; }
.next-step ol { margin: 0; padding-left: 22px; }
.next-step li { padding: 3px 0 3px 5px; }
.result-note { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; padding: 12px 14px; border-left: 3px solid var(--orange); background: #fff8ee; border-radius: 0 10px 10px 0; }
.result-note span { flex: 0 0 21px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--navy-900); font-weight: 900; font-family: Georgia, serif; }
.result-note p { margin: 0; font-size: 0.82rem; color: #684312; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.source-note { margin: 16px 0 0; color: var(--muted); font-size: 0.72rem; }

.trust-strip { padding: 44px 0 54px; display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; }
.trust-lead h2 { margin: 0; color: var(--navy-900); font-size: 1.35rem; }
.trust-lead p { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
.trust-card { border-left: 3px solid var(--orange); padding: 3px 0 3px 16px; }
.trust-card strong { display: block; color: var(--navy-900); }
.trust-card span { display: block; color: var(--muted); font-size: 0.84rem; margin-top: 4px; }

footer { background: var(--navy-900); color: #c8dced; }
.footer-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 0.82rem; }
.footer-inner a { color: white; font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: 3px; }

[hidden] { display: none !important; }

@media (max-width: 860px) {
  .planner-shell { grid-template-columns: 1fr; }
  .form-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .empty-state { min-height: 360px; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-lead { grid-column: 1 / -1; }
}

@media (max-width: 580px) {
  .header-inner, .hero, .planner-shell, .trust-strip, .footer-inner { width: min(100% - 24px, 1120px); }
  .header-inner { min-height: 64px; }
  .brand-copy span, .privacy-label { display: none; }
  .hero { padding: 45px 0 30px; }
  .form-panel, .result-panel { padding: 24px 20px; }
  .choice-grid, .date-grid, .answer-grid, .trust-strip { grid-template-columns: 1fr; }
  .trust-lead { grid-column: auto; }
  .actions .button { width: 100%; }
  .footer-inner { padding: 24px 0; align-items: flex-start; flex-direction: column; }
}

@media print {
  body { background: white; }
  .site-header, .hero, .form-panel, .trust-strip, footer, .result-tools, .actions { display: none !important; }
  .planner-shell { display: block; width: 100%; border: 0; box-shadow: none; }
  .result-panel { padding: 0; background: white !important; }
  .source-note { font-size: 9pt; }
}

