/* Groundwork: shared look. Same range-country palette and type as the Land Finder and the cost calculator. */
:root {
  --bg: #f3f1ec; --surface: #ffffff; --fg: #1f2328; --muted: #5c6369; --rule: #d6d2c8;
  --accent: #8a4b1f; --accent-ink: #ffffff; --accent-hover: #6e3a16;
  --band: #22302e; --band-fg: #f3f1ec; --step: #2f5d4a; --warn: #9a3b1f;
  --bar: #3d7a62; --grid: #e6e2d9; --field: #faf9f6;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15191b; --surface: #1d2224; --fg: #e8e5de; --muted: #a09c93; --rule: #343b3e;
    --accent: #d98a4f; --accent-ink: #15191b; --accent-hover: #e9a068;
    --band: #0f1514; --band-fg: #e8e5de; --step: #7fc3a4; --warn: #e58a6a;
    --bar: #7fb49b; --grid: #2a3134; --field: #15191b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15191b; --surface: #1d2224; --fg: #e8e5de; --muted: #a09c93; --rule: #343b3e;
  --accent: #d98a4f; --accent-ink: #15191b; --accent-hover: #e9a068;
  --band: #0f1514; --band-fg: #e8e5de; --step: #7fc3a4; --warn: #e58a6a;
  --bar: #7fb49b; --grid: #2a3134; --field: #15191b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
.wrap { max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 24px; }
a { color: var(--accent); }

/* top band and nav */
header { background: var(--band); color: var(--band-fg); }
header .wrap { padding-block: 18px 26px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 18px; font-size: 15px; }
.nav .brand { font-family: var(--font-display); font-weight: 700; font-size: 24px; text-transform: uppercase; letter-spacing: .02em; color: inherit; text-decoration: none; margin-right: auto; }
.nav a { color: inherit; text-decoration: none; opacity: .85; padding: 6px 0; min-height: 40px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.nav .acct a { font-weight: 600; }
.nav .theme { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; min-height: 40px; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 8vw, 56px); line-height: .95; text-transform: uppercase; margin: 0 0 10px; text-wrap: balance; }
.lede { font-size: 19px; margin: 0; max-width: 680px; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; text-transform: uppercase; margin: 0 0 6px; }
h3 { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.05; text-transform: uppercase; margin: 0 0 6px; color: var(--step); }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.card { background: var(--surface); border: 1px solid var(--rule); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 17px; text-decoration: none;
  border: 2px solid var(--accent); border-radius: 8px; padding: 12px 20px; min-height: 48px; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--fg); background: transparent; }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--step); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.flash { font-size: 14px; color: var(--step); min-height: 20px; margin: 6px 0 0; }
.muted { color: var(--muted); }
.est { display: inline-block; font-size: 12px; color: var(--warn); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; line-height: 1.5; vertical-align: middle; margin-left: 4px; }

/* forms */
.fields { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; }
.field label, .check label { font-size: 15px; font-weight: 500; }
.field .hint { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.field input[type=number], .field input[type=text], .field select {
  font: inherit; font-size: 17px; color: var(--fg); background: var(--field); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; min-height: 48px; width: 100%; }
.field input[type=number] { font-variant-numeric: tabular-nums; }
.unit { color: var(--muted); font-weight: 400; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
@media (max-width: 420px) { .two { grid-template-columns: 1fr; } }
.choice { display: grid; gap: 6px; }
.choice label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); cursor: pointer; font-weight: 400; }
.choice input { width: 20px; height: 20px; accent-color: var(--step); margin: 0; }
.choice label:has(input:checked) { border-color: var(--step); box-shadow: inset 0 0 0 1px var(--step); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
@media (max-width: 480px) { .checks { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); cursor: pointer; font-weight: 400; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--step); margin: 0; flex: none; }
.check:has(input:checked) { border-color: var(--step); box-shadow: inset 0 0 0 1px var(--step); }

/* the path */
.stages { list-style: none; padding: 0; margin: 0; counter-reset: stage; }
.stage { position: relative; border: 1px solid var(--rule); background: var(--surface); padding: 18px 20px 18px 72px; margin-top: 14px; }
.stage::before { counter-increment: stage; content: counter(stage); position: absolute; left: 18px; top: 16px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 22px; background: var(--grid); color: var(--fg); }
.stage.done::before { background: var(--step); color: #fff; content: "\2713"; }
.stage.now { border-color: var(--step); box-shadow: 0 0 0 2px var(--step); }
.stage.now::before { background: var(--accent); color: var(--accent-ink); }
.stage h3 { margin: 0; }
.stage .state { font-size: 13.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 4px; }
.stage.now .state { color: var(--accent); }
.stage.done .state { color: var(--step); }
.stage .why { margin: 6px 0 10px; }
.stage .gate { border-left: 3px solid var(--step); padding: 4px 12px; margin: 10px 0; background: var(--field); }
.stage .gate b { color: var(--step); }
.stage .figs { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 4px; }
.stage .fig { display: grid; }
.stage .fig .n { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; }
.stage .fig .l { font-size: 13px; color: var(--muted); }
.stage .month { margin: 10px 0 0; }
.stage .month h4 { font-size: 15px; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .03em; color: var(--step); }
.stage .month ul { margin: 0; padding-left: 20px; }
.stage .month li { margin: 4px 0; }
.stage .src { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }
@media (max-width: 480px) { .stage { padding-left: 20px; padding-top: 64px; } .stage::before { left: 18px; top: 14px; } }

.heroes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 760px) { .heroes { grid-template-columns: 1fr; } }
.hero { background: var(--surface); border: 1px solid var(--rule); padding: 16px 18px; }
.hero .lbl { font-size: 15px; color: var(--muted); margin: 0; }
.hero .val { font-size: clamp(30px, 6vw, 42px); font-weight: 600; line-height: 1.05; margin: 2px 0; letter-spacing: -.01em; font-family: var(--font-display); }
.hero .rng { font-size: 15px; color: var(--muted); margin: 0; }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 13.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

footer { color: var(--muted); font-size: 14.5px; }
footer .wrap { padding-block: 24px 40px; }
footer .feedback { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--rule); }
footer .feedback strong { display: block; color: var(--fg); font-family: var(--font-display); font-size: 20px; letter-spacing: .3px; margin-bottom: 8px; }
footer .feedback .buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
footer .feedback .btn { font-size: 15px; }
footer .feedback .btn small { display: block; font-weight: 400; font-size: 12.5px; opacity: .85; margin-top: 2px; }

/* home page */
.intro { font-size: 19px; max-width: 720px; }
.intro p { margin: 0 0 16px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.steps .k { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1; color: var(--accent); }

/* print: one clean plan */
@media print {
  :root { --bg: #fff; --surface: #fff; --fg: #000; --muted: #333; --rule: #999; --field: #fff; --grid: #ddd; }
  body { font-size: 12.5px; }
  header, .nav, .actions, .noprint, footer { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card, .stage, .hero { border: 1px solid #999; break-inside: avoid; page-break-inside: avoid; }
  .stage { padding-left: 56px; margin-top: 8px; }
  .stage.now { box-shadow: none; border: 2px solid #000; }
  .stage::before { width: 30px; height: 30px; font-size: 16px; left: 12px; top: 12px; }
  .heroes { grid-template-columns: 1fr 1fr 1fr; }
  a { color: #000; text-decoration: none; }
  .printonly { display: block !important; }
}
.printonly { display: none; }
