/* Find by Aperture Estate: dark only, frameless media. Structure follows the CRM's styles.css
   (CSS variables, Inter, 64px bottom .tabs, 14px .card corners, 48px pill .btn, .auth-card, .toast, safe areas). */
:root {
  color-scheme: dark;
  --bg-base: #0A0A0B; --bg-raised: #141416; --bg-overlay: #1C1C1F;
  --border-subtle: rgba(255, 255, 255, .08); --border-strong: rgba(255, 255, 255, .16);
  --text-primary: #F5F5F7; --text-secondary: #A1A1A6;
  --accent: #E8B86D; --accent-ink: #1a1206;
  --danger: #FF5A5F; --success: #3DDC97;
  --icon: rgba(255, 255, 255, .8);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px; --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; background: var(--bg-base); }
body { background: var(--bg-base); color: var(--text-primary); font: 400 16px/1.5 var(--sans); min-height: 100svh; overflow-x: clip; -webkit-tap-highlight-color: transparent; padding-bottom: calc(var(--tabs-h) + var(--safe-b)); }
body.no-tabs { padding-bottom: 0; }
body.no-tabs .tabs { display: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
img, video { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.hidden { display: none !important; }
.muted { color: var(--text-secondary); }
.small { font-size: 13px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.err { color: var(--danger); font-size: 14px; min-height: 1.2em; margin: 6px 0; }
.err:empty { min-height: 0; margin: 0; }
.hp { position: absolute; left: -9999px; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
h2 { font-size: 20px; font-weight: 600; margin: 24px 0 10px; }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.price { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* splash */
.splash { min-height: 60svh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* pages */
.page { padding: calc(20px + var(--safe-t)) 16px 32px; max-width: 1100px; margin: 0 auto; }
.page.narrow { max-width: 560px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.prose p, .prose ol { margin: 0 0 14px; color: var(--text-secondary); }
.prose ol { padding-left: 22px; }
.prose h3 { margin-top: 20px; }
.prose a { color: var(--accent); }
.draft { display: inline-block; background: rgba(232, 184, 109, .12); color: var(--accent) !important; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.card { background: var(--bg-raised); border: 1px solid var(--border-subtle); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.stack { display: grid; gap: 10px; margin: 16px 0; }
.cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-bottom: 14px; }
.cols .card { margin: 0; }
.card > p { margin-bottom: 14px; }
.card > p:last-child { margin-bottom: 0; }
.links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 24px; font-size: 14px; color: var(--text-secondary); }
.links a { text-decoration: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--bg-overlay); color: var(--text-primary); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; }
.btn:hover { border-color: rgba(255, 255, 255, .3); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.on { border-color: var(--success); color: var(--success); }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.btn-row .btn { flex: 1; }
.linklike { background: none; border: 0; color: var(--text-secondary); text-decoration: underline; cursor: pointer; font-size: inherit; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--icon); cursor: pointer; font-size: 26px; line-height: 1; text-decoration: none; }
.icon-btn svg { width: 24px; height: 24px; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--text-secondary); }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; background: var(--bg-base); border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text-primary); outline: none; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.row2, .row3 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .row3 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-secondary); margin: 10px 0; }
.check input, .radios input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.radios { border: 0; display: grid; gap: 10px; margin: 8px 0 16px; }
.radios label { display: flex; gap: 10px; align-items: flex-start; }
.toggle { display: flex; gap: 12px; align-items: center; font-weight: 600; cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 22px; height: 22px; }
.seg { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; min-height: 44px; border-radius: 999px; border: 1px solid var(--border-strong); font-weight: 600; font-size: 14px; cursor: pointer; }
.seg input:checked + span { border-color: var(--accent); color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.code-input { font-size: 28px !important; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; border: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-secondary); font-size: 13px; cursor: default; }
.chips.pick .chip { cursor: pointer; min-height: 36px; }
.chips.pick .chip.on, .chips.pick .chip:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.chips.pick input { accent-color: var(--accent); }
.chip.demo { position: absolute; top: calc(14px + var(--safe-t)); left: 14px; z-index: 3; background: rgba(0, 0, 0, .45); color: var(--text-primary); border-color: transparent; backdrop-filter: blur(6px); }
.suggested { font-size: 13px; color: var(--accent); margin-bottom: 10px; }

/* ---------- feed ---------- */
.feed { position: relative; height: calc(100svh - var(--tabs-h) - var(--safe-b)); overflow: hidden; }
.stage { position: absolute; inset: 0; }
.swipe-card { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; will-change: transform; background: var(--bg-base); }
.swipe-card:active { cursor: grabbing; }
.media, .media-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.placeholder { display: grid; place-content: center; justify-items: center; gap: 12px; color: rgba(255, 255, 255, .28); font-size: 13px; letter-spacing: .02em; }
.placeholder svg { width: 72px; height: 72px; }
.shade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, .35) 55%, transparent); pointer-events: none; }
.info { position: absolute; left: 16px; right: 16px; bottom: 96px; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); pointer-events: none; }
.info .facts { font-weight: 500; }
.info .where { color: rgba(255, 255, 255, .75); font-size: 14px; }
.stamp { position: absolute; top: calc(70px + var(--safe-t)); padding: 6px 14px; border: 2px solid; border-radius: 10px; font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .08em; opacity: 0; pointer-events: none; }
.stamp.like { left: 22px; color: var(--success); transform: rotate(-12deg); }
.stamp.nope { right: 22px; color: var(--danger); transform: rotate(12deg); }
.mute { position: absolute; top: calc(10px + var(--safe-t)); right: 10px; z-index: 3; }
.actions { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; gap: 22px; z-index: 4; pointer-events: none; }
.round { pointer-events: auto; width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 10, 11, .35); backdrop-filter: blur(8px); color: var(--icon); display: grid; place-items: center; cursor: pointer; transition: transform .12s, border-color .12s, color .12s; }
.round svg { width: 26px; height: 26px; }
.round:active { transform: scale(.94); }
.round.pass:hover { color: var(--danger); border-color: var(--danger); }
.round.save:hover { color: var(--accent); border-color: var(--accent); }
.round.detail { width: 46px; height: 46px; align-self: center; }
.feed-panel { display: none; }
.empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; max-width: 420px; margin: 0 auto; }
.question-card { position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; padding: 24px; max-width: 420px; margin: 0 auto; text-align: center; }
.question-card h2 { font-size: 30px; margin: 0 0 8px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.q-opts { display: grid; gap: 10px; }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0; }
.kv div { border-top: 1px solid var(--border-subtle); padding-top: 8px; }
.kv dt { font-size: 12px; color: var(--text-secondary); }
.kv dd { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Desktop buyer: 9:16 card centred, facts in a right panel, arrow keys. */
@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: 88px; }
  .feed { height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: center; max-width: 1040px; margin: 0 auto; padding: 16px 24px 56px; }
  .stage { position: relative; height: calc(100svh - 72px); aspect-ratio: 9 / 16; justify-self: end; inset: auto; overflow: hidden; border-radius: 0; }
  .feed-panel { display: block; align-self: center; }
  .feed-panel .chips { margin: 16px 0 20px; }
  .feed-panel .keys { margin-top: 16px; }
  .actions { position: static; grid-column: 2; grid-row: 1; align-self: end; justify-content: flex-start; padding-bottom: 20px; }
  .feed-panel { grid-column: 2; grid-row: 1; }
  .stage { grid-column: 1; grid-row: 1; }
}

