/* OverAppraised design system — the "Red Pen" identity.
   Tokens mirror the Claude Design project (tokens/colors.css, typography.css,
   spacing.css, shape.css); the --oa-* names are the canonical ones and the
   older semantic aliases below are kept so existing templates keep their class
   vocabulary (.card/.pill/.btn/.stat/...) — restyled here, not renamed.

   Red is scarce by design: the mark, ONE primary CTA per screen, the kicker on
   the headline panel, the strikethrough, alert borders. On ink backgrounds it
   lifts to --accent-on-dark. */

/* ---------- fonts (self-hosted; never load from fonts.googleapis.com) ---------- */
@font-face {
  font-family: "Public Sans";
  src: url("../vendor/fonts/public-sans-var.e4c9b081863a.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../vendor/fonts/instrument-serif-400.9b8dd1ecf641.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../vendor/fonts/instrument-serif-400italic.bc891bdd08ad.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  /* base palette (tokens/colors.css) */
  --oa-ink: #14181d;
  --oa-ink-2: #2b3139;
  --oa-paper: #f7f4ee;
  --oa-paper-2: #efe9dd;
  --oa-white: #fff;
  --oa-line: #e4dfd3;
  --oa-line-2: #d6d0c3;
  --oa-line-3: #efe9dd;
  --oa-red: #c8321e;
  --oa-red-2: #a1281a;
  --oa-red-soft: #fdf1ef;
  --oa-red-on-dark: #ff6a52;
  --oa-green: #2f6f4e;
  --oa-green-soft: #e3efe7;
  --oa-amber: #9a5a12;
  --oa-amber-soft: #fbead9;
  --oa-muted: #8a8172;
  --oa-muted-2: #525a66;
  --oa-muted-3: #4b5563;
  --oa-muted-on-dark: #aeb0b3;
  --oa-struck: #9ca3af;

  /* semantic aliases used throughout the templates */
  --ink: var(--oa-ink);
  --muted: var(--oa-muted);
  --muted-2: var(--oa-muted-2);
  --line: var(--oa-line);
  --line-strong: var(--oa-line-2);
  --line-soft: var(--oa-line-3);
  --accent: var(--oa-red);
  --accent-dark: var(--oa-red-2);
  --accent-on-dark: var(--oa-red-on-dark);
  --good: var(--oa-green);
  --warn: var(--oa-amber);
  --bad: #b91c1c;
  --bg: var(--oa-paper);
  --panel: var(--oa-white);
  --highlight: var(--oa-paper-2);
  --struck: var(--oa-struck);
  /* the identity has no navy — ink carries every dark surface. The --navy
     names stay as aliases so existing markup (.btn.dark, .band-navy, the
     rail) did not need renaming. */
  --navy: var(--oa-ink);
  --navy-ink: var(--oa-paper);
  --subject-tint: var(--oa-red-soft);

  /* shape (tokens/shape.css) */
  --radius-sm: 7px;
  --radius: 14px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  --border-w: 1.5px;
  --shadow-search: 0 10px 30px rgba(20, 24, 29, 0.12);

  --font-ui: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;  /* one overflowing element must never shift the page */
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1 { font: 400 1.9rem/1.15 var(--font-display); letter-spacing: -0.01em; margin: 0.2rem 0 0.7rem; }
h2 { font: 400 1.35rem/1.2 var(--font-display); margin: 1.1rem 0 0.45rem; }
main { max-width: 1180px; margin: 1.2rem auto; padding: 0 1rem; }

/* Full-bleed layouts opt out of the boxed main via body_class. */
body.marketing main,
body.workspace main { max-width: none; margin: 0; padding: 0; }

/* ---------- existing utility vocabulary, restyled ---------- */
.card {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}

table { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
th, td { padding: 0.45rem 0.55rem; border-bottom: 1px solid var(--line-soft); text-align: right; }
th:first-child, td:first-child, th.l, td.l { text-align: left; }
th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
tr.excluded td { color: var(--struck); }
tr.subject-row td { font-weight: 700; background: var(--subject-tint); color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill.good { background: var(--oa-green-soft); color: var(--good); }
.pill.warn { background: var(--oa-amber-soft); color: var(--warn); }
.pill.bad  { background: var(--oa-red-soft); color: var(--bad); }
.pill.tier { background: var(--highlight); color: var(--muted); }

button, .btn {
  background: var(--accent);
  border: 0;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font: 700 0.85rem var(--font-ui);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--accent-dark); color: #fff; }
button.ghost, .btn.ghost {
  background: var(--panel);
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
button.ghost:hover, .btn.ghost:hover { background: var(--highlight); color: var(--ink); }
button.small, .btn.small { padding: 0.18rem 0.55rem; font-size: 0.75rem; }
.btn.dark { background: var(--navy); color: var(--navy-ink); }
.btn.dark:hover { background: var(--oa-ink-2); color: var(--navy-ink); }
.btn.block { display: block; text-align: center; width: 100%; }

input, select, textarea {
  padding: 0.45rem 0.6rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  font: 400 0.9rem var(--font-ui);
  background: var(--panel);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
label {
  font: 700 0.72rem var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
}

.warnings p {
  margin: 0.25rem 0;
  padding: 0.45rem 0.7rem;
  background: #fffbeb;
  border-left: 3px solid var(--warn);
  font-size: 0.85rem;
}
.stat { display: inline-block; margin-right: 1.6rem; }
.stat .v { font: 400 1.55rem/1.2 var(--font-display); display: block; }
.stat .k { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
details.adj { text-align: left; }
details.adj summary { cursor: pointer; color: var(--accent); font-size: 0.78rem; }
.adj-entry {
  margin: 0.3rem 0 0.3rem 0.8rem;
  padding: 0.35rem 0.6rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  text-align: left;
}
.adj-entry .basis { color: var(--muted); }
.adj-entry.disabled { opacity: 0.45; text-decoration: line-through; }
.muted { color: var(--muted); }
.grid-form { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: end; }

/* ---------- shared brand bits ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
/* The mark is an inline SVG (templates/_topbar.html) so it inherits the two
   brand colours from currentColor/--accent and needs no second asset for the
   dark bands. Minimum size is 16px; below 48px use the heavier favicon
   strokes (static/img/icons/favicon.svg). */
.logo .mark { width: 30px; height: 30px; display: block; flex: none; }
.logo .mark .eave { stroke: currentColor; }
.logo .mark .chevron { stroke: var(--accent); }
/* Wordmark: Public Sans "Over" 400 + "Appraised" 800, tracking -.035em. */
.logo .word { font: 800 17px var(--font-ui); letter-spacing: -0.035em; }
.logo .word .thin { font-weight: 400; }

/* Ink surfaces lift the red (#FF6A52) and flip the text colours. */
.band-navy, .on-ink { --accent: var(--oa-red-on-dark); --accent-dark: var(--oa-red-on-dark); }
.kicker {
  margin: 0 0 0.6rem;
  font: 700 11px var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker.accent { color: var(--accent); }
.serif-note { font: italic 400 1rem var(--font-display); color: var(--muted); }

footer.legal {
  max-width: 1180px;
  margin: 2rem auto;
  padding: 1rem 1rem 2rem;
  color: var(--muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--line);
}
body.marketing footer.legal, body.workspace footer.legal { max-width: none; padding: 1rem 3rem 2rem; margin: 0; }

/* ---------- marketing chrome ---------- */
.hero {
  padding: 64px 48px 52px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: radial-gradient(1200px 500px at 50% -10%, var(--highlight) 0%, var(--bg) 65%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  border-radius: 999px;
  padding: 6px 14px;
  font: 600 11.5px var(--font-ui);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 24px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--good); }
.hero h1 {
  margin: 0 0 16px;
  font: 400 clamp(40px, 6vw, 72px)/1.04 var(--font-display);
  letter-spacing: -0.015em;
}
.hero h1 em { color: var(--accent); }
.hero .sub { margin: 0 0 34px; font: 400 18px/1.55 var(--font-ui); color: var(--muted-2); max-width: 520px; }

.hero-search {
  display: flex;
  width: min(720px, 100%);
  background: var(--panel);
  border: 2px solid var(--navy);
  border-radius: 14px;
  box-shadow: var(--shadow-search);
  overflow: hidden;
}
.hero-search select {
  border: 0; border-right: 1px solid var(--line); border-radius: 0;
  padding: 0 14px; font: 600 14px var(--font-ui); background: var(--panel);
}
.hero-search input {
  flex: 1; border: 0; border-radius: 0; padding: 16px 18px;
  font: 400 15px var(--font-ui); min-width: 0;
}
.hero-search select:focus, .hero-search input:focus { outline: none; }
.hero-search button {
  border-radius: 0; padding: 16px 26px; font: 700 15px var(--font-ui); white-space: nowrap;
}
.hero .fineprint { margin: 14px 0 0; font: italic 400 16px var(--font-display); color: var(--muted); }
#hero-suggestions { width: min(720px, 100%); text-align: left; }
#hero-suggestions .suggestions {
  margin-top: 8px;
  box-shadow: var(--shadow-search);
}

.band { padding: 60px 48px; }
.band-stats {
  display: flex; justify-content: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.band-stats .item { flex: 1; max-width: 300px; text-align: center; padding: 30px 20px; }
.band-stats .item + .item { border-left: 1px solid var(--line); }
.band-stats .v { font: 400 40px var(--font-display); }
.band-stats .v small { font-size: 22px; color: var(--muted); }
.band-stats .v.good { color: var(--good); }
.band-stats .k {
  font: 600 12px var(--font-ui);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-top: 4px;
}

.band-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.band-split h2 { margin: 0 0 26px; font: 400 36px/1.12 var(--font-display); }
.feature-row { display: flex; gap: 14px; margin-bottom: 18px; }
.feature-row .n {
  flex: none; width: 34px; height: 34px;
  border-radius: 9px; background: var(--navy); color: var(--navy-ink);
  display: flex; align-items: center; justify-content: center;
  font: italic 400 17px var(--font-display);
}
.feature-row .t { font: 700 15px var(--font-ui); }
.feature-row .d { font: 400 13.5px/1.5 var(--font-ui); color: var(--muted-2); }

.band-navy {
  background: var(--navy); color: var(--navy-ink);
  padding: 44px 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap;
}
.band-navy h2 { margin: 0 0 8px; font: 400 30px var(--font-display); color: var(--navy-ink); }
.band-navy p { margin: 0; font: 400 14px/1.5 var(--font-ui); color: var(--oa-muted-on-dark); max-width: 420px; }
.county-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; max-width: 560px; }
.county-pill {
  border: 1px solid rgba(250, 247, 241, 0.35);
  border-radius: 999px;
  padding: 9px 18px;
  font: 600 13px var(--font-ui);
}
.county-pill.soon { border-style: dashed; font: italic 400 14px var(--font-display); color: var(--oa-muted-on-dark); }

.placeholder-panel {
  background: repeating-linear-gradient(45deg, #efece5 0 8px, #f6f3ec 8px 16px);
  border: 1.5px dashed #cfc8b8;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font: 500 13px ui-monospace, monospace;
  color: #a09a8e;
  text-align: center;
}

/* ---------- wizard (one decision per screen) ---------- */
.stepper { max-width: 420px; margin: 2.2rem auto; padding: 0 1rem; }
.stepper-head { display: flex; justify-content: space-between; align-items: center; }
.stepper-head .step-label { font: 600 12px var(--font-ui); color: var(--muted); }
.stepper-head a { font: 600 13px var(--font-ui); color: var(--muted-2); text-decoration: none; }
.progress { display: flex; gap: 5px; margin: 14px 0 0; }
.progress span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.progress span.on { background: var(--accent); }
.stepper h1 { margin: 24px 0 0; font: 400 30px/1.1 var(--font-display); }
.stepper form, .stepper .step-body { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }

.suggestions { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.suggestions .item {
  display: block; width: 100%;
  padding: 12px 16px;
  font: 500 14px var(--font-ui);
  color: var(--ink);
  background: var(--panel);
  border: 0; border-top: 1px solid var(--line-soft);
  border-radius: 0;
  text-align: left; cursor: pointer;
}
.suggestions .item:first-child { border-top: 0; }
.suggestions .item:hover { background: var(--highlight); }
.suggestions .empty { padding: 12px 16px; font: 400 13.5px var(--font-ui); color: var(--muted); }

.platmap-panel { margin: 0; }
.platmap-panel svg {
  display: block;
  width: 100%;
  height: 150px;
  background: #f6f3ec;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}
.platmap-panel .nb { fill: #efece5; stroke: var(--line-strong); stroke-width: 1; }
.platmap-panel .subject {
  fill: rgba(200, 50, 30, 0.16);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
}
.platmap-panel figcaption {
  margin-top: 6px;
  font: 600 10.5px var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.facts { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; }
.facts .row {
  display: flex; justify-content: space-between; gap: 12px;
  font: 400 13.5px var(--font-ui);
  padding: 5px 0;
}
.facts .row + .row { border-top: 1px solid var(--line-soft); }
.facts .row .k { color: var(--muted); }
.facts .row b { font-weight: 700; }
.facts .row .locked {
  color: var(--muted);
  background: var(--highlight);
  border-radius: 5px;
  padding: 0 8px;
  font: italic 400 13px var(--font-display);
}
.big-figure { font: 400 56px/1.1 var(--font-display); color: var(--accent); }
.big-figure small { font-size: 24px; color: var(--muted); }

/* ---------- step 3 "compare" loop (_estimate_pending.html) ----------
   Your lot on a plat (as on step 2) → a ring sweeps out and picks similar
   homes → they drop into $/sqft bars → sort → a dashed median draws. One 8s
   CSS loop, no script; it runs until the htmx estimate swaps in. Geometry is
   % of a 9:4 stage, so it scales with the column. Each shape's --d delays its
   WHOLE cycle (same period, so the loop stays in phase): that is what makes
   lots appear in the ring's wake and bars leave and sort nearest-first.
   Decorative only — heights are fixed, never data, and the subject never
   becomes a bar, so nothing implies a result. Reduced motion holds the last
   frame. Storyboard: Claude Design canvas "Neighbor Compare Animation". */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.compare-anim {
  background: var(--panel);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
}
.compare-anim .stage { position: relative; aspect-ratio: 9 / 4; overflow: hidden; }
.compare-anim .stage > span { position: absolute; box-sizing: border-box; }
.compare-anim .stage > span,
.compare-anim .status > span {
  animation-duration: 8s;
  animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1);
  animation-delay: var(--d, 0s);
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}
.compare-anim .lot {
  left: var(--px); top: var(--py);
  width: 11%; height: 24%;
  background: #efece5;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  opacity: 0;
  animation-name: cmp-lot;
}
.compare-anim .subject {
  --px: 44.5%; --py: 32.5%;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: #f6dedb;  /* the step-2 plat subject tint, solid on white */
  border: 2px solid var(--accent);
  font: 700 9px/1 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  animation-name: cmp-subject;
}
.compare-anim .comp { --late: var(--line-strong); z-index: 1; animation-name: cmp-comp; }
.compare-anim .comp.mid { --late: var(--ink); }
.compare-anim .ring {
  left: 50%; top: 44.5%;
  width: 88.9%; aspect-ratio: 1;
  border: var(--border-w) solid var(--muted);
  border-radius: 50%;
  opacity: 0;
  animation-name: cmp-ring;
}
.compare-anim .baseline {
  left: 6%; top: 90%; width: 88%; height: 0;
  border-top: var(--border-w) solid var(--line);
  opacity: 0;
  animation-name: cmp-baseline;
}
.compare-anim .median-line {
  left: 6%; top: 40%; width: 0; height: 0;
  z-index: 3;
  border-top: var(--border-w) dashed var(--good);
  animation-name: cmp-median;
}
.compare-anim .median-label {
  left: 6%; top: 40%;
  z-index: 3;
  transform: translateY(-100%);
  padding-bottom: 3px;
  font: italic 400 15px/1 var(--font-display);
  color: var(--good);
  opacity: 0;
  animation-name: cmp-label;
}
/* Plat slots: 7 columns × 3 rows, the subject at the centre. n* drop away;
   c* are the picks — --bx is the bar slot in pick order, --sx after the sort,
   --h the bar height. c7 sorts into the middle (the median). */
.compare-anim .n1 { --px: 57.5%; --py: 32.5%; --d: 0.35s; }
.compare-anim .n2 { --px: 31.5%; --py: 5.5%; --d: 0.48s; }
.compare-anim .n3 { --px: 57.5%; --py: 70.5%; --d: 0.58s; }
.compare-anim .n4 { --px: 70.5%; --py: 5.5%; --d: 0.77s; }
.compare-anim .n5 { --px: 18.5%; --py: 70.5%; --d: 0.84s; }
.compare-anim .n6 { --px: 5.5%; --py: 32.5%; --d: 1.05s; }
.compare-anim .n7 { --px: 83.5%; --py: 32.5%; --d: 1.05s; }
.compare-anim .n8 { --px: 5.5%; --py: 5.5%; --d: 1.1s; }
.compare-anim .n9 { --px: 83.5%; --py: 5.5%; --d: 1.1s; }
.compare-anim .n10 { --px: 5.5%; --py: 70.5%; --d: 1.15s; }
.compare-anim .n11 { --px: 83.5%; --py: 70.5%; --d: 1.15s; }
.compare-anim .c0 { --px: 44.5%; --py: 5.5%; --d: 0.32s; --h: 54%; --bx: 8%; --sx: 56.5%; }
.compare-anim .c1 { --px: 31.5%; --py: 32.5%; --d: 0.35s; --h: 41%; --bx: 17.7%; --sx: 27.4%; }
.compare-anim .c2 { --px: 44.5%; --py: 70.5%; --d: 0.46s; --h: 66%; --bx: 27.4%; --sx: 75.9%; }
.compare-anim .c3 { --px: 57.5%; --py: 5.5%; --d: 0.48s; --h: 30%; --bx: 37.1%; --sx: 8%; }
.compare-anim .c4 { --px: 31.5%; --py: 70.5%; --d: 0.58s; --h: 59%; --bx: 46.8%; --sx: 66.2%; }
.compare-anim .c5 { --px: 70.5%; --py: 32.5%; --d: 0.7s; --h: 45%; --bx: 56.5%; --sx: 37.1%; }
.compare-anim .c6 { --px: 18.5%; --py: 32.5%; --d: 0.72s; --h: 73%; --bx: 66.2%; --sx: 85.6%; }
.compare-anim .c7 { --px: 18.5%; --py: 5.5%; --d: 0.77s; --h: 50%; --bx: 75.9%; --sx: 46.8%; }
.compare-anim .c8 { --px: 70.5%; --py: 70.5%; --d: 0.84s; --h: 38%; --bx: 85.6%; --sx: 17.7%; }

.compare-anim .caption {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.compare-anim .status { display: grid; font: 600 13px/1.3 var(--font-ui); color: var(--ink); }
.compare-anim .status > span { grid-area: 1 / 1; opacity: 0; }
.compare-anim .status > .s1 { animation-name: cmp-s1; }
.compare-anim .status > .s2 { animation-name: cmp-s2; }
.compare-anim .status > .s3 { animation-name: cmp-s3; }
.compare-anim .note { font: italic 400 14px/1.3 var(--font-display); color: var(--muted); }

/* Keyframe % of 8s: 3.125 = 0.25s · 21.25 = 1.7s · 31.25 = 2.5s · 40 = 3.2s ·
   50 = 4s · 61.25 = 4.9s · 85 = 6.8s. Status copy: 0–2s · 2–4.8s · 4.8–8s. */
@keyframes cmp-ring {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.04); animation-timing-function: linear; }
  1.25% { opacity: 1; transform: translate(-50%, -50%) scale(0.04); animation-timing-function: linear; }
  16.25%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@keyframes cmp-lot {
  0% { opacity: 0; transform: scale(0.8); }
  3.125%, 12.5% { opacity: 1; transform: scale(1); }
  16.25%, 100% { opacity: 0; transform: scale(0.9); }
}
@keyframes cmp-subject {
  0% { opacity: 0; transform: scale(0.8); }
  3.125%, 18.75% { opacity: 1; transform: scale(1); }
  23.75%, 100% { opacity: 0; transform: scale(0.9); }
}
@keyframes cmp-comp {
  0% {
    left: var(--px); top: var(--py); width: 11%; height: 24%; border-radius: 3px;
    opacity: 0; transform: scale(0.8);
    background: #efece5; border-color: var(--line-strong);
  }
  3.125% { opacity: 1; transform: scale(1); background: #efece5; }
  5.625% { background: var(--line-strong); }
  21.25% { left: var(--px); top: var(--py); width: 11%; height: 24%; border-radius: 3px; }
  31.25% { left: var(--bx); top: calc(90% - var(--h)); width: 6.4%; height: var(--h); border-radius: 4px 4px 0 0; }
  40% { left: var(--bx); }
  50% { left: var(--sx); }
  57.5% { background: var(--line-strong); border-color: var(--line-strong); }
  61.25% { background: var(--late); border-color: var(--late); }
  85% { opacity: 1; }
  88.75%, 100% {
    left: var(--sx); top: calc(90% - var(--h)); width: 6.4%; height: var(--h); border-radius: 4px 4px 0 0;
    opacity: 0; transform: scale(1);
    background: var(--late); border-color: var(--late);
  }
}
@keyframes cmp-baseline { 0%, 23.75% { opacity: 0; } 28.75%, 86.25% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes cmp-median {
  0%, 61.25% { width: 0; opacity: 1; }
  68.75%, 86.25% { width: 88%; opacity: 1; }
  90%, 100% { width: 88%; opacity: 0; }
}
@keyframes cmp-label { 0%, 67.5% { opacity: 0; } 71.25%, 86.25% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes cmp-s1 { 0%, 23.75% { opacity: 1; } 25%, 98.75% { opacity: 0; } 100% { opacity: 1; } }
@keyframes cmp-s2 { 0%, 23.75% { opacity: 0; } 25%, 58.75% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes cmp-s3 { 0%, 58.75% { opacity: 0; } 60%, 97.5% { opacity: 1; } 98.75%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .compare-anim .stage > span,
  .compare-anim .status > span { animation: none; }
  .compare-anim .lot,
  .compare-anim .ring { opacity: 0; }
  .compare-anim .comp {
    left: var(--sx); top: calc(90% - var(--h)); width: 6.4%; height: var(--h);
    border-radius: 4px 4px 0 0;
    opacity: 1;
    background: var(--late); border-color: var(--late);
  }
  .compare-anim .baseline,
  .compare-anim .median-label,
  .compare-anim .status > .s0 { opacity: 1; }
  .compare-anim .median-line { width: 88%; }
}

.auth-wrap { max-width: 560px; margin: 2.5rem auto; padding: 0 1rem; }
.auth-wrap form > div { margin-bottom: 14px; }
.auth-wrap input:not([type="checkbox"]) { width: 100%; }
.auth-wrap .errorlist { color: var(--bad); font-size: 0.8rem; margin: 4px 0 0; padding-left: 1rem; }

.checkrow { display: flex; gap: 10px; align-items: flex-start; }
.checkrow input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.checkrow label { font: 400 13.5px/1.45 var(--font-ui); text-transform: none; letter-spacing: 0; color: var(--ink); }

/* ---------- limited-preview banner (_preview_banner.html, above the header) ---------- */
/* An ink strip, not a red one: red stays reserved for the page's own CTA. */
.preview-banner {
  background: var(--navy); color: var(--navy-ink);
  padding: 9px 48px;
  font: 400 13px/1.45 var(--font-ui);
  text-align: center;
}
.preview-banner p { margin: 0; }
.preview-banner strong { font-weight: 700; }
.preview-banner a {
  color: var(--navy-ink); font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
  transition: color 140ms;
}
.preview-banner a:hover { color: var(--accent); }
.preview-banner .later { color: var(--oa-muted-on-dark); }
body.workspace .preview-banner { padding: 9px 28px; }

/* ---------- the universal header (_topbar.html — every layout) ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 48px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
/* The middle (property switcher) must SHRINK, never overflow the viewport:
   flex:1 + min-width:0 down the chain, address ellipsized. */
.topbar .middle { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; min-width: 0; }
.topbar .middle details.popover { min-width: 0; max-width: 100%; }
.topbar .middle details.popover > summary { min-width: 0; max-width: 100%; white-space: nowrap; }
.topbar .addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topbar .logo { flex: none; }
.topbar .right { flex: none; }
.topbar .right { display: flex; align-items: center; gap: 20px; font: 600 13px var(--font-ui); color: var(--oa-muted-3); }
.topbar .right a { color: var(--oa-muted-3); text-decoration: none; }
.topbar .right a:hover { color: var(--ink); }
.topbar .right a.outline {
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  color: var(--navy);
}
/* Above the rail, the header inset tightens to align with the rail items. */
body.workspace .topbar { padding: 14px 28px; }
.chip {
  font: 700 10px var(--font-ui);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  background: var(--highlight);
  border-radius: 5px;
  padding: 3px 7px;
  white-space: nowrap;
}
.chip.alert { background: var(--accent); color: #fff; }
.avatar {
  width: 32px; height: 32px; border-radius: 99px;
  background: var(--oa-ink); color: var(--oa-paper);
  display: flex; align-items: center; justify-content: center;
  font: 700 13px var(--font-ui);
}
details.popover { position: relative; }
details.popover > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 7px 14px;
  font: 600 13px var(--font-ui);
  background: var(--panel);
}
details.popover > summary::-webkit-details-marker { display: none; }
details.popover > summary.bare { border: 0; padding: 0; background: none; }
details.popover .menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  min-width: 240px;
  max-width: min(320px, 92vw);
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(20, 24, 29, 0.12);
  padding: 6px;
}
details.popover .menu a {
  display: block; padding: 9px 12px;
  border-radius: 8px;
  font: 600 13px var(--font-ui);
  color: var(--ink); text-decoration: none;
}
details.popover .menu a:hover { background: var(--highlight); }

.workspace-layout { display: flex; min-height: calc(100vh - 57px); align-items: stretch; }
.rail {
  width: 232px; flex: none;
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.rail-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-radius: 10px;
  padding: 10px 14px;
  font: 600 13.5px var(--font-ui);
  color: var(--oa-muted-3);
  text-decoration: none;
}
.rail-item:hover { background: var(--highlight); color: var(--ink); }
.rail-item.active { background: var(--navy); color: var(--navy-ink); font-weight: 700; }
.rail-item.active:hover { background: var(--navy); color: var(--navy-ink); }
.rail-item .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); flex: none; }
.rail .spacer { flex: 1; }
.rail-deadline { background: var(--highlight); border-radius: var(--radius); padding: 16px; text-align: center; }
.rail-deadline .k {
  font: 700 10.5px var(--font-ui);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.rail-deadline .v { font: 400 28px var(--font-display); color: var(--accent); margin: 4px 0 2px; }
.rail-deadline .d { font: 600 12px var(--font-ui); color: var(--muted-2); }
.rail-note { padding: 14px 6px 2px; font: 400 10.5px/1.5 var(--font-ui); color: #a09a8e; }

.workspace { flex: 1; padding: 30px 34px; min-width: 0; }
.workspace-grid { display: flex; gap: 22px; margin-bottom: 22px; }
.workspace-grid > * { min-width: 0; }
.panel {
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.panel.alert { border-color: var(--accent); }
.panel.flush { padding: 0; overflow: hidden; }
.panel .head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.panel .head .kicker { margin: 0; }
.panel-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 22px;
  background: var(--highlight);
  font: 700 13px var(--font-ui);
}
.panel-footer .figure { font: 400 21px var(--font-display); color: var(--good); }

.value-pair { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.value-pair .from .k, .value-pair .to .k { font: 400 13px var(--font-ui); color: var(--muted); }
.value-pair .from .v {
  font: 400 32px var(--font-display);
  color: var(--struck);
  text-decoration: line-through;
}
.value-pair .arrow { font: 400 24px var(--font-display); color: var(--accent); }
.value-pair .to .v { font: 400 52px/1 var(--font-display); }
.savings-line { margin: 14px 0 20px; font: italic 400 16px var(--font-display); color: var(--good); }
.savings-line.muted { color: var(--muted); }

.barchart-wrap { display: flex; flex-direction: column; height: 100%; }
.barchart {
  flex: 1;
  display: flex; align-items: flex-end; gap: 8px;
  min-height: 130px;
  border-bottom: 1.5px solid var(--line);
  position: relative;
}
.barchart .bar { flex: 1; background: var(--line-strong); border-radius: 5px 5px 0 0; min-width: 8px; }
.barchart .bar.subject { background: var(--accent); }
.barchart .median-line {
  position: absolute; left: 0; right: 0;
  border-top: 1.5px dashed var(--good);
}
.barchart .median-label {
  position: absolute; right: 0;
  transform: translateY(-110%);
  font: 600 10px var(--font-ui);
  color: var(--good);
  background: rgba(255, 255, 255, 0.85);
  padding: 0 3px;
}
.barchart-legend {
  display: flex; justify-content: space-between; margin-top: 8px;
  font: 600 11px var(--font-ui); color: var(--muted);
}
.barchart-legend .swatch {
  display: inline-block; width: 9px; height: 9px;
  background: var(--accent); border-radius: 2px;
  margin-right: 5px; vertical-align: -1px;
}

.status-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.status-card .t { font: 700 15px var(--font-ui); }
.status-card .d { font: 400 13px var(--font-ui); color: var(--muted-2); }

.comp-grid-preview td, .comp-grid-preview th { font-size: 0.86rem; }

@media (max-width: 900px) {
  /* iOS Safari zooms the page when a focused input's font is under 16px —
     keep every text control at 16px on small screens. */
  input, select, textarea { font-size: 16px; }
  .preview-banner, body.workspace .preview-banner { padding: 8px 16px; font-size: 12.5px; }
  .topbar { padding: 12px 16px; }
  .topbar .right { gap: 12px; }
  .hero { padding: 44px 20px 40px; }
  .hero-search { flex-wrap: wrap; }
  .hero-search select { border-right: 0; border-bottom: 1px solid var(--line); flex: 1 1 100%; padding: 12px 14px; font-size: 16px; }
  .hero-search input { flex: 1 1 100%; padding: 14px; font-size: 16px; }
  .hero-search button { flex: 1 1 100%; }
  .band { padding: 40px 20px; }
  .band-split { grid-template-columns: 1fr; gap: 28px; }
  .band-stats { flex-direction: column; }
  .band-stats .item { max-width: none; }
  .band-stats .item + .item { border-left: 0; border-top: 1px solid var(--line); }
  .band-navy { padding: 36px 20px; }
  .county-pills { justify-content: flex-start; }
  .topbar .logo .word { display: none; }  /* mark-only logo frees switcher room */
  .topbar .addr { max-width: 34vw; }
  .workspace-layout { flex-direction: column; min-height: 0; }
  /* the rail becomes a horizontally scrollable nav strip */
  .rail {
    width: auto;
    flex-direction: row; flex-wrap: nowrap; align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 10px 12px;
  }
  .rail-item { flex: none; padding: 8px 12px; white-space: nowrap; }
  .rail .spacer, .rail-deadline, .rail-note { display: none; }
  .workspace { padding: 18px 14px; }
  .workspace-grid { flex-direction: column; }
  .value-pair .to .v { font-size: clamp(34px, 9vw, 52px); }
  .value-pair .from .v { font-size: clamp(22px, 6vw, 32px); }
  .big-figure { font-size: clamp(38px, 11vw, 56px); }
  .panel { padding: 18px 16px; }
  .panel.flush { overflow-x: auto; }   /* wide comp tables scroll inside */
  .panel.flush table { min-width: 520px; }
  body.marketing footer.legal, body.workspace footer.legal { padding: 1rem 1.2rem 2rem; }
}
