/* Same palette and type as the Proposal Builder and its PDF, so the web version reads as the same document.
   The one flourish is the signature line: the client's typed name appears in handwriting. */
:root {
  --bg: #F3F5F4;
  --surface: #FFFFFF;
  --ink: #17221F;
  --muted: #5B6A65;
  --line: #D9E0DD;
  --accent: #0F7A5C;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1F1EB;
  --warn: #B4462F;
  --warn-soft: #FBEAE5;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-hand: "Caveat", "Bradley Hand", "Segoe Script", cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111816; --surface: #19221F; --ink: #E5ECE9; --muted: #95A59F; --line: #2C3834;
    --accent: #4CC59C; --accent-ink: #0D1A15; --accent-soft: #1C3229; --warn: #F08A70; --warn-soft: #3A211B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111816; --surface: #19221F; --ink: #E5ECE9; --muted: #95A59F; --line: #2C3834;
  --accent: #4CC59C; --accent-ink: #0D1A15; --accent-soft: #1C3229; --warn: #F08A70; --warn-soft: #3A211B;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16.5px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; }
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.band { height: 6px; background: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 140px; }
.read { max-width: 680px; }
.loading { padding: 80px 0; color: var(--muted); }

/* Masthead */
.mast { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 22px 0 0; font-size: .92rem; }
.mast b { font-weight: 600; }
.mast span { color: var(--muted); }
.title { padding: 56px 0 0; display: grid; gap: 10px; }
.title .kicker { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: var(--muted); }
.title h1 { font-size: clamp(2.4rem, 7.5vw, 4.4rem); font-weight: 700; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.title .att { color: var(--muted); }
.lead { margin-top: 22px; font-size: 1.08rem; }

/* Status banners */
.banner { margin-top: 28px; border-radius: 12px; padding: 14px 18px; display: grid; gap: 2px; }
.banner.ok { background: var(--accent-soft); border: 1px solid var(--accent); }
.banner.ok b { color: var(--accent); }
.banner.warn { background: var(--warn-soft); border: 1px solid var(--warn); }

/* The return on it, said as a sentence */
.gain { margin-top: 40px; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.gain p.big { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.45rem, 3.6vw, 2.05rem); line-height: 1.22; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; max-width: 32ch; text-wrap: balance; }
.gain p.small { color: var(--muted); }

/* Sections */
section { padding-top: 52px; }
section > h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); font-weight: 700; }
section > h2::after { content: ""; display: block; width: 40px; height: 3px; background: var(--accent); margin-top: 10px; border-radius: 2px; }
section .intro { margin-top: 14px; color: var(--muted); max-width: 62ch; }
.told { margin-top: 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
.told li { border-left: 3px solid var(--line); padding: 2px 0 2px 16px; font-size: 1.05rem; }
.told li::before { content: "\201C"; } .told li::after { content: "\201D"; }
.setup { margin-top: 16px; padding-left: 1.4em; display: grid; gap: 8px; }
.setup li::marker { color: var(--accent); font-weight: 700; font-family: var(--font-display); }

/* Package choice */
.pkgs { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 820px) { .pkgs { grid-template-columns: minmax(0, 1fr); } }
.pkg { position: relative; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 6px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 18px 18px 16px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.pkg:hover { border-color: var(--muted); }
.pkg input { position: absolute; opacity: 0; pointer-events: none; }
.pkg:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.pkg:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pkg .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.pkg .rec { font-size: .8rem; font-weight: 600; color: var(--accent); }
.pkg .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; margin-left: auto; }
.pkg:has(input:checked) .tick { background: var(--accent); border-color: var(--accent); }
.pkg .tick svg { width: 12px; height: 12px; opacity: 0; }
.pkg:has(input:checked) .tick svg { opacity: 1; }
.pkg .nm { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.pkg .pr { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pkg .meta { font-size: .86rem; color: var(--muted); }
.pkg ul { padding-left: 1.15em; display: grid; gap: 5px; font-size: .92rem; margin-top: 8px; align-content: start; }
.pkg ul li::marker { color: var(--accent); }
.pkg .sup { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.pkg .sup b { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; }
.pkg .supd { display: block; margin-top: 4px; font-size: .86rem; line-height: 1.45; }
.pkgs.locked .pkg { cursor: default; }
.pkgs.locked .pkg:not(:has(input:checked)) { opacity: .55; }
.note { margin-top: 14px; font-size: .9rem; color: var(--muted); max-width: 70ch; }

/* Dashboard choice */
.dash { margin-top: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 12px; }
.dash h3 { font-size: 1.12rem; }
.opt { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input { accent-color: var(--accent); width: 18px; height: 18px; margin: 3px 0 0; }
.opt .on { font-weight: 600; }
.opt .op { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt small { grid-column: 2 / 4; color: var(--muted); font-size: .88rem; }

/* Extras table */
.extras { margin-top: 18px; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.extras td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.extras td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-weight: 600; }
.extras small { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }

/* Total + approve, side by side on wide screens */
.close { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; margin-top: 22px; }
@media (max-width: 860px) { .close { grid-template-columns: minmax(0, 1fr); } }
.total { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; font-variant-numeric: tabular-nums; }
.total h3 { font-size: 1.12rem; margin-bottom: 8px; }
.total dl { margin: 0; display: grid; grid-template-columns: 1fr auto; }
.total dt, .total dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.total dd { text-align: right; font-weight: 600; padding-left: 12px; }
.total .sum dt, .total .sum dd { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; border-bottom: 2px solid var(--ink); }
.total .sub dt { color: var(--muted); padding-left: 14px; }
.total .sub dd { font-weight: 500; }
.total .after { margin-top: 14px; display: grid; gap: 6px; font-size: .92rem; color: var(--muted); }
.total .after b { color: var(--ink); font-weight: 600; }

.sign { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; padding: 22px 20px 20px; display: grid; gap: 16px; }
.sign h3 { font-size: 1.25rem; }
.sign .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.field { display: grid; gap: 5px; font-size: .88rem; font-weight: 600; min-width: 0; }
.field span.h { font-weight: 400; color: var(--muted); }
.field input { font-size: 1rem; font-weight: 400; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); width: 100%; min-width: 0; }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.sigbox { display: grid; gap: 4px; padding-top: 4px; }
.sigbox label { font-size: .88rem; font-weight: 600; }
.sigbox input { font-family: var(--font-hand); font-size: 2.4rem; line-height: 1.1; padding: 6px 4px 2px; border: none; border-bottom: 2px solid var(--ink); background: transparent; width: 100%; min-width: 0; border-radius: 0; }
.sigbox input:focus { outline: none; border-bottom-color: var(--accent); }
.sigbox input::placeholder { color: var(--line); }
.sigbox .under { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.agree { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: .95rem; cursor: pointer; }
.agree input { accent-color: var(--accent); width: 19px; height: 19px; margin: 2px 0 0; }
.err { color: var(--warn); font-weight: 600; font-size: .92rem; }
.err:empty { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 13px 22px; font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--accent); }
.sign .btn[type=submit] { justify-self: start; }

/* Signed record */
.signed { display: grid; gap: 6px; }
.signed .hand { font-family: var(--font-hand); font-size: 2.6rem; line-height: 1.05; border-bottom: 2px solid var(--ink); padding: 4px 4px 2px; overflow-wrap: anywhere; }
.signed .who { font-size: .92rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.signed .next { margin-top: 10px; }
.signed .acts { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.stamp { animation: stamp .45s ease-out both; }
@keyframes stamp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }

/* Going live: a real sequence, so it's numbered */
.steps { margin-top: 20px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
@media (max-width: 720px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: s; border-top: 3px solid var(--accent); padding-top: 12px; display: grid; gap: 4px; }
.steps li::before { content: counter(s); font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--accent); line-height: 1; }
.steps b { font-weight: 600; }
.steps span { color: var(--muted); font-size: .94rem; }
.weeks { margin-top: 16px; }

.terms { margin-top: 16px; padding-left: 1.2em; display: grid; gap: 8px; max-width: 70ch; }
.terms li::marker { color: var(--accent); }
.fine { margin-top: 18px; font-size: .88rem; color: var(--muted); font-style: italic; max-width: 70ch; }

.contact { margin-top: 56px; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.contact b { font-family: var(--font-display); font-size: 1.15rem; }

/* Bottom bar with the running total */
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(15, 60, 45, .08); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateY(0); transition: transform .2s ease; z-index: 5; }
.bar.away { transform: translateY(110%); }
.bar-in { max-width: 1040px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bar-sum { font-variant-numeric: tabular-nums; font-size: .95rem; min-width: 0; }
.bar-sum b { font-family: var(--font-display); font-size: 1.15rem; }
.bar-sum span { color: var(--muted); }
@media (max-width: 520px) { .bar .btn { padding: 11px 14px; font-size: .92rem; } .bar-sum { font-size: .86rem; } }

.missing { padding: 90px 0; display: grid; gap: 12px; max-width: 560px; }
.missing h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.missing p { color: var(--muted); }

@media print {
  body { background: #fff; color: #000; font-size: 11.5pt; }
  .bar, .acts, .sign .btn, .loading { display: none !important; }
  .wrap { padding-bottom: 0; max-width: none; }
  .title { padding-top: 20px; }
  section { padding-top: 26px; break-inside: avoid-page; }
  .pkgs { grid-template-columns: repeat(3, 1fr); }
  .pkg, .total, .sign, .dash { break-inside: avoid; }
  .close { grid-template-columns: 1fr 1fr; }
}
