/* Readability, light mode and the listing-first additions from the 2026-09 user review. */

/* ---------- Text size ----------
   Most of the site is sized in px, so zoom is the one lever that scales
   everything evenly, like browser zoom. Phones get a smaller step. */
html[data-text="1"]{zoom:1.15}
html[data-text="2"]{zoom:1.32}
@media(max-width:700px){html[data-text="1"]{zoom:1.06}html[data-text="2"]{zoom:1.14}}

/* The smallest labels were 8 to 10px. Lift them to a readable floor. */
.eyebrow,.field-label,.filter-chip,.sort-hint,.metric-bottom span,.listing-stat,.listing-tag,.asking-price-label,.deal-badge,.property-badge,.keyword-tag,.status-label,.section-label,.research-help,.map-footer,.guide-note,.filter-explanation,.results-meta p,.collection-footer p{font-size:max(12px,1em)}
.filter-chip{font-size:13px;padding:8px 13px}
.listing-location,.results-description,#search-note,.search-description{font-size:15px}
.listing-address{font-size:17px}
.sheet-heading h2,.search-heading h1{letter-spacing:-.01em}
/* Headers stand out: brighter, heavier. */
.sheet-heading h2,.detail-address,.email-content h2,.research-heading h3,.pull-more h3,.brief-section h4,.section-label{color:var(--ink);font-weight:600}

