/* =========================================================================
   Home Sweet Maine × Maine Cooperative Housing — Pre-Sales Platform
   Design language: "Warm Civic Modernism" — Maine paper, pine, clay,
   editorial serif, topographic-contour motif. Self-hosted fonts (no CDN).
   ========================================================================= */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/sourcesans3.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  font-style: normal;
}

:root {
  /* paper + ink — cool coastal light, MCDP-derived */
  --paper:      #eef3f4;
  --paper-2:    #e4edee;
  --paper-3:    #dae6e8;
  --card:       #ffffff;
  --ink:        #151e24;
  --ink-soft:   #445159;
  --ink-faint:  #77848b;

  /* brand — MCDP teal + warm coral accent (var names kept for reuse) */
  --pine:       #28657c;   /* MCDP teal (primary) */
  --pine-deep:  #173e4c;   /* deep teal */
  --pine-light: #e0edf0;   /* teal tint */
  --navy:       #151e24;
  --clay:       #d9714e;   /* warm coral accent */
  --clay-deep:  #bc5936;
  --clay-light: #f8e5dc;
  --wheat:      #e0a458;
  --tide:       #4f8e93;

  --line:       #d3dfe2;
  --line-soft:  #e2eaec;

  /* stage progression: cool → warm → teal (member = goal) */
  --st-lead:           #8aa6b0;
  --st-educated:       #6f9fb0;
  --st-prequalified:   #4f8e93;
  --st-reserved:       #e0a458;
  --st-under_contract: #d9714e;
  --st-homeowner:      #28657c;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(42, 54, 44, .06), 0 1px 3px rgba(42, 54, 44, .05);
  --shadow:    0 4px 14px rgba(37, 52, 41, .08), 0 1px 3px rgba(37, 52, 41, .06);
  --shadow-lg: 0 18px 44px rgba(30, 45, 36, .16), 0 4px 12px rgba(30, 45, 36, .08);

  --maxw: 1120px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 82% -8%, rgba(192, 103, 63, .07), transparent 60%),
    radial-gradient(1000px 620px at -10% 6%, rgba(44, 85, 69, .07), transparent 55%);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--pine); text-decoration: none; }
a:hover { color: var(--clay-deep); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.4vw, 4.1rem); font-weight: 600; overflow-wrap: break-word; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1rem; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--clay-deep);
  display: inline-flex; align-items: center; gap: .5rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--clay); display: inline-block; }
