/* The Neuman Team — Downtown Condo Guide
   Brand: "Ink & Gold" (sandiegodowntown.com). Editorial, quietly luxurious:
   white space, thin lines, square corners, no gradients, no shadows. */
:root {
  --ink: #16161a;
  --muted: #4e4a44;
  --caption: #8a857c;
  --paper: #faf8f4;
  --sand: #f1ece3;
  --line: #d9cdb6;
  --white: #ffffff;
  --gold: #8a6116;        /* text + buttons on light */
  --gold-bright: #b8892e; /* decorative rules, accent borders */
  --gold-light: #d9b76e;  /* text on dark */
  --ok: #2f6b3f;
  --warn: #8a4a00;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--font-body); padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); overflow-x: clip; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: 0; }
a { color: var(--gold); }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.client-only { display: none; }
body.client .client-only { display: block; }

.eyebrow { font: 600 12px/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.rule { display: block; width: 56px; height: 2px; background: var(--gold-bright); margin: 14px auto 0; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-right: auto; }
.brand img { height: 47px; width: auto; }
.brand-title { font: 600 11px/1.4 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); border-left: 1px solid var(--line); padding-left: 14px; }
.mode { border: 1px solid var(--ink); background: var(--white); padding: 6px 14px; font-size: 13px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; min-height: 40px; }
.mode[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mode .dot { display: inline-block; width: 7px; height: 7px; background: var(--gold-bright); margin-right: 8px; }

/* ---------- Nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1; text-align: center; text-decoration: none; color: #cfc8ba; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 10px 4px; min-height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-top: 2px solid transparent; position: relative; }
.nav a svg { width: 22px; height: 22px; }
.nav a[aria-current="page"] { color: var(--gold-light); border-top-color: var(--gold-bright); }
.badge { position: absolute; top: 8px; left: calc(50% + 8px); background: var(--gold-light); color: var(--ink); font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; letter-spacing: 0; }

/* ---------- Layout / hero band ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 16px 8px; }
.band { background: var(--ink); color: #fff; text-align: center; width: 100vw; margin: 0 0 28px calc(50% - 50vw); padding: 40px 20px 36px; }
.band .eyebrow { color: var(--gold-light); }
.band h1 { color: #fff; font-size: 32px; margin-top: 10px; }
.band .lede { color: rgba(255,255,255,.82); max-width: 620px; margin: 12px auto 0; }
.band .addr { color: rgba(255,255,255,.82); margin-top: 8px; }
.band .rule { margin-top: 18px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 28px auto 0; }
.hero-stats .s { padding: 12px 8px; }
.hero-stats .s + .s { border-left: 1px solid rgba(255,255,255,.22); }
.hero-stats .s:nth-child(3) { border-left: 0; }
.hero-stats .v { font: 600 30px/1.1 var(--font-head); color: #fff; }
.hero-stats .l { font: 600 11px/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); margin-top: 6px; }
.hero-sub { color: rgba(255,255,255,.82); font-size: 14px; margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--gold); background: var(--gold); color: #fff; padding: 10px 20px; font-weight: 600; font-size: 15px; letter-spacing: .02em; text-decoration: none; min-height: 48px; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.btn.ghost[aria-pressed="true"] { background: var(--ink); color: #fff; }
.btn.link { border: 0; background: none; color: var(--gold); padding: 4px 0; min-height: 0; text-decoration: underline; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.on-dark .btn.ghost, .band .btn.ghost { color: #fff; border-color: #fff; }
.on-dark .btn.ghost:hover, .band .btn.ghost:hover { background: #fff; color: var(--ink); }

/* ---------- Search + filters ---------- */
.search { position: relative; margin-bottom: 14px; }
.search input { width: 100%; font: inherit; padding: 14px 16px 14px 48px; border: 1px solid var(--ink); background: var(--white); min-height: 52px; }
.search svg { position: absolute; left: 15px; top: 15px; width: 22px; height: 22px; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 12px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--white); padding: 7px 16px; font-weight: 600; font-size: 14px; letter-spacing: .02em; min-height: 40px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { color: var(--caption); font-weight: 400; margin-left: 6px; }
.chip[aria-pressed="true"] .n { color: var(--gold-light); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 16px; }
.toolbar .count { margin-right: auto; color: var(--muted); font-size: 14px; }
.toolbar select { font: inherit; border: 1px solid var(--line); background: var(--white); padding: 8px 10px; min-height: 42px; }
.filters { background: var(--sand); border: 1px solid var(--line); padding: 16px; margin-bottom: 16px; display: grid; gap: 14px; grid-template-columns: 1fr; }
.filters label.field { display: grid; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.filters select, .filters input[type=number] { font: inherit; letter-spacing: 0; text-transform: none; border: 1px solid var(--line); padding: 9px 10px; min-height: 44px; background: #fff; color: var(--ink); }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { background: var(--white); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.card:hover { border-color: var(--gold-bright); }
.card h3 { font-size: 22px; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card .addr { color: var(--muted); font-size: 14px; }
.card .top-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.stat { padding: 0 8px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .v { font: 600 20px/1.1 var(--font-head); }
.stat .l { font: 600 10px/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.hoa-line { font-size: 13px; color: var(--muted); margin: -2px 0 0; }
.amen { display: flex; flex-wrap: wrap; gap: 6px; }
.amen span { font-size: 12.5px; background: var(--paper); border: 1px solid var(--line); padding: 2px 10px; }
.card-actions { margin-top: auto; display: flex; gap: 8px; position: relative; z-index: 2; }
.card-actions .btn { flex: 1; }

.status { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 1px 8px; border: 1px solid currentColor; }
.status.ok { color: var(--ok); }
.status.old, .status.none { color: var(--warn); }
.band .status { color: var(--gold-light); }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); background: var(--white); border: 1px solid var(--line); }

/* ---------- Detail ---------- */
.crumb { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: .02em; color: var(--gold); margin: 16px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; justify-content: center; }
.actions .btn { flex: 1 1 150px; max-width: 240px; }
.section { background: var(--white); border: 1px solid var(--line); padding: 24px 20px; margin-bottom: 18px; }
.section > h2 { font-size: 24px; text-align: center; }
.section > h2::after { content: ""; display: block; width: 56px; height: 2px; background: var(--gold-bright); margin: 12px auto 20px; }
.section.agent { border-top: 3px solid var(--gold-bright); background: var(--white); }
.agent-flag { display: block; font: 600 12px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; text-align: center; }
.facts > div { padding: 10px 8px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts > div:nth-child(odd) { border-left: 0; }
.facts dt { font: 600 11px/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); order: 2; }
.facts dd { margin: 0 0 4px; font: 600 24px/1.2 var(--font-head); }
.facts > div { display: flex; flex-direction: column; }
.fine { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }
.warnbox { border-left: 3px solid var(--gold-bright); background: var(--sand); padding: 10px 14px; font-size: 14px; margin: 14px 0 0; }
.alist { list-style: none; margin: 0; padding: 0; }
.alist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.alist li:last-child { border-bottom: 0; }
.alist .k { flex: 0 0 120px; font: 600 12px/1.5 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.alist .v { flex: 1; }
.yes::before { content: "✓"; color: var(--gold); font-weight: 700; margin-right: 8px; }
.no { color: var(--muted); }
.no::before { content: "—"; margin-right: 8px; }
.unk { color: var(--caption); font-style: italic; }
.pre { white-space: pre-line; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kv { display: grid; gap: 18px; }
.kv h3 { font: 600 12px/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.kv p { margin: 0 0 4px; }
.hint { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

.cta { background: var(--ink); color: rgba(255,255,255,.82); text-align: center; padding: 36px 20px; margin: 8px 0 18px; }
.cta h2 { color: #fff; font-size: 26px; }
.cta p { max-width: 560px; margin: 12px auto 20px; }
.cta .btn { min-width: 220px; }
.cta .btn.ghost { color: #fff; border-color: #fff; }
.cta .btn.ghost:hover { background: #fff; color: var(--ink); }

/* ---------- Market tables ---------- */
.sub { font: 600 12px/1.3 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 24px 0 8px; text-align: center; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl .short { display: inline; }
.tbl .long { display: none; }
.tbl th { background: var(--sand); font: 600 11px/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 9px 4px; }
.tbl td { padding: 9px 4px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td:nth-child(2) { text-align: left; }
.tbl th:nth-child(2) { text-align: left; }

@media (max-width: 719px) {
  .hide-sm { display: none; }
  .facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; border-left: 0; }
}
@media (min-width: 720px) {
  .tbl { font-size: 14.5px; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .tbl .short { display: none; }
  .tbl .long { display: inline; }
}

/* ---------- Compare ---------- */
.cmp-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); }
table.cmp { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 540px; }
.cmp th, .cmp td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.cmp thead th { background: var(--ink); color: #fff; border-bottom: 2px solid var(--gold-bright); vertical-align: bottom; }
.cmp thead th a { font: 600 18px/1.25 var(--font-head); text-decoration: none; color: #fff; }
.cmp thead th .rm { display: block; margin-top: 6px; background: none; border: 0; color: var(--gold-light); padding: 0; font-size: 12px; text-decoration: underline; }
.cmp tbody th { font: 600 11px/1.5 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--paper); width: 108px; min-width: 108px; position: sticky; left: 0; z-index: 1; }
.cmp thead th:first-child { position: sticky; left: 0; z-index: 2; width: 108px; min-width: 108px; }
.cmp tr.agentrow th { background: var(--sand); }
.cmp td.best { background: var(--sand); font-weight: 600; box-shadow: none; border-top: 0; }
.cmp td.best::before { content: "Lowest"; display: block; font: 600 10px/1.4 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.cmp-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; }

/* ---------- HOA updater ---------- */
.hoa-top { display: grid; gap: 12px; background: var(--white); border: 1px solid var(--line); padding: 18px; margin-bottom: 16px; }
.progress { height: 6px; background: var(--line); }
.progress > i { display: block; height: 100%; background: var(--gold-bright); }
.hoa-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hoa-row { background: var(--white); border: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; margin-bottom: 12px; }
.hoa-row.saved { border-top: 3px solid var(--gold-bright); }
.hoa-row .nm { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.hoa-row .nm strong { font: 600 19px/1.2 var(--font-head); }
.hoa-row .meta { font-size: 13.5px; color: var(--muted); }
.hoa-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.hoa-form label.f { display: grid; gap: 4px; font: 600 11px/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hoa-form .dollar { position: relative; display: block; }
.hoa-form .dollar span { position: absolute; left: 12px; top: 12px; color: var(--muted); letter-spacing: 0; }
.hoa-form input { width: 100%; font: 400 16px var(--font-body); letter-spacing: 0; text-transform: none; border: 1px solid var(--line); padding: 10px 10px 10px 26px; min-height: 46px; background: #fff; color: var(--ink); }
.hoa-form input[type=text] { padding-left: 10px; }
.hoa-form .note, .hoa-form .btns { grid-column: 1 / -1; }
.hoa-row .btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Footer / toast ---------- */
.foot { background: var(--ink); color: rgba(255,255,255,.82); margin-top: 32px; padding: 32px 16px 28px; text-align: center; font-size: 14px; }
.foot-inner { max-width: 760px; margin: 0 auto; }
.foot p { margin: 0 0 8px; }
.foot strong { color: #fff; font-weight: 600; }
.foot a { color: var(--gold-light); }
.foot .brokerage { color: var(--gold-light); letter-spacing: .02em; }
.foot .finep { font-size: 12.5px; color: rgba(255,255,255,.65); margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); background: var(--ink); color: #fff; padding: 12px 18px; border-left: 3px solid var(--gold-bright); opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: 90vw; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tablet / desktop ---------- */
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(4, 1fr); }
  .filters .toggles, .filters > div:last-child { grid-column: 1 / -1; }
  .hoa-form { grid-template-columns: 170px 170px 1fr auto; }
  .hoa-form .note, .hoa-form .btns { grid-column: auto; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .hero-stats .s:nth-child(3) { border-left: 1px solid rgba(255,255,255,.22); }
  .facts { grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-columns: none; }
  .facts > div:nth-child(odd) { border-left: 1px solid var(--line); }
  .facts > div:first-child { border-left: 0; }
  .kv.two { grid-template-columns: 1fr 1fr; }
  .band h1 { font-size: 42px; }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .nav { position: static; background: none; padding: 0; gap: 4px; }
  .nav a { flex: none; flex-direction: row; min-height: 0; padding: 12px 14px; color: var(--ink); border-top: 0; border-bottom: 2px solid transparent; font-size: 12px; }
  .nav a svg { display: none; }
  .nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold-bright); }
  .badge { position: static; margin-left: 8px; background: var(--ink); color: #fff; }
  .toast { bottom: 24px; }
  .band { padding: 56px 20px 48px; }
  .band h1 { font-size: 48px; }
}
@media (max-width: 420px) {
  .brand-title { display: none; }
  .stat .v { font-size: 17px; }
}

/* ---------- Print (client handout) ---------- */
@media print {
  body { background: #fff; padding: 0; font-size: 12px; }
  .nav, .mode, .toast, .actions, .card-actions, .search, .chips, .toolbar, .filters, .crumb, .hint, .rm, .no-print, .skip { display: none !important; }
  .top { position: static; }
  .brand-title { display: block; }
  .band, .cmp thead th, .cta, .foot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .band { width: auto; margin: 0 0 16px; padding: 20px; }
  .cmp-wrap { overflow: visible; }
  .cmp thead th, .cmp tbody th { position: static; }
  .client-only { display: block; }
  .section, .card, .cta { break-inside: avoid; }
}
