:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --border: #e6e8ec;
    --border-w: 1px;
    --text: #14161a;
    --text-dim: #6b7280;
    --accent: #2f5fd6;
    --accent-bg: #eaf0fd;
    --warn: #c23a3a;
    --warn-bg: #fbecec;
  }
  /* Dark palette, tuned 2026-09-28 for legibility: a darker (near-black) page
     background so surfaces read as clearly elevated, a lighter/higher-contrast
     border so card edges are actually visible against that surface (the old
     #2a2d33 measured under 1.3:1 against the card surface — barely there),
     and a thicker border on card-shaped elements only (--border-w) since
     width alone doesn't fix a low-contrast color. --accent is unchanged: it
     already has strong contrast as text/icon color on dark backgrounds
     (~6:1) — the one place that was failing (white text on a solid --accent
     button/badge, ~2.9:1) is fixed at the two call sites by using
     var(--surface) for the label color instead of literal white, not by
     darkening --accent (which would have fixed that case while breaking the
     text-on-dark-bg case instead). */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0a0b0d;
      --surface: #17191d;
      --border: #454c57;
      --border-w: 1.5px;
      --text: #edeef0;
      --text-dim: #8b909a;
      --accent: #6d95ea;
      --accent-bg: #1c2740;
      --warn: #e08080;
      --warn-bg: #34191b;
    }
  }
  :root[data-theme="dark"] {
    --bg: #0a0b0d; --surface: #17191d; --border: #454c57; --border-w: 1.5px; --text: #edeef0;
    --text-dim: #8b909a; --accent: #6d95ea; --accent-bg: #1c2740; --warn: #e08080; --warn-bg: #34191b;
  }

  * { box-sizing: border-box; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  #app-shell { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  #app-shell[hidden] { display: none; }

  /* ---- login gate ---- */
  .login-screen {
    flex: 1 1 auto; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
  }
  .login-screen[hidden] { display: none; }
  .login-card {
    width: 100%; max-width: 380px; background: var(--surface); border: var(--border-w) solid var(--border);
    border-radius: 16px; padding: 32px 30px; text-align: center;
  }
  .login-eyebrow {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
    color: var(--accent); margin: 0 0 10px;
  }
  .login-card h1 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
  .login-sub { color: var(--text-dim); font-size: 0.92rem; line-height: 1.5; margin: 0 0 24px; }
  .login-ms-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
    font-family: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer;
    background: var(--accent); color: var(--surface); border: none; border-radius: 8px; padding: 11px 16px;
  }
  .login-ms-btn:hover { opacity: 0.92; }
  .login-divider {
    display: flex; align-items: center; gap: 10px; margin: 18px 0;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; color: var(--text-dim);
  }
  .login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
  .login-test-input {
    width: 100%; font-family: inherit; font-size: 0.88rem; cursor: text; box-sizing: border-box;
    background: none; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px;
    margin: 0 0 10px;
  }
  .login-test-input:focus { outline: none; border-color: var(--accent); }
  .login-test-btn {
    width: 100%; font-family: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
    background: none; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px;
  }
  .login-test-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
  .login-foot { font-size: 0.76rem; color: var(--text-dim); line-height: 1.5; margin: 22px 0 0; }

  /* ---- toast ---- */
  .toast-host {
    position: fixed; bottom: 20px; right: 20px; z-index: 100;
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  }
  .toast {
    background: var(--surface); color: var(--text); border: var(--border-w) solid var(--border);
    border-radius: 10px; padding: 12px 16px; font-size: 0.86rem; font-weight: 600;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18); max-width: 300px;
    animation: toast-in 0.18s ease-out;
  }
  @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

  /* ---- top nav ---- */
  .top-nav {
    display: flex; align-items: center; gap: 4px; height: 48px; flex-shrink: 0;
    padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface);
  }
  .top-nav .brand-mini {
    font-weight: 800; font-size: 0.92rem; margin-right: 14px; white-space: nowrap;
    color: var(--text); text-decoration: none;
  }
  .top-nav a.nav-link {
    font-size: 0.85rem; font-weight: 600; color: var(--text-dim); text-decoration: none;
    padding: 6px 10px; border-radius: 6px; white-space: nowrap;
  }
  .top-nav a.nav-link:hover { background: var(--accent-bg); color: var(--text); }
  .top-nav a.nav-link.active { color: var(--accent); background: var(--accent-bg); }

  .theme-toggle {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0;
    background: none; border: 1px solid var(--border); border-radius: 8px;
    color: var(--text-dim); cursor: pointer;
  }
  .theme-toggle:hover { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-bg); }
  .theme-toggle svg { width: 16px; height: 16px; display: block; }

  /* ---- universal nav search ---- */
  .nav-search { position: relative; margin-left: auto; flex-shrink: 1; min-width: 0; width: 220px; }
  .nav-search-input {
    width: 100%; font-family: inherit; font-size: 0.85rem;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px;
    padding: 6px 10px; box-sizing: border-box;
  }
  .nav-search-input:focus { outline: none; border-color: var(--accent); }
  .nav-search-results {
    position: absolute; top: calc(100% + 6px); right: 0; width: 320px; max-width: 82vw;
    background: var(--surface); border: var(--border-w) solid var(--border); border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.16); overflow: hidden; z-index: 40;
  }
  .nsr-item {
    display: block; padding: 9px 12px; text-decoration: none; color: var(--text);
    border-bottom: 1px solid var(--border); cursor: pointer;
  }
  .nsr-item:last-child { border-bottom: none; }
  .nsr-item:hover, .nsr-item.active { background: var(--accent-bg); }
  .nsr-item .nsr-type {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent);
  }
  .nsr-item .nsr-title { display: block; font-size: 0.87rem; font-weight: 600; margin-top: 2px; }
  .nsr-item .nsr-blurb {
    display: block; font-size: 0.76rem; color: var(--text-dim); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nsr-more {
    display: block; padding: 8px 12px; text-align: center; font-size: 0.78rem; font-weight: 700;
    color: var(--accent); background: var(--bg); text-decoration: none;
  }
  .nsr-more:hover { background: var(--accent-bg); }
  .nsr-empty { padding: 14px 12px; font-size: 0.82rem; color: var(--text-dim); }

  .search-results-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
  }
  .search-card {
    display: flex; flex-direction: column; gap: 4px;
    background: var(--surface); border: var(--border-w) solid var(--border); border-radius: 14px;
    padding: 18px 20px; text-decoration: none; color: var(--text);
    transition: border-color 0.12s ease;
  }
  .search-card:hover { border-color: var(--accent); }
  .search-card .sc-type {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent);
  }
  .search-card .sc-title { font-size: 1rem; font-weight: 700; }
  .search-card .sc-blurb { font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; }

  @media (max-width: 640px) {
    .nav-search { width: 120px; }
  }

  /* ---- section host ---- */
  #section-root { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

  .app { display: flex; max-width: 1280px; width: 100%; margin: 0 auto; flex: 1 1 auto; min-height: 0; }
  .sidebar {
    width: 300px; flex-shrink: 0; border-right: 1px solid var(--border);
    padding: 24px 16px; height: 100%; overflow-y: auto;
  }
  .brand { padding: 0 8px 20px; }
  .brand h1 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 2px; }
  .brand .sub { font-size: 0.8rem; color: var(--text-dim); }

  .search-box {
    width: 100%; font-family: inherit; font-size: 0.88rem;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px;
    padding: 8px 10px; margin-bottom: 14px;
  }

  .nav-group { margin-bottom: 20px; }
  .nav-group-toggle {
    display: flex; align-items: center; gap: 5px; width: 100%;
    font-family: inherit; background: none; border: none; cursor: pointer;
    padding: 0 8px; margin: 0 0 6px; text-align: left;
  }
  .nav-group-label {
    font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-dim); font-weight: 700; margin: 0;
  }
  .chevron {
    display: inline-block; font-size: 0.7rem; color: var(--text-dim);
    transition: transform 0.12s ease; transform: rotate(0deg);
  }
  .chevron.collapsed { transform: rotate(-90deg); }
  .nav-item {
    display: block; width: 100%; text-align: left; font-family: inherit;
    background: none; border: none; cursor: pointer;
    color: var(--text); font-size: 0.88rem;
    padding: 7px 8px; border-radius: 6px; line-height: 1.3;
  }
  .nav-item:hover { background: var(--accent-bg); }
  .nav-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
  .nav-item .cats { display: block; font-size: 0.72rem; color: var(--text-dim); margin-top: 1px; }
  .nav-item.active .cats { color: var(--accent); opacity: 0.75; }
  .nav-item.pending { color: var(--text-dim); cursor: default; }
  .nav-item.pending:hover { background: none; }
  .nav-empty { padding: 6px 8px; font-size: 0.82rem; color: var(--text-dim); }

  .content { flex: 1; padding: 40px 48px; min-width: 0; height: 100%; overflow-y: auto; }
  .content h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
  .content .blurb { color: var(--text-dim); font-size: 1rem; margin: 0 0 8px; }
  .welcome { color: var(--text-dim); font-size: 1rem; line-height: 1.7; max-width: 560px; }
  .empty-state { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; max-width: 480px; }

  .chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
  .chip {
    font-size: 0.74rem; font-weight: 600; color: var(--accent);
    background: var(--accent-bg); border-radius: 999px; padding: 3px 10px;
  }

  /* ---- home hub ---- */
  .home-wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .home-inner { max-width: 1000px; margin: 0 auto; padding: 56px 32px 48px; }
  .home-inner .eyebrow {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
    color: var(--accent); margin: 0 0 10px;
  }
  .home-inner h1 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 10px; }
  .home-inner .lede { color: var(--text-dim); font-size: 1.02rem; line-height: 1.65; max-width: 620px; margin: 0 0 36px; }

  /* ---- promo banner (rotating announcements) ---- */
  .promo-banner {
    position: relative; border: var(--border-w) solid var(--border); border-radius: 14px;
    background: var(--surface); overflow: hidden; margin: 0 0 32px; min-height: 132px;
  }
  .promo-slide {
    display: none; align-items: center; gap: 16px; padding: 20px 24px;
  }
  .promo-slide.active { display: flex; }
  .promo-logo {
    flex: 0 0 auto; width: 64px; height: 64px; border-radius: 12px;
    background: var(--accent-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em;
  }
  .promo-body { flex: 1 1 auto; min-width: 0; }
  .promo-eyebrow {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-dim); margin: 0 0 4px;
  }
  .promo-title { font-size: 1.02rem; font-weight: 700; margin: 0 0 4px; }
  .promo-caption { font-size: 0.87rem; color: var(--text-dim); line-height: 1.5; margin: 0; }
  .promo-dots { position: absolute; bottom: 10px; right: 16px; display: flex; gap: 6px; }
  .promo-dot {
    width: 7px; height: 7px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
    background: var(--border);
  }
  .promo-dot.active { background: var(--accent); }

  /* ---- home hub row: link cards (2/3) + social placeholder (1/3) ---- */
  .home-row { display: flex; gap: 20px; align-items: flex-start; }
  .home-hub-col { flex: 2 1 0; min-width: 0; }
  .home-social-col { flex: 1 1 0; min-width: 220px; }
  .social-panel {
    background: var(--surface); border: var(--border-w) solid var(--border); border-radius: 14px;
    padding: 20px 22px;
  }
  .social-panel h2 { font-size: 0.95rem; font-weight: 700; margin: 0 0 4px; }
  .social-panel .social-sub { font-size: 0.8rem; color: var(--text-dim); margin: 0 0 16px; }
  .social-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 4px; margin: 0 -4px;
    border-top: 1px solid var(--border);
    text-decoration: none; color: var(--text); border-radius: 8px;
  }
  .social-row:first-of-type { border-top: none; }
  .social-row:hover { background: var(--accent-bg); }
  .social-row:hover .social-row-name { color: var(--accent); }
  .social-icon {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px;
    background: var(--accent-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
  }
  .social-icon svg { width: 17px; height: 17px; }
  .social-row-body { min-width: 0; }
  .social-row-name { font-size: 0.88rem; font-weight: 700; }
  .social-row-note { font-size: 0.78rem; color: var(--text-dim); }

  @media (max-width: 760px) {
    .home-row { flex-direction: column; }
    .home-social-col { width: 100%; }
  }

  .hub-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
  }
  .hub-card {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--surface); border: var(--border-w) solid var(--border); border-radius: 14px;
    padding: 22px 22px 20px; text-decoration: none; color: var(--text);
    transition: border-color 0.12s ease, transform 0.12s ease;
  }
  .hub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
  .hub-card .hub-icon {
    width: 38px; height: 38px; border-radius: 10px; margin-bottom: 4px;
    background: var(--accent-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
  }
  .hub-card .hub-icon svg { width: 20px; height: 20px; display: block; }
  .hub-card .hub-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
  .hub-card .hub-blurb { font-size: 0.88rem; color: var(--text-dim); line-height: 1.55; flex: 1; }
  .hub-card .hub-count {
    font-size: 0.75rem; font-weight: 700; color: var(--accent);
    text-transform: uppercase; letter-spacing: 0.05em;
  }

  .home-note {
    margin-top: 36px; padding: 16px 18px; border-radius: 10px;
    background: var(--warn-bg); color: var(--text);
    font-size: 0.87rem; line-height: 1.6;
  }
  .home-note strong { color: var(--warn); }

  /* ---- not found ---- */
  .not-found { max-width: 1280px; width: 100%; margin: 0 auto; padding: 56px 48px; }
  .not-found h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 8px; }
  .not-found p { color: var(--text-dim); line-height: 1.6; margin: 0 0 16px; }
  .not-found a { color: var(--accent); }

  /* ---- footer ---- */
  .site-footer {
    flex-shrink: 0; border-top: 1px solid var(--border); background: var(--surface);
    padding: 16px 20px;
  }
  .footer-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap;
  }
  .site-footer .foot-brand { font-weight: 800; font-size: 0.82rem; margin-right: 4px; }
  .site-footer a, .site-footer button.link-btn {
    font-size: 0.82rem; font-weight: 600; color: var(--text-dim); text-decoration: none;
    background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
  }
  .site-footer a:hover, .site-footer button.link-btn:hover { color: var(--accent); }
  .site-footer .foot-meta { margin-left: auto; font-size: 0.76rem; color: var(--text-dim); }

  @media (max-width: 640px) {
    .sidebar { width: 220px; }
    .content { padding: 28px 20px; }
    .home-inner { padding: 36px 20px 40px; }
    .home-inner h1 { font-size: 1.6rem; }
    .site-footer .foot-meta { margin-left: 0; width: 100%; }
  }
