:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1b1d22;
  --ink-2: #4a4f5a;
  --muted: #6b7180;
  --line: #e3dfd6;
  --accent: #0f6b5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1ec;
  --warn-soft: #fdf0d8;
  --warn-ink: #7a4e05;
  --sample-soft: #ece9f7;
  --sample-ink: #4b3f8f;
  --danger: #b42318;
  --focus: #2563eb;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(20 20 30 / 0.04), 0 4px 16px rgb(20 20 30 / 0.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418;
    --surface: #1b1e24;
    --ink: #eceae4;
    --ink-2: #c3c6cd;
    --muted: #9399a5;
    --line: #2d3139;
    --accent: #3fb59d;
    --accent-ink: #0b1210;
    --accent-soft: #163029;
    --warn-soft: #3a2c10;
    --warn-ink: #f2c66d;
    --sample-soft: #29253f;
    --sample-ink: #c2b8f5;
    --danger: #f97066;
    --focus: #7aa7ff;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); letter-spacing: -0.02em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code { font-size: 0.9em; background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; margin: 0 auto; padding: 40px 0 64px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { font-weight: 750; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.site-header nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 0.95rem; }
.site-header nav a { color: var(--ink-2); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; font-size: 0.9rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-inner a { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }

/* Home */
.hero { padding: 56px 0 32px; max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.lede { font-size: 1.125rem; color: var(--ink-2); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.section-title { font-size: 1.35rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head p { margin: 0; }
.steps { padding: 24px 0 40px; }
.steps ol { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink-2); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.875rem; margin-bottom: 10px; }
.steps strong { color: var(--ink); display: block; }
.notice { background: var(--sample-soft); color: var(--sample-ink); border-radius: var(--radius); padding: 12px 16px; font-size: 0.95rem; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; scroll-margin-top: 16px; }
.card-title { font-size: 1.25rem; margin-top: 12px; }
.problem { color: var(--ink-2); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.tier-starter { background: var(--bg); }
.tier-validated, .tier-build-ready { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tier-tier-under-review { background: var(--bg); color: var(--muted); border-style: dashed; }
.badge-reserved { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.badge-sample { background: var(--sample-soft); color: var(--sample-ink); border-color: transparent; }

.facts { margin: 4px 0 16px; display: grid; gap: 10px; font-size: 0.925rem; }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; }
.source { display: block; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 480px) {
  .facts div { grid-template-columns: 1fr; gap: 0; }
}
.contents { border-top: 1px solid var(--line); padding-top: 12px; font-size: 0.925rem; }
.contents summary { cursor: pointer; font-weight: 600; color: var(--ink-2); min-height: 32px; }
.contents ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }
.card-foot { margin-top: auto; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { display: flex; flex-direction: column; }
.amount { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price-note { font-size: 0.8rem; color: var(--muted); }

.cta-pair { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-top: 48px; }
.cta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.cta h2 { font-size: 1.2rem; }
.cta p { color: var(--ink-2); }

/* Reserve page */
.back { font-size: 0.925rem; }
.back a { text-decoration: none; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0 24px; }
.summary-title { font-weight: 650; font-size: 1.1rem; margin: 10px 0 4px; }
.summary-price { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.summary-price .muted { font-weight: 400; font-size: 0.925rem; }
.small-title { font-size: 1.05rem; margin-top: 8px; }
.next-steps { padding-left: 20px; color: var(--ink-2); margin-bottom: 28px; }
.ticks { padding-left: 20px; color: var(--ink-2); }

/* Forms */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.hint { margin: 0; font-size: 0.875rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.error { margin: 0; color: var(--danger); font-size: 0.875rem; font-weight: 500; }
.error-summary { border-left: 4px solid var(--danger); padding: 4px 12px; }
.error-summary p { margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 0.9rem !important; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }

/* Legal */
.legal h2 { font-size: 1.15rem; margin-top: 1.75em; }
.legal ul { padding-left: 20px; }
.draft { display: inline-block; background: var(--warn-soft); color: var(--warn-ink); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 6px; }

/* Admin */
.admin { padding: 32px 0 48px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 32px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.stat-num { font-size: 2rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.admin-section { margin-bottom: 40px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; text-transform: capitalize; white-space: nowrap; }
td { max-width: 320px; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.record { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0 24px; }
.record div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.record dt { color: var(--muted); text-transform: capitalize; }
.record dd { margin: 0; overflow-wrap: anywhere; }
.admin-head form, .record + form { display: flex; gap: 12px; flex-wrap: wrap; }
tbody th { text-transform: none; color: var(--ink); font-weight: 500; white-space: normal; }
.row-strong th, .row-strong td { font-weight: 700; background: var(--accent-soft); }
.follow-up { display: flex; gap: 6px; align-items: center; }
.follow-up select { width: auto; min-height: 36px; padding: 4px 8px; font-size: 0.875rem; }
.status-new { border-color: var(--warn-ink); }
.status-agreed-to-deposit { border-color: var(--accent); background: var(--accent-soft); }
.status-not-interested { color: var(--muted); }

/* Admin bar: dark so it's always clear you're in admin */
.admin-bar { background: #16181d; color: #e9e7e1; position: sticky; top: 0; z-index: 5; }
.admin-bar a { color: #e9e7e1; text-decoration: none; }
.admin-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.admin-bar .logo { color: #fff; display: flex; align-items: center; gap: 8px; }
.admin-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: #f2c66d; color: #16181d; padding: 2px 8px; border-radius: 6px; }
.admin-bar-actions { display: flex; align-items: center; gap: 16px; font-size: 0.9rem; }
.admin-bar-actions a:hover { text-decoration: underline; }
.admin-bar-actions button { font: inherit; font-weight: 600; color: #16181d; background: #e9e7e1; border: 0; border-radius: 999px; padding: 6px 14px; min-height: 34px; cursor: pointer; }
.admin-bar-actions button:hover { background: #fff; }
.admin-nav { border-top: 1px solid #2c3038; }
.admin-nav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.admin-nav a { color: #b9bcc4; font-size: 0.875rem; font-weight: 500; padding: 10px 10px; white-space: nowrap; border-bottom: 2px solid transparent; }
.admin-nav a:first-child { padding-left: 0; }
.admin-nav a:hover { color: #fff; border-bottom-color: #f2c66d; }
.admin-bar :focus-visible { outline-color: #f2c66d; }
.admin-section, .admin-section[id] { scroll-margin-top: 112px; }
.nav-badge { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: #f2c66d; color: #16181d; font-size: 0.75rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; overflow-wrap: normal; }
