/* Layout concept: postcard-to-phone. Pine ink, marigold "stamp" accent,
   perforated coupon stubs as the signature object. */
:root {
  --bg: #F3F5F1;
  --surface: #FFFFFF;
  --surface-2: #E9EEE7;
  --ink: #10241D;
  --ink-2: #4B5E56;
  --ink-3: #7D8D86;
  --line: #D7DFD5;
  --pine: #1C5B4A;
  --pine-2: #2B7A63;
  --on-pine: #FFFFFF;
  --gold: #F2B01E;
  --on-gold: #2A1D00;
  --good: #1E8449;
  --good-bg: #E3F3E8;
  --warn: #A86A12;
  --warn-bg: #FBF0DA;
  --bad: #B9392A;
  --bad-bg: #FBE6E2;
  --shadow: 0 1px 2px rgba(16, 36, 29, .06), 0 8px 24px rgba(16, 36, 29, .07);
  --display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 14px;
  --hl-bg: #10241D;
  --hl-fg: #F3F5F1;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1411; --surface: #12201B; --surface-2: #192B24; --ink: #E5EEE9; --ink-2: #A3B5AD; --ink-3: #6F837A;
    --line: #23362E; --pine: #5BBE9C; --pine-2: #7FD3B4; --on-pine: #06140F; --gold: #FFC43F; --on-gold: #241800;
    --good: #57C98A; --good-bg: #13301F; --warn: #E7B04F; --warn-bg: #33270F; --bad: #F07C6B; --bad-bg: #3A1813;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35); --hl-bg: #183A2F; --hl-fg: #E9F2EC;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1411; --surface: #12201B; --surface-2: #192B24; --ink: #E5EEE9; --ink-2: #A3B5AD; --ink-3: #6F837A;
  --line: #23362E; --pine: #5BBE9C; --pine-2: #7FD3B4; --on-pine: #06140F; --gold: #FFC43F; --on-gold: #241800;
  --good: #57C98A; --good-bg: #13301F; --warn: #E7B04F; --warn-bg: #33270F; --bad: #F07C6B; --bad-bg: #3A1813;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35); --hl-bg: #183A2F; --hl-fg: #E9F2EC;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s ease, background .15s ease;
  background: var(--pine); color: var(--on-pine);
}
.btn:active { transform: scale(.98); }
.btn.gold { background: var(--gold); color: var(--on-gold); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 22%, transparent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--pine); flex: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 100; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.demo-flag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  background: var(--warn-bg); color: var(--warn); padding: 4px 10px; border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===================== phone polish ===================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }
img, svg, video { max-width: 100%; }
a, button, label, summary, select, input, .chip { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
input[type=range] { height: 40px; accent-color: var(--pine, #1C5B4A); touch-action: pan-y; }
input[type=range]::-webkit-slider-thumb { width: 28px; height: 28px; }
@media (max-width: 760px) {
  /* 16px inputs stop iPhones from zooming in on every field */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea, .input { font-size: 16px !important; }
  small { font-size: max(12.5px, .86em); }
  .btn.small { min-height: 42px; }
  .check { min-height: 40px; }
  .check input { width: 22px; height: 22px; flex: none; }
}