.section-loan-products .body h3 { font-size: 1.05rem; font-weight: 700; margin: 28px 0 6px; }
  .section-loan-products .body h3:first-child { margin-top: 0; }
  .section-loan-products .body h4 { font-size: 0.95rem; font-weight: 700; margin: 20px 0 6px; }
  .section-loan-products .body p { line-height: 1.6; margin: 0 0 12px; color: var(--text); }
  .section-loan-products .body p.src { font-size: 0.85rem; color: var(--text-dim); font-style: italic; margin: -2px 0 10px; }
  .section-loan-products .body ul { margin: 0 0 14px; padding-left: 22px; line-height: 1.6; }
  .section-loan-products .body li { margin-bottom: 4px; }
  .section-loan-products .body strong { font-weight: 700; }
  .section-loan-products .body .table-wrap { overflow-x: auto; margin: 0 0 16px; }
  .section-loan-products .body table { width: 100%; min-width: 640px; border-collapse: collapse; margin: 0; font-size: 0.88rem; }
  .section-loan-products .body th,
  .section-loan-products .body td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
  .section-loan-products .body th { color: var(--text-dim); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; white-space: nowrap; }

  /* product-catalog additions */
  .section-loan-products .nav-subgroup {
    font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-dim); font-weight: 700; opacity: 0.75;
    padding: 10px 8px 3px;
  }
  .section-loan-products .nav-item .dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: var(--text-dim); opacity: 0.45; margin-right: 7px; vertical-align: middle;
  }
  .section-loan-products .nav-item .dot.documented { background: var(--accent); opacity: 1; }
  .section-loan-products .nav-item .dot.none { background: var(--warn); opacity: 0.9; }

  .section-loan-products .coverage {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
    border-radius: 999px; padding: 4px 11px; margin-bottom: 18px;
  }
  .section-loan-products .coverage.documented { color: var(--accent); background: var(--accent-bg); }
  .section-loan-products .coverage.named { color: var(--text-dim); background: var(--border); }
  .section-loan-products .coverage.none { color: var(--warn); background: var(--warn-bg); }

  .section-loan-products .lender-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 28px; }
  .section-loan-products .lender-link {
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
    border: var(--border-w) solid var(--border); border-radius: 9px; padding: 10px 13px;
    text-decoration: none; color: var(--text); cursor: pointer;
    font-family: inherit; font-size: 0.9rem; text-align: left; width: 100%; background: none;
  }
  .section-loan-products .lender-link:hover { border-color: var(--accent); background: var(--accent-bg); }
  .section-loan-products .lender-link .ll-name { font-weight: 700; }
  .section-loan-products .lender-link .ll-depth {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    border-radius: 999px; padding: 2px 8px;
  }
  .section-loan-products .lender-link .ll-depth.detail { color: var(--accent); background: var(--accent-bg); }
  .section-loan-products .lender-link .ll-depth.named { color: var(--text-dim); background: var(--border); }
  .section-loan-products .lender-link .ll-blurb { flex: 1 1 100%; font-size: 0.82rem; color: var(--text-dim); line-height: 1.45; }

  .section-loan-products .section-label {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-dim); margin: 0 0 8px;
  }
  .section-loan-products a.chip { text-decoration: none; cursor: pointer; }
  .section-loan-products a.chip:hover { outline: 1px solid var(--accent); }
  .section-loan-products a.chip.named { color: var(--text-dim); background: var(--border); }

  .section-loan-products .catalog-group { margin-bottom: 26px; }
  .section-loan-products .catalog-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px;
  }
  .section-loan-products .catalog-card {
    border: var(--border-w) solid var(--border); border-radius: 10px; padding: 13px 15px;
    text-decoration: none; color: var(--text); display: block;
  }
  .section-loan-products .catalog-card:hover { border-color: var(--accent); }
  .section-loan-products .catalog-card .cc-name { display: block; font-weight: 700; font-size: 0.94rem; }
  .section-loan-products .catalog-card .cc-blurb { display: block; font-size: 0.8rem; color: var(--text-dim); line-height: 1.45; margin-top: 3px; }
  .section-loan-products .catalog-card .cc-meta { display: block; font-size: 0.72rem; color: var(--text-dim); margin-top: 7px; }
  .section-loan-products .catalog-card .cc-meta strong { color: var(--accent); }
  .section-loan-products .catalog-card .cc-meta.none strong { color: var(--warn); }

  /* ---- two-tab layout (mirrors Realty Partners' office tabs) ---- */
  .section-loan-products .page-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  .section-loan-products .top-bar { max-width: 1280px; width: 100%; margin: 0 auto; padding: 16px 24px 0; flex-shrink: 0; }
  .section-loan-products .top-bar .brand { padding: 0; margin-bottom: 10px; }
  .section-loan-products .top-bar .brand h1 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
  .section-loan-products .top-row {
    display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--border);
  }
  .section-loan-products .tabs { display: flex; gap: 4px; }
  .section-loan-products .tab {
    font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
    background: none; color: var(--text-dim); border: none;
    padding: 10px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  }
  .section-loan-products .tab:hover { color: var(--text); }
  .section-loan-products .tab.active { color: var(--accent); border-bottom-color: var(--accent); }
  .section-loan-products .search-group { display: flex; align-items: center; gap: 8px; margin: 0 0 8px auto; }
  .section-loan-products .top-search { width: 300px; max-width: 100%; margin: 0; }
  .section-loan-products .download-btn {
    font-family: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer;
    background: var(--accent); color: var(--surface); white-space: nowrap;
    border: none; border-radius: 999px; padding: 8px 14px; flex-shrink: 0;
  }
  .section-loan-products .download-btn:hover { opacity: 0.88; }
  .section-loan-products .download-btn:active { opacity: 0.7; }
  .section-loan-products .download-status {
    display: block; font-size: 0.78rem; color: var(--accent); font-weight: 600;
    text-align: right; margin: -4px 0 8px auto;
  }
  .section-loan-products .sidebar { padding: 20px 16px; }
  .section-loan-products .content { padding: 32px 40px; }

  /* ---- lender contact cards (merged from Lender Contacts, 2026-09-22) ---- */
  .section-loan-products .contact-cards { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; }
  .section-loan-products .contact-card {
    border: var(--border-w) solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--accent-bg);
  }
  .section-loan-products .contact-card .c-name { font-weight: 700; font-size: 1rem; }
  .section-loan-products .contact-card .c-title { color: var(--text-dim); font-size: 0.84rem; margin-left: 6px; }
  .section-loan-products .contact-card .c-row { margin-top: 6px; font-size: 0.9rem; }
  .section-loan-products .contact-card .c-row a { color: var(--accent); text-decoration: none; }
  .section-loan-products .contact-card .c-row a:hover { text-decoration: underline; }
  .section-loan-products .contact-notes { margin: 0 0 20px; font-size: 0.86rem; color: var(--text-dim); }
  .section-loan-products .contact-notes strong { color: var(--text); }

  /* ---- guideline cards (Lenders tab) ---- */
  .section-loan-products .lender-intro { margin-bottom: 4px; }
  .section-loan-products .card-tools { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
  .section-loan-products .card-tools .section-label { margin: 0; }
  .section-loan-products .card-tools-btns { display: flex; gap: 14px; }
  .section-loan-products .link-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--accent);
  }
  .section-loan-products .link-btn:hover { text-decoration: underline; }
  .section-loan-products .gcard {
    border: var(--border-w) solid var(--border); border-radius: 10px; background: var(--surface);
    margin: 0 0 8px; transition: border-color 0.12s ease;
  }
  .section-loan-products .gcard:hover,
  .section-loan-products .gcard.flash { border-color: var(--accent); }
  .section-loan-products .gcard > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 12px 16px;
  }
  .section-loan-products .gcard > summary::-webkit-details-marker { display: none; }
  .section-loan-products .gcard > summary .chevron { transform: rotate(-90deg); }
  .section-loan-products .gcard[open] > summary .chevron { transform: rotate(0deg); }
  .section-loan-products .gcard-title { font-weight: 700; font-size: 0.95rem; flex: 1 1 240px; }
  .section-loan-products .gcard-chips { display: flex; gap: 6px; flex-wrap: wrap; }
  .section-loan-products .gcard-body { border-top: 1px solid var(--border); padding: 14px 16px 4px; }
  .section-loan-products .gcard .chip,
  .section-loan-products .ll-cards .chip { font-size: 0.7rem; padding: 2px 9px; }

  /* lender rows on a product page hold several links, so the row itself isn't one */
  .section-loan-products div.lender-link { cursor: default; }
  .section-loan-products div.lender-link:hover { border-color: var(--border); background: none; }
  .section-loan-products .lender-link a.ll-name { color: var(--text); text-decoration: none; }
  .section-loan-products .lender-link a.ll-name:hover { color: var(--accent); }
  .section-loan-products .ll-cards { flex: 1 1 100%; display: flex; gap: 6px; flex-wrap: wrap; }

  /* ---- scenario comparison (products with content/comparisons/<slug>.json) ---- */
  .section-loan-products .cmp {
    border: var(--border-w) solid var(--border); border-radius: 14px; background: var(--surface);
    padding: 16px 18px; margin: 0 0 28px;
  }
  .section-loan-products .cmp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .section-loan-products .cmp-head .section-label { margin: 0 0 12px; }
  .section-loan-products .cmp-scn { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .section-loan-products .cmp-field span {
    display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-dim); margin-bottom: 4px;
  }
  .section-loan-products .cmp-field .search-box { margin: 0; }
  .section-loan-products .cmp-needs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 8px; font-size: 0.84rem; }
  .section-loan-products .cmp-need,
  .section-loan-products .cmp-hide { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
  .section-loan-products .cmp-hide { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 4px; }
  .section-loan-products .cmp-tally { font-size: 0.85rem; color: var(--text-dim); margin: 8px 0 10px; }
  .section-loan-products .cmp-tally strong { color: var(--text); }
  .section-loan-products .cmp-table-wrap { overflow-x: auto; }
  .section-loan-products .cmp-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.85rem; }
  .section-loan-products .cmp-table th {
    text-align: left; padding: 0 8px 8px; border-bottom: 1px solid var(--border); vertical-align: bottom;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim);
  }
  .section-loan-products .cmp-sort {
    background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); text-align: left;
  }
  .section-loan-products .cmp-sort:hover,
  .section-loan-products .cmp-sort.active { color: var(--accent); }
  .section-loan-products .cmp-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
  .section-loan-products .cmp-table td.pass { background: var(--accent-bg); }
  .section-loan-products .cmp-table td.fail { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
  .section-loan-products .cmp-table td.unk,
  .section-loan-products .cmp-table td.blank,
  .section-loan-products .cmp .blank { color: var(--text-dim); }
  .section-loan-products .cell-note { display: block; font-size: 0.72rem; font-weight: 400; color: var(--text-dim); line-height: 1.35; margin-top: 2px; }
  .section-loan-products .cmp-lender a { font-weight: 700; color: var(--text); text-decoration: none; }
  .section-loan-products .cmp-lender a:hover { color: var(--accent); }
  .section-loan-products .cmp-program { display: block; font-size: 0.75rem; color: var(--text-dim); }
  .section-loan-products .cmp-notes-btn { font-size: 0.72rem; margin-top: 3px; }
  .section-loan-products .fit {
    display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    border-radius: 999px; padding: 2px 9px; white-space: nowrap;
  }
  .section-loan-products .fit.yes { color: var(--accent); background: var(--accent-bg); }
  .section-loan-products .fit.no { color: var(--warn); background: var(--warn-bg); }
  .section-loan-products .fit.unk { color: var(--text-dim); background: var(--border); }
  .section-loan-products .fit.none { color: var(--text-dim); }
  .section-loan-products .fit-detail { display: block; font-size: 0.72rem; color: var(--text-dim); margin-top: 3px; max-width: 170px; }
  .section-loan-products .cmp-feats { min-width: 110px; }
  .section-loan-products .feat {
    display: inline-block; font-size: 0.7rem; font-weight: 600; border-radius: 999px; padding: 1px 8px; margin: 0 4px 4px 0;
    color: var(--text-dim); background: var(--bg); border: 1px solid var(--border);
  }
  .section-loan-products .feat.neg { color: var(--warn); }
  .section-loan-products .feat.pass { color: var(--accent); background: var(--accent-bg); border-color: transparent; }
  .section-loan-products .feat.fail { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
  .section-loan-products .cmp-notes-row td { background: var(--bg); font-size: 0.84rem; line-height: 1.55; }
  .section-loan-products .cmp-notes-row p { margin: 0 0 6px; }
  .section-loan-products .cmp-notes-row p.src { font-style: italic; color: var(--text-dim); font-size: 0.78rem; }
  .section-loan-products .cmp-foot { font-size: 0.76rem; color: var(--text-dim); margin: 10px 0 0; line-height: 1.5; }

  /* agency baseline rows: pinned above the lenders, never counted as one */
  .section-loan-products .cmp-table tr.cmp-base td { background: var(--bg); }
  .section-loan-products .cmp-table tr.cmp-base td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
  .section-loan-products .cmp-table tr.cmp-base td.pass { background: var(--accent-bg); }
  .section-loan-products .cmp-table tr.cmp-base td.fail { background: var(--warn-bg); }
  .section-loan-products .base-badge {
    display: block; width: max-content; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--accent); background: var(--accent-bg); border-radius: 999px; padding: 1px 8px; margin-bottom: 3px;
  }
  .section-loan-products .cmp-group-row td {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-dim); padding: 14px 8px 6px;
  }
  .section-loan-products .cmp-base-sum { display: block; margin-top: 3px; }
  .section-loan-products .feat.state { color: var(--text); }
  .section-loan-products select.search-box { cursor: pointer; }
  .section-loan-products select.search-box:disabled { opacity: 0.55; cursor: not-allowed; }

  @media (max-width: 640px) {
    .section-loan-products .top-bar { padding: 12px 16px 0; }
    .section-loan-products .search-group { width: 100%; margin: 0 0 8px; }
    .section-loan-products .top-search { width: 100%; }
    .section-loan-products .content { padding: 24px 20px; }
  }
