:root, [data-theme="light"] {
  --paper: #f4f3f1;
  --paper-deep: #e6e4df;
  --card: #ffffff;
  --ink: #1c1b19;
  --muted: #5c5852;
  --line: #ddd9d2;
  --teal: #0e5c56;
  --teal-deep: #0a3f3b;
  --on-accent: #ffffff;
  --rust: #8c3826;
  --rust-bg: #f6e6e1;
  --gold: #6e5312;
  --gold-bg: #f4e7c4;
  --sage: #21573a;
  --sage-bg: #e3f0e6;
  --blue: #1e4f68;
  --toast-bg: #1c1b19;
  --toast-ink: #f4f3f1;
  --shadow: 0 1px 0 rgba(28, 28, 26, 0.04);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --nav-h: 72px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
}
[data-theme="dark"] {
  --paper: #141413;
  --paper-deep: #1c1c1a;
  --card: #232320;
  --ink: #f3f1ea;
  --muted: #c8c4bb;
  --line: #3c3b37;
  --teal: #3d9e94;
  --teal-deep: #9ee0d8;
  --on-accent: #062421;
  --rust: #f0b2a4;
  --rust-bg: #3a2420;
  --gold: #e6d3a1;
  --gold-bg: #3a3220;
  --sage: #b7d7c4;
  --sage-bg: #1e3328;
  --blue: #b7d4e4;
  --toast-bg: #f3f1ea;
  --toast-ink: #141413;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); }
body { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal-deep); }

.app {
  min-height: 100vh;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 8px;
  background: var(--paper);
}
.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0;
  letter-spacing: -0.02em;
}
.tagline {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.3;
  margin: 2px 0 0;
}
.top .tagline { font-size: 0.92rem; max-width: 16rem; }
.who { color: var(--muted); font-size: 0.85rem; margin: 0; }
.area-title { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; margin: 0 0 4px; }
.doors, .door-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.door {
  text-align: left;
  border-radius: 16px;
  padding: 14px;
  min-height: 112px;
  background: var(--card);
  border: 1px solid var(--teal);
  display: grid;
  align-content: start;
  gap: 6px;
  box-shadow: var(--shadow);
}
.door strong { font-size: 1.05rem; color: var(--teal-deep); }
.door p, .door span { color: var(--muted); font-size: 0.88rem; margin: 0; }
.door-actions .btn { width: 100%; margin: 0; }
@media (max-width: 560px) {
  .welcome .doors { grid-template-columns: 1fr; }
}
.main { padding: 12px 20px 32px; }

.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  z-index: 6;
}
.nav button, .btn, .chip, .module {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 12px;
}
.nav button { min-width: 0; min-height: 44px; }
.nav button.area { flex: 1 1 140px; max-width: 220px; font-weight: 700; }
.nav button.quiet {
  flex: 0 1 88px;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
}
.nav button.on, .chip.on, .btn.primary {
  background: var(--teal);
  color: var(--on-accent);
  border-color: var(--teal);
}
.btn.primary { border-radius: 12px; padding: 12px 16px; font-weight: 600; }
button.door { border-radius: 16px; padding: 14px; background: var(--card); color: var(--ink); border-color: var(--teal); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--rust); border-color: var(--line); background: var(--card); }
.btn:focus-visible, .nav button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .module:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.welcome { max-width: 40rem; padding-top: 12px; }
.welcome h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.lede { font-size: 1.05rem; }
.steps { padding-left: 1.1rem; }
.steps li { margin: 8px 0; }
.welcome .btn { margin-top: 8px; }

