/* Home Lock for Zillow: a recreation of Zillow's rental search and home
   details UI. Motion follows Emil Kowalski's design-engineering rules:
   custom ease-out curves, transform/opacity only, UI motion under 300ms,
   press feedback on every control, hover gated to fine pointers. */

:root {
  --blue: #006aff;
  --blue-hover: #0d4599;
  --blue-50: #f2f7ff;
  --blue-100: #e5efff;
  --ink: #2a2a33;
  --ink-2: #54545a;
  --muted: #596b82;
  --line: #d1d1d5;
  --line-2: #e9e9ec;
  --surface: #ffffff;
  --bg: #f7f7f9;
  --ok: #0a7a46;
  --ok-bg: #e8f6ee;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --bad: #d1242f;
  --bad-bg: #fdecee;
  --held: #5a2ca0;
  --held-bg: #f1eafc;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --header-h: 64px;
  --bar-h: 28px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.5 "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- buttons (press feedback: scale 0.97, 160ms ease-out) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn:hover { text-decoration: none; }
.btn.block { width: 100%; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-outline { background: #fff; border-color: var(--blue); color: var(--blue); }
.btn-light { background: rgba(255, 255, 255, 0.94); border-color: var(--line); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger-ghost { background: #fff; border-color: #f1b9be; color: var(--bad); }
.btn.muted-btn { background: #f1f1f4; border-color: var(--line-2); color: #9a9aa2; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--blue-hover); }
  .btn-outline:hover { background: var(--blue-50); }
  .btn-light:hover { background: #fff; }
  .btn-danger-ghost:hover { background: var(--bad-bg); }
}
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 10px;
  border-radius: var(--radius); cursor: pointer; font-weight: 600; color: var(--ink);
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.icon-btn:active { transform: scale(0.97); }
.icon-btn.on { color: var(--bad); }
.icon-btn.on svg { fill: currentColor; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: #f1f1f4; } }

/* ---------- header (Zillow layout: nav left, logo center, account right) ---------- */
.concept-bar {
  height: var(--bar-h); display: flex; align-items: center; justify-content: center; gap: 4px;
  background: #1a1d24; color: #c9cdd4; font-size: 12px; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.concept-bar a { color: #fff; text-decoration: underline; }
.site-header {
  position: sticky; top: 0; z-index: 30; height: var(--header-h); background: #fff; border-bottom: 1px solid var(--line-2);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 24px;
}
.nav-left, .nav-right { display: flex; gap: 4px; align-items: center; }
.nav-right { justify-content: flex-end; }
.site-header nav a {
  color: var(--ink); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: var(--radius); position: relative;
  transition: color 150ms ease;
}
.site-header nav a:hover { text-decoration: none; color: var(--blue); }
.site-header nav a.active { color: var(--blue); }
.site-header nav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue);
}
.new-pill { font-size: 11px; font-weight: 700; color: var(--blue); background: var(--blue-100); padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.sign-in { border: 1px solid var(--line) !important; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--blue); text-decoration: none !important; }
.brand-word { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; color: var(--blue); }
.brand-tag { font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 6px; }

/* ---------- page transitions (ease-out, 220ms) ---------- */
#app:focus { outline: none; }
#app.page-in > * { animation: page-in 220ms var(--ease-out); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- search bar + filters ---------- */
.search-bar {
  position: relative; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: #fff;
  border-bottom: 1px solid var(--line-2);
}
.search-input { position: relative; flex: 0 1 330px; min-width: 200px; }
.search-input input {
  width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 40px 0 14px; font: inherit; color: var(--ink);
}
.search-input input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.search-input svg { position: absolute; right: 12px; top: 11px; color: var(--ink); }
.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-btn {
  height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.filter-btn:active { transform: scale(0.97); }
.filter-btn svg { transition: transform 200ms var(--ease-out); }
.filter-btn.open svg { transform: rotate(180deg); }
.filter-btn.selected { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.lock-filter svg { transform: none !important; }
.save-search { margin-left: auto; }
@media (hover: hover) and (pointer: fine) { .filter-btn:hover { border-color: var(--ink-2); } }

/* popover: scales from its trigger (origin-aware), 200ms ease-out */
.popover {
  position: absolute; width: 300px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-2); border: 1px solid var(--line-2);
  padding: 16px; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.popover[data-state="closed"] { opacity: 0; transform: scale(0.95) translateY(-4px); pointer-events: none; }
.popover[data-state="open"] { opacity: 1; transform: none; }
.popover h3 { font-size: 14px; margin-bottom: 10px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { flex: 1; height: 38px; border: 0; border-left: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 13px; transition: background-color 150ms ease, color 150ms ease; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--blue); color: #fff; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }

/* ---------- results: map left, list right ---------- */
.results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(560px, 47%); height: calc(100vh - var(--header-h) - var(--bar-h) - 65px); }
.map-pane { position: relative; border-right: 1px solid var(--line-2); }
#map { position: absolute; inset: 0; background: #f2efe9; isolation: isolate; z-index: 0; }
.map-fallback, .map-fallback svg { width: 100%; height: 100%; }
.list-pane { overflow-y: auto; padding: 16px 20px 32px; overscroll-behavior: contain; }
.list-head h1 { font-size: 20px; font-weight: 700; }
.list-sub { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); font-size: 14px; margin: 4px 0 10px; }
.sort { display: inline-flex; align-items: center; gap: 4px; }
.sort b { color: var(--blue); }
.today-toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-radius: var(--radius); background: var(--bg); margin-bottom: 14px; }
.today-toggle label:last-child { cursor: pointer; }
.list-foot { margin-top: 24px; padding: 16px; border-radius: var(--radius-lg); background: var(--blue-50); color: var(--ink-2); font-size: 14px; }
.list-foot p { margin: 0 0 6px; }

/* map price pills */
.pin-wrap { background: none; border: 0; }
.pin {
  display: inline-flex; align-items: center; gap: 4px; transform: translate(-50%, -50%); white-space: nowrap;
  font: 700 12px/1 "Open Sans", system-ui; padding: 6px 9px; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid rgba(0, 0, 0, 0.18); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 180ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.pin::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9a9aa2; }
.pin.ok::before { background: var(--ok); }
.pin.caution::before { background: #e59b16; }
.pin.danger::before { background: var(--bad); }
.pin.blocked { background: var(--held); color: #fff; border-color: var(--held); }
.pin.blocked::before { display: none; }
.pin.active { transform: translate(-50%, -50%) scale(1.14); background: var(--blue); color: #fff; border-color: var(--blue); }
.pin.active::before { background: #fff; }
body.before-mode .pin:not(.active) { background: #fff; color: var(--ink); border-color: var(--line); }
body.before-mode .pin::before { display: none; }
body.before-mode .pin svg { display: none; }
.leaflet-container { font-family: "Open Sans", system-ui, sans-serif; }
.leaflet-control-zoom a { border-radius: 8px !important; }

/* ---------- property cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-1); transition: box-shadow 200ms ease, transform 200ms var(--ease-out); }
.card.stagger { animation: rise 300ms var(--ease-out) both; animation-delay: calc(var(--i) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (hover: hover) and (pointer: fine) {
  .card:hover { box-shadow: var(--shadow-2); }
  .card:hover .nav { opacity: 1; }
}
.card-link { display: block; color: inherit; text-decoration: none !important; }
.card-photo { position: relative; aspect-ratio: 16 / 10.4; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: #e9e9ec; }
.slides { display: flex; height: 100%; transition: transform 300ms var(--ease-in-out); }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.card-badge {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 4px;
  font-size: 12px; font-weight: 700; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.card-badge.ok { color: var(--ok); }
.card-badge.caution { color: var(--warn); }
.card-badge.danger { color: #fff; background: var(--bad); }
.card-badge.blocked { color: #fff; background: var(--held); }
.card-badge.generic { display: none; color: var(--warn); }
body.before-mode .card-badge:not(.generic) { display: none; }
body.before-mode .card-badge.generic { display: inline-flex; }
.heart {
  position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); transition: transform 160ms var(--ease-out);
}
.heart:active { transform: scale(0.9); }
.heart.on svg { fill: #ff4b5c; stroke: #fff; animation: pop 300ms var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.2); } }
.nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92);
  display: grid; place-items: center; cursor: pointer; opacity: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: opacity 150ms ease, transform 160ms var(--ease-out);
}
.nav:active { transform: scale(0.92); }
.nav.prev { left: 8px; }
.nav.next { right: 8px; }
@media (hover: none) { .nav { display: none; } }
.dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); transition: background-color 150ms ease, transform 200ms var(--ease-out); }
.dots i.on { background: #fff; transform: scale(1.2); }
.card-body { padding: 10px 12px 12px; }
.card-price { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.card-price span { font-size: 15px; font-weight: 600; }
.card-facts { font-size: 14px; color: var(--ink); margin-top: 2px; }
.card-facts b { font-weight: 700; }
.card-facts .sep { display: inline-block; width: 1px; height: 12px; background: var(--line); margin: 0 6px; vertical-align: -1px; }
.card-facts .dash { color: var(--ink-2); margin: 0 2px; }
address { font-style: normal; font-size: 14px; color: var(--ink); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px; color: var(--muted); }
.map-toggle { display: none; }

/* ---------- home details modal (centered, scale 0.96 → 1, 250ms) ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 24px; }
.backdrop { position: absolute; inset: 0; background: rgba(15, 18, 24, 0.6); transition: opacity 250ms var(--ease-out); }
.modal {
  position: relative; width: min(1180px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3); overscroll-behavior: contain;
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
}
.modal-wrap[data-state="opening"] .backdrop, .modal-wrap[data-state="closing"] .backdrop { opacity: 0; }
.modal-wrap[data-state="opening"] .modal { opacity: 0; transform: scale(0.96) translateY(8px); }
.modal-wrap[data-state="closing"] .modal { opacity: 0; transform: scale(0.98); transition-duration: 180ms; }
.modal-bar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 12px; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.modal-brand { display: flex; align-items: center; gap: 6px; color: var(--blue); font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 2px; }
.photo-grid { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: 440px; padding: 6px; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .pg-0 { grid-row: 1 / 3; border-radius: 8px 0 0 8px; }
.photo-grid .pg-2 { border-radius: 0 8px 0 0; }
.photo-grid .pg-4 { border-radius: 0 0 8px 0; }
.photo-grid img:only-child, .photo-grid .pg-0:last-of-type { grid-column: 1 / -1; border-radius: 8px; }
.see-all { position: absolute; right: 18px; bottom: 18px; height: 36px; font-size: 14px; }
.detail-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; padding: 20px 32px 40px; }
.price-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.d-price { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.d-price span { font-size: 18px; font-weight: 600; }
.stats { display: flex; gap: 28px; }
.stats div { display: flex; flex-direction: column; align-items: flex-start; }
.stats b { font-size: 24px; font-weight: 700; line-height: 1.1; }
.stats span { color: var(--ink-2); font-size: 14px; }
.d-address { font-size: 18px; font-weight: 600; margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.detail-main section { margin-top: 28px; }
.detail-main h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.sub { font-size: 15px; font-weight: 700; margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.desc { font-size: 15px; line-height: 1.65; margin: 0; }
mark { background: #ffe1e3; color: #9b111b; border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px 0 #f6a3aa; cursor: help; }
.bubble { background: var(--bg); border-radius: 14px 14px 14px 4px; padding: 10px 14px; max-width: 520px; font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 24px; margin: 0; }
.facts div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; }
.detail-side { position: relative; }
.contact-card { position: sticky; top: 72px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 10px; box-shadow: var(--shadow-1); }
.contact-head { display: flex; gap: 10px; align-items: center; padding-bottom: 6px; }
.contact-head > svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--bg); }
.mini-verdict { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; animation: rise 250ms var(--ease-out); }
.mini-verdict svg { flex: none; margin-top: 2px; }
.mini-verdict b { font-size: 14px; }
.mini-verdict.pending { background: var(--bg); color: var(--ink-2); align-items: center; }
.mini-verdict.ok { background: var(--ok-bg); color: var(--ok); }
.mini-verdict.caution { background: var(--warn-bg); color: var(--warn); }
.mini-verdict.danger { background: var(--bad-bg); color: var(--bad); }
.mini-verdict.blocked { background: var(--held-bg); color: var(--held); }
.generic-warning, .today-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.today-box { font-size: 14px; }
.today-box svg, .generic-warning svg { flex: none; margin-top: 2px; }

/* ---------- Home Lock card ---------- */
.lock-section { margin-top: 24px; }
.lock-card { border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 20px; background: #fff; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.lock-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--blue); }
.lock-card.ok::before { background: var(--ok); }
.lock-card.caution::before { background: #e59b16; }
.lock-card.danger::before { background: var(--bad); }
.lock-card.blocked::before { background: var(--held); }
.lock-top { display: flex; gap: 20px; align-items: center; }
.score { position: relative; flex: none; width: 104px; height: 104px; }
.score-inner { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 34px; }
.score-num { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.score-of { font-size: 12px; color: var(--muted); font-weight: 600; }
.ring-track { fill: none; stroke: var(--line-2); }
.ring-value { fill: none; stroke: var(--blue); stroke-linecap: round; }
.score.ok .ring-value { stroke: var(--ok); }
.score.caution .ring-value { stroke: #e59b16; }
.score.danger .ring-value { stroke: var(--bad); }
.score.blocked .ring-value { stroke: var(--held); }
.score.danger .score-num { color: var(--bad); }
.score.ok .score-num { color: var(--ok); }
.score.blocked .score-num { color: var(--held); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); }
.lock-headline h2 { font-size: 22px; font-weight: 800; margin: 2px 0 2px; }
.lock-card.danger .lock-headline h2 { color: var(--bad); }
.lock-card.blocked .lock-headline h2 { color: var(--held); }
.lock-card.ok .lock-headline h2 { color: var(--ok); }
.lock-headline p { margin: 0; color: var(--ink-2); }
.checks { list-style: none; margin: 18px 0 0; padding: 0; }
.check-item, .checks .check { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); animation: rise 300ms var(--ease-out) both; animation-delay: calc(120ms + var(--i) * 50ms); }
.status { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.check.pass .status { background: var(--ok-bg); color: var(--ok); }
.check.warn .status { background: var(--warn-bg); color: var(--warn); }
.check.fail .status { background: var(--bad-bg); color: var(--bad); }
.check.info .status { background: var(--blue-100); color: var(--blue); }
.check-body { min-width: 0; flex: 1; }
.check-title { font-weight: 700; font-size: 15px; }
.check-detail { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.src { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; }
.mode-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

.id-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-top: 10px; }
.id-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2); min-width: 0; }
.id-card span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.id-card b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-vs { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.id-vs.bad { background: var(--bad-bg); color: var(--bad); }
.id-vs.ok { background: var(--ok-bg); color: var(--ok); }
.mail-flow { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mail-flow span { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--bg); }
.flow-line { flex: 1; max-width: 120px; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); background-size: 24px 2px; animation: dash 1s linear infinite; }
@keyframes dash { to { background-position: 24px 0; } }

/* drag-to-compare slider: clip-path reveal, pointer capture */
.cmp { position: relative; margin-top: 12px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; cursor: ew-resize; touch-action: pan-y; user-select: none; background: #ddd; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp-top { clip-path: inset(0 50% 0 0); }
.cmp-label { position: absolute; top: 10px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.62); color: #fff; }
.cmp-label.left { left: 10px; }
.cmp-label.right { right: 10px; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: 0; width: 0; }
.cmp-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, 0.4); }
.cmp-handle > span { position: absolute; top: 50%; left: -20px; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); color: var(--ink); transition: transform 160ms var(--ease-out); }
.cmp.dragging .cmp-handle > span { transform: scale(1.08); }
.match-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.match-strip figure { margin: 0; }
.match-strip img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.match-strip figcaption { font-size: 11px; font-weight: 700; color: var(--bad); margin-top: 2px; }

.price-gauge { margin-top: 12px; }
.gauge-track { position: relative; height: 10px; border-radius: 999px; background: var(--line-2); }
.gauge-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--you); border-radius: 999px; background: var(--ok); transform-origin: left; animation: grow 700ms var(--ease-out) both 200ms; }
.gauge-fill.fail { background: var(--bad); }
.gauge-fill.warn { background: #e59b16; }
@keyframes grow { from { transform: scaleX(0); } }
.gauge-mark { position: absolute; top: -5px; left: var(--fmr); width: 3px; height: 20px; border-radius: 2px; background: var(--ink); }
.gauge-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; font-weight: 700; }
.gauge-labels .you { color: var(--ink-2); }

/* skeleton shimmer while checks run */
.skeleton { display: flex; gap: 20px; align-items: center; }
.sk { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #ececf0 0%, #f6f6f8 50%, #ececf0 100%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
.sk-ring { width: 104px; height: 104px; border-radius: 50%; flex: none; }
.sk-lines { flex: 1; display: grid; gap: 10px; }
.sk.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); animation: spin 600ms linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- inner pages ---------- */
body[data-view="page"] { background: var(--bg); }
.page { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; }
.card-surface { background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-1); }
.page-head h1, .owner-hero h1, .rm-form h1, .about-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin: 6px 0 8px; }
.page-head p { color: var(--ink-2); max-width: 680px; margin: 0 0 20px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.field input, .field textarea, .prefix-input {
  font: inherit; font-weight: 400; font-size: 15px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input:focus, .field textarea:focus, .prefix-input:focus-within { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.prefix-input { display: flex; align-items: center; gap: 4px; padding: 0 12px; }
.prefix-input i { font-style: normal; color: var(--muted); }
.prefix-input input { border: 0; padding: 10px 0; box-shadow: none !important; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
legend { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.form-foot .small { display: inline-flex; align-items: center; gap: 6px; }

/* Rental Manager */
.rm { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.rm-steps { position: sticky; top: 96px; }
.rm-title { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 14px; }
.rm-steps ol { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 4px; }
.rm-steps li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius); font-weight: 600; color: var(--ink-2); font-size: 14px; }
.rm-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--line-2); }
.rm-steps li.done span { background: var(--ok-bg); color: var(--ok); }
.rm-steps li.active { background: var(--blue-100); color: var(--blue); }
.rm-steps li.active span { background: var(--blue); color: #fff; }
.rm-result { grid-column: 2; }
.photo-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo-choice { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 13px; transition: border-color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out); }
.photo-choice:active { transform: scale(0.98); }
.photo-choice input[type=radio] { position: absolute; opacity: 0; }
.photo-choice:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.photo-choice b { display: block; font-size: 13px; }
.photo-choice small { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pc-img { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; background: #eee center / cover; }
.pc-img.upload { display: grid; place-items: center; background: var(--bg); color: var(--muted); border: 1.5px dashed var(--line); }
.run { margin-top: 20px; }
.run h2 { font-size: 18px; margin-bottom: 8px; }
.run-steps { list-style: none; margin: 0; padding: 0; }
.run-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); font-weight: 600; font-size: 14px; color: var(--ink-2); animation: rise 250ms var(--ease-out) both; animation-delay: calc(var(--i) * 50ms); }
.run-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--bg); color: var(--ink-2); }
.run-state { margin-left: auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.run-steps li.done { color: var(--ink); }
.run-steps li.done .run-state { background: var(--ok-bg); color: var(--ok); animation: pop 300ms var(--ease-out); }
.result { margin-top: 20px; display: flex; gap: 24px; align-items: center; animation: rise 300ms var(--ease-out); }
.result h2 { font-size: 22px; margin: 6px 0; }
.result p { color: var(--ink-2); margin: 0 0 14px; }
.result.blocked { border-color: #d9c7f7; background: linear-gradient(180deg, #faf7ff, #fff); }
.result.blocked .eyebrow { color: var(--held); }
.result-art { flex: none; width: 180px; }
.result-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 4px; font-weight: 700; font-size: 13px; }
.result-badge.ok { background: var(--ok-bg); color: var(--ok); }
.result-badge.caution { background: var(--warn-bg); color: var(--warn); }
.result-badge.danger { background: var(--bad); color: #fff; }
.result.danger, .result.caution, .result.ok { display: block; }

/* lock illustration: the shackle drops shut (250ms ease-out) */
.lock-art { width: 100%; height: auto; overflow: visible; }
.lock-art .shackle { transition: transform 280ms var(--ease-out); transform: translateY(-10px); }
.lock-art.locked .shackle { transform: translateY(0); }
.lock-art .lock-g { transition: transform 280ms var(--ease-out); transform-origin: 110px 116px; }
.lock-art.locked .lock-g { animation: clunk 380ms var(--ease-out); }
@keyframes clunk { 50% { transform: scale(1.08); } }

/* owners */
.owner-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 32px; border-radius: 20px; background: linear-gradient(135deg, #eef4ff 0%, #f7f3ff 100%); margin-bottom: 24px; }
.owner-hero p { color: var(--ink-2); font-size: 16px; max-width: 560px; }
.hero-points { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.hero-points li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.hero-points svg { color: var(--blue); }
.hero-art { max-width: 280px; justify-self: center; width: 100%; }
.owner-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px; align-items: start; }
.claim h2 { font-size: 20px; margin-bottom: 12px; }
.stepper { display: flex; gap: 6px; margin-bottom: 16px; }
.stepper span { flex: 1; font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line-2); transition: border-color 250ms var(--ease-out), color 250ms ease; }
.stepper span.on { border-color: var(--blue); color: var(--blue); }
.claim-form { display: grid; gap: 14px; }
.claim-step { margin-top: 14px; }
.claim-loading { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: 14px; }
.claim-msg { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; font-size: 14px; animation: rise 250ms var(--ease-out); }
.claim-msg svg { flex: none; margin-top: 2px; }
.claim-msg.bad { background: var(--bad-bg); color: var(--bad); }
.claim-msg.good { background: var(--ok-bg); color: var(--ok); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.2em; color: var(--ink); }
.code-form { display: flex; gap: 8px; align-items: center; }
.otp { width: 46px; height: 52px; text-align: center; font-size: 22px; font-weight: 700; border: 1px solid var(--line); border-radius: 10px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.otp:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.code-form .btn { height: 52px; margin-left: 4px; }
.shake { animation: shake 320ms var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.homes { display: grid; gap: 16px; }
.empty-home { display: grid; place-items: center; text-align: center; color: var(--muted); min-height: 200px; }
.home-card { transition: border-color 250ms ease, box-shadow 250ms ease; }
.home-card.is-locked { border-color: #d9c7f7; box-shadow: 0 0 0 3px #f1eafc, var(--shadow-1); }
.home-top { display: flex; gap: 14px; align-items: center; }
.home-thumb { width: 84px; height: 64px; border-radius: 10px; background: #eee center / cover; flex: none; }
.home-thumb.blank { display: grid; place-items: center; color: var(--muted); }
.home-info { flex: 1; min-width: 0; }
.home-info .small { display: flex; gap: 4px; align-items: center; margin-top: 2px; color: var(--ok); }
.lock-row b { white-space: nowrap; }
.lock-row { display: flex; gap: 10px; align-items: baseline; margin: 16px 0 4px; padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.home-card.is-locked .lock-row { background: var(--held-bg); color: var(--held); }
.lock-state { color: var(--ink-2); }
.home-card.is-locked .lock-state { color: var(--held); }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alert { display: flex; gap: 12px; padding: 12px; border-radius: 10px; background: var(--bg); font-size: 14px; animation: rise 250ms var(--ease-out); }
.alert.held { background: var(--held-bg); }
.alert-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--held); }
.alert.approved .alert-ic { color: var(--ok); }
.alert.blocked .alert-ic { color: var(--bad); }
.alert-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.quiet { margin: 0; }

/* switch: thumb slides with ease-out; input stays focusable */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 44px; height: 26px; border-radius: 999px; background: #c5c5cc; position: relative; transition: background-color 200ms ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 200ms var(--ease-out); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch.big span { width: 56px; height: 32px; }
.switch.big span::after { width: 26px; height: 26px; }
.switch.big input:checked + span { background: var(--held); }
.switch.big input:checked + span::after { transform: translateX(24px); }
.switch.small span { width: 36px; height: 22px; }
.switch.small span::after { width: 16px; height: 16px; }
.switch.small input:checked + span::after { transform: translateX(14px); }
.switch:active span::after { width: 24px; }
.switch.big:active span::after { width: 30px; }

/* check page */
.check-form { display: grid; gap: 14px; }

/* how it works */
.about-hero { max-width: 760px; margin-bottom: 28px; }
.about-hero p { color: var(--ink-2); font-size: 17px; }
.flow { background: #fff; border-radius: 20px; border: 1px solid var(--line-2); padding: 20px; box-shadow: var(--shadow-1); }
.flow svg { width: 100%; height: auto; }
.flow-line-anim { stroke-dasharray: 6 6; animation: dash-line 1s linear infinite; }
@keyframes dash-line { to { stroke-dashoffset: -12; } }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
@media (min-width: 1100px) { .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feature { background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 20px; }
.feature h3 { font-size: 16px; margin: 10px 0 6px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14px; }
.f-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-100); color: var(--blue); }
.ship { background: #1a1d24; color: #fff; border-radius: 20px; padding: 32px; }
.ship h2 { font-size: 24px; margin-bottom: 8px; }
.ship p { color: #c9cdd4; max-width: 720px; margin: 0 0 18px; }
/* scroll reveal: clip-path, fires once */
.reveal { clip-path: inset(0 0 100% 0); transition: clip-path 600ms var(--ease-in-out); }
.reveal[data-visible] { clip-path: inset(0 0 0 0); }

/* ---------- toasts (Sonner-style: `ease`, 400ms, enter from below) ---------- */
.toaster { position: fixed; right: 20px; bottom: 20px; z-index: 80; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line-2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); cursor: pointer; font-size: 14px;
  opacity: 1; transform: translateY(0); transition: opacity 400ms ease, transform 400ms ease;
}
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }
.toast.leaving { opacity: 0; transform: translateY(8px) scale(0.98); transition-duration: 200ms; }
.toast-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-100); color: var(--blue); }
.toast.success .toast-icon { background: var(--ok-bg); color: var(--ok); }
.toast.danger .toast-icon { background: var(--bad-bg); color: var(--bad); }
.toast.lock .toast-icon { background: var(--held-bg); color: var(--held); }
.toast-title { font-weight: 700; }
.toast-desc { color: var(--ink-2); font-size: 13px; margin-top: 1px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .results { grid-template-columns: minmax(0, 1fr) minmax(420px, 52%); }
  .cards { grid-template-columns: 1fr; }
  .nav-left a:not(.active):not([data-nav="rent"]) { display: none; }
}
@media (max-width: 860px) {
  .site-header { grid-template-columns: auto 1fr; padding: 0 16px; }
  .nav-left { display: none; }
  .brand { justify-self: start; }
  .brand-tag { display: none; }
  .nav-right a.sign-in { display: none; }
  .nav-right a { padding: 8px; font-size: 14px; white-space: nowrap; }
  .nav-right .wide, .nav-right .new-pill { display: none; }
  .search-bar { padding: 10px 16px; flex-wrap: wrap; }
  .search-input { flex: 1 1 100%; }
  .save-search { display: none; }
  .results { display: block; height: auto; }
  .map-pane { display: none; position: fixed; inset: calc(var(--header-h) + var(--bar-h)) 0 0 0; z-index: 15; }
  body.show-map .map-pane { display: block; }
  .list-pane { padding: 14px 16px 90px; overflow: visible; }
  .cards { grid-template-columns: 1fr; }
  .map-toggle { display: inline-flex; position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 25; border-radius: 999px; box-shadow: var(--shadow-2); }
  .modal-wrap { padding: 0; }
  .modal { max-height: 100vh; height: 100vh; border-radius: 0; }
  .modal-actions span, .modal-bar .icon-btn span { display: none; }
  .photo-grid { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
  .photo-grid img { display: none; aspect-ratio: 16 / 10; border-radius: 0 !important; }
  .photo-grid .pg-0 { display: block; grid-row: auto; }
  .detail-cols { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .contact-card { position: static; }
  .d-price { font-size: 30px; }
  .stats { gap: 18px; }
  .lock-top { flex-direction: column; align-items: flex-start; }
  .id-compare { grid-template-columns: 1fr; }
  .id-vs { justify-self: center; }
  .page { padding: 20px 16px 48px; }
  .rm { grid-template-columns: 1fr; }
  .rm-steps { position: static; }
  .rm-steps ol { grid-auto-flow: column; overflow-x: auto; }
  .rm-result { grid-column: auto; }
  .photo-choices, .grid-3, .grid-2, .feature-grid, .owner-grid, .owner-hero { grid-template-columns: 1fr; }
  .owner-hero { padding: 20px; }
  .hero-art { max-width: 200px; }
  .result { flex-direction: column; align-items: flex-start; }
  .form-foot { flex-direction: column; align-items: stretch; }
  .page-head h1, .owner-hero h1, .rm-form h1, .about-hero h1 { font-size: 26px; }
  .concept-bar { font-size: 11px; justify-content: flex-start; }
}

/* ---------- relist evidence, presets, owner letter ---------- */
.relist-ev { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ev-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--bad-bg); color: var(--bad); font-size: 13px; font-weight: 600; animation: rise 300ms var(--ease-out) both; }
.ev-chip:nth-child(2) { animation-delay: 60ms; } .ev-chip:nth-child(3) { animation-delay: 120ms; }
.ev-chip b { color: var(--ink); font-weight: 700; }
.ev-was { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.result.relist { border-color: #f4c3c9; background: linear-gradient(180deg, #fff7f8, #fff); }
.result.relist .eyebrow { color: var(--bad); }
.relist-art { display: grid; place-items: center; width: 132px; height: 132px; margin: 0 auto; border-radius: 50%; background: var(--bad-bg); color: var(--bad); animation: pop-in 360ms var(--ease-out) both; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.9); } }

.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.preset { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.preset:active { transform: scale(0.97); }
.preset.on { border-color: var(--blue); background: var(--blue-100); color: var(--blue); }
@media (hover: hover) and (pointer: fine) { .preset:not(.on):hover { border-color: var(--ink-2); } }

.letter-art { width: 100%; height: auto; }
.letter-art .letter-sheet { animation: sheet-in 700ms var(--ease-out) 150ms both; }
@keyframes sheet-in { from { transform: translateY(-22px); opacity: 0; } }

.letter-claim { margin-top: 18px; }
.letter-claim .or { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.letter-claim .or::before, .letter-claim .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

.letter-page { max-width: 820px; }
.letter-intro h1 { font-size: 30px; margin: 6px 0 8px; letter-spacing: -0.4px; }
.paper { position: relative; margin: 26px 0 20px; padding: 40px 48px; background: #fffdf8; border: 1px solid #ece6d8; border-radius: 6px; box-shadow: 0 1px 0 #ece6d8, 0 24px 48px -24px rgba(40, 30, 10, 0.25); font-size: 15px; line-height: 1.6; animation: paper-in 500ms var(--ease-out) both; }
@keyframes paper-in { from { opacity: 0; transform: translateY(16px) rotate(-0.6deg); } }
.paper-head { display: flex; align-items: center; gap: 8px; color: var(--blue); font-size: 17px; padding-bottom: 16px; border-bottom: 2px solid var(--blue); }
.paper-head .muted { font-size: 13px; font-weight: 600; }
.paper-date { margin-left: auto; color: var(--ink-2); font-size: 13px; }
.paper-to { margin: 20px 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.paper h2 { font-size: 22px; margin: 0 0 10px; }
.paper-code { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; padding: 14px 18px; border: 2px dashed #bcd3ff; border-radius: 10px; background: #f2f7ff; }
.paper-code span { font-weight: 600; color: var(--ink-2); }
.paper-code b { font-size: 30px; letter-spacing: 6px; color: var(--blue); font-variant-numeric: tabular-nums; }
.paper ol { padding-left: 20px; }
.paper-fine { font-size: 12.5px; color: var(--muted); border-top: 1px solid #ece6d8; padding-top: 12px; margin-top: 18px; }
.letter-cta { display: flex; justify-content: center; }
@media (max-width: 860px) { .paper { padding: 24px 20px; } .paper-code b { font-size: 24px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-property: opacity, background-color, color, border-color !important; }
  .reveal { clip-path: none; }
  .slides { transition: none; }
}