/* ---------- listing detail ---------- */
.detail .hero { position: relative; height: 72svh; min-height: 420px; background: var(--bg-raised); overflow: hidden; }
.detail .hero .info { bottom: 20px; }
.detail .back, .gallery .back { position: absolute; top: calc(8px + var(--safe-t)); left: 8px; z-index: 3; background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.detail .chip.demo { left: 60px; top: calc(16px + var(--safe-t)); }
.detail-body { max-width: 720px; margin: 0 auto; padding: 16px 16px 40px; }
.top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 16px 0 8px; }
.top3 img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.desc { color: var(--text-secondary); margin: 14px 0; white-space: pre-line; }
.credits { margin-top: 20px; }
.credits a { color: var(--accent); }
@media (min-width: 900px) { .detail .hero { height: 78svh; } .kv { grid-template-columns: repeat(4, 1fr); } }
.gallery { background: #000; min-height: 100svh; }
.gallery .strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 100svh; }
.gallery .strip img { flex: 0 0 100%; height: 100%; object-fit: contain; scroll-snap-align: center; touch-action: pan-x pinch-zoom; }

/* ---------- saved / compare ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile { background: var(--bg-raised); border-radius: var(--r); overflow: hidden; border: 1px solid var(--border-subtle); }
.tile-media { display: block; aspect-ratio: 4 / 3; }
.tile-body { padding: 12px 14px; display: grid; gap: 2px; }
.tile-body .check { margin: 6px 0 0; }
.compare { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.compare th, .compare td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.compare thead th { font-weight: 600; }
.compare tbody th { color: var(--text-secondary); font-weight: 400; width: 30%; }
.compare a { color: var(--text-primary); }

/* ---------- agent / admin ---------- */
.subtabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border-subtle); margin: 4px 0 16px; overflow-x: auto; font-size: 14px; }
.subtabs > * { padding: 10px 0; white-space: nowrap; color: var(--text-secondary); }
.subtabs .on { color: var(--text-primary); border-bottom: 2px solid var(--accent); }
.subtabs .soon::after { content: " · soon"; font-size: 11px; }
.list { display: grid; gap: 8px; margin-bottom: 16px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; background: var(--bg-raised); border: 1px solid var(--border-subtle); border-radius: var(--r); cursor: pointer; color: var(--text-primary); }
.list-row.static { cursor: default; }
.status { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-secondary); white-space: nowrap; }
.status.s-live { color: var(--success); border-color: var(--success); }
.status.s-suspended, .status.s-removed { color: var(--danger); border-color: var(--danger); }
.wizard-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 12px; font-size: 13px; }
.wizard-steps span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-subtle); color: var(--text-secondary); }
.wizard-steps .on { border-color: var(--accent); color: var(--accent); }
.report-item ul { margin: 8px 0 8px 18px; color: var(--text-secondary); }