.founding-offer {
  margin: 18px 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid #e4c98a;
  box-shadow: var(--shadow);
}
.founding-offer h2 { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 6px; }
.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
}

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.column {
  scroll-snap-align: start;
  background: var(--paper-deep);
  background: color-mix(in srgb, var(--paper-deep) 65%, transparent);
  border-radius: 16px;
  padding: 10px;
  min-height: 180px;
}
.column h2 {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  margin: 2px 4px 8px;
}
.column h2 span { color: var(--muted); font-weight: 500; }
@media (max-width: 720px) {
  .board { grid-auto-columns: 88%; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1rem; margin: 6px 0; line-height: 1.3; }
.card[data-gated] {
  background:
    repeating-linear-gradient(-12deg, transparent, transparent 10px, rgba(14, 107, 102, 0.05) 10px, rgba(14, 107, 102, 0.05) 11px),
    var(--card);
}
.meta, .posted, .hint, .fine { color: var(--muted); }
.letter { white-space: pre-wrap; font: inherit; margin: 0; }
.posted { margin: 8px 0 0; font-size: 0.92rem; }
.posted.first-seen { color: var(--blue); font-style: italic; }
.posted.conflict { color: var(--rust); }
.rate { margin: 0; font-weight: 650; }
.badges, .chips, .row, .filters, .interval { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
}
.badge.rust { background: var(--rust-bg); color: var(--rust); }
.badge.sage { background: var(--sage-bg); color: var(--sage); }
.badge.gold { background: var(--gold-bg); color: var(--gold); }
.badge.quiet { background: var(--paper-deep); color: var(--ink); }
.chips span, .chip {
  background: var(--paper);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.82rem;
}
.row { margin-top: 8px; }
.row select, .stack input, .stack select, .stack textarea, .filters input, .filters select, .find-bar input, .home-search input, .filter-sheet input, .filter-sheet select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
}
.stack { display: grid; gap: 8px; }
.stack label, .check { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.check { grid-template-columns: auto 1fr; align-items: center; color: var(--ink); }
.stack textarea { min-height: 88px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.details { margin-top: 10px; display: grid; gap: 8px; }

.filters { margin-bottom: 12px; }
.filters input, .filters select { width: auto; flex: 1 1 140px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0;
}
.panel h2, .plans h3 { font-family: var(--serif); margin: 0 0 6px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.plan {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--card);
}
.plan.on { border-color: var(--teal); }
.price { font-family: var(--serif); font-size: 1.6rem; margin: 4px 0; }
.plan ul { margin: 8px 0; padding-left: 1.1rem; }
.vendor-modules { display: grid; gap: 14px; }
.vendor-modules h3 { margin: 0; font-size: 0.95rem; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.vendor-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.module { border-radius: 12px; text-align: left; min-height: 52px; display: grid; align-content: center; }
.module small { color: var(--muted); font-size: 0.72rem; }
.module.certified { background: var(--gold-bg); border-color: #e2cf90; }
.module.interested { background: var(--sage-bg); border-color: #b7d7c2; }
.empty, .banner {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
  margin: 8px 0 12px;
}
.toast {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
  background: var(--toast-bg);
  color: var(--toast-ink);
  padding: 12px 14px;
  border-radius: 12px;
  z-index: 8;
  max-width: 420px;
  margin: 0 auto;
}
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.confirm { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.outreach { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.outreach th, .outreach td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.shot { width: 100%; max-height: 180px; object-fit: contain; border-radius: 12px; background: var(--paper-deep); }
.local-pill {
  font-size: 0.75rem;
  color: var(--teal-deep);
  background: var(--paper-deep);
  border-radius: 999px;
  padding: 4px 8px;
}
.sheet {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 20px calc(var(--nav-h) + 28px);
}
.sheet h1, .sheet h2 { font-family: var(--serif); font-weight: 500; }
.sheet .nav { position: fixed; }
.sheet .nav a {
  flex: 1 1 0;
  display: grid;
  place-items: center;
  min-height: 48px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
}
.sheet .nav a.area { color: var(--ink); }
.joblist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; }
.joblist .card h2 { font-size: 1.25rem; margin: 4px 0 0; font-weight: 600; line-height: 1.3; }
.joblist .card h2 a { color: var(--ink); text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 28px; }
.footer-links a { color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.top-actions, .quiet-nav { display: flex; align-items: center; gap: 4px; }
.theme-toggle {
  width: 44px; height: 44px;
  border-radius: 999px;
  display: grid; place-items: center;
  padding: 0;
  color: var(--ink);
  background: var(--card);
}
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
.text-link {
  background: none;
  border: 0;
  color: var(--teal-deep);
  padding: 8px 6px;
  min-height: 44px;
  font-weight: 600;
  border-radius: 8px;
}
.text-link.on { color: var(--ink); }
.welcome { padding-top: 28px; }
.welcome h1 { margin-bottom: 16px; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; }
.home-search, .find-bar { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.home-search { margin-top: 8px; }
.find-bar { margin: 8px 0 20px; }
.card { padding: 20px 18px; margin: 0 0 14px; border-radius: 16px; }
.card h3 { font-size: 1.22rem; font-weight: 600; margin: 0; line-height: 1.3; }
.card-hit {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  border-radius: 0;
}
.employer { margin: 6px 0 0; color: var(--muted); }
.card-line { margin: 10px 0 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tags span {
  background: var(--paper-deep);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
}
.details { margin-top: 16px; }
.stages {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 8px 0 18px;
  border-bottom: 1px solid var(--line);
}
.stages button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 10px 8px;
  white-space: nowrap;
}
.stages button.on { color: var(--ink); border-bottom-color: var(--teal); background: none; }
.founding-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 4px 20px 0;
  padding: 10px 12px;
  background: var(--paper-deep);
  border-radius: 12px;
  font-size: 0.95rem;
}
.founding-banner p { margin: 0; }
.filter-layer { position: fixed; inset: 0; z-index: 30; }
.filter-layer[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 20, 19, 0.45); border: 0; padding: 0; }
.filter-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 82vh;
  overflow: auto;
  background: var(--card);
  color: var(--ink);
  border-radius: 20px 20px 0 0;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  display: grid;
  gap: 12px;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-family: var(--serif); font-weight: 500; }
.nav button.area { flex: 1 1 0; max-width: none; font-size: 1.05rem; }
@media (min-width: 880px) {
  .nav {
    position: sticky;
    top: 0;
    order: -1;
    border-top: 0;
    border-bottom: 1px solid var(--line);
  }
  .top { order: -2; }
  .app { padding-bottom: 48px; }
}
.sheet form input[type="tel"], .sheet form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  min-height: 48px;
}
.sheet .check { display: flex; gap: 10px; align-items: flex-start; }
.sheet .check input { margin-top: 4px; }
