:root {
  --navy: #07172b;
  --navy-soft: #173653;
  --gold: #d2a94e;
  --gold-dark: #986a1d;
  --ivory: #fbfaf6;
  --white: #fff;
  --ink: #13233a;
  --muted: #526174;
  --line: #cfd6de;
  --soft: #eef2f4;
  --green: #246b52;
  --danger: #9b2f35;
  --shadow: 0 18px 50px rgba(7, 23, 43, .1);
  color: var(--ink);
  background: var(--ivory);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 1rem; z-index: 50; padding: .7rem 1rem; color: #fff; background: var(--navy); }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--gold-dark); outline-offset: 3px; }

.planner-breadcrumbs { max-width: 1240px; margin: 1rem auto 0; padding: 0 clamp(1rem, 4vw, 2rem); }
.planner-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; color: var(--muted); font-size: .75rem; list-style: none; }
.planner-breadcrumbs li + li::before { content: "/"; margin-right: .5rem; color: #8f9aa7; }
.release-status { max-width: 48rem; margin: .65rem 0; color: var(--gold-dark); font-size: .8rem; font-weight: 800; }

main { max-width: 1240px; margin: auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.hero { min-height: 68vh; padding: clamp(4rem, 9vw, 8rem) 0; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.eyebrow { margin: 0 0 .55rem; color: var(--gold-dark); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--navy); line-height: 1.05; }
h1 { margin: .2rem 0 .75rem; max-width: 12ch; font-size: clamp(3rem, 8vw, 6.5rem); letter-spacing: -.055em; }
.hero-line { margin: 0; color: var(--navy-soft); font-size: clamp(1.15rem, 2.2vw, 1.55rem); font-weight: 800; }
.hero-copy { max-width: 700px; color: var(--muted); font-size: 1.05rem; }
.primary-link, .button { min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: .5rem; border-radius: .55rem; font-weight: 850; text-decoration: none; }
.primary-link { margin-top: .6rem; padding: .8rem 1.1rem; color: #fff; background: var(--navy); }
.trust-list { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.trust-list li { padding: .38rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-size: .76rem; font-weight: 750; }
.hero-card { position: relative; overflow: hidden; padding: clamp(1.5rem, 4vw, 2.4rem); color: #e9eef3; background: var(--navy); border-radius: 1.2rem; box-shadow: var(--shadow); }
.hero-card strong { display: block; font-family: Georgia, serif; font-size: 1.7rem; line-height: 1.2; }
.hero-card p:last-child { color: #cbd5df; }
.hero-card .eyebrow { color: var(--gold); }
.route-line { position: absolute; right: -2rem; top: -2rem; width: 9rem; height: 9rem; border: 2px dashed rgba(210, 169, 78, .35); border-radius: 50%; }

.planner-shell { margin-bottom: 5rem; padding: clamp(1.1rem, 4vw, 2.4rem); border: 1px solid var(--line); border-radius: 1.2rem; background: var(--white); box-shadow: var(--shadow); }
.planner-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
.planner-heading h2 { margin: .2rem 0 1rem; font-size: clamp(2rem, 4vw, 3.3rem); }
.save-status { max-width: 300px; margin: .2rem 0; color: var(--green); font-size: .8rem; font-weight: 750; text-align: right; }
.stage-nav { margin-bottom: 1.5rem; padding: 1rem; background: var(--soft); border-radius: .8rem; }
.stage-nav > p { margin: 0 0 .7rem; font-weight: 850; }
.stage-nav ol { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .35rem; margin: 0; padding: 0; list-style: none; }
.stage-nav button { width: 100%; min-height: 42px; padding: .4rem; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .3rem; border: 1px solid var(--line); border-radius: .35rem; color: var(--muted); background: var(--white); font-size: .7rem; font-weight: 750; text-align: left; }
.stage-nav button[aria-current="step"] { color: #fff; border-color: var(--navy); background: var(--navy); }
.stage-nav button.complete { color: var(--green); border-color: #8bb5a6; background: #e6f2ed; }
.stage-content { min-height: 440px; }
.stage-intro { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin: 1rem 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.stage-intro h2 { margin: .15rem 0; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.stage-intro p:last-child { max-width: 600px; color: var(--muted); }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 750; }
input, select, textarea { width: 100%; min-height: 44px; padding: .65rem .72rem; border: 1px solid #9ca9b6; border-radius: .45rem; color: var(--ink); background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.check-label { display: flex; align-items: flex-start; gap: .65rem; padding: .85rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--white); }
.check-label input { flex: 0 0 auto; width: auto; min-height: auto; margin-top: .25rem; }
fieldset { margin: 1rem 0; padding: 0; border: 0; }
legend { margin-bottom: .75rem; color: var(--navy); font-family: Georgia, serif; font-size: 1.25rem; font-weight: 800; }
.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.option-card { position: relative; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card span { min-height: 70px; display: flex; align-items: center; padding: .85rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; font-weight: 750; }
.option-card input:checked + span { border: 2px solid var(--green); color: var(--green); background: #e9f3ef; }
.option-card input:focus-visible + span { outline: 3px solid var(--gold-dark); outline-offset: 3px; }
.custom-option-field { max-width: 620px; margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--soft); }
.custom-option-field small { display: block; margin-top: .4rem; color: var(--muted); }
.custom-entry-title { margin: 0 0 .75rem; color: var(--navy); font-weight: 850; }
.custom-entry-list { display: grid; gap: .75rem; }
.custom-entry-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .65rem; align-items: end; }
.custom-entry-row > label, .custom-entry-row > .field-error { grid-column: 1 / -1; }
.custom-entry-row > input { min-width: 0; }
.add-custom-entry { margin-top: .85rem; }
.field-error { margin: .5rem 0 0; color: var(--danger); font-size: .82rem; font-weight: 800; }
input[aria-invalid="true"] { border: 2px solid var(--danger); }
.plan-context { margin: 1rem 0; padding: 1rem; border-left: .3rem solid var(--gold); border-radius: .4rem; background: var(--soft); }
.plan-context h3 { margin: 0 0 .65rem; }
.plan-context p { margin: .35rem 0; overflow-wrap: anywhere; }

.record-list { display: grid; gap: .75rem; }
.record-card { padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--soft); }
.record-card__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: .7rem; align-items: end; }
.button { padding: .68rem 1rem; border: 1px solid transparent; }
.button--primary { color: #fff; background: var(--navy); }
.button--secondary { color: var(--navy); border-color: var(--navy); background: #fff; }
.button--danger { color: var(--danger); border-color: #d6aaaa; background: #fff; }
.button--small { min-height: 38px; padding: .45rem .7rem; font-size: .78rem; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; }
.stage-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem -1rem -1rem; padding: 1rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.error-summary { margin-bottom: 1rem; padding: 1rem; border: 2px solid var(--danger); border-radius: .6rem; color: var(--danger); background: #fff1f2; }

.review-tools, .track-tools { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(150px, .45fr)); gap: .7rem; margin: 1rem 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .7rem; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
th, td { padding: .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--navy); background: var(--soft); }
td input, td select { min-width: 100px; min-height: 38px; padding: .35rem; }
.pack-list { display: grid; gap: .65rem; margin: 1rem 0; }
.pack-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .85rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; }
.pack-item.is-packed { opacity: .65; background: #edf5f1; }
.pack-item input { width: 1.3rem; min-height: 1.3rem; }
.pack-item strong, .pack-item small { display: block; }
.pack-item small { color: var(--muted); }
.badge { display: inline-flex; padding: .2rem .4rem; border-radius: .25rem; color: var(--navy); background: #eadba8; font-size: .65rem; font-weight: 850; }
.progress-panel { padding: 1rem; border-radius: .7rem; color: #fff; background: var(--navy); }
.progress-panel strong { font-family: Georgia, serif; font-size: 2.2rem; }
.progress-track { height: .65rem; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.25); }
.progress-track span { display: block; height: 100%; background: var(--gold); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.panel { padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--soft); }
.panel h3 { margin: .1rem 0 .8rem; }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.alert-list { padding-left: 1.2rem; color: #7c4e00; }
.where-result { min-height: 1.4rem; color: var(--green); font-weight: 800; }

.privacy-note { margin-bottom: 5rem; padding: clamp(1.5rem, 4vw, 2.6rem); display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; border-left: .35rem solid var(--gold); background: var(--white); }
.privacy-note h2 { margin: .1rem 0; font-size: 2rem; }
.privacy-note > p { color: var(--muted); }
.release-review-note { margin: 0; color: #cbd5df; font-size: .75rem; }

@media (max-width: 850px) {
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .stage-nav ol { grid-template-columns: repeat(3, 1fr); }
  .option-grid, .field-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-card__grid { grid-template-columns: 1fr 1fr; }
  .review-tools, .track-tools { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
  .planner-heading, .stage-intro { align-items: flex-start; flex-direction: column; }
  .save-status { text-align: left; }
  h1 { font-size: clamp(2.8rem, 16vw, 4.6rem); }
  .field-grid, .option-grid, .record-card__grid, .review-tools, .track-tools, .dashboard-grid, .privacy-note { grid-template-columns: 1fr; }
  .planner-shell { padding: 1rem; }
  .stage-nav ol { grid-template-columns: repeat(3, 1fr); }
  .stage-actions { margin-inline: 0; }
  .custom-entry-row { grid-template-columns: 1fr; }
  .custom-entry-row > label, .custom-entry-row > .field-error { grid-column: 1; }
  .custom-entry-row > .button { justify-self: start; }
  .pack-item { grid-template-columns: auto 1fr; }
  .pack-item .badge { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .planner-breadcrumbs, .hero, .stage-nav, .stage-actions, .review-tools, .track-tools, .inline-actions, .privacy-note, .site-footer, .skip-link { display: none !important; }
  body, .planner-shell { color: #000; background: #fff; }
  main { max-width: none; padding: 0; }
  .planner-shell { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .stage-content { min-height: 0; }
  .dashboard-grid { display: block; }
  .panel, .pack-item, .table-wrap { break-inside: avoid; border-color: #777; background: #fff; }
}