/* ---------- quiz ---------- */
.quiz { min-height: 100svh; display: grid; grid-template-rows: auto auto 1fr; gap: 16px; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b)); max-width: 900px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 12px; }
.bar { flex: 1; height: 3px; background: var(--border-strong); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.quiz-opts { display: grid; gap: 4px; grid-template-rows: repeat(3, 1fr); min-height: 60svh; }
@media (min-width: 700px) { .quiz-opts { grid-template-rows: none; grid-template-columns: repeat(3, 1fr); } }
.quiz-tile { position: relative; border: 0; cursor: pointer; display: flex; align-items: flex-end; padding: 16px; color: #fff; font-weight: 600; font-size: 18px; text-align: left; }
.quiz-tile::before { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); }
.quiz-tile span { position: relative; }
.quiz-tile:hover { filter: brightness(1.1); }

/* ---------- about ---------- */
.about-hero { position: relative; min-height: 70svh; display: grid; align-items: end; overflow: hidden; }
.about-bg { position: absolute; inset: 0; background: radial-gradient(90% 70% at 70% 20%, rgba(232, 184, 109, .22), transparent 60%), radial-gradient(80% 60% at 10% 90%, rgba(80, 110, 140, .25), transparent 60%), var(--bg-raised); }
.about-hero::after { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(to top, var(--bg-base), transparent); }
.about-hero-text { position: relative; z-index: 1; max-width: 760px; padding: 40px 16px 32px; margin: 0 auto; width: 100%; }
.about-hero h1 { font-size: clamp(34px, 6vw, 56px); margin-bottom: 16px; }
.about-hero p { color: var(--text-secondary); font-size: 17px; max-width: 620px; }
.about .card a:not(.btn) { color: var(--accent); }
.photo-cta { text-align: center; }

/* ---------- sheets (auth, showing, report) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6); display: grid; align-items: end; justify-items: center; opacity: 0; transition: opacity .2s; }
.sheet-wrap.show { opacity: 1; }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 92svh; overflow-y: auto; background: var(--bg-overlay); border-radius: 20px 20px 0 0; padding: 24px 20px calc(24px + var(--safe-b)); transform: translateY(24px); transition: transform .2s; }
.sheet-wrap.show .sheet { transform: none; }
.sheet h2 { margin: 0 0 6px; padding-right: 36px; }
.sheet > form > .muted { margin-bottom: 16px; }
.sheet-close { position: absolute; top: 12px; right: 12px; }
@media (min-width: 600px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 20px; } }

/* ---------- tabs (mobile bottom bar → desktop left rail) ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: rgba(10, 10, 11, .92); backdrop-filter: blur(12px); border-top: 1px solid var(--border-subtle); }
.tabs a { flex: 1; display: grid; place-items: center; align-content: center; gap: 3px; text-decoration: none; color: var(--text-secondary); font-size: 11px; font-weight: 500; }
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--text-primary); }
.tabs a.on svg { color: var(--accent); }
@media (min-width: 900px) {
  .tabs { top: 0; right: auto; width: 88px; height: auto; flex-direction: column; justify-content: center; gap: 8px; border-top: 0; border-right: 1px solid var(--border-subtle); padding: 0; }
  .tabs a { flex: none; height: 64px; }
  body.no-tabs { padding-left: 0; }
}
/* Footer on every page: platform disclaimer + Equal Housing Opportunity mark (small) + policy links. */
.site-footer { display: grid; justify-items: center; gap: 10px; padding: 24px 16px 28px; margin-top: 24px; border-top: 1px solid var(--border-subtle); text-align: center; font-size: 12px; color: var(--text-secondary); }
body.full .site-footer { display: none; }
.site-footer .disclaimer { max-width: 720px; line-height: 1.5; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text-primary); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.eho { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.eho svg { width: 18px; height: 14px; flex: none; }
.eho-big svg { width: 96px; height: 72px; color: var(--text-primary); margin: 8px 0 16px; }

/* Full-screen feed: compact disclaimer + EHO mark on the card (mobile), full text under the card (desktop). */
.feed-legal { position: absolute; top: calc(12px + var(--safe-t)); right: 60px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .4); backdrop-filter: blur(6px); color: rgba(255, 255, 255, .75); font-size: 11px; text-decoration: none; }
.feed-legal svg { width: 14px; height: 11px; }
.feed-legal-desk { display: none; }
@media (min-width: 900px) {
  .feed-legal { display: none; }
  .feed-legal-desk { display: block; position: absolute; left: 24px; right: 24px; bottom: 4px; text-align: center; font-size: 11px; }
}

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); z-index: 60; background: var(--bg-overlay); border: 1px solid var(--border-strong); color: var(--text-primary); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: var(--success); }
.toast.err { border-color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.page > p.muted { margin-bottom: 16px; }

/* Listing: agent + brokerage disclosure (brokerage directly below the contact details). */
.agent-card p { margin: 0 0 4px; }
.agent-card a { color: var(--text-primary); }
.agent-card .license { font-size: 14px; color: var(--text-secondary); }
.agent-card .listed-by { margin-top: 10px; }
.state-notices { display: grid; gap: 6px; margin-top: 10px !important; font-size: 14px; } /* at least 10pt */
.state-notices a { color: var(--accent); }
.courtesy { font-size: 12px; color: rgba(255, 255, 255, .7); margin-top: 2px; }
.panel-agent { margin: 8px 0 16px; color: var(--text-secondary); }

/* Payment calculator */
.calc summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; cursor: pointer; font-weight: 600; list-style: none; }
.calc summary::-webkit-details-marker { display: none; }
.calc[open] summary { margin-bottom: 14px; }
.calc-kv { grid-template-columns: repeat(2, 1fr) !important; }
.calc .disclaimer { margin-top: 10px; }
.legal { margin-top: 12px; }
.legal a { color: var(--text-primary); }
.q-item p { margin-bottom: 6px; }
.status.s-draft { color: var(--accent); border-color: var(--accent); }