/* ---------- Header display buttons ---------- */
.display-controls{display:flex;gap:8px}
.display-button{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border-radius:99px;border:1px solid #ffffff1c;background:var(--face);box-shadow:var(--raise);color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.display-button:hover{filter:brightness(1.12)}
.display-button:focus-visible{outline:2px solid var(--ember);outline-offset:2px}
.text-size-glyph{font-weight:700;font-size:13px;line-height:1}.text-size-glyph span{font-size:18px}
.theme-glyph{width:16px;height:16px;border-radius:50%;background:linear-gradient(90deg,var(--ink) 50%,transparent 50%);border:1.5px solid var(--ink)}
@media(max-width:760px){.workspace-label{display:none}.display-button-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.display-button{padding:0 12px}}

/* ---------- Visible search controls ---------- */
.search-controls{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0 4px;align-items:stretch}
.search-control{flex:1 1 150px;max-width:220px;display:flex;flex-direction:column;gap:6px;padding:10px 14px;border-radius:16px;border:1px solid #ffffff17;background:#171717;color:var(--muted);font-size:13px}
.search-control>span:not(.pull-toggle-copy){font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.search-control select{font:inherit;font-size:16px;color:var(--ink);background:transparent;border:0;padding:2px 0;min-width:140px;cursor:pointer}
.search-control select option{background:#1b1b1b;color:#eee}
.search-control select{min-width:0;width:100%}
.pull-toggle{flex:1 1 320px;max-width:none;flex-direction:row;align-items:flex-start;gap:12px;cursor:pointer;border-color:#d4a67f55}
.pull-toggle input{width:22px;height:22px;margin-top:2px;accent-color:var(--ember);flex-shrink:0}
.pull-toggle-copy{display:flex;flex-direction:column;gap:3px}
.pull-toggle-copy strong{font-size:16px;color:var(--ink);font-weight:600}
.pull-toggle-copy small{font-size:13px;line-height:1.4;color:var(--muted)}
.pull-toggle:has(input:checked){background:#2a211a;border-color:var(--ember)}
#search-note strong{color:var(--ink)}
.search-button.attention{animation:search-pulse 1.6s var(--ease) 2}
@keyframes search-pulse{50%{box-shadow:0 0 0 6px #d4a67f55}}
@media(prefers-reduced-motion:reduce){.search-button.attention{animation:none}}

/* ---------- "Pull in more" banner ---------- */
.pull-more{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:16px 0 8px;padding:18px 20px;border-radius:20px;border:1px solid #d4a67f66;background:linear-gradient(135deg,#2a211a,#171412)}
.pull-more[hidden]{display:none}
.pull-more h3{margin:0 0 4px;font-size:18px}
.pull-more p{margin:0;font-size:14px;line-height:1.45;color:var(--muted)}
.pull-more-button{flex-shrink:0;min-height:52px;padding:0 20px;display:inline-flex;align-items:center;gap:10px;font-size:15px;white-space:nowrap}
@media(max-width:600px){.pull-more{flex-direction:column;align-items:stretch}.pull-more-button{justify-content:center}}

/* ---------- True time on market ---------- */
.days-filter{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:12px 0}
.days-filter[hidden]{display:none}
.days-filter small{flex-basis:100%;font-size:13px;line-height:1.4;color:var(--muted)}
.relist-flag{margin-left:7px;padding:2px 7px;border-radius:99px;background:#d4a67f26;color:var(--ember);font-style:normal;font-size:11px;font-weight:600;letter-spacing:.02em}
.relist-note{display:flex;gap:8px;align-items:flex-start;margin:10px 0;padding:10px 12px;border-radius:12px;background:#d4a67f1a;color:var(--ink);font-size:14px;line-height:1.45}

/* ---------- Financing terms near the price ---------- */
.financing-strip{display:flex;flex-direction:column;gap:6px;margin:10px 0 4px;padding:10px 12px;border-radius:12px;border:1px solid #d4a67f55;background:#d4a67f14;text-align:left}
.fin-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;color:var(--ember)}
.fin-head>strong{font-size:15px;color:var(--ink)}
.fin-head .icon{width:18px;height:18px}
.fin-fact{padding:3px 9px;border-radius:99px;background:#00000033;border:1px solid #d4a67f44;font-size:13px;color:var(--ink)}
.fin-rate strong{font-size:15px;color:var(--ember)}
.fin-quote{font-size:14px;line-height:1.45;color:var(--ink);font-style:italic}
.listing-dialog .financing-strip{margin:12px 0}
.detail-offer-button{margin:4px 0 14px;min-height:48px;display:inline-flex;align-items:center;gap:8px}

/* ---------- Description on the results page ---------- */
.listing-description-preview{padding:12px 14px;background:#141414;border:1px solid #dddddd10;border-top:0}
.listing-description-preview summary{list-style:none;cursor:pointer;display:flex;flex-direction:column;gap:6px}
.listing-description-preview summary::-webkit-details-marker{display:none}
.desc-label{font-size:12px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.desc-text{font-size:15px;line-height:1.55;color:var(--ink)}
.desc-more{align-self:flex-start;font-size:14px;color:var(--ember);text-decoration:underline;text-underline-offset:3px}
.listing-description-preview[open] .desc-text{display:none}
.listing-description-preview[open] .desc-more::after{content:" (show less)"}
.desc-full{margin:10px 0 0;font-size:15px;line-height:1.6;color:var(--ink);white-space:pre-line}
.listing-description-preview mark{background:#d4a67f40;color:inherit;border-radius:3px;padding:0 2px}
.listing-card .listing-contact-actions{border-top:0}
.offer-button{border-color:#d4a67f77;background:#2a211a;color:var(--ink)}

/* ---------- Creative offer sheet ---------- */
.offer-dialog{max-width:760px}
.offer-form{display:flex;flex-direction:column;gap:14px}
.offer-address{margin:0;font-size:16px;color:var(--ink);font-weight:600}
.offer-listing-terms{margin:0;padding:10px 12px;border-radius:12px;background:#d4a67f14;border:1px solid #d4a67f44;font-size:14px;line-height:1.45}
.offer-structure{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0;padding:0;border:0}
.offer-structure legend{font-size:13px;color:var(--muted);margin-bottom:6px;text-transform:uppercase;letter-spacing:.05em}
.offer-structure label{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:12px;border-radius:14px;border:1px solid #ffffff1c;background:#171717;font-size:15px;color:var(--ink);cursor:pointer}
.offer-structure label small{flex-basis:100%;font-size:12px;color:var(--muted);padding-left:26px}
.offer-structure label:has(input:checked){border-color:var(--ember);background:#2a211a}
.offer-structure input{width:18px;height:18px;accent-color:var(--ember)}
.offer-grid,.offer-group{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.offer-group{grid-column:1/-1}
.offer-group[hidden]{display:none}
.offer-field{display:flex;flex-direction:column;gap:5px;font-size:13px;color:var(--muted)}
.offer-field input,.offer-field textarea{font:inherit;font-size:17px;color:var(--ink);background:#101010;border:1px solid #ffffff24;border-radius:10px;padding:10px 12px}
.offer-field input:focus,.offer-field textarea:focus{outline:2px solid var(--ember);outline-offset:1px}
.offer-field small{font-size:12px;color:var(--dim)}
.offer-message-field textarea{font-size:15px;line-height:1.5;min-height:230px;resize:vertical}
.offer-results{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:16px;background:#161616;border:1px solid #ffffff14}
.offer-result{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #ffffff10;font-size:15px}
.offer-result strong{font-size:18px;color:var(--ink);font-variant-numeric:tabular-nums}
.offer-total strong{font-size:22px;color:var(--ember)}
.offer-warning{margin:8px 0 0;font-size:14px;color:var(--ember)}
.offer-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.offer-actions a,.offer-actions button{min-height:46px;display:inline-flex;align-items:center;justify-content:center;padding:0 18px;text-decoration:none}
.offer-actions a[hidden]{display:none}
.offer-note{margin:0;font-size:13px;color:var(--muted)}
@media(max-width:560px){.offer-structure{grid-template-columns:1fr}}

/* ---------- Light mode ----------
   The palette is almost entirely grays, so an inverted rendering gives a clean
   light theme without rewriting several hundred hard-coded colors. Photos
   and the map's listing dots are flipped back so they keep their real color. */
html[data-theme="light"]{filter:invert(1) hue-rotate(180deg);background:#0b0b0b}
html[data-theme="light"] :is(.listing-photo,.detail-photo,img:not(.brand img,.footer-logo)){filter:invert(1) hue-rotate(180deg)}
html[data-theme="light"] mark{background:#2b59c340}
/* Open dialogs render in the top layer, outside the page filter, so they flip on their own. */
html[data-theme="light"] dialog[open],html[data-theme="light"] .toast{filter:invert(1) hue-rotate(180deg)}
html[data-theme="light"] dialog::backdrop{background:#00000055}
