/* Harborline Demo Realty — visual world: 待售立牌 (American front-yard enamel FOR SALE sign).
   Red-and-white enamel plates hung from an iron post; listing status hangs below as a rider plate
   (PENDING / SOLD). Lettering is the condensed DIN of real yard signs: Bahnschrift ships with Windows,
   so no font files leave the machine (web.md rule 4). */
:root {
  color-scheme: light;
  --bg: #eceef0;            /* sidewalk concrete */
  --surface: #ffffff;       /* white enamel */
  --text: #1b1d21;          /* sign-shop black */
  --muted: #4c5259;
  --line: #cfd3d8;
  --red: #b3121b;           /* enamel red, fill */
  --red-ink: #a3111a;       /* enamel red, as text on enamel white */
  --on-red: #ffffff;
  --iron: #2b2e33;          /* powder-coated post */
  --lawn: #5f7a52;
  --danger: #a3111a;
  --ok: #24663a;
  --focus: #1b1d21;
  --shadow: 0 1px 2px rgb(27 29 33 / .10), 0 6px 16px -6px rgb(27 29 33 / .22);
  --radius: 5px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --font: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  --font-sign: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Arial Narrow",
    "Liberation Sans Narrow", "DejaVu Sans Condensed", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121418;            /* the yard after dusk */
  --surface: #1c1f24;
  --text: #efece5;
  --muted: #b0b4ba;
  --line: #363b42;
  --red: #b8222a;
  --red-ink: #ff8f88;
  --on-red: #fff8f2;
  --iron: #0b0c0e;
  --lawn: #3e5236;
  --danger: #ff8f88;
  --ok: #86d49f;
  --focus: #efece5;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 20px -8px rgb(0 0 0 / .6);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; accent-color: var(--red); scrollbar-color: var(--muted) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  caret-color: var(--red);
}
::selection { background: var(--red); color: var(--on-red); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1, h2 {
  font-family: var(--font-sign);
  font-variation-settings: "wdth" 75;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; max-width: 68ch; }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem 1rem; }

/* sign lettering used across the chrome */
.brand-name, .site-nav a, .button, .lang-toggle, .theme-toggle, .nav-toggle,
.badge, .rider, .listing-price, .sign-panel-text, .steps > li::before, .listing-facts dt {
  font-family: var(--font-sign);
  font-variation-settings: "wdth" 80;
}

