/* Parkview app. Phone first. Colors meet WCAG AA contrast (4.5:1+ for text). */
:root {
  /* Parkview brand (Canva brand kit): black, white and gold #C8A44C. */
  --ink: #141414;       /* on white: 18.4:1 */
  --ink-dark: #0b0b0b;
  --gold: #c8a44c;      /* brand gold: ONLY on dark backgrounds (7.7:1 on --ink; too light for text on white) */
  --gold-deep: #7a5c14; /* gold for text/lines on white: 6.0:1 */
  --accent: var(--gold-deep);
  --text: #1c1c1c;
  --muted: #4d5560;     /* on white: 7.4:1 */
  --line: #d5dbe1;
  --bg: #ffffff;
  --bg-soft: #f3f6f9;
  --ok: #1e6b3a;
  --err: #a8201a;
  --radius: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text); background: var(--bg); padding-bottom: calc(64px + var(--safe-bottom)); }
a { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .6em 0 .4em; }
h2 { font-size: 1.25rem; margin: 1.4em 0 .5em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.test-banner { background: #fff4c2; color: #4a3b00; text-align: center; font-size: .9rem; padding: 6px 12px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px)); background: var(--ink); color: #fff; }
.site-header { border-bottom: 3px solid var(--gold); }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; line-height: 1.2; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; }
.brand-agent { font-weight: 700; font-size: 1.1rem; }
.brand-office { font-size: 1.1rem; font-weight: 700; } /* Ohio: brokerage name as prominent as the agent name */
.top-nav { display: none; }
.me { color: var(--gold); font-size: .95rem; }
main { padding: 0 16px 24px; max-width: 1100px; margin: 0 auto; display: block; }
main:focus { outline: none; }
.narrow { max-width: 620px; }

.hero { padding: 8px 0; }
.search-bar { display: flex; gap: 8px; }
.search-bar input { flex: 1; min-width: 0; }
input, select, textarea { font: inherit; width: 100%; padding: 11px 12px; border: 1px solid #8a949e;
  border-radius: 8px; background: #fff; color: var(--text); }
button, .button { display: inline-block; font: inherit; font-weight: 600; padding: 11px 18px; border-radius: 8px;
  border: 2px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
  min-height: 44px; text-align: center; }
button.secondary, .button.secondary { background: #fff; color: var(--ink); }
button.link { background: none; border: 0; color: var(--err); padding: 0 4px; min-height: 0; text-decoration: underline; font-weight: 400; }
.button.big { font-size: 1.1rem; padding: 14px 22px; }
/* Reserved for the AI search button Mark adds later. Empty and takes no space until then. */
.ai-search-slot:empty { display: none; }
.ai-search-slot { margin-top: 8px; min-height: 44px; }
.filters { margin-top: 10px; }
.filters summary { cursor: pointer; font-weight: 600; padding: 6px 0; min-height: 44px; display: flex; align-items: center; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field.check { display: flex; gap: 10px; align-items: flex-start; }
.field.check input { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.field.check label { font-weight: 400; }
.req { font-weight: 400; color: var(--muted); font-size: .9rem; }
.error { color: var(--err); margin: 4px 0 0; }
.has-error input { border-color: var(--err); border-width: 2px; }
.notice { background: #e8f4ec; color: var(--ok); border-left: 4px solid var(--ok); padding: 10px 12px; margin: 10px 0; }
.fine { font-size: .9rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.inline { display: inline; }

.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; position: relative; }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg-soft); }
.no-photo { display: flex; align-items: center; justify-content: center; color: var(--muted); aspect-ratio: 4 / 3; background: var(--bg-soft); }
.card-body { padding: 10px 12px 0; }
.price { font-size: 1.3rem; font-weight: 700; margin: 0; }
.badge { font-size: .8rem; font-weight: 600; background: var(--bg-soft); color: var(--ink); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.addr, .facts { margin: 2px 0; }
.courtesy { font-size: .85rem; color: var(--muted); margin: 6px 12px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mls-logo { height: 30px; width: auto; }
.courtesy span + span::before { content: "· "; }
.report-error { white-space: nowrap; }
.broker-switch { margin: 12px 0; padding: 12px; border: 1px dashed var(--muted); border-radius: var(--radius); }
.fav-form { position: absolute; top: 8px; right: 8px; }
.fav { background: rgba(255,255,255,.95); color: var(--ink); border-color: #fff; padding: 6px 12px; min-height: 40px; }
.fav.on { color: var(--accent); }
.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.results-head h1 { font-size: 1.3rem; }
.pager { display: flex; gap: 16px; justify-content: center; padding: 16px; }
.mls-disclaimer { margin-top: 24px; padding: 12px; background: var(--bg-soft); font-size: .85rem; color: var(--muted); border-radius: var(--radius); }

.listing .gallery { list-style: none; margin: 0 -16px; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 4px; }
.listing .gallery li { flex: 0 0 100%; scroll-snap-align: start; }
.gallery-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.listing-head h1 { font-size: 1.4rem; margin: .3em 0; }
.listing-head .city { display: block; font-size: 1rem; font-weight: 400; color: var(--muted); }
.listing-head .courtesy { margin: 6px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.actions .fav-form { position: static; }
.actions .fav { border-color: var(--ink); }
.remarks { white-space: pre-line; }
.facts-table { width: 100%; border-collapse: collapse; }
.facts-table th, .facts-table td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts-table th { width: 45%; font-weight: 600; }
.calc { background: var(--bg-soft); border-radius: var(--radius); padding: 4px 14px 10px; margin-top: 20px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.calc-out { font-size: 1.1rem; }
.calc-out strong { font-size: 1.4rem; color: var(--ink); }
.calc-break { display: block; font-size: .95rem; color: var(--muted); }
.stack { max-width: 560px; }

.agent-card { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.agent-card img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; flex: none; background: var(--bg-soft); }
.agent-card h1, .agent-card h2 { margin: 0 0 4px; font-size: 1.2rem; }
.agent-card h1 { font-size: 1.5rem; }
.agent-card p { margin: 2px 0; }
.agent-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.bio { margin-top: 10px; }
.saved-list li { margin-bottom: 10px; }
.office-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; font-size: .95rem; }
table th, table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.install ol li { margin-bottom: 6px; }

.site-footer { background: var(--ink-dark); color: #f1f4f7; padding: 20px 16px 28px; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .eho { color: var(--gold); }
.site-footer p { margin: 4px 0; }
.eho-row { display: flex; gap: 12px; align-items: flex-start; max-width: 1100px; margin: 0 auto 12px; }
.eho { width: 64px; height: 64px; flex: none; color: #fff; }
.brokerage, .footer-links { max-width: 1100px; margin: 0 auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom); z-index: 50; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; font-size: .8rem;
  color: var(--muted); text-decoration: none; min-height: 52px; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--gold); }
.tabbar svg { width: 24px; height: 24px; fill: currentColor; }

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .listing .gallery { margin: 0; }
  .listing .gallery li { flex-basis: 70%; }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .top-nav { display: flex; gap: 18px; }
  .top-nav a { color: #fff; text-decoration: none; }
  .top-nav a[aria-current="page"] { text-decoration: underline; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .filter-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Agent download page */
.download-card { text-align: center; margin-top: 16px; }
.download-photo { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; background: var(--bg-soft); }
.download-who { font-size: 1.05rem; }
.download-contact { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.install-box { text-align: center; background: var(--bg-soft); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.install-box button.big { font-size: 1.15rem; padding: 14px 28px; width: 100%; max-width: 360px; }
.install-box ol { text-align: left; max-width: 360px; margin: 8px auto; }
.desktop-qr { display: none; text-align: center; }
.staff-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 960px) { .desktop-qr { display: block; } }
[hidden] { display: none !important; }

/* Phones: agent card stacks (photo above text) and long emails wrap; header keeps logo + name only
   (sign-in lives in the bottom "Me" tab). */
.agent-card > div { min-width: 0; }
.agent-card a { overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .agent-card { flex-direction: column; align-items: center; text-align: center; }
  .agent-card .bio { text-align: left; }
}
@media (max-width: 959px) {
  .site-header .me { display: none; }
  .brand-agent, .brand-office { font-size: 1.05rem; }
}

/* Mortgage calculator (server-calculated) */
.calc-grid .calc-wide { grid-column: 1 / -1; }
.calc-table th { width: 60%; }
.calc-table .calc-total th, .calc-table .calc-total td { font-weight: 700; border-top: 2px solid var(--ink); }
.calc .field.check { grid-column: 1 / -1; }
.second-person { margin: 4px 0 12px; border: 1px solid var(--line, #ddd); border-radius: var(--radius); padding: 8px 12px; }
.second-person summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; gap: 6px; }
.second-person fieldset { border: 0; padding: 0; margin: 8px 0 0; }
.second-person legend { position: absolute; left: -9999px; }
.second-person .consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.second-person .consent input { width: 20px; min-height: 20px; margin-top: 2px; flex: none; }
.second-person .err { color: var(--danger, #b00020); }