.serif-accent { font-family: var(--font-display); font-style: italic; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--pine); --fg: #fff; --bd: var(--pine);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .82rem 1.5rem; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: #fff; }
.btn:active { transform: translateY(0); }
.btn-clay { --bg: var(--clay); --bd: var(--clay); }
.btn-clay:hover { --bg: var(--clay-deep); }
.btn-outline { --bg: transparent; --fg: var(--pine); --bd: var(--pine); box-shadow: none; }
.btn-outline:hover { --bg: var(--pine); --fg: #fff; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.06rem; }
.btn-ghost { --bg: transparent; --fg: var(--ink-soft); --bd: transparent; box-shadow: none; }

/* ---------- site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(238, 243, 244, .9);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(30, 45, 50, .08); }
.site-header .container { display: flex; align-items: center; gap: 1.5rem; height: 76px; }

.brand-lockup { display: flex; align-items: center; gap: .6rem; flex: none; max-width: 62%; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text .b1 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.08; color: var(--pine-deep); letter-spacing: -.005em; max-width: 20ch; }
.brand-text .b2 { font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin-top: .18rem; }

.nav-primary { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.nav-primary a { font-weight: 600; font-size: .93rem; color: var(--ink-soft); padding: .5rem .7rem; border-radius: 7px; transition: color .15s, background .15s; }
.nav-primary a:hover { color: var(--pine-deep); background: rgba(40, 101, 124, .07); }

.nav-actions { display: flex; align-items: center; gap: .8rem; flex: none; }
.btn-cta {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem;
  color: #fff; background: linear-gradient(135deg, var(--clay), var(--clay-deep));
  padding: .62rem 1.15rem; border-radius: 999px; border: none;
  box-shadow: 0 4px 14px rgba(192, 89, 54, .32); transition: transform .16s var(--ease), box-shadow .16s, filter .16s;
}
.btn-cta:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 7px 20px rgba(192, 89, 54, .4); filter: saturate(1.08); }
.btn-cta svg { flex: none; }

/* hamburger */
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--pine-deep); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile slide-down nav */
.mobile-nav { position: fixed; top: 76px; left: 0; right: 0; z-index: 59; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: .8rem 24px 1.4rem; display: none; flex-direction: column; gap: .1rem; }
.mobile-nav.open { display: flex; animation: riseIn .22s var(--ease); }
.mobile-nav a { padding: .8rem .4rem; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.mobile-nav a.btn-cta { border: none; justify-content: center; }

@media (max-width: 940px) {
  .nav-primary { display: none; }
  .nav-toggle { display: flex; }
  .site-header .container { gap: .75rem; }
  /* nav-primary carried the margin that pushed things right; with it hidden,
     pin the CTA + menu to the far right so they float right and stay put. */
  .nav-actions { margin-left: auto; }
}
@media (max-width: 600px) {
  .nav-actions .hide-sm { display: none; }
  /* icon-only CTA so the full brand name + CTA + hamburger always fit the viewport */
  .btn-cta span { display: none; }
  .btn-cta { padding: .6rem; width: 42px; height: 42px; justify-content: center; }
  .btn-cta svg { width: 19px; height: 19px; }
  .brand-text .b1 { font-size: .9rem; max-width: 17ch; }
  .brand-text .b2 { font-size: .56rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5.5rem); }
.hero-contours { position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-grid > * { min-width: 0; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1, .hero-sub, .hero-cta { max-width: 100%; }
.hero-meta { max-width: 100%; }
.hero h1 { font-size: clamp(1.8rem, 6vw, 4.1rem); overflow-wrap: anywhere; max-width: min(100%, 90vw); }
.hero h1 .lede-em { color: var(--pine); font-style: italic; }
.hero-sub { font-size: 1.22rem; color: var(--ink-soft); max-width: 34ch; margin: 1.2rem 0 1.9rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.hero-meta { margin-top: 2.2rem; display: flex; gap: 1.4rem 2rem; flex-wrap: wrap; }
.hero-meta .hm { min-width: 0; }
.hero-meta .hm .n { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--pine-deep); display: block; line-height: 1; }
.hero-meta .hm .l { font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-faint); }

/* hero card (floorplan preview) */
.hero-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 1.4rem; transform: rotate(-1.4deg);
  transition: transform .4s var(--ease);
}
.hero-card:hover { transform: rotate(0); }
.hero-card .hc-photo { height: 190px; border-radius: var(--radius); background:
  linear-gradient(135deg, var(--pine-light), var(--paper-3));
  position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 1rem; }
.hero-card .hc-badge { position: absolute; top: 12px; left: 12px; background: var(--clay); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .05em; padding: .3rem .6rem; border-radius: 999px; text-transform: uppercase; }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-featured { border-color: var(--clay); box-shadow: 0 0 0 1px var(--clay), var(--shadow-sm); }
.card .card-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--pine-light); color: var(--pine); display: grid; place-items: center; margin-bottom: 1rem; }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* floorplan / pricing cards */
.plan-card { display: flex; flex-direction: column; }
.plan-card .price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--pine-deep); }
.plan-card .price small { font-size: .95rem; color: var(--ink-faint); font-family: var(--font-body); font-weight: 500; }
.plan-card .beds { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--clay-deep); }
.plan-card ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.plan-card li { padding: .4rem 0; border-top: 1px solid var(--line-soft); color: var(--ink-soft); font-size: .95rem; display: flex; gap: .5rem; }
.plan-card li::before { content: "→"; color: var(--tide); }