/* ---------- chrome ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.demo-banner {
  margin: 0; max-width: none; padding: .4rem var(--gutter);
  font-size: .8125rem; line-height: 1.45;
  background: var(--iron); color: #eceef0;
}
.site-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; padding: .85rem var(--gutter); }
.brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; margin-right: auto; }
.brand-name {
  align-self: flex-start;
  background: var(--red); color: var(--on-red);
  padding: .2rem .6rem .15rem; border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px var(--on-red);
  font-weight: 700; font-size: 1.125rem; letter-spacing: .03em; text-transform: uppercase;
}
.brand-tagline { font-size: .8125rem; color: var(--muted); margin-top: .3rem; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: .55rem 0;
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }
.site-tools { display: flex; gap: .5rem; }
.site-footer {
  margin-top: auto; padding: 2rem var(--gutter) calc(2rem + env(safe-area-inset-bottom, 0px));
  background: var(--iron); color: #cfccc5; font-size: .875rem;
  border-top: 6px solid var(--red);
}
.site-footer p:first-child { color: #eceef0; font-weight: 700; }

main { width: 100%; max-width: 74rem; margin: 0 auto; padding: 2.25rem var(--gutter) 4rem; }
main:focus { outline: none; }
section { margin-block: 3rem; }
.page-head { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .35em; }
.lead { font-size: 1.125rem; color: var(--muted); }

/* ---------- controls ---------- */
button, input, select, textarea { font: inherit; color: inherit; }
.button, .lang-toggle, .theme-toggle, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1.15rem; border-radius: 4px;
  border: 2px solid var(--text); background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 1rem; letter-spacing: .05em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
}
.lang-toggle, .theme-toggle, .nav-toggle { border-width: 1px; border-color: var(--line); font-size: .9375rem; padding-inline: .85rem; }
.lang-toggle:hover, .theme-toggle:hover, .nav-toggle:hover, .button-quiet:hover { border-color: var(--text); background: var(--bg); }
.button-primary {
  background: var(--red); border-color: var(--red); color: var(--on-red);
  box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px rgb(255 255 255 / .55), var(--shadow);
}
.button-primary:hover { filter: brightness(1.08); }
.button-primary:active { transform: translateY(1px); box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px rgb(255 255 255 / .55); }
.button:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.site-bar .nav-toggle { display: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 700; font-size: .9375rem; }
input, select, textarea {
  min-height: 44px; padding: .55rem .75rem; border-radius: 4px;
  border: 1px solid #8d887e; background: var(--surface);
}
:root[data-theme="dark"] :is(input, select, textarea) { border-color: #5c626a; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--text); }
textarea { resize: vertical; }
[aria-invalid] { border-color: var(--danger) !important; box-shadow: inset 0 0 0 1px var(--danger); }
.field-error { margin: 0; min-height: 1.25em; font-size: .875rem; font-weight: 600; color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.search-form .form-actions { grid-column: 1 / -1; }
.search-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; align-items: end; }
.contact-form {
  display: grid; gap: .75rem; max-width: 40rem;
  padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-notice, .fine-print, .updated-at { font-size: .875rem; color: var(--muted); }
.form-result { margin: 0; padding: .85rem 1rem; border-radius: 4px; border: 2px solid currentColor; font-weight: 600; }
.form-result:focus { outline: none; }
.form-result.is-success { color: var(--ok); }
.form-result.is-error { color: var(--danger); }

/* ---------- home hero: the sign in the front yard ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: .5rem;
}
.hero h1 { margin-bottom: .4em; }
.hero-copy .lead { margin-bottom: 1.75rem; }
.hero-yard {
  position: relative; margin: 0; container-type: inline-size;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.hero-yard img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
:root[data-theme="dark"] .hero-yard img { filter: brightness(.62) saturate(.8); }
.yard-sign {
  position: absolute; left: 6cqi; bottom: 5cqi; width: 46cqi; height: 46cqi;
  --post: 2.2cqi;
}
.sign-post {
  position: absolute; left: 0; top: 0; bottom: 0; width: var(--post);
  background: linear-gradient(90deg, #3b3f45, var(--iron) 60%);
  border-radius: 1px 1px 0 0;
}
.sign-arm {
  position: absolute; left: 0; top: 4cqi; width: 100%; height: calc(var(--post) * .8);
  background: var(--iron);
}
.sign-arm::after { /* finial cap */
  content: ""; position: absolute; left: calc(var(--post) * -.25); top: -4cqi; width: calc(var(--post) * 1.5); height: 1.4cqi;
  background: var(--iron); border-radius: 1px;
}
.sign-panel {
  position: absolute; left: 10cqi; right: 2cqi; top: 8.5cqi; height: 21cqi;
  display: grid; place-items: center; padding: 0 2cqi;
  background: var(--red); color: var(--on-red); border-radius: 1.2cqi;
  box-shadow: inset 0 0 0 1.2cqi var(--red), inset 0 0 0 1.6cqi var(--on-red), 0 1.2cqi 2cqi -1cqi rgb(0 0 0 / .45);
  transform-origin: 50% -4.5cqi;
}
.sign-panel::before, .sign-panel::after { /* S-hooks up to the arm */
  content: ""; position: absolute; top: -3.4cqi; width: .7cqi; height: 3.4cqi; background: var(--iron);
}
.sign-panel::before { left: 14%; }
.sign-panel::after { right: 14%; }
.sign-panel-text {
  text-align: center; line-height: 1.02; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  font-size: clamp(.875rem, 4.6cqi, 2.1rem); text-wrap: balance;
}
.rider {
  display: inline-block; position: relative; margin: 0;
  padding: .15rem .7rem .1rem; border-radius: 3px;
  font-weight: 700; font-size: .9375rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.5;
}
.rider::before, .rider::after { /* the two rings it hangs from */
  content: ""; position: absolute; top: -.7rem; width: .4rem; height: .75rem;
  border: 2px solid var(--iron); border-bottom: 0; border-radius: .3rem .3rem 0 0;
}
:root[data-theme="dark"] .rider::before, :root[data-theme="dark"] .rider::after { border-color: #8a8f96; }
.rider::before { left: 18%; }
.rider::after { right: 18%; }
.rider-pending { background: var(--surface); color: var(--red-ink); box-shadow: inset 0 0 0 2px var(--red); }
.rider-sold { background: var(--red); color: var(--on-red); box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px var(--on-red); }
.rider-sign {
  position: absolute; left: 22cqi; top: 33cqi; padding: .2cqi 2cqi; border-radius: .8cqi;
  font-size: clamp(.6875rem, 3cqi, 1.25rem);
  background: #ffffff; color: #a3111a; box-shadow: inset 0 0 0 .5cqi #b3121b;
  transform-origin: 50% -3cqi;
}
.rider-sign::before, .rider-sign::after { top: -3.2cqi; height: 3.2cqi; width: 1.6cqi; border-color: var(--iron); border-width: .45cqi; }

/* ---------- services and steps ---------- */
.service-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0; padding: 0; margin: 0; list-style: none;
  border-top: 3px solid var(--text);
}
.service-list > li { padding: 1.25rem 1.5rem 0 0; }
.service-list > li + li { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.service-list h3 { font-size: 1.1875rem; }
.service-list p { color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem 2rem; padding: 0; margin: 0 0 2.5rem; list-style: none; counter-reset: step; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; }
.steps > li::before {
  content: counter(step); grid-row: span 2;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 4px;
  background: var(--red); color: var(--on-red); font-weight: 700; font-size: 1.5rem;
  box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px var(--on-red);
}
.steps p { color: var(--muted); }
.agent-profile { max-width: 46rem; }
.agent-license { font-weight: 700; color: var(--red-ink); }

/* ---------- listings: every card is a sign, status hangs below ---------- */
.result-status { margin-top: 1.75rem; font-weight: 600; }
.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 3.25rem 1.5rem; list-style: none; margin: 1.25rem 0 2.5rem; padding: 0;
}
.listing-grid[aria-busy="true"] { opacity: .6; }
.listing-card {
  display: flex; flex-direction: column; position: relative;
  background: var(--surface); border: 2px solid var(--red); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.listing-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border-radius: 3px 3px 0 0; }
:root[data-theme="dark"] .listing-card img { filter: brightness(.82); }
.listing-card-body { padding: 1rem 1.1rem 1.15rem; display: grid; gap: .3rem; border-top: 6px solid var(--red); }
.listing-card-body p { margin: 0; }
.listing-title { font-size: 1.0625rem; margin: .15rem 0 0; }
.listing-title a { color: var(--text); text-decoration: none; }
.listing-title a::after { content: ""; position: absolute; inset: 0; }
.listing-title a:focus-visible { outline: none; }
.listing-card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.listing-card:hover .listing-title a { text-decoration: underline; text-underline-offset: .2em; }
.listing-price { font-weight: 700; font-size: 1.625rem; line-height: 1.2; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.listing-specs, .listing-place, .listing-brokerage { color: var(--muted); font-size: .9375rem; }
.listing-brokerage { padding-top: .35rem; margin-top: .25rem !important; border-top: 1px solid var(--line); font-size: .875rem; }
.listing-badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.badge {
  font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .05rem .5rem; border-radius: 3px; border: 1px solid var(--line); color: var(--muted);
}
.badge-demo { border-color: var(--text); color: var(--text); }
.listing-card:not([data-status="Active"]) .badge-status { display: none; }
.listing-card[data-status="Active"] .badge-status { border-color: var(--red); color: var(--red-ink); }
.listing-card > .rider { position: absolute; top: 100%; left: 50%; translate: -50% .7rem; white-space: nowrap; }
.listing-card[data-status="Closed"] img { filter: saturate(.55); }
.pager { display: flex; gap: .75rem; }

/* ---------- listing detail ---------- */
.back-link { font-weight: 600; }
.listing-detail { display: grid; gap: 1.75rem; }
.listing-head {
  position: relative; justify-self: start; max-width: 100%;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  background: var(--red); color: var(--on-red); border-radius: var(--radius);
  box-shadow: inset 0 0 0 6px var(--red), inset 0 0 0 8px var(--on-red), var(--shadow);
  margin-bottom: 1.5rem;
}
.listing-head h1 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem); margin: .35rem 0 .15em; }
.listing-head .listing-place { color: inherit; opacity: .92; margin: 0 0 .5rem; }
.listing-head .listing-price { color: inherit; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin: 0; }
.listing-head .badge-demo { border-color: var(--on-red); color: var(--on-red); }
.listing-head > .rider { position: absolute; top: 100%; left: 2rem; margin-top: .75rem; }
.listing-photo { margin: 0; }
.listing-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
:root[data-theme="dark"] .listing-photo img { filter: brightness(.85); }
.listing-facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); column-gap: 1.5rem; margin: 0;
  border-top: 3px solid var(--text);
}
.listing-facts > div { padding-block: .8rem; border-bottom: 1px solid var(--line); }
.listing-facts dt { font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.listing-facts dd { margin: 0; font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.location-sketch { /* a street grid with the lot marked, instead of a third-party map */
  position: relative; height: 11rem; margin-bottom: 1rem; border-radius: var(--radius);
  border: 1px solid var(--line); background-color: var(--surface);
  background-image:
    linear-gradient(var(--line) 0 0), linear-gradient(90deg, var(--line) 0 0),
    repeating-linear-gradient(0deg, transparent 0 2.4rem, var(--line) 2.4rem calc(2.4rem + 1px)),
    repeating-linear-gradient(90deg, transparent 0 3.2rem, var(--line) 3.2rem calc(3.2rem + 1px));
  background-size: 100% .6rem, .6rem 100%, auto, auto;
  background-position: 0 52%, 38% 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}
.location-sketch::after {
  content: ""; position: absolute; left: calc(38% + 1.2rem); top: calc(52% - 2.6rem);
  width: 1.9rem; height: 1.5rem; background: var(--red); border-radius: 2px;
  box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px var(--on-red), var(--shadow);
}

/* ---------- MLS disclaimer: a small plate screwed to the post ---------- */
.mls-disclaimer {
  margin-top: 3rem; padding: 1.25rem 1.5rem; max-width: 60rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .8125rem; color: var(--muted);
  background:
    radial-gradient(circle, var(--muted) 0 2px, transparent 2.5px) .5rem .5rem / 6px 6px no-repeat,
    radial-gradient(circle, var(--muted) 0 2px, transparent 2.5px) calc(100% - .5rem) .5rem / 6px 6px no-repeat,
    radial-gradient(circle, var(--muted) 0 2px, transparent 2.5px) .5rem calc(100% - .5rem) / 6px 6px no-repeat,
    radial-gradient(circle, var(--muted) 0 2px, transparent 2.5px) calc(100% - .5rem) calc(100% - .5rem) / 6px 6px no-repeat,
    var(--surface);
}
.mls-disclaimer p { max-width: 88ch; }
.mls-disclaimer p:last-child { margin-bottom: 0; }
.mls-template { font-weight: 700; color: var(--red-ink); }

/* ---------- IDX demo ---------- */
.idx-option { padding-top: 1.5rem; border-top: 3px solid var(--text); }
.idx-frame { width: 100%; height: 28rem; border: 2px solid var(--red); border-radius: var(--radius); background: var(--surface); }
.idx-widget { padding: 1rem; border: 2px solid var(--red); border-radius: var(--radius); background: var(--surface); }
.idx-widget ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.idx-widget li { display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.idx-widget li > span:first-of-type { font-family: var(--font-sign); font-variation-settings: "wdth" 80; font-weight: 700; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.idx-widget li > span:last-of-type { grid-column: 1 / -1; font-size: .875rem; color: var(--muted); }
.idx-widget p:last-child { margin: 0; font-size: .875rem; color: var(--muted); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare { border-collapse: collapse; min-width: 40rem; width: 100%; }
.compare th, .compare td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--red); color: var(--on-red); font-family: var(--font-sign); font-variation-settings: "wdth" 80; letter-spacing: .05em; text-transform: uppercase; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody th { font-weight: 700; }

/* ---------- small screens ---------- */
@media (max-width: 47.99rem) {
  .site-bar .nav-toggle { display: inline-flex; }
  .site-nav { flex-basis: 100%; display: none; }
  .nav-toggle[aria-expanded="true"] + .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-tools { flex-basis: 100%; }
  .hero { grid-template-columns: 1fr; }
  .service-list > li { padding: 1.25rem 0 0; }
  .service-list > li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 1rem; }
}

/* ---------- motion: the hero sign settles on its hooks, once ---------- */
@media (prefers-reduced-motion: no-preference) {
  .button, .listing-card, .site-nav a { transition: background-color .15s ease-out, border-color .15s ease-out, box-shadow .2s ease-out, filter .15s ease-out; }
  .listing-card:hover { box-shadow: 0 2px 4px rgb(27 29 33 / .12), 0 14px 28px -10px rgb(27 29 33 / .32); }
  .is-ready .sign-panel { animation: settle 1.6s cubic-bezier(.16, 1, .3, 1) both; }
  .is-ready .rider-sign { animation: settle 1.9s .12s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes settle {
    0% { rotate: -4deg; }
    35% { rotate: 2deg; }
    65% { rotate: -.8deg; }
    100% { rotate: 0deg; }
  }
}