.section-realty-partners .page-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  .section-realty-partners .top-bar {
    max-width: 1280px; width: 100%; margin: 0 auto; padding: 16px 24px 0; flex-shrink: 0;
  }
  .section-realty-partners .top-bar .brand {
    display: flex; align-items: baseline; justify-content: space-between;
    flex-wrap: wrap; gap: 8px; padding: 0; margin-bottom: 12px;
  }
  .section-realty-partners .top-bar .brand h1 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }

  .section-realty-partners .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
  .section-realty-partners .tab {
    font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
    background: none; color: var(--text-dim); border: none;
    padding: 10px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  }
  .section-realty-partners .tab:hover { color: var(--text); }
  .section-realty-partners .tab.active { color: var(--accent); border-bottom-color: var(--accent); }

  /* this section's own spacing, tighter than the shell default */
  .section-realty-partners .sidebar { padding: 20px 16px; }
  .section-realty-partners .nav-item { padding: 6px 8px; }
  .section-realty-partners .content { padding: 32px 40px; }
  .section-realty-partners .content h1 { font-size: 1.6rem; }
  .section-realty-partners .content .blurb { font-size: 0.95rem; margin: 0 0 20px; }
  .section-realty-partners .chip-row { margin-top: 8px; margin-bottom: 0; }

  .section-realty-partners .contact-card {
    border: var(--border-w) solid var(--border); border-radius: 10px; padding: 16px 18px; max-width: 420px;
    display: flex; gap: 14px;
  }
  .section-realty-partners .contact-card .c-avatar {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    background: var(--accent-bg);
  }
  .section-realty-partners .contact-card .c-avatar-fallback {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem;
  }
  .section-realty-partners .contact-card .c-body { flex: 1; min-width: 0; }
  .section-realty-partners .contact-card .c-name { font-weight: 700; font-size: 1.15rem; }
  .section-realty-partners .contact-card .c-title { color: var(--text-dim); font-size: 0.88rem; display: block; margin-top: 2px; }
  .section-realty-partners .contact-card .c-row { margin-top: 10px; font-size: 0.9rem; }
  .section-realty-partners .contact-card .c-row a { color: var(--accent); text-decoration: none; }
  .section-realty-partners .contact-card .c-row a:hover { text-decoration: underline; }
  .section-realty-partners .email-note { font-size: 0.76rem; color: var(--text-dim); margin-top: 2px; }

  @media (max-width: 640px) {
    .section-realty-partners .content { padding: 24px 20px; }
  }