/* ---------- badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 700; padding: .28rem .66rem; border-radius: 999px; letter-spacing: .02em; }
.badge-pine { background: var(--pine-light); color: var(--pine-deep); }
.badge-clay { background: var(--clay-light); color: var(--clay-deep); }
.badge-live { background: var(--clay); color: #fff; }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }

/* ---------- footer ---------- */
.site-footer { background: var(--pine-deep); color: #dfe9e2; padding: 3rem 0 2rem; margin-top: 2rem; }
.site-footer a { color: #fff; }
.site-footer .ft-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.site-footer .powered { font-family: var(--font-display); font-size: 1.2rem; color: #fff; }
.site-footer .fine { color: #9fb4a9; font-size: .85rem; margin-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.2rem; }

/* ---------- path-home motif (buyer journey / stages) ---------- */
.pathline { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.pathstep { display: flex; align-items: center; gap: .5rem; }
.pathstep .dot { width: 15px; height: 15px; border-radius: 999px; border: 2.5px solid var(--line); background: var(--card); flex: none; }
.pathstep.done .dot { background: var(--pine); border-color: var(--pine); }
.pathstep.current .dot { background: var(--clay); border-color: var(--clay); box-shadow: 0 0 0 5px var(--clay-light); }
.pathstep .seg { width: 34px; height: 2.5px; background: var(--line); }
.pathstep.done .seg { background: var(--pine); }
.pathstep .lbl { font-size: .8rem; font-weight: 600; color: var(--ink-soft); }

/* ---------- photos ---------- */
.photo-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: var(--card); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-4x3 { aspect-ratio: 4 / 3; }
.photo-16x10 { aspect-ratio: 16 / 10; }
.spotlight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.spotlight-grid > * { min-width: 0; }
@media (max-width: 860px) { .spotlight-grid { grid-template-columns: 1fr; } }

/* ---------- partners strip ---------- */
.partners { background: var(--card); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 2rem 0; }
.partners .lead-label { text-align: center; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin-bottom: 1.3rem; }
.partner-logos { display: flex; flex-wrap: wrap; gap: 2.2rem 2.8rem; align-items: center; justify-content: center; }
.partner-logos img { height: 40px; width: auto; opacity: .7; filter: grayscale(.3); transition: opacity .2s, filter .2s; }
.partner-logos img:hover { opacity: 1; filter: none; }

/* ---------- income table ---------- */
.income-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.income-table caption { text-align: left; color: var(--ink-faint); font-size: .82rem; margin-bottom: .6rem; }
.income-table th, .income-table td { padding: .6rem .5rem; border-bottom: 1px solid var(--line-soft); text-align: center; }
.income-table th:first-child, .income-table td:first-child { text-align: left; font-weight: 600; }
.income-table thead th { color: var(--pine-deep); font-weight: 700; border-bottom: 2px solid var(--line); }
.income-table tbody td { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* ---------- resource library ---------- */
.res-group { margin-bottom: 2rem; }
.res-group h3 { color: var(--pine-deep); margin-bottom: .8rem; }
.res-list { display: grid; gap: .6rem; }
.res-item { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s, transform .15s; }
.res-item:hover { border-color: var(--pine); transform: translateX(3px); }
.res-kind { flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pine); background: var(--pine-light); padding: .28rem .55rem; border-radius: 5px; min-width: 58px; text-align: center; }
.res-item .res-title { color: var(--ink); font-weight: 600; }
.res-item .res-go { margin-left: auto; color: var(--ink-faint); }

/* ---------- forms / wizard ---------- */
.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-weight: 600; margin-bottom: .4rem; }
.field .hint { color: var(--ink-faint); font-size: .86rem; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: .82rem 1rem; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font: inherit; background: var(--card); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-light); }
/* 5-point satisfaction scale: one row on desktop, stacked on phones */
.scale-row { display: grid; gap: .5rem; grid-template-columns: repeat(5, 1fr); }
.scale-row .choice { flex-direction: column; text-align: center; gap: .35rem; padding: .7rem .4rem; }
.scale-row .c-title { font-weight: 600; font-size: .82rem; line-height: 1.2; }
@media (max-width: 700px) { .scale-row { grid-template-columns: 1fr; } .scale-row .choice { flex-direction: row; text-align: left; padding: .7rem 1rem; } }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.choice-grid { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }
.choice {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1rem;
  cursor: pointer; background: var(--card); display: flex; gap: .65rem; align-items: center; transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--pine); }
.choice input { accent-color: var(--pine); width: auto; margin: 0; }
.choice:has(input:checked) { border-color: var(--pine); background: var(--pine-light); }
.choice .c-title { font-weight: 600; }
.choice .c-sub { color: var(--ink-faint); font-size: .84rem; }

.wizard { max-width: 620px; margin: 0 auto; }
.wizard-progress { display: flex; gap: .4rem; margin-bottom: 1.8rem; }
.wizard-progress .pip { height: 5px; flex: 1; border-radius: 999px; background: var(--line); transition: background .3s; }
.wizard-progress .pip.done { background: var(--pine); }
.wstep { display: none; }
.wstep.active { display: block; animation: riseIn .4s var(--ease); }
.wstep h2 { font-size: 1.7rem; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.7rem; gap: 1rem; }
.step-count { color: var(--ink-faint); font-size: .88rem; }

/* ---------- readiness dial ---------- */
.dial { --pct: 0; --c: var(--pine); width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), var(--pine-light) 0); position: relative; }
.dial::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--card); }
.dial .dial-num { position: relative; font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; color: var(--ink); line-height: 1; }
.dial .dial-num small { display: block; font-family: var(--font-body); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }

/* eligibility pill */
.elig { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: 999px; font-weight: 700; font-size: .82rem; }
.elig-eligible { background: #dcefe4; color: #1f6b47; }
.elig-below-min { background: #fde7d6; color: #9a5b16; }
.elig-above-max { background: var(--clay-light); color: var(--clay-deep); }
.elig-unknown { background: var(--paper-3); color: var(--ink-soft); }

/* ---------- affordability breakdown ---------- */
.afford-total { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.afford-total .big { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; color: var(--pine-deep); line-height: 1; }
.line-items { list-style: none; padding: 0; margin: 1rem 0 0; }
.line-items li { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line-soft); font-size: .95rem; }
.line-items li span:first-child { color: var(--ink-soft); }
.line-items li span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.line-items li.total { border-top: 2px solid var(--line); border-bottom: none; margin-top: .3rem; padding-top: .7rem; }
.prog-row { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line-soft); }
.prog-check { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.prog-yes { background: #dcefe4; color: #1f6b47; }
.prog-maybe { background: var(--clay-light); color: var(--clay-deep); }
.prog-amt { margin-left: auto; font-weight: 700; color: var(--pine-deep); font-variant-numeric: tabular-nums; }

/* ---------- lender rows ---------- */
.lender-row { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.lender-row:last-child { border-bottom: none; }
.lender-row .lr-body { flex: 1; }
.lender-row .lr-name { font-weight: 700; }
.lender-row .lr-officer { color: var(--ink-faint); font-size: .85rem; }
.lender-row .lr-reason { color: var(--pine-deep); font-size: .88rem; margin-top: .2rem; }
.lender-row .lr-phone { white-space: nowrap; font-weight: 700; color: var(--pine); font-size: .9rem; }
.tag-mini { display: inline-block; font-size: .68rem; font-weight: 700; background: var(--pine-light); color: var(--pine-deep); padding: .12rem .45rem; border-radius: 4px; margin: .25rem .25rem 0 0; }

/* ---------- checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { margin: 0; }
.checklist button { width: 100%; text-align: left; display: flex; align-items: center; gap: .8rem; padding: .75rem .3rem; background: none; border: none; border-bottom: 1px solid var(--line-soft); cursor: pointer; font: inherit; color: var(--ink); }
.checklist .box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; color: #fff; }
.checklist .done .box { background: var(--pine); border-color: var(--pine); }
.checklist .done .label { color: var(--ink-faint); text-decoration: line-through; }

/* ---------- messages ---------- */
.msg-thread { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.msg { max-width: 85%; padding: .6rem .85rem; border-radius: var(--radius); font-size: .92rem; }
.msg-buyer { align-self: flex-end; background: var(--pine); color: #fff; border-bottom-right-radius: 4px; }
.msg-team { align-self: flex-start; background: var(--paper-2); border-bottom-left-radius: 4px; }
.msg-form { display: flex; gap: .5rem; }
.msg-form input { flex: 1; padding: .7rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; }

/* ---------- AI concierge widget ---------- */
.cc-fab { position: fixed; bottom: 22px; right: 22px; z-index: 80; display: flex; align-items: center; gap: .55rem;
  background: var(--pine); color: #fff; border: none; border-radius: 999px; padding: .8rem 1.2rem; font: inherit; font-weight: 700;
  cursor: pointer; box-shadow: var(--shadow-lg); transition: transform .18s var(--ease), background .18s; }
.cc-fab:hover { transform: translateY(-2px); background: var(--pine-deep); }
.cc-fab .cc-dot { width: 9px; height: 9px; border-radius: 999px; background: #7fdca6; box-shadow: 0 0 0 0 rgba(127,220,166,.7); animation: ccPulse 2s infinite; }
@keyframes ccPulse { 0% { box-shadow: 0 0 0 0 rgba(127,220,166,.6); } 70% { box-shadow: 0 0 0 8px rgba(127,220,166,0); } 100% { box-shadow: 0 0 0 0 rgba(127,220,166,0); } }
.cc-panel { position: fixed; bottom: 22px; right: 22px; z-index: 81; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 44px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: none; flex-direction: column; overflow: hidden; }
.cc-panel.open { display: flex; animation: riseIn .25s var(--ease); }
.cc-head { background: var(--pine-deep); color: #fff; padding: 1rem 1.2rem; display: flex; align-items: center; gap: .7rem; }
.cc-head .cc-av { width: 34px; height: 34px; border-radius: 999px; background: var(--clay); display: grid; place-items: center; font-weight: 700; flex: none; }
.cc-head .cc-title { font-family: var(--font-display); font-weight: 600; line-height: 1.1; }
.cc-head .cc-sub { font-size: .74rem; color: #bcd; }
.cc-head .cc-x { margin-left: auto; background: none; border: none; color: #cde; font-size: 1.4rem; cursor: pointer; }
.cc-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--paper); }
.cc-msg { max-width: 88%; padding: .6rem .85rem; border-radius: var(--radius); font-size: .93rem; line-height: 1.55; white-space: pre-wrap; }
.cc-bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; max-width: 92%; white-space: normal; box-shadow: var(--shadow-sm); }
.cc-bot p { margin: 0 0 .55rem; }
.cc-bot p:last-child { margin-bottom: 0; }
.cc-bot ul { margin: .2rem 0 .55rem; padding-left: 1.1rem; }
.cc-bot ul:last-child { margin-bottom: 0; }
.cc-bot li { margin: .18rem 0; }
.cc-bot li::marker { color: var(--clay); }
.cc-bot strong { color: var(--pine-deep); font-weight: 700; }
.cc-user { align-self: flex-end; background: var(--pine); color: #fff; border-bottom-right-radius: 4px; }
.cc-typing { align-self: flex-start; color: var(--ink-faint); font-size: .85rem; padding: .3rem .4rem; }
.cc-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }
.cc-chip { background: var(--pine-light); color: var(--pine-deep); border: none; border-radius: 999px; padding: .4rem .7rem; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.cc-chip:hover { background: var(--pine); color: #fff; }
.cc-foot { border-top: 1px solid var(--line-soft); padding: .7rem; background: var(--card); }
.cc-inputrow { display: flex; gap: .5rem; }
.cc-inputrow input { flex: 1; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; }
.cc-inputrow input:focus { outline: none; border-color: var(--pine); }
.cc-send { background: var(--pine); color: #fff; border: none; border-radius: 999px; width: 40px; flex: none; cursor: pointer; font-size: 1.1rem; }
.cc-lead { background: var(--pine-light); border-radius: var(--radius); padding: .7rem .85rem; margin-top: .3rem; }
.cc-lead form { display: flex; gap: .4rem; margin-top: .5rem; }
.cc-lead input { flex: 1; padding: .5rem .7rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.cc-badge-ai { font-size: .68rem; color: var(--ink-faint); text-align: center; padding: .3rem 0 0; }
@media (max-width: 520px) { .cc-fab .cc-label { display: none; } }

/* ---------- own vs co-op vs rent (interactive) ---------- */
.cmp-head h3 { margin-bottom: .2rem; }
.cmp-head .cmp-lede { font-size: 1.05rem; color: var(--ink-soft); }
.cmp-head .cmp-lede strong { color: var(--pine-deep); }
.cmp-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }
@media (max-width: 680px) { .cmp-cols { grid-template-columns: 1fr; } }
.cmp-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; background: var(--card); }
.cmp-col.cmp-hi { border-color: var(--pine); box-shadow: 0 0 0 1px var(--pine); position: relative; }
.cmp-col.cmp-hi::before { content: "Recommended"; position: absolute; top: -10px; left: 1rem; background: var(--pine); color: #fff; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 999px; }
.cmp-col-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.cmp-metric { display: flex; align-items: baseline; gap: .3rem; margin-top: .5rem; }
.cmp-metric .cmp-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--ink); }
.cmp-metric .cmp-unit { color: var(--ink-faint); font-size: .9rem; }
.cmp-bar { height: 8px; background: var(--paper-3); border-radius: 999px; overflow: hidden; margin: .5rem 0 .9rem; }
.cmp-bar .cmp-fill { height: 100%; border-radius: 999px; }
.cmp-kv { display: grid; grid-template-columns: 1fr auto; gap: .35rem .6rem; margin: 0; font-size: .88rem; }
.cmp-kv dt { color: var(--ink-faint); }
.cmp-kv dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.cmp-tenyear { margin-top: 1.4rem; }
.cmp-tenyear .cmp-ty-title { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: .7rem; }
.cmp-qual { margin-top: 1.4rem; overflow-x: auto; }
.cmp-qual .income-table td:not(:first-child) { text-align: left; }
.cmp-toggle { display: inline-flex; gap: .3rem; background: var(--paper-2); padding: .3rem; border-radius: 999px; }
.cmp-toggle button { border: none; background: none; padding: .5rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink-soft); }
.cmp-toggle button.active { background: var(--pine); color: #fff; }

/* ---------- horizontal bar chart (shared public + admin) ---------- */
.bars { display: flex; flex-direction: column; gap: .7rem; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 56px; align-items: center; gap: .8rem; }
.bar-row .b-label { font-size: .9rem; font-weight: 600; }
.bar-track { background: var(--paper-3); border-radius: 999px; height: 16px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; min-width: 2px; transition: width .5s var(--ease); }
.bar-row .b-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }

/* ---------- lightbox ---------- */
.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(21, 30, 36, .88); z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox .lb-close { position: fixed; top: 18px; right: 22px; background: rgba(255,255,255,.15); color: #fff; border: none; font-size: 1.6rem; width: 44px; height: 44px; border-radius: 999px; cursor: pointer; }

/* ---------- civic: breadcrumb + page header ---------- */
.crumb { font-size: .85rem; color: var(--ink-faint); margin-bottom: .6rem; }
.crumb a { color: var(--ink-soft); }
.page-header { border-bottom: 1px solid var(--line); padding-bottom: 1.4rem; margin-bottom: 2rem; }
.page-header h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: .3rem 0 .5rem; }
.page-header .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; margin: 0; }

/* ---------- civic: directory hub ---------- */
.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .hub { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .hub { grid-template-columns: 1fr; } }
.hub-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; color: inherit; transition: border-color .18s, transform .18s, box-shadow .18s; }
.hub-card:hover { border-color: var(--pine); transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.hub-card .hc-ic { font-size: 1.4rem; }
.hub-card h3 { margin: .5rem 0 .25rem; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.hub-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.hub-card .hc-go { color: var(--pine); font-weight: 700; font-size: .85rem; display: inline-block; margin-top: .6rem; }

/* ---------- civic: numbered steps + timeline ---------- */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 1.1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.step:last-child { border-bottom: none; }
.step .step-n { width: 40px; height: 40px; border-radius: 50%; background: var(--pine-light); color: var(--pine-deep); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.step h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.step p { margin: 0; color: var(--ink-soft); }

.tl { position: relative; margin-left: .5rem; }
.tl-item { position: relative; padding: 0 0 1.4rem 1.6rem; border-left: 2px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; }
.tl-item::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--pine); }
.tl-item.tl-now::before { background: var(--clay); box-shadow: 0 0 0 4px var(--clay-light); }
.tl-date { font-weight: 700; color: var(--pine-deep); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.tl-item h3 { margin: .15rem 0 .2rem; font-size: 1.05rem; }
.tl-item p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* amenity rows */
.amenity { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.amenity:last-child { border-bottom: none; }
.amenity .am-ic { font-size: 1.5rem; }
.amenity h3 { margin: 0 0 .15rem; font-size: 1.05rem; }
.amenity p { margin: 0; color: var(--ink-soft); }

/* bio cards */
.bio { display: grid; grid-template-columns: 96px 1fr; gap: 1.1rem; align-items: start; padding: 1.2rem 0; border-bottom: 1px solid var(--line-soft); }
.bio:last-child { border-bottom: none; }
.bio .bio-img { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; }
.bio .bio-img img { width: 100%; height: 100%; object-fit: cover; cursor: default; }
.bio h3 { margin: 0 0 .3rem; }
.bio p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- civic: footer sitemap ---------- */
.ft-sitemap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
@media (max-width: 760px) { .ft-sitemap { grid-template-columns: repeat(2, 1fr); } }
.ft-col h4 { color: #9fc0c9; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .7rem; }
.ft-col a { display: block; color: #dfe9ea; font-size: .9rem; padding: .18rem 0; }
.ft-col a:hover { color: #fff; }

/* ---------- lender directory (upgraded) ---------- */
.lender-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0; }
.lender-filter button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink-soft); font: inherit; font-weight: 600; font-size: .88rem; padding: .5rem 1rem; border-radius: 999px; cursor: pointer; transition: all .15s; }
.lender-filter button:hover { border-color: var(--pine); }
.lender-filter button.active { background: var(--pine); color: #fff; border-color: var(--pine); }
.lender-card { display: flex; flex-direction: column; }
.lender-card .lc-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .7rem; }
.lender-mono { width: 58px; height: 58px; border-radius: 12px; flex: none; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #fff; overflow: hidden; }
/* When a real logo is present, use a clean white tile with a hairline border rather than the colored monogram fill. */
.lender-mono:has(img) { background: #fff !important; border: 1px solid var(--line); }
.lender-mono img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 5px; }
.lender-card .lc-best { display: inline-block; background: var(--clay-light); color: var(--clay-deep); font-weight: 700; font-size: .78rem; padding: .25rem .6rem; border-radius: 999px; margin-bottom: .5rem; }

/* Recommended-lender rows on the buyer dashboard */
.rec-lenders { display: grid; gap: .7rem; margin-top: 1rem; }
.rec-lender { display: flex; align-items: center; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: .9rem 1.1rem; }
.rec-logo { width: 62px; height: 62px; flex: none; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.rec-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.rec-logo span { font-family: var(--font-display); font-weight: 700; color: var(--pine-deep); }
.rec-body { flex: 1 1 auto; min-width: 0; }
.rec-name { font-weight: 700; color: var(--pine-deep); display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.rec-officer { font-size: .85rem; color: var(--ink-soft); margin-top: .1rem; }
.rec-reason { font-size: .9rem; color: var(--ink-soft); margin-top: .25rem; }
@media (max-width: 560px) { .rec-lender { flex-wrap: wrap; } .rec-lender .btn { width: 100%; } }
.lender-card .lc-officer { color: var(--ink-faint); font-size: .88rem; }

/* ---------- teachable journey ---------- */
.progress-wrap { display: flex; align-items: center; gap: 1rem; }
.progress-bar { flex: 1; height: 12px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pine), var(--tide)); transition: width .5s var(--ease); }
.progress-pct { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--pine-deep); }

.jstage { margin-bottom: 1.6rem; }
.jstage-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
.jstage-head .jn { width: 30px; height: 30px; border-radius: 50%; background: var(--pine-light); color: var(--pine-deep); display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.jstage-head h3 { margin: 0; font-size: 1.2rem; }
.jstage-head .jcount { margin-left: auto; font-size: .82rem; color: var(--ink-faint); }

.task { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: .7rem; transition: border-color .15s; }
.task.done { background: #f2f8f5; border-color: #cfe6da; }
.task-check { flex: none; }
.task-check button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; color: #fff; font-size: .85rem; padding: 0; }
.task.done .task-check button { background: var(--pine); border-color: var(--pine); }
.task-body { flex: 1; min-width: 0; }
.task-type { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .18rem .5rem; border-radius: 5px; margin-bottom: .35rem; }
.tt-read { background: var(--pine-light); color: var(--pine-deep); }
.tt-watch { background: #efe2f2; color: #6a4b78; }
.tt-upload { background: var(--clay-light); color: var(--clay-deep); }
.tt-do { background: var(--paper-2); color: var(--ink-soft); }
.task-title { font-weight: 600; }
.task.done .task-title { text-decoration: line-through; color: var(--ink-faint); }
.task-note { color: var(--ink-faint); font-size: .88rem; margin-top: .15rem; }
/* Locked task — gated until an advisor unlocks it */
.task.locked { background: var(--paper-2); border-style: dashed; border-color: var(--line); }
.task.locked .task-title { color: var(--ink-soft); }
.task.locked .task-type { opacity: .65; }
.task-lock { width: 26px; height: 26px; display: grid; place-items: center; font-size: .95rem; opacity: .8; }
.task-locked-note { margin-top: .5rem; font-size: .86rem; color: var(--ink-soft); background: var(--paper-3); border-radius: 8px; padding: .5rem .7rem; line-height: 1.5; }
.task-locked-note a { color: var(--pine-deep); font-weight: 600; }
/* Journey: quiz + completion attribution */
.task-circle { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: block; background: var(--card); }
.task-done-note { margin-top: .5rem; font-size: .88rem; font-weight: 600; color: var(--pine-deep); }
.task-quiz { margin-top: .7rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.task-quiz.is-wrong { border-color: var(--clay); background: var(--clay-light); }
.task-quiz .tq-q { font-weight: 600; color: var(--ink); margin-bottom: .6rem; line-height: 1.5; }
.tq-badge { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--clay); border-radius: 999px; padding: .12rem .5rem; margin-right: .4rem; vertical-align: middle; }
.task-quiz .tq-opts { display: grid; gap: .4rem; margin-bottom: .7rem; }
.task-quiz .tq-opt { display: flex; align-items: flex-start; gap: .55rem; background: var(--card); border: 1.5px solid var(--line); border-radius: 8px; padding: .55rem .7rem; cursor: pointer; font-size: .93rem; transition: border-color .12s; }
.task-quiz .tq-opt:hover { border-color: var(--pine); }
.task-quiz .tq-opt input { margin-top: .2rem; flex: none; }
.task-quiz .tq-msg { color: var(--clay-deep); font-weight: 600; font-size: .86rem; margin-bottom: .6rem; }
.task-actions { margin-top: .6rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.task-video { margin-top: .7rem; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; max-width: 460px; }
.task-video iframe { width: 100%; height: 100%; border: 0; }
.upload-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.upload-form input[type=file] { font-size: .85rem; max-width: 200px; }
.doc-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; background: var(--pine-light); color: var(--pine-deep); padding: .3rem .6rem; border-radius: 999px; font-weight: 600; }

/* advisor + people cards */
.advisor-card { display: flex; gap: 1rem; align-items: center; }
.advisor-av { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.advisor-av-img { overflow: hidden; }
.advisor-av-img img { width: 100%; height: 100%; object-fit: cover; }
.advisor-card .ac-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.person-row { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
.person-ic { font-size: 1.3rem; flex: none; }
.person-row .pr-body { flex: 1; min-width: 0; }
.person-row .pr-name { font-weight: 600; }
.person-row .pr-meta { color: var(--ink-faint); font-size: .85rem; }

/* ---------- range sliders ---------- */
input[type="range"] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: var(--paper-3); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--pine); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .12s; }
input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--pine); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; }

/* ---------- article body ---------- */
.article-body { font-size: 1.08rem; line-height: 1.75; color: var(--ink); }
.article-body h2 { font-size: 1.4rem; margin: 2rem 0 .7rem; color: var(--pine-deep); }
.article-body p { margin: 0 0 1.1rem; color: var(--ink-soft); }
.article-body ul { margin: 0 0 1.2rem; padding-left: 1.2rem; color: var(--ink-soft); }
.article-body li { margin-bottom: .5rem; }
.article-body strong { color: var(--ink); }
.article-body a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- utilities ---------- */
.text-center { text-align: center; }
.muted { color: var(--ink-soft); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 2rem 0; }

/* ---------- entrance animation ---------- */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: riseIn .7s var(--ease) forwards; }
.rise-1 { animation-delay: .05s; } .rise-2 { animation-delay: .15s; }
.rise-3 { animation-delay: .25s; } .rise-4 { animation-delay: .35s; } .rise-5 { animation-delay: .45s; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; opacity: 1; } .btn:hover { transform: none; } }

/* ============ Language switcher (Google Translate, natively styled) ============ */
/* Hide Google's injected chrome — we drive it with our own UI */
#google_translate_element { display: none !important; }
.goog-te-banner-frame, .goog-te-banner-frame.skiptranslate { display: none !important; }
.skiptranslate iframe { visibility: hidden !important; height: 0 !important; }
body { top: 0 !important; }
.goog-tooltip, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font { vertical-align: inherit; }

.lang-mount { display: inline-flex; }
.lang-switch { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--pine-deep); background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: .4rem .8rem; cursor: pointer; transition: border-color .15s, background .15s; }
.lang-btn:hover { border-color: var(--pine); }
.lang-btn svg { color: var(--pine); }
.lang-caret { font-size: .7rem; color: var(--ink-faint); }
.lang-menu { position: absolute; top: calc(100% + .5rem); right: 0; min-width: 180px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .4rem;
  display: none; z-index: 90; }
.lang-switch.open .lang-menu { display: block; animation: langIn .14s ease; }
@keyframes langIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lang-opt { display: block; width: 100%; text-align: left; font: inherit; font-size: .92rem; color: var(--ink);
  background: none; border: none; border-radius: 8px; padding: .55rem .7rem; cursor: pointer; }
.lang-opt[dir="rtl"] { text-align: right; }
.lang-opt:hover { background: var(--paper-2); }
.lang-opt.active { color: var(--pine-deep); font-weight: 700; background: var(--pine-light); }
.lang-opt.active::after { content: " ✓"; color: var(--pine); }

/* Mobile: full-width in the drawer */
.lang-switch-mobile { width: 100%; }
.lang-switch-mobile .lang-btn { width: 100%; justify-content: space-between; padding: .6rem .9rem; }
.lang-switch-mobile .lang-menu { position: static; box-shadow: none; margin-top: .4rem; min-width: 0; }
@media (max-width: 760px) { .lang-mount { display: none; } }

/* ============ /homes page ============ */
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0 0 1.8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); }
.home-stats .hs { display: flex; flex-direction: column; gap: .1rem; }
.home-stats .n { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--pine-deep); line-height: 1; }
.home-stats .l { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }

.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.home-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); color: inherit;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.home-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.hc-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-3); }
.hc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.home-card:hover .hc-photo img { transform: scale(1.04); }
.hc-tag { position: absolute; left: 12px; top: 12px; background: rgba(23,62,76,.88); color: #fff;
  font-weight: 700; font-size: .82rem; padding: .3rem .7rem; border-radius: 999px; backdrop-filter: blur(4px); }
