@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/outfit-400.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/outfit-500.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/outfit-600.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/outfit-700.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/fraunces-460.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-560.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-deep: #e7e1d4;
  --paper: #fbf8f2;
  --ink: #1c1916;
  --ink-soft: #5e574e;
  --line: #ddd4c4;
  --brass: #8c6239;
  --brass-soft: #eadcc6;
  --good: #135c38;
  --good-bg: #dcefe4;
  --warn: #6d4a10;
  --warn-bg: #f6e7c4;
  --bad: #8a2424;
  --bad-bg: #f6ddd9;
  --info-bg: #efe8dc;
  --shadow: 0 1px 0 rgba(28, 25, 22, 0.04), 0 16px 40px rgba(28, 25, 22, 0.06);
  --radius: 16px;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 0% -10%, #efe4d0 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}
body.has-tabs { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
img { max-width: 100%; }
a { color: var(--ink); }
a:hover { color: var(--brass); }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2rem, 8vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 4vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 0.8em; }
::selection { background: #ead9bc; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus { top: 8px; color: var(--paper); }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mock-banner {
  background: var(--ink);
  color: #f3efe6;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  padding: 8px 14px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header::after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--ink) 0 72%, var(--brass) 72% 100%);
}
.header-inner, .wrap, .wrap-wide {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
}
.wrap-wide { width: min(1040px, calc(100% - 32px)); }
.header-inner {
  width: min(1040px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 650; letter-spacing: -0.02em; }
.brand-sub { color: var(--ink-soft); font-size: 0.75rem; letter-spacing: 0.04em; }
.header-nav { display: flex; align-items: center; gap: 14px; }
.desktop-nav { display: none; gap: 18px; }
.desktop-nav a { text-decoration: none; font-weight: 550; }
.desktop-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brass); }

main { padding: 28px 0 48px; }
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 28px 0 40px;
}
.site-footer a { color: var(--ink-soft); }
.fine { font-size: 0.8rem; }

.kicker {
  margin: 0 0 8px;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lede { color: var(--ink-soft); font-size: 1.05rem; }
.meta { color: var(--ink-soft); font-size: 0.92rem; }
.hint { color: var(--ink-soft); font-size: 0.92rem; }
.stock {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: #f7f3eb; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-ghost { border-color: var(--line); background: var(--paper); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { color: #fff; background: #6e1c1c; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.text-btn, .text-link {
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  min-height: 44px;
  padding: 0 4px;
}

.banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  background: var(--info-bg);
}
.banner-error, .banner-bad { background: var(--bad-bg); color: var(--bad); }
.banner-success, .banner-good { background: var(--good-bg); color: var(--good); }
.banner-info { background: var(--info-bg); }
.banner-warning, .banner-warn { background: var(--warn-bg); color: var(--warn); }
.flash-stack { margin-bottom: 8px; }

.callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brass);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.callout-warn { border-left-color: #b5812b; background: #fbf6ea; }
.callout-bad { border-left-color: var(--bad); background: #fbf4f2; }

.paper, .auth-card, .deal-card, .broker-card, .store-panel, .jacket {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.paper, .auth-card { padding: 18px 16px 20px; margin: 0 0 18px; }
.auth-card { margin-top: 8px; }
.auth-links { color: var(--ink-soft); }

.field { margin: 0 0 14px; }
.field label, .check { font-weight: 600; }
.req {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
}
input, select, textarea {
  width: 100%;
  margin-top: 6px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  scroll-margin-top: 88px;
  scroll-margin-bottom: 120px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea {
  border-color: var(--bad);
}
.field-error { color: var(--bad); font-size: 0.92rem; margin: 6px 0 0; }
.ssn-row { display: flex; gap: 8px; align-items: center; }
.ssn-row input { flex: 1; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 500; }
.check input { width: 20px; height: 20px; margin: 0; }

.hero {
  display: grid;
  gap: 22px;
  margin-bottom: 36px;
}
.hero-actions, .row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.jacket { padding: 18px; }
.jacket-top, .deal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.badge, .pill, .tag, .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 650;
}
.badge { min-height: 26px; padding: 0 9px; font-size: 0.75rem; width: fit-content; }
.badge-icq { background: #141414; color: #f7f4ee; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.68rem; }
.badge-kia { background: #7d1524; color: #fff; font-size: 0.82rem; }
.pill { min-height: 26px; padding: 2px 10px; font-size: 0.78rem; }
.pill-neutral { background: var(--info-bg); color: #3a342c; }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.tag {
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  white-space: nowrap;
}

.section { margin: 0 0 42px; }
.store-grid, .doc-groups { display: grid; gap: 12px; }
.store-panel { padding: 18px; }
.store-panel.store-icq { box-shadow: inset 4px 0 0 #141414, var(--shadow); }
.store-panel.store-kia { box-shadow: inset 4px 0 0 #7d1524, var(--shadow); }
.process { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.process li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.process li > span {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--brass);
}
.plain { margin: 0; padding-left: 1.1em; }
.plain li { margin: 0.25em 0; }
.faq details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.closing {
  background: var(--ink);
  color: #f6f1e8;
  border-radius: 20px;
  padding: 28px 20px;
}
.closing h2, .closing p { color: #f6f1e8; }
.closing .btn-primary { background: #f6f1e8; color: var(--ink); }
.privacy-strip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.desktop-only { display: none; }
.toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  min-height: 40px;
  padding: 0 12px;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.chip span { color: var(--ink-soft); font-weight: 500; }
.chip.is-on { background: var(--ink); color: #f6f1e8; border-color: var(--ink); }
.chip.is-on span { color: #eadcc6; }
.search-field { margin: 0; }
.deal-list, .broker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.deal-card, .broker-card { display: block; padding: 16px; color: inherit; text-decoration: none; }
.deal-card h2 { font-size: 1.45rem; margin-bottom: 2px; }
.deal-card:hover { border-color: #c8b89a; }
.note-preview {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--warn);
  font-size: 0.95rem;
}
.empty, .empty-block, .empty-inline {
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
}
.empty-inline { text-align: left; margin-top: 8px; }

.stepper {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 8px 0 16px;
  scrollbar-width: none;
}
.stepper button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 650;
  min-height: 36px;
  padding: 0 2px 6px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.stepper button.is-current { color: var(--ink); border-bottom-color: var(--brass); }
.stepper button.is-done { color: var(--ink); }
.wizard-step { margin-bottom: 12px; }
.wizard-step h2 { font-size: 1.7rem; }
.wizard-bar {
  position: sticky;
  bottom: calc(72px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 12px 0 calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 65%, rgba(243, 239, 230, 0));
  z-index: 15;
}
.wizard-bar .btn-primary { flex: 1; }
body.wizard-open { padding-bottom: env(safe-area-inset-bottom); }
body.wizard-open .tabbar { display: none; }
body.wizard-open .wizard-bar { bottom: 0; }
#wizard-next, #wizard-back { display: none; }
.js #wizard-next:not([hidden]),
.js #wizard-back:not([hidden]) { display: inline-flex; }
.wizard-step { display: none; }
.wizard-step.is-active { display: block; }
.step-error { color: var(--bad); font-weight: 600; }

.choice-grid { display: grid; gap: 10px; }
.store-card, .choice {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
}
.store-card input, .choice input { position: absolute; opacity: 0; pointer-events: none; }
.store-card > span, .choice > span { display: grid; gap: 4px; justify-items: start; }
.store-card small, .choice small { color: var(--ink-soft); }
.store-card:has(input:checked), .choice:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.store-icq:has(input:checked) { box-shadow: inset 4px 0 0 #141414, inset 0 0 0 1px var(--ink); }
.store-kia:has(input:checked) { box-shadow: inset 4px 0 0 #7d1524, inset 0 0 0 1px var(--ink); }
.credit-block {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0 0;
  padding: 14px 0 0;
}
.credit-block legend { font-family: var(--serif); font-size: 1.25rem; padding: 0; }
.doc-group { margin: 0 0 18px; }
.doc-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.doc-row.is-missing { background: #fbf6ea; margin: 0 -8px; padding: 12px 8px; border-radius: 10px; }
.doc-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.doc-top label { font-weight: 650; }
.review-list { margin: 0; }
.review-row {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.review-row dt { color: var(--ink-soft); font-size: 0.82rem; }
.review-row dd { margin: 0; font-weight: 600; }

.rail, .timeline { list-style: none; margin: 0 0 18px; padding: 0; }
.rail li, .timeline li {
  position: relative;
  padding: 0 0 14px 28px;
}
.rail li::before, .timeline li::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}
.rail li:last-child::before, .timeline li:last-child::before { display: none; }
.rail li span, .timeline li strong { display: block; }
.rail li::after, .timeline li::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg);
}
.rail li.is-done::after, .timeline li.is-done::after { background: var(--ink); border-color: var(--ink); }
.rail li.is-current::after { background: var(--brass); border-color: var(--brass); }
.rail li.is-attention::after { background: #b5812b; border-color: #b5812b; }
.timeline li.is-bad::after { background: var(--bad); border-color: var(--bad); }
.timeline time, .timeline .meta { display: block; color: var(--ink-soft); font-size: 0.88rem; }

.facts { margin: 0 0 18px; }
.facts div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.facts dt { color: var(--ink-soft); font-size: 0.82rem; }
.facts dd { margin: 0; font-weight: 600; }
.back-link { margin: 0 0 10px; }
.demo-box {
  margin-top: 22px;
  padding: 16px;
  border-radius: var(--radius);
  background: #efe8dc;
  border: 1px dashed #b7ab96;
}
.prose h2 { margin-top: 1.2em; }

.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(251, 248, 242, 0.96);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
body.has-tabs .tabbar { display: flex; }
body.wizard-open .tabbar { display: none !important; }
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 650;
}
.tabbar svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--ink); }

@media (min-width: 840px) {
  body.has-tabs { padding-bottom: 0; }
  body.has-tabs .tabbar { display: none; }
  .desktop-nav { display: flex; }
  .desktop-only { display: inline-flex; }
  .brand-sub { display: inline; }
  .hero { grid-template-columns: 1.3fr 0.8fr; align-items: center; gap: 36px; }
  .store-grid, .doc-groups { grid-template-columns: 1fr 1fr; }
  .doc-groups { grid-template-columns: 1fr 1fr 1fr; }
  .wizard-bar { bottom: 0; }
  .facts { grid-template-columns: 1fr 1fr; display: grid; gap: 0 24px; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  main { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