.section-walkthroughs .content { max-width: 880px; }
  .section-walkthroughs .wt-notice {
    display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
    background: var(--accent-bg); border-radius: 10px; padding: 14px 16px; margin: 22px 0 28px;
  }
  .section-walkthroughs .wt-notice .wt-notice-text { flex: 1 1 280px; font-size: 0.9rem; line-height: 1.55; color: var(--text); }
  .section-walkthroughs .wt-pill {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    border-radius: 999px; padding: 4px 11px; white-space: nowrap;
    color: var(--accent); background: var(--surface); border: 1px solid var(--accent);
  }
  .section-walkthroughs .section-label {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-dim); margin: 0 0 10px;
  }
  .section-walkthroughs .wt-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px;
  }
  .section-walkthroughs .wt-card {
    position: relative; border: var(--border-w) solid var(--border); border-radius: 10px; padding: 14px 16px;
    background: var(--surface); display: flex; flex-direction: column; gap: 6px;
    text-decoration: none; color: var(--text);
  }
  .wt-card:has(.wt-card-link:hover) { border-color: var(--accent); }
  /* .wt-card-link stretches over the whole card as the primary click target so the
     card can also contain a real, independently-clickable <a> (wt-agent-badge) --
     nesting an <a> inside a card-as-<a> is invalid HTML and gets un-nested by the
     browser, which broke the grid layout (found while testing the agent guide). */
  .section-walkthroughs .wt-card .wt-card-link { position: absolute; inset: 0; z-index: 1; }
  .section-walkthroughs .wt-card .wt-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
  .section-walkthroughs .wt-card .wt-blurb { font-size: 0.84rem; color: var(--text-dim); line-height: 1.5; flex: 1; }
  .section-walkthroughs .wt-card .wt-status {
    align-self: flex-start; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--text-dim); background: var(--border); border-radius: 999px; padding: 2px 9px;
  }
  .section-walkthroughs .wt-card .wt-status.ready { color: var(--accent); background: var(--accent-bg); }
  .section-walkthroughs .wt-card .wt-meta { font-size: 0.76rem; color: var(--text-dim); }
  .section-walkthroughs .wt-card .wt-agent-badge {
    position: relative; z-index: 2; align-self: flex-start; font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.03em; color: var(--accent); text-decoration: none;
  }
  .section-walkthroughs .wt-card .wt-agent-badge:hover { text-decoration: underline; }

  .section-walkthroughs .wt-share-banner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--accent-bg); border: 1px solid var(--accent); border-radius: 10px;
    padding: 12px 16px; margin: 4px 0 20px;
  }
  .section-walkthroughs .wt-share-banner .wt-share-text { flex: 1 1 260px; font-size: 0.86rem; color: var(--text); line-height: 1.5; }
  .section-walkthroughs .wt-share-banner a.wt-share-link {
    font-size: 0.82rem; font-weight: 700; color: var(--surface); background: var(--accent);
    text-decoration: none; padding: 7px 14px; border-radius: 8px; white-space: nowrap;
  }
  .section-walkthroughs .wt-share-banner a.wt-share-link:hover { opacity: 0.9; }

  /* ---- guide page ---- */
  .section-walkthroughs .wt-back {
    display: inline-block; font-size: 0.82rem; font-weight: 600; color: var(--text-dim);
    text-decoration: none; margin-bottom: 14px;
  }
  .section-walkthroughs .wt-back:hover { color: var(--accent); }
  .section-walkthroughs .wt-head-row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-bottom: 4px;
  }
  .section-walkthroughs .wt-head-row a.wt-source {
    font-size: 0.82rem; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap;
  }
  .section-walkthroughs .wt-head-row a.wt-source:hover { text-decoration: underline; }
  .section-walkthroughs .wt-guide-meta { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 24px; }
  .section-walkthroughs .wt-guide-meta b { color: var(--text); font-weight: 700; }

  .section-walkthroughs .wt-body { display: flex; gap: 28px; align-items: flex-start; }
  .section-walkthroughs .wt-index {
    flex: 0 0 160px; position: sticky; top: 0; max-height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 2px; padding-top: 4px;
  }
  .section-walkthroughs .wt-index a {
    font-size: 0.8rem; color: var(--text-dim); text-decoration: none;
    padding: 4px 8px; border-radius: 6px; border-left: 2px solid transparent;
  }
  .section-walkthroughs .wt-index a:hover { background: var(--accent-bg); color: var(--text); }
  .section-walkthroughs .wt-index a.active { color: var(--accent); font-weight: 600; border-left-color: var(--accent); }

  .section-walkthroughs .wt-steps { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
  .section-walkthroughs .wt-step { scroll-margin-top: 12px; }
  .section-walkthroughs .wt-step-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
  .section-walkthroughs .wt-step-n {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent-bg); color: var(--accent); font-weight: 700; font-size: 0.82rem;
    display: flex; align-items: center; justify-content: center;
  }
  .section-walkthroughs .wt-step-text { font-size: 0.92rem; line-height: 1.65; color: var(--text); white-space: pre-line; }
  .section-walkthroughs .wt-step-text a { color: var(--accent); }
  .section-walkthroughs .wt-shot {
    display: block; width: 100%; border: 1px solid var(--border); border-radius: 10px;
    margin-top: 12px; margin-left: 36px; max-width: calc(100% - 36px);
    cursor: zoom-in; background: var(--surface);
  }
  .section-walkthroughs .wt-step.flash .wt-shot { border-color: var(--accent); }

  .section-walkthroughs .wt-lightbox {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); z-index: 50;
    display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
  }
  .section-walkthroughs .wt-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; display: block; }
  .section-walkthroughs .wt-lightbox[hidden] { display: none; }

  @media (max-width: 640px) {
    .section-walkthroughs .wt-body { flex-direction: column; }
    .section-walkthroughs .wt-index {
      position: static; flex-direction: row; flex-wrap: wrap; max-height: none;
      border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 6px;
    }
    .section-walkthroughs .wt-index a { border-left: none; border-bottom: 2px solid transparent; }
    .section-walkthroughs .wt-index a.active { border-left-color: transparent; border-bottom-color: var(--accent); }
    .section-walkthroughs .wt-shot { margin-left: 0; max-width: 100%; }
  }