.hc-est { position: absolute; right: 12px; top: 12px; background: var(--clay); color: #fff;
  font-weight: 700; font-size: .72rem; padding: .28rem .6rem; border-radius: 999px; }
.hc-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.hc-price { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--pine-deep); }
.hc-sub { color: var(--ink-soft); font-size: .9rem; margin-bottom: .7rem; }
.hc-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .35rem; }
.hc-list li { font-size: .92rem; color: var(--ink-soft); padding-left: 1.1rem; position: relative; }
.hc-list li::before { content: "→"; position: absolute; left: 0; color: var(--clay); }
.hc-go { margin-top: auto; font-weight: 700; color: var(--pine-deep); font-size: .93rem; }

.home-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.hg-item { margin: 0; position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; }
.hg-item img { width: 100%; height: 100%; object-fit: cover; }
.hg-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .7rem .5rem;
  font-size: .78rem; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); }

.home-feat { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.home-feat .hf { display: flex; gap: .9rem; align-items: flex-start; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.home-feat .hf-ic { font-size: 1.5rem; flex: none; }
.home-feat .hf strong { display: block; color: var(--pine-deep); margin-bottom: .1rem; }
.home-feat .hf span { font-size: .9rem; color: var(--ink-soft); }

.finish-list { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.2rem; margin: 0; }
.finish-list dt { font-weight: 700; color: var(--pine-deep); font-size: .92rem; }
.finish-list dd { margin: 0; color: var(--ink-soft); font-size: .92rem; }

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-gallery { grid-template-columns: repeat(2, 1fr); }
  .home-feat { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .home-stats { grid-template-columns: repeat(2, 1fr); gap: 1rem .8rem; }
  .finish-list { grid-template-columns: 1fr; gap: .1rem .5rem; }
  .finish-list dd { margin-bottom: .5rem; }
}

/* Match form — demo mode (guided tour): full form on one page, prefilled */
.wizard.demo .wstep { display: block !important; animation: none; border-top: 1px solid var(--line-soft); padding-top: 1.2rem; margin-top: 1.2rem; }
.wizard.demo .wstep:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.wizard.demo .wizard-progress, .wizard.demo .wizard-nav { display: none; }
.demo-banner { background: var(--clay-light); color: var(--clay-deep); border: 1px solid var(--clay); border-radius: 10px;
  padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 600; font-size: .92rem; text-align: center; }

/* Demo-mode note — "this goes live in production" */
.demo-note { margin-top: .9rem; background: var(--clay-light); border: 1px solid var(--clay); color: var(--clay-deep);
  border-radius: 10px; padding: .8rem 1rem; font-size: .9rem; line-height: 1.5; }
.demo-note strong { color: var(--clay-deep); }

/* Demo environment badge — subtle, fixed, hidden inside the tour stages */
.demo-badge { position: fixed; left: 14px; bottom: 14px; z-index: 70; display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(23, 62, 76, .92); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .4rem .75rem; border-radius: 999px; box-shadow: var(--shadow); backdrop-filter: blur(4px); }
.demo-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--clay); animation: demoPulse 2s ease-in-out infinite; }
@keyframes demoPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@media (max-width: 560px) { .demo-badge { font-size: .64rem; left: 10px; bottom: 10px; padding: .35rem .6rem; } }
@media (prefers-reduced-motion: reduce) { .demo-badge .dot { animation: none; } }