.section-open-house-flyers .page-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  .section-open-house-flyers .top-bar { max-width: 1280px; width: 100%; margin: 0 auto; padding: 16px 24px 0; flex-shrink: 0; }
  .section-open-house-flyers .top-bar .brand { padding: 0; margin-bottom: 10px; }
  .section-open-house-flyers .top-bar .brand h1 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
  .section-open-house-flyers .sidebar { padding: 20px 16px; }
  .section-open-house-flyers .content { padding: 32px 40px; max-width: 980px; }

  .section-open-house-flyers .welcome { max-width: 560px; }

  /* ---- listing form ---- */
  .section-open-house-flyers .of-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px;
    margin: 0 0 22px;
  }
  .section-open-house-flyers .of-field { display: flex; flex-direction: column; gap: 4px; }
  .section-open-house-flyers .of-field span {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim);
  }
  .section-open-house-flyers .of-field.wide { grid-column: 1 / -1; }
  .section-open-house-flyers .of-rate-group {
    grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px;
    border: var(--border-w) solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--accent-bg);
  }
  .section-open-house-flyers .of-rate-group .section-label { grid-column: 1 / -1; margin: 0 0 2px; }

  .section-open-house-flyers table.of-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin: 0 0 24px; }
  .section-open-house-flyers table.of-table th {
    text-align: left; padding: 0 10px 8px; border-bottom: var(--border-w) solid var(--border); vertical-align: bottom;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim);
  }
  .section-open-house-flyers table.of-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
  .section-open-house-flyers table.of-table td.of-total { font-weight: 700; color: var(--text); }
  .section-open-house-flyers table.of-table tr.of-selected td { background: var(--accent-bg); }
  .section-open-house-flyers .of-scenario-name { font-weight: 700; }
  .section-open-house-flyers .of-scenario-sub { display: block; font-size: 0.76rem; color: var(--text-dim); }

  .section-open-house-flyers .of-slots {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 28px;
  }

  /* ---- photos ---- */
  .section-open-house-flyers .of-dropzone {
    border: 2px dashed var(--border); border-radius: 12px; padding: 28px; text-align: center;
    color: var(--text-dim); font-size: 0.9rem; margin: 0 0 18px; cursor: pointer; transition: border-color 0.12s ease;
  }
  .section-open-house-flyers .of-dropzone.dragover { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
  .section-open-house-flyers .of-dropzone input[type="file"] { display: none; }
  .section-open-house-flyers .of-photo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
  }
  .section-open-house-flyers .of-photo-card {
    border: var(--border-w) solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface);
  }
  .section-open-house-flyers .of-photo-card img { width: 100%; height: 110px; object-fit: cover; display: block; }
  .section-open-house-flyers .of-photo-card .of-photo-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px;
  }
  .section-open-house-flyers .of-photo-card select { font-family: inherit; font-size: 0.8rem; }
  .section-open-house-flyers .of-photo-card button {
    background: none; border: none; color: var(--warn); cursor: pointer; font-size: 0.78rem; font-weight: 600; padding: 0;
  }
  .section-open-house-flyers .of-photo-empty { font-size: 0.85rem; color: var(--text-dim); }

  /* ---- agent headshot (single photo, separate from the listing photos) ---- */
  .section-open-house-flyers .of-headshot-row { display: flex; align-items: center; gap: 16px; margin: 0 0 22px; flex-wrap: wrap; }
  .section-open-house-flyers .of-headshot-zone {
    border: 2px dashed var(--border); border-radius: 12px; padding: 18px 24px; text-align: center;
    color: var(--text-dim); font-size: 0.85rem; cursor: pointer; transition: border-color 0.12s ease; flex: 1 1 220px;
  }
  .section-open-house-flyers .of-headshot-zone.dragover { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
  .section-open-house-flyers .of-headshot-zone input[type="file"] { display: none; }
  .section-open-house-flyers .of-headshot-preview { display: flex; align-items: center; gap: 10px; }
  .section-open-house-flyers .of-headshot-preview img {
    width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: var(--border-w) solid var(--border);
  }
  .section-open-house-flyers .of-headshot-preview button {
    background: none; border: none; color: var(--warn); cursor: pointer; font-size: 0.8rem; font-weight: 600; padding: 0;
  }
  .section-open-house-flyers .of-headshot-empty { font-size: 0.85rem; color: var(--text-dim); }

  /* ---- step wizard ---- */
  .section-open-house-flyers .of-stepper { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
  .section-open-house-flyers .of-step {
    display: flex; align-items: center; gap: 7px; font-family: inherit; font-size: 0.8rem; font-weight: 600;
    color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: 6px 14px 6px 6px; cursor: pointer;
  }
  .section-open-house-flyers .of-step:hover { border-color: var(--accent); color: var(--accent); }
  .section-open-house-flyers .of-step-num {
    width: 20px; height: 20px; border-radius: 50%; background: var(--border); color: var(--text);
    display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex-shrink: 0;
  }
  .section-open-house-flyers .of-step.active { border-color: var(--accent); color: var(--accent); }
  .section-open-house-flyers .of-step.active .of-step-num { background: var(--accent); color: var(--surface); }
  .section-open-house-flyers .of-step.done .of-step-num { background: var(--accent-bg); color: var(--accent); }
  .section-open-house-flyers .of-step-label { white-space: nowrap; }

  .section-open-house-flyers .of-step-nav { display: flex; justify-content: space-between; margin-top: 28px; }
  .section-open-house-flyers .of-step-btn {
    font-family: inherit; font-size: 0.88rem; font-weight: 600; padding: 9px 18px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
  }
  .section-open-house-flyers .of-step-btn:hover { border-color: var(--accent); color: var(--accent); }
  .section-open-house-flyers .of-step-btn.primary {
    background: var(--accent); color: var(--surface); border-color: var(--accent); margin-left: auto;
  }
  .section-open-house-flyers .of-step-btn.primary:hover { opacity: 0.9; }

  .section-open-house-flyers .of-print-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
  .section-open-house-flyers .of-print-btn {
    font-family: inherit; font-size: 0.92rem; font-weight: 700; padding: 12px 22px; border-radius: 8px; cursor: pointer;
    border: none; background: var(--accent); color: var(--surface);
  }
  .section-open-house-flyers .of-print-btn:hover { opacity: 0.9; }
  .section-open-house-flyers .of-chatgpt-btn {
    font-family: inherit; font-size: 0.92rem; font-weight: 700; padding: 12px 22px; border-radius: 8px; cursor: pointer;
    border: var(--border-w) solid var(--border); background: var(--surface); color: var(--text);
  }
  .section-open-house-flyers .of-chatgpt-btn:hover { border-color: var(--accent); color: var(--accent); }
  .section-open-house-flyers .of-chatgpt-note { font-size: 0.82rem; color: var(--text-dim); margin: 10px 0 0; max-width: 620px; line-height: 1.5; }

  /* Printing/"Save as PDF" shows only the flyer card, full-page, nothing else
     from the app chrome — scoped with :has() so this never affects printing
     from any OTHER section (this section's CSS is loaded globally even when
     a different section is mounted, per this project's "all partials load
     at once" convention — see CLAUDE.md). */
  @media print {
    body:has(.section-open-house-flyers) * { visibility: hidden; }
    body:has(.section-open-house-flyers) .of-flyer,
    body:has(.section-open-house-flyers) .of-flyer * { visibility: visible; }
    body:has(.section-open-house-flyers) .of-flyer {
      position: fixed; top: 0; left: 0; width: 100%; margin: 0; box-shadow: none;
    }
  }

  /* ---- flyer preview — a fixed-light "paper" mockup, independent of the ---- */
  /* app's own light/dark theme, since it represents the actual printed/     */
  /* exported output rather than app chrome.                                */
  .section-open-house-flyers .of-preview-note { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 14px; }
  .section-open-house-flyers .of-flyer {
    position: relative; width: 100%; max-width: 820px; margin: 0 0 32px; background: #fdfbf6; color: #3a332b;
    border-radius: 6px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,0.28);
    font-family: var(--flyer-heading-font, Georgia, "Times New Roman", serif);
  }
  /* ---- AI-selectable decorative accents (added 2026-10-02) ---- */
  /* Named CSS-only looks, same pattern as the hero/strip photo treatments —
     the model picks one of these four, never free-form content, and each is
     placed somewhere guaranteed blank regardless of what's on the flyer. */
  .section-open-house-flyers .of-flyer--decor-accent-divider { border-top: 6px solid var(--flyer-accent, #f4ead9); }
  .section-open-house-flyers .of-flyer--decor-dot-grid .of-flyer-pay {
    background-image: radial-gradient(var(--flyer-accent, #f4ead9) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
  }
  .section-open-house-flyers .of-flyer--decor-corner-flourish .of-flyer-bottombar { position: relative; }
  .section-open-house-flyers .of-flyer--decor-corner-flourish .of-flyer-bottombar::after {
    content: ""; position: absolute; right: 0; top: 0; width: 0; height: 0;
    border-style: solid; border-width: 0 30px 30px 0; border-color: transparent var(--flyer-accent, #f4ead9) transparent transparent;
  }
  .section-open-house-flyers .of-flyer--decor-border-frame::before {
    content: ""; position: absolute; inset: 8px; border: 3px solid var(--flyer-accent, #f4ead9);
    border-radius: 4px; pointer-events: none; z-index: 5;
  }
  .section-open-house-flyers .of-flyer-hero {
    position: relative; min-height: 300px; background-color: #324a63; background-repeat: no-repeat;
    background-position: var(--flyer-hero-pos-x, 50%) var(--flyer-hero-pos-y, 50%);
    background-size: var(--flyer-hero-size, cover);
    display: flex; flex-direction: column; justify-content: space-between; padding: 20px 24px;
  }
  .section-open-house-flyers .of-flyer-hero.empty { align-items: center; justify-content: center; }
  /* AI-selectable photo treatments — box-shadow/filter only, no extra markup,
     so the model can only ever pick one of these four named looks. */
  .section-open-house-flyers .of-flyer-hero--vignette { box-shadow: inset 0 0 70px 24px rgba(0,0,0,0.55); }
  .section-open-house-flyers .of-flyer-hero--warm-tone { filter: sepia(0.35) saturate(1.2) hue-rotate(-8deg); }
  .section-open-house-flyers .of-flyer-hero--grayscale-accent { filter: grayscale(0.85) contrast(1.05); }
  .section-open-house-flyers .of-flyer-strip-cell--vignette { box-shadow: inset 0 0 24px 8px rgba(0,0,0,0.45); }
  .section-open-house-flyers .of-flyer-strip-cell--warm-tone { filter: sepia(0.35) saturate(1.2) hue-rotate(-8deg); }
  .section-open-house-flyers .of-flyer-strip-cell--grayscale-accent { filter: grayscale(0.85) contrast(1.05); }
  .section-open-house-flyers .of-flyer-hero-placeholder { color: #cbd5e1; font-family: Arial, sans-serif; font-size: 0.9rem; text-align: center; }
  .section-open-house-flyers .of-flyer-hero-scrim {
    /* No fully-transparent band anywhere — the old version faded to near-0
       opacity through the middle third, which is exactly where the address
       and price sit, so they went illegible over a bright photo. */
    position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,15,25,0.65) 0%, rgba(10,15,25,0.3) 30%, rgba(10,15,25,0.35) 60%, rgba(10,15,25,0.78) 100%);
  }
  .section-open-house-flyers .of-flyer-hero > * { position: relative; z-index: 1; }
  .section-open-house-flyers .of-flyer-hero-title { color: #fff; line-height: 0.85; text-shadow: 0 2px 8px rgba(0,0,0,0.85), 0 0 2px rgba(0,0,0,0.9); }
  .section-open-house-flyers .of-flyer-hero-title .script { display: block; font-family: var(--flyer-script-font, "Brush Script MT", "Segoe Script", cursive); font-size: 3.4rem; }
  .section-open-house-flyers .of-flyer-hero-title .bold { display: block; font-size: 2.6rem; font-weight: 700; letter-spacing: 0.03em; }
  .section-open-house-flyers .of-flyer-hero-badge {
    display: inline-block; background: var(--flyer-primary, #1a3a5c); color: #fff; font-family: var(--flyer-body-font, Arial, sans-serif);
    font-size: 0.82rem; font-weight: 700; padding: 8px 14px; border-radius: 3px; margin-top: 10px;
  }
  .section-open-house-flyers .of-flyer-hero-features {
    position: absolute; top: 20px; right: 20px; background: var(--flyer-accent, #f4ead9); border-radius: 6px;
    padding: 12px 16px; font-family: var(--flyer-body-font, Arial, sans-serif); font-size: 0.82rem; color: var(--flyer-primary, #1a3a5c); max-width: 220px;
  }
  .section-open-house-flyers .of-flyer-hero-features div { margin: 3px 0; }
  .section-open-house-flyers .of-flyer-hero-features .tick { color: var(--flyer-primary, #1a3a5c); margin-right: 5px; }
  /* A solid chip behind the address/price, not just the scrim — guarantees
     contrast no matter what the photo looks like underneath, and gives the
     AI-selectable primary/accent color an actual visible effect here. */
  .section-open-house-flyers .of-flyer-hero-addr {
    color: #fff; align-self: flex-start; display: inline-block;
    background: var(--flyer-primary, #1a3a5c); background: color-mix(in srgb, var(--flyer-primary, #1a3a5c) 78%, transparent);
    padding: 10px 16px; border-radius: 6px;
  }
  .section-open-house-flyers .of-flyer-hero-street { font-size: 1.5rem; font-weight: 700; }
  .section-open-house-flyers .of-flyer-hero-citystate { font-family: var(--flyer-body-font, Arial, sans-serif); letter-spacing: 0.08em; font-size: 0.82rem; text-transform: uppercase; }
  .section-open-house-flyers .of-flyer-hero-price { font-size: 1.6rem; font-weight: 700; margin-top: 2px; }
  .section-open-house-flyers .of-flyer-hero-tagline { font-family: var(--flyer-script-font, "Brush Script MT", "Segoe Script", cursive); color: #fff; font-size: 1.1rem; text-align: right; align-self: flex-end; max-width: 200px; text-shadow: 0 2px 6px rgba(0,0,0,0.85); }

  .section-open-house-flyers .of-flyer-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #ede4d6; }
  .section-open-house-flyers .of-flyer-strip-cell { aspect-ratio: 4 / 3; background: #ede4d6 center/cover no-repeat; display: flex; align-items: center; justify-content: center; }
  .section-open-house-flyers .of-flyer-strip-cell span { font-family: var(--flyer-body-font, Arial, sans-serif); font-size: 0.72rem; color: #a99d89; }

  .section-open-house-flyers .of-flyer-pay { padding: 30px 26px 16px; text-align: center; font-family: var(--flyer-body-font, Arial, sans-serif); }
  .section-open-house-flyers .of-flyer-pay h2 { font-family: var(--flyer-heading-font, Georgia, serif); color: var(--flyer-primary, #1a3a5c); margin: 0 0 4px; font-size: 1.5rem; }
  .section-open-house-flyers .of-flyer-pay-sub { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #8c8172; margin: 0 0 20px; }
  .section-open-house-flyers .of-flyer-paycards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
  .section-open-house-flyers .of-flyer-paycard { border: 1px solid #e8dfcf; border-radius: 8px; overflow: hidden; background: #fffefb; }
  .section-open-house-flyers .of-flyer-paycard-placeholder {
    border: 1.5px dashed #ddd1ba; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: #b3a890; font-size: 0.78rem; text-align: center; padding: 16px; min-height: 160px;
  }
  .section-open-house-flyers .of-flyer-paycard-head { background: var(--flyer-accent, #dbe6f2); color: var(--flyer-primary, #1a3a5c); font-weight: 700; text-align: center; padding: 10px 6px; font-size: 0.9rem; }
  .section-open-house-flyers .of-flyer-paycard-head span { display: block; font-weight: 400; font-size: 0.74rem; }
  .section-open-house-flyers .of-flyer-payrow { display: flex; justify-content: space-between; padding: 5px 10px; font-size: 0.78rem; color: #544a3e; }
  .section-open-house-flyers .of-flyer-payrow.rule { border-top: 1px solid #ece3d3; margin-top: 2px; padding-top: 7px; }
  .section-open-house-flyers .of-flyer-paycard-total {
    background: var(--flyer-accent, #f4ead9); color: var(--flyer-primary, #1a3a5c); text-align: center; padding: 9px 6px 11px; margin-top: 4px;
  }
  .section-open-house-flyers .of-flyer-paycard-total span:first-child { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
  .section-open-house-flyers .of-flyer-paycard-total span:last-child { display: block; font-size: 1.3rem; font-weight: 700; }

  .section-open-house-flyers .of-flyer-footer {
    display: grid; grid-template-columns: 1.1fr 0.9fr 1.1fr; gap: 12px; align-items: center;
    padding: 26px 26px; font-family: var(--flyer-body-font, Arial, sans-serif); font-size: 0.8rem; color: #3a332b; border-top: 1px solid #ece3d3;
  }
  .section-open-house-flyers .of-flyer-agent { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .section-open-house-flyers .of-flyer-agent.right { text-align: right; flex-direction: row-reverse; }
  .section-open-house-flyers .of-flyer-agent > div { min-width: 0; line-height: 1.45; }
  .section-open-house-flyers .of-flyer-agent-headshot { width: var(--flyer-headshot-size, 116px); height: var(--flyer-headshot-size, 116px); border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
  .section-open-house-flyers .of-flyer-agent-headshot--square { border-radius: 14%; }
  .section-open-house-flyers .of-flyer-agent strong { display: block; color: var(--flyer-primary, #1a3a5c); font-size: 0.92rem; }
  .section-open-house-flyers .of-flyer-agent .role { color: #8c8172; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
  .section-open-house-flyers .of-flyer-agent .company { margin-top: 4px; font-weight: 700; }
  /* "Apply now" card (redesigned 2026-10-02 to match a reference Aarno had
     ChatGPT generate from a flyer screenshot) — a gold ribbon banner, a
     navy card body with a white gold-bordered QR panel flanked by
     sunburst accents, and a row of trust badges. The gold here is a fixed
     decorative color, not tied to flyerStyle.accentColor (that pale
     cream accent would read as washed-out for a banner/badge this bold);
     the card body still tracks --flyer-primary so the AI's color choice
     remains visible. */
  .section-open-house-flyers .of-flyer-apply {
    --gold: #d4af37; --gold-light: #f0cf6e;
    position: relative; margin: -34px auto 0; z-index: 3; width: 92%;
    border-radius: 16px; text-align: center; padding: 30px 14px 16px;
    background: linear-gradient(170deg, var(--flyer-primary, #1a3a5c), color-mix(in srgb, var(--flyer-primary, #1a3a5c) 70%, black));
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  }
  .section-open-house-flyers .of-flyer-apply-callout {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
    color: #3a2f0a; background: linear-gradient(135deg, var(--gold-light), var(--gold));
    font-weight: 800; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 9px 22px; border-radius: 4px; box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  }
  .section-open-house-flyers .of-flyer-apply-callout::before,
  .section-open-house-flyers .of-flyer-apply-callout::after {
    content: ""; position: absolute; top: 0; width: 0; height: 0;
    border-top: 19px solid color-mix(in srgb, var(--gold) 70%, black); border-bottom: 0 solid transparent;
  }
  .section-open-house-flyers .of-flyer-apply-callout::before { left: -11px; border-left: 11px solid transparent; }
  .section-open-house-flyers .of-flyer-apply-callout::after { right: -11px; border-right: 11px solid transparent; }
  .section-open-house-flyers .of-flyer-apply-qr-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-top: 6px; }
  .section-open-house-flyers .of-flyer-apply-qr-panel {
    background: #fff; border: 3px solid var(--gold); border-radius: 10px; padding: 8px; line-height: 0;
  }
  .section-open-house-flyers .of-flyer-apply-qr-panel svg { width: 92px; height: 92px; display: block; }
  .section-open-house-flyers .of-flyer-apply-burst {
    position: absolute; width: 34px; height: 34px; color: var(--gold); opacity: 0.9;
  }
  .section-open-house-flyers .of-flyer-apply-burst.left { left: -42px; top: 50%; transform: translateY(-50%); }
  .section-open-house-flyers .of-flyer-apply-burst.right { right: -42px; top: 50%; transform: translateY(-50%); }
  .section-open-house-flyers .of-flyer-apply span.of-flyer-apply-label {
    display: block; color: #e8edf3; font-weight: 600; font-size: 0.74rem; margin-top: 8px;
  }
  .section-open-house-flyers .of-flyer-apply-badges {
    display: flex; justify-content: center; gap: 10px; margin-top: 16px; padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.15);
  }
  .section-open-house-flyers .of-flyer-apply-badge { display: flex; flex-direction: column; align-items: center; gap: 5px; max-width: 72px; }
  .section-open-house-flyers .of-flyer-apply-badge-icon {
    width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #3a2f0a;
    display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 800;
  }
  .section-open-house-flyers .of-flyer-apply-badge span { color: #fff; font-size: 0.6rem; font-weight: 700; line-height: 1.25; }
  .section-open-house-flyers .of-flyer-apply-empty { color: #e8edf3; font-size: 0.72rem; padding: 20px 10px; }
  .section-open-house-flyers .of-flyer-bottombar {
    display: flex; align-items: center; justify-content: center; gap: 8px; background: #f6f0e4; color: #8c8172;
    font-family: var(--flyer-body-font, Arial, sans-serif); font-size: 0.64rem; line-height: 1.35; padding: 10px 20px; text-align: center;
  }
  .section-open-house-flyers .of-flyer-bottombar svg { flex-shrink: 0; width: 22px; height: 22px; }

  @media (max-width: 640px) {
    .section-open-house-flyers .top-bar { padding: 12px 16px 0; }
    .section-open-house-flyers .content { padding: 24px 20px; }
  }
