/* ──────────────────────────────────────────────────────────────
 * THRED Realty — site stylesheet.
 *
 * F mockup (_mockups/F.html) is the authoritative design spec.
 * Apex (thredrealty.com), Join (join.thredrealty.com), and the agent
 * micro-sites (agent.thredrealty.com/{slug}) all render through this
 * single stylesheet. The portal (portal.thredrealty.com) has its own.
 *
 * Vocabulary contract — these are the only public class names that
 * appear on rendered pages (plus the narrow form/admin survivors at
 * the bottom):
 *   chrome:   .nav .logo .logo__mark .logo__text .dot .nav__links
 *             .foot .foot__top .foot__brand-block .foot__col .foot__bot
 *   sections: .section .section--white .section--light .section--paper-2
 *             .section--first .section-head .section-eyebrow
 *   hero:     .hero .hero__bg .hero__content .hero__eyebrow .hero__title
 *             .hero__sub .hero__actions .hero__scroll
 *   listings: .listings .listing .listing__photo .listing__tag
 *             .listing__body .listing__location .listing__title
 *             .listing__meta .listings-foot
 *   editorial:.editorial .editorial__text .editorial__photo .editorial__list
 *   strip:    .strip .strip__tile .strip__bg .strip__caption
 *             .strip__eyebrow .strip__name
 *   band:     .band .band__inner
 *   lead:     .lead .lead__left .lead__right .lead__form .lead__title
 *             .lead__sub
 *   buttons:  .btn-primary .btn-ghost
 *   cards:    .cards .card (generic tile primitive — used by join/apex
 *                          alike for any non-listing card grid)
 * ────────────────────────────────────────────────────────────── */

:root {
  --accent:           #0096ff;
  --accent-hover:     #0077cc;
  --ink:              #0c0c0d;
  --ink-muted:        #54565a;
  --paper:            #faf8f3;
  --paper-2:          #f3f0e8;
  --line:             #e4e2dc;
  --white:            #ffffff;
  --bg:               #ffffff;
  --font:             'Manrope', system-ui, -apple-system, sans-serif;
  --ease:             cubic-bezier(.2,.7,.2,1);

  --nav-h:            72px;
  --section-pad-x:    64px;
  --band-pad-y:       120px;
  --display-h1:       clamp(48px, 7vw, 96px);
  --display-h2:       clamp(36px, 5vw, 64px);
  --letter-tight:     -.03em;
  --hero-overlay:     linear-gradient(180deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 75%, rgba(0,0,0,.7) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.5; overflow-x: hidden; }
body { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 12px; letter-spacing: var(--letter-tight); }
h1 { font-size: var(--display-h1); font-weight: 700; line-height: .95; }
h2 { font-size: var(--display-h2); font-weight: 700; line-height: 1.02; }
h3 { font-size: clamp(20px, 2vw, 28px); font-weight: 700; line-height: 1.2; }
h4 { font-size: 16px; font-weight: 700; }
em { font-style: normal; color: var(--accent); }
strong { font-weight: 700; }
p { margin: 0 0 14px; font-size: 16px; }
input, button, select, textarea { font-family: inherit; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > .foot { margin-top: auto; }

/* Width utility — only used by text-heavy CMS blocks (text_block, video_embed, faq).
   F sections are full-bleed and don't use any inner max-width clamp. */
.container--narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ── F chrome: nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--paper); color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease), color .3s var(--ease), padding .3s var(--ease), border-color .3s var(--ease);
}
.nav.over-hero {
  background: transparent; border-bottom-color: transparent; color: #fff;
}
.nav.scrolled {
  background: var(--paper); color: var(--ink);
  padding: 14px 40px; border-bottom-color: var(--line);
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: inherit; text-decoration: none; }
.logo__mark { width: 30px; height: 30px; border-radius: 7px; background: transparent; color: currentColor; display: grid; place-items: center; flex-shrink: 0; transition: background .3s var(--ease), color .3s var(--ease); }
.logo__mark svg { width: 26px; height: 26px; stroke: currentColor; filter: none; transition: filter .3s var(--ease); }
.logo__text { font-weight: 800; letter-spacing: -.02em; }
.logo__text .dot, .dot { color: var(--ink); transition: color .3s var(--ease); }

.nav.over-hero .logo__mark svg { filter: drop-shadow(0 1px 3px rgba(0,0,0,.55)); }
.nav.over-hero .dot { color: #fff; }
.nav.scrolled .logo__mark svg { filter: none; }
.nav.scrolled .dot { color: var(--ink); }

/* Nav links */
.nav__links { display: flex; gap: 32px; align-items: center; }
.nav__links a { color: inherit; opacity: .7; text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: .01em; transition: opacity .2s var(--ease); }
.nav__links a:hover { opacity: 1; color: inherit; }
.nav__links a.active { opacity: 1; }
/* color must be set here (0,2,0) so it beats `.nav__links a {color:inherit}`
   (0,1,1) — otherwise the pill's label inherits the nav ink color and goes
   invisible on its own dark fill on paper navs. The .over-hero override
   (higher specificity) still flips it to ink-on-white over a photo hero. */
.nav__links .btn-primary { opacity: 1; color: var(--paper); }
.nav__links .btn-primary:hover { color: #fff; }

/* "Agents" badge next to logo on join.thredrealty.com */
.logo__tag {
  display: inline-block; margin-left: 8px;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(0,150,255,.12); color: var(--accent);
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase;
}
.nav.over-hero .logo__tag { background: rgba(255,255,255,.18); color: #fff; }
.nav.scrolled  .logo__tag,
.nav.open      .logo__tag { background: rgba(0,150,255,.12); color: var(--accent); }

/* Hamburger toggle (mobile) */
.nav__toggle { display: none; width: 40px; height: 40px; background: transparent; border: 0; cursor: pointer; padding: 0; }
.nav__toggle-bar { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto; transition: transform .15s var(--ease), opacity .15s var(--ease); }
.nav.open .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav.open .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── F chrome: footer ── */
.foot {
  background: var(--ink); color: var(--paper);
  padding: 80px var(--section-pad-x) 40px;
}
.foot__top {
  display: grid; grid-template-columns: minmax(220px, 1fr) 3fr;
  gap: 40px 48px; margin-bottom: 60px;
}
.foot__cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 40px 32px;
}
.foot__cta {
  display: inline-block; margin-top: 18px;
  color: var(--paper); font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(250,248,243,.28); border-radius: 8px; padding: 10px 16px;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.foot__cta:hover { background: rgba(250,248,243,.08); border-color: rgba(250,248,243,.5); }
.foot__brand-block .logo { color: var(--paper); margin-bottom: 16px; font-size: 22px; }
.foot__brand-block .logo__mark { width: 36px; height: 36px; border-radius: 8px; background: var(--ink); color: var(--white); }
.foot__brand-block .logo__mark svg { width: 26px; height: 26px; filter: none; }
.foot__brand-block .logo__text { color: var(--paper); font-weight: 800; }
.foot__brand-block .logo__text .dot { color: var(--white); opacity: .8; }
.foot__tagline { opacity: .6; font-size: 14px; line-height: 1.7; margin: 0; max-width: 280px; }
.foot__col h4 { color: rgba(250,248,243,.50); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 20px; }
.foot__col ul { list-style: none; margin: 0; padding: 0; }
.foot__col li { margin-bottom: 12px; }
.foot__col a { color: rgba(250,248,243,.80); font-size: 15px; text-decoration: none; transition: opacity .2s var(--ease); }
.foot__col a:hover { color: var(--paper); }
.foot__bot {
  padding-top: 40px; border-top: 1px solid rgba(255,255,255,.10);
  color: rgba(250,248,243,.50); font-size: 13px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center;
}
.foot__bot a { color: rgba(250,248,243,.70); }
.foot__bot a:hover { color: var(--paper); }
.foot__staff { opacity: .85; }

/* ── F section primitive ── */
.section {
  padding: var(--band-pad-y) var(--section-pad-x);
  position: relative;
}
.section--first { padding-top: 140px; }
.section--white { background: var(--bg); }
.section--light { background: var(--paper); }
.section--paper-2 { background: var(--paper-2); }
.section--soft { background: var(--paper); }  /* alias for legacy callers */
.section--ink, .section--navy { background: var(--ink); color: var(--paper); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--navy h1, .section--navy h2, .section--navy h3 { color: var(--paper); }
.section--ink p, .section--navy p { color: rgba(250,248,243,.80); }

.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head--tight { margin-bottom: 40px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { line-height: 1.02; margin-bottom: 12px; }
.section-head h2 span { color: var(--ink-muted); font-weight: 300; }
.section-head p { color: var(--ink-muted); font-size: 17px; max-width: 560px; margin: 16px 0 0; line-height: 1.6; }
.section-head.center p { margin-left: auto; margin-right: auto; }

.section-eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
.band .section-eyebrow { color: var(--accent); }

/* ── F hero (photo) ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: flex-end;
  color: #fff; overflow: hidden; background: var(--ink);
}
.hero__bg { position: absolute; inset: 0; z-index: 1; background-size: cover; background-position: center; }
.hero__bg::after { content: ''; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero__content { position: relative; z-index: 2; padding: 80px var(--section-pad-x); max-width: 720px; }
.hero__eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; opacity: .9; margin-bottom: 24px; }
.hero__title { font-weight: 700; font-size: var(--display-h1); line-height: .95; letter-spacing: -.035em; margin: 0 0 24px; color: #fff; }
.hero__title span { display: block; font-weight: 300; color: rgba(255,255,255,.78); }
.hero__sub { font-size: 17px; max-width: 480px; opacity: .9; margin: 0 0 32px; }
.hero__actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero__scroll { position: absolute; bottom: 40px; right: var(--section-pad-x); color: #fff; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; z-index: 2; font-weight: 600; }
.hero__scroll::before { content: ''; display: inline-block; width: 1px; height: 40px; background: #fff; margin-right: 16px; vertical-align: middle; }

/* Hero — text variant (no photo) for inner pages */
.hero--text { min-height: 0; display: block; padding: calc(var(--nav-h) + 80px) var(--section-pad-x) 80px; background: var(--paper); color: var(--ink); }
.hero--text .hero__content { padding: 0; max-width: 880px; position: static; }
.hero--text .hero__eyebrow { color: var(--ink-muted); opacity: 1; }
.hero--text .hero__title { color: var(--ink); font-size: clamp(40px, 5vw, 68px); line-height: 1.05; }
.hero--text .hero__title span { color: var(--ink-muted); }
.hero--text .hero__sub { color: var(--ink-muted); opacity: 1; max-width: 640px; font-size: clamp(17px, 1.4vw, 19px); }

/* ── F buttons ──
   Default is the on-LIGHT treatment because the vast majority of the
   site sits on paper. The three genuinely dark surfaces in the system
   (.hero photo, .band, .nav.over-hero before it scrolls/opens) override
   to the white-on-dark treatment below. Bespoke sections (.apply, .lead,
   .faq, anything custom on paper) inherit the correct default for free —
   no per-section opt-in list to maintain. */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper);
  padding: 14px 28px; border-radius: 999px;
  text-decoration: none; font-size: 14px; font-weight: 700;
  letter-spacing: .01em; border: 1px solid var(--ink);
  cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink);
  padding: 14px 28px; border-radius: 999px;
  text-decoration: none; font-size: 14px; font-weight: 700;
  letter-spacing: .01em; border: 1px solid rgba(12,12,13,.25);
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn-ghost:hover { background: rgba(12,12,13,.04); border-color: var(--ink); color: var(--ink); }

/* On-dark override — only the three genuinely dark surfaces in the system.
   The :not(.scrolled):not(.open) on .nav.over-hero matches the existing
   AGENTS pill / mobile drawer pattern: once the nav flips to paper via
   .scrolled or .open, the button reverts to the default ink fill. */
.hero:not(.hero--text) .btn-primary,
.band .btn-primary,
.nav.over-hero:not(.scrolled):not(.open) .btn-primary {
  background: var(--white); color: var(--ink); border-color: var(--white);
}
.hero:not(.hero--text) .btn-primary:hover,
.band .btn-primary:hover,
.nav.over-hero:not(.scrolled):not(.open) .btn-primary:hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.hero:not(.hero--text) .btn-ghost,
.band .btn-ghost,
.nav.over-hero:not(.scrolled):not(.open) .btn-ghost {
  color: #fff; border-color: rgba(255,255,255,.45);
}
.hero:not(.hero--text) .btn-ghost:hover,
.band .btn-ghost:hover,
.nav.over-hero:not(.scrolled):not(.open) .btn-ghost:hover {
  background: rgba(255,255,255,.1); border-color: #fff; color: #fff;
}

/* Legacy on-light selector retained as no-op (matches default). Kept so
   any third-party CSS audit tool seeing the old selectors doesn't flag
   them as orphaned — but they can be removed in the next cleanup pass. */
.section--white .btn-ghost, .section--light .btn-ghost, .section--paper-2 .btn-ghost, .hero--text .btn-ghost {
  color: var(--ink); border-color: rgba(12,12,13,.25);
}
.section--white .btn-ghost:hover, .section--light .btn-ghost:hover, .section--paper-2 .btn-ghost:hover, .hero--text .btn-ghost:hover {
  background: rgba(12,12,13,.06); border-color: var(--ink); color: var(--ink);
}

/* ── F listings ── */
.listings {
  display: grid; grid-template-columns: repeat(3, 1fr);
  column-gap: 32px; row-gap: 56px;
}
.listing { background: var(--bg); border: 1px solid var(--line); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .3s var(--ease), box-shadow .3s var(--ease); display: block; }
.listing:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -16px rgba(0,0,0,.12); color: var(--ink); }
.listing__photo { aspect-ratio: 5/4; background-size: cover; background-position: center; position: relative; }
.listing__tag { position: absolute; top: 16px; left: 16px; background: rgba(255,255,255,.95); color: var(--ink); padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.listing__tag--coming { background: var(--ink); color: var(--paper); }
.listing__body { padding: 24px 28px 28px; }
.listing__location { font-size: 12px; color: var(--ink-muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.listing__title { font-size: 22px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin: 0 0 16px; color: var(--ink); }
.listing__meta { display: flex; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-muted); }
.listing__meta strong { color: var(--ink); font-weight: 700; margin-right: 4px; }
.listings-foot { margin-top: 64px; text-align: center; }
.listings-foot a { color: var(--ink); font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--ink-muted); padding-bottom: 4px; text-decoration: none; transition: border-color .2s var(--ease), color .2s var(--ease); }
.listings-foot a:hover { color: var(--accent); border-color: var(--accent); }

/* ── F editorial ── */
.editorial { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.editorial__photo { aspect-ratio: 4/5; background-size: cover; background-position: center; }
.editorial__photo--right { order: 2; }
.editorial__text h3 { font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 20px; color: var(--ink); }
.editorial__text h3 span { color: var(--ink-muted); font-weight: 300; }
.editorial__text p { font-size: 17px; color: var(--ink-muted); margin: 0 0 20px; line-height: 1.6; }
.editorial__list { list-style: none; margin: 8px 0 0; padding: 0; }
.editorial__list li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; font-size: 15px; color: var(--ink); }
.editorial__list li:last-child { border-bottom: 1px solid var(--line); }
.editorial__list li::before { content: ''; flex: 0 0 24px; height: 1px; background: var(--accent); }

/* ── F strip (Texas metros + Houston neighborhoods) ── */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.strip__tile { position: relative; aspect-ratio: 3/4; overflow: hidden; text-decoration: none; color: #fff; }
.strip__bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .6s var(--ease); }
.strip__tile:hover .strip__bg { transform: scale(1.05); }
.strip__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.7) 100%); }
.strip__caption { position: absolute; bottom: 24px; left: 24px; right: 24px; z-index: 2; display: block; }
.strip__eyebrow { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .75; margin: 0 0 6px; color: #fff; }
.strip__name { display: block; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.015em; line-height: 1.15; margin: 0; }

/* ── F dark band ── */
.band { background: var(--ink); color: var(--paper); padding: 100px var(--section-pad-x); }
.band__inner { max-width: 720px; }
.band__inner h2 { font-weight: 700; font-size: var(--display-h2); letter-spacing: var(--letter-tight); line-height: 1; margin: 0 0 24px; color: var(--paper); }
.band__inner h2 span, .band__inner h2 em { color: var(--accent); font-weight: 300; font-style: normal; }
.band__inner p { font-size: 17px; opacity: .8; margin: 0 0 32px; max-width: 560px; color: rgba(250,248,243,.80); }

/* ── F lead form (split layout) ── */
.lead { display: grid; grid-template-columns: 1fr 1fr; min-height: 600px; }
.lead--white .lead__right { background: var(--bg); }
.lead--soft .lead__right { background: var(--paper); }
.lead--paper-2 .lead__right { background: var(--paper-2); }
.lead__left { background-size: cover; background-position: center; min-height: 480px; }
.lead__right { padding: 80px var(--section-pad-x); display: flex; flex-direction: column; justify-content: center; }
.lead__right .section-eyebrow { color: var(--ink-muted); margin-bottom: 16px; }
.lead__title { font-weight: 700; font-size: 48px; letter-spacing: -.025em; line-height: 1.1; margin: 0 0 16px; color: var(--ink); }
.lead__title span { color: var(--ink-muted); font-weight: 300; }
.lead__sub { color: var(--ink-muted); font-size: 17px; margin: 0 0 32px; max-width: 480px; }

/* Inline form variant inside .lead — F's compact underline-input pattern */
.lead__form .field { margin-bottom: 0; }
.lead__form .field label { display: none; }
.lead__form .field input,
.lead__form .field select,
.lead__form .field textarea {
  background: transparent; border: 0;
  border-bottom: 1px solid var(--ink-muted);
  padding: 14px 0; height: auto;
  font-family: inherit; font-size: 15px; color: var(--ink);
  outline: none; border-radius: 0;
  transition: border-color .2s var(--ease);
}
.lead__form .field input:focus,
.lead__form .field select:focus,
.lead__form .field textarea:focus {
  border-color: var(--accent); box-shadow: none;
}
.lead__form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead__form .field textarea { min-height: 80px; resize: vertical; }
.lead__form button[type=submit] {
  background: var(--ink); color: var(--paper); border: 0;
  padding: 16px 32px; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  letter-spacing: .02em; cursor: pointer; margin-top: 24px;
  transition: background .2s var(--ease);
}
.lead__form button[type=submit]:hover { background: var(--accent); }

/* ── Generic card grid primitive (replaces legacy .highlight / .bucket / .how-step) ── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--paper-2); border: 1px solid var(--line);
  padding: 32px; transition: transform .25s var(--ease), border-color .25s var(--ease);
  text-decoration: none; color: var(--ink); display: block;
}
.card:hover { transform: translateY(-2px); border-color: var(--ink-muted); color: var(--ink); }
.card__kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.card__num { display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; margin-bottom: 16px; border-radius: 4px; }
.card__icon { width: 40px; height: 40px; background: rgba(0,150,255,.10); color: var(--accent); display: grid; place-items: center; margin-bottom: 20px; }
.card h3 { margin: 0 0 10px; font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -.015em; }
.card p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 1.6; }
.card ul { margin: 8px 0 0; padding: 0; list-style: none; color: var(--ink); font-size: 15px; line-height: 1.7; }
.card ul li { padding: 8px 0; border-top: 1px solid var(--line); }
.card ul li:first-child { border-top: 0; padding-top: 0; }
.card ul li strong { color: var(--ink); font-weight: 700; }

/* ── Pricing plan card (recruiting funnel — kept as distinct primitive) ── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.plans--2 { grid-template-columns: repeat(2, 1fr); }
.plans--1 { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
.plan {
  background: var(--bg); border: 1px solid var(--line);
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.plan-recommended {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(0,150,255,.06);
}
.plan-recommended .plan__badge {
  display: inline-block; align-self: flex-start;
  background: var(--accent); color: #fff;
  padding: 4px 10px; font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 0;
}
.plan__name { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin: 0; }
.plan__price { font-size: 48px; font-weight: 800; letter-spacing: -.025em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; margin: 0; }
.plan__price small { font-size: 14px; font-weight: 500; color: var(--ink-muted); margin-left: 6px; }
.plan__desc { color: var(--ink-muted); font-size: 15px; line-height: 1.6; margin: 0; }
.plan__features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; color: var(--ink); }
.plan__features li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.plan__features li:first-child { border-top: 0; }
.plan__features li::before { content: ''; flex: 0 0 16px; height: 16px; margin-top: 2px; background: rgba(0,150,255,.10) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230096ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 8l3 3 7-7'/></svg>") center / 10px no-repeat; }
.plan__cta { margin-top: auto; }

/* ── Fee table (recruiting funnel) ── */
.fee-table { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--line); font-size: 14.5px; }
.fee-table th, .fee-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fee-table th { font-weight: 700; color: var(--ink); background: var(--paper-2); }
.fee-table td { color: var(--ink); }
.fee-table td.amount, .fee-table-amount { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.fee-table-foot { color: var(--ink-muted); font-size: 13.5px; margin: 16px auto 0; max-width: 720px; text-align: center; line-height: 1.6; }

/* ── Example-deal slider + breakdown table (recruiting pricing demo) ──
   The .example-deal-* hooks existed in markup without rules; these
   complete them. Slider sits in its own row above the breakdown so
   the value isn't crammed against the "$900,000" label. */
.example-deal-slider-wrap { max-width: 560px; margin: 0 auto 32px; padding: 0 24px; text-align: center; }
.example-deal-slider-label { display: block; font-size: 14px; color: var(--ink-muted); margin-bottom: 10px; }
.example-deal-slider-label strong { display: inline-block; margin-left: 8px; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.example-deal-slider-wrap input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--paper-2); border-radius: 999px; outline: 0; }
.example-deal-slider-wrap input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer; }
.example-deal-slider-wrap input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); cursor: pointer; }
.example-deal-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.example-deal-table th, .example-deal-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: baseline; }
.example-deal-table th { text-align: left; font-weight: 500; color: var(--ink); }
.example-deal-table td { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.example-deal-table tr.example-deal-total th, .example-deal-table tr.example-deal-total td { border-top: 1px solid var(--ink); border-bottom: 0; padding-top: 14px; font-size: 17px; }
.example-deal-table tr.example-deal-total td strong { font-size: 22px; font-weight: 700; }
.example-deal-muted { color: var(--ink-muted); font-weight: 400; font-size: 13px; }
.example-deal-compare { font-size: 15px; color: var(--ink); line-height: 1.7; margin: 16px 0 8px; }
.example-deal-foot { font-size: 13.5px; line-height: 1.6; }

/* ── Image band (full-bleed photo break) ── */
.image { padding: 0; line-height: 0; background: var(--paper); }
.image img { width: 100%; height: auto; display: block; }

/* ── Gallery ── */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery__tile { margin: 0; overflow: hidden; background: var(--paper-2); border-radius: 10px; }
.gallery__tile img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; display: block; transition: transform .3s var(--ease); }
.gallery__tile:hover img { transform: scale(1.03); }
.gallery__tile figcaption { padding: 10px 14px; font-size: 13px; color: var(--ink-muted); }

/* ── Video embed ── */
.video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Two-column generic ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.two-col__col img { width: 100%; height: auto; display: block; margin-bottom: 18px; }
.two-col__col p { color: var(--ink-muted); }

/* ── Divider ── */
.section--divider { padding: 24px 0; }
.section--divider hr { border: 0; border-top: 1px solid var(--line); margin: 0 auto; width: 100%; }
.section--divider--center hr { max-width: 80px; border-top-color: var(--accent); border-top-width: 2px; }
.section--divider--left hr { max-width: 240px; margin-left: 0; }
.section--divider--right hr { max-width: 240px; margin-right: 0; }

/* ── Text block ── */
.text__title { font-size: var(--display-h2); margin: 0 0 18px; color: var(--ink); }
.text__body { color: var(--ink); font-size: 17px; line-height: 1.7; }

/* ── FAQ ── */
.faq { margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq__q { cursor: pointer; list-style: none; font-size: 17px; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; font-weight: 400; font-size: 22px; color: var(--accent); flex-shrink: 0; transition: transform .2s var(--ease); }
.faq__item[open] .faq__q::after { content: "−"; }
.faq__a { margin-top: 12px; color: var(--ink-muted); font-size: 15px; line-height: 1.7; max-width: 660px; }

/* ── Form field internals (survivor — used by .apply-form classic AND .lead__form) ── */
.apply-form h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: var(--ink); }
.apply-form-sub { color: var(--ink-muted); font-size: 13.5px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 0;
  font-size: 15px; color: var(--ink); background: var(--bg);
  font-family: var(--font);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,150,255,.10);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 14px 16px; font-size: 14px; line-height: 1.5; margin: 0 0 18px; border: 1px solid; }
.alert-err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }

/* ── Button modifiers + admin variants ── */
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 16px 32px; font-size: 15px; }
/* `.btn` is the legacy base class still emitted by admin and form buttons.
   It applies a reset-only baseline; the actual visual style comes from the
   variant modifier (.btn-primary, .btn-ghost, .btn-secondary). */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 14px; font-weight: 700;
  padding: 12px 22px; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
/* Secondary button — neutral admin action (back, alternate flow, etc.) */
.btn-secondary {
  background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--line);
  padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.btn-secondary:hover { background: var(--paper); border-color: var(--ink-muted); color: var(--ink); }

/* ── Admin shell internals (superadmin.php + includes/admin/*.php) ──
   Non-public surface. Restyled to F tokens but keeps its own granular
   vocabulary because the admin layout is denser than F's editorial system. */
.admin-topbar {
  background: var(--ink); color: var(--paper);
  padding: 14px var(--section-pad-x);
  display: flex; align-items: center; gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-topbar .logo { color: var(--paper); }
.admin-topbar .logo__mark { background: var(--paper); color: var(--ink); width: 28px; height: 28px; border-radius: 6px; }
.admin-topbar-section { color: rgba(250,248,243,.55); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.15); }
.admin-tabs { display: flex; gap: 4px; flex: 1; margin-left: 16px; }
.admin-tab { color: rgba(250,248,243,.7); text-decoration: none; padding: 8px 14px; font-size: 14px; font-weight: 600; transition: color .15s var(--ease), background .15s var(--ease); }
.admin-tab:hover { color: var(--paper); background: rgba(255,255,255,.06); }
.admin-tab--active { color: var(--paper); background: rgba(255,255,255,.1); }
.admin-topbar-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.admin-topbar-link { color: rgba(250,248,243,.7); font-size: 13px; text-decoration: none; }
.admin-topbar-link:hover { color: var(--paper); }
.admin-topbar-user { color: rgba(250,248,243,.85); font-size: 13px; font-weight: 600; }

.admin-main { padding: 32px var(--section-pad-x); max-width: 1400px; margin: 0 auto; }
.admin-pageHead { margin-bottom: 24px; }
.admin-pageHead h1 { font-size: 28px; margin: 0 0 8px; color: var(--ink); }
.admin-pageHead p { color: var(--ink-muted); font-size: 15px; margin: 0; }

.admin-card { background: var(--bg); border: 1px solid var(--line); padding: 20px 24px; margin-bottom: 24px; }
.admin-card h2, .admin-card h3 { margin: 0 0 12px; }
.admin-section-h { font-size: 14px; font-weight: 700; color: var(--ink-muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.admin-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.admin-side-tabs { display: flex; flex-direction: column; gap: 2px; padding-right: 24px; border-right: 1px solid var(--line); min-width: 200px; }
.admin-side-tab { color: var(--ink-muted); text-decoration: none; padding: 10px 14px; font-size: 14px; font-weight: 600; transition: color .15s var(--ease), background .15s var(--ease); }
.admin-side-tab:hover { color: var(--ink); background: var(--paper); }
.admin-side-tab--active { color: var(--accent); background: rgba(0,150,255,.08); border-left: 2px solid var(--accent); padding-left: 12px; }
.admin-side-content { padding-left: 24px; flex: 1; }

.admin-table-wrap { background: var(--bg); border: 1px solid var(--line); overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { background: var(--paper); color: var(--ink-muted); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: rgba(0,150,255,.03); }
.admin-table a { color: var(--accent); }

.admin-status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--paper); color: var(--ink-muted); }

.admin-kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-kv th, .admin-kv td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); }
.admin-kv th { width: 40%; color: var(--ink-muted); font-weight: 600; }

.admin-field-hint { color: var(--ink-muted); font-size: 13px; margin: 4px 0 12px; }
.admin-row-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.admin-empty { color: var(--ink-muted); font-size: 14px; padding: 16px 0; }
.admin-muted { color: var(--ink-muted); }
.admin-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.admin-status-pending  { background: rgba(0,150,255,.10); color: var(--accent); }
.admin-status-accepted { background: #f0fdf4; color: #166534; }
.admin-status-active   { background: #f0fdf4; color: #166534; }
.admin-status-revoked  { background: var(--paper-2); color: var(--ink-muted); }
.admin-status-past_due { background: #fef2f2; color: #991b1b; }
.admin-status-expired  { background: var(--paper-2); color: var(--ink-muted); }

/* ── CMS editor sidebar (right-edge fixed; only rendered to editor users) ──
   Lives on the page edge so it never collides with per-block edit handles
   and scales to any number of tools without crowding the nav.

   States: collapsed = only the 36px tab is visible. Expanded (`.is-open`)
   = tab + 320px panel slides in from the right. Toggle via the tab or any
   `[data-action="cms-sidebar-toggle"]`; close via outside-click or Esc.
   State persists across pages via localStorage. */
.cms-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  z-index: 60;
  pointer-events: none;
  font-family: var(--font);
}
.cms-sidebar__tab {
  position: absolute; top: 50%; right: 0; transform: translateY(-50%);
  pointer-events: auto;
  width: 36px; height: 80px;
  background: var(--ink); color: var(--paper);
  border: 0; border-right: 0;
  display: grid; place-items: center;
  cursor: pointer;
  transition: right .3s var(--ease);
}
.cms-sidebar__tab svg { transform: rotate(0); transition: transform .3s var(--ease); }
.cms-sidebar.is-open .cms-sidebar__tab { right: var(--cms-sidebar-w, 420px); }
.cms-sidebar.is-open .cms-sidebar__tab svg { transform: rotate(180deg); }
.cms-sidebar__tab:hover { background: var(--accent); }

.cms-sidebar__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: var(--cms-sidebar-w, 420px);
  max-width: 94vw;
  background: var(--bg); color: var(--ink);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 32px rgba(0,0,0,.10);
  transform: translateX(100%);
  transition: transform .3s var(--ease);
  pointer-events: auto;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
/* Drag-to-resize handle on the panel's left edge. */
.cms-sidebar__resize {
  position: absolute; top: 0; left: 0; bottom: 0; width: 7px;
  cursor: ew-resize; z-index: 2;
  background: transparent;
}
.cms-sidebar__resize:hover, .cms-sidebar--resizing .cms-sidebar__resize { background: var(--accent); opacity: .5; }
.cms-sidebar--resizing { user-select: none; }
.cms-sidebar--resizing .cms-sidebar__panel { transition: none; }
.cms-sidebar.is-open .cms-sidebar__panel { transform: translateX(0); }
/* Mobile: the editor takes the full screen and the collapse arrow rides the
   panel's left edge (the 420px desktop offset would float it mid-screen). */
@media (max-width: 560px) {
  .cms-sidebar__panel { width: 100vw; max-width: 100vw; }
  .cms-sidebar.is-open .cms-sidebar__tab { right: calc(100vw - 36px); }
}

/* ── CMS guided tour (cms-tour.js) ─────────────────────────────────── */
.cms-tour__block { position: fixed; inset: 0; z-index: 100000; }
/* While the tour runs, the sidebar must be instantly open (no slide) so the
   spotlight measures the panel's real position, not a mid-animation frame. */
.cms-tour-on .cms-sidebar__panel { transition: none !important; }
.cms-tour__spot {
  position: fixed; z-index: 100001; border-radius: 8px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(8,12,20,.62), 0 0 0 2px var(--accent, #0096ff);
  transition: top .18s var(--ease), left .18s var(--ease), width .18s var(--ease), height .18s var(--ease);
}
.cms-tour__tip {
  position: fixed; z-index: 100002; width: 300px; max-width: 92vw;
  background: #fff; color: #1a1f26; border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.32); font-family: var(--font, sans-serif);
}
.cms-tour__count { font: 600 11px/1 sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #8a97a5; margin-bottom: 7px; }
.cms-tour__title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 6px; }
.cms-tour__body { font-size: 13.5px; line-height: 1.55; color: #4a5663; margin-bottom: 14px; }
.cms-tour__nav { display: flex; align-items: center; gap: 8px; }
.cms-tour__spacer { flex: 1; }
.cms-tour__skip { background: none; border: 0; color: #8a97a5; font-size: 13px; cursor: pointer; padding: 4px; }
.cms-tour__skip:hover { color: #4a5663; }
.cms-tour__tip .btn { padding: 7px 14px; font-size: 13px; }
.cms-tour__offer {
  position: fixed; right: 18px; bottom: 18px; z-index: 9990; width: 320px; max-width: 92vw;
  background: #fff; border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22); border: 1px solid var(--line, #e6e6ef);
  font-family: var(--font, sans-serif);
}
.cms-tour__offer-text { font-size: 13.5px; line-height: 1.5; color: #34506b; margin-bottom: 11px; }
.cms-tour__offer-btns { display: flex; justify-content: flex-end; gap: 8px; }
.cms-tour__offer .btn { padding: 7px 13px; font-size: 13px; }
@media (max-width: 560px) {
  .cms-tour__tip { left: 8px !important; right: 8px; width: auto; }
}

/* ── AI writing-prompt modal (admin-editor.js) ─────────────────────── */
.cms-ai { position: fixed; inset: 0; z-index: 9995; display: flex; align-items: center; justify-content: center; }
.cms-ai__backdrop { position: absolute; inset: 0; background: rgba(8,12,20,.5); }
.cms-ai__panel { position: relative; z-index: 1; width: 560px; max-width: 94vw; max-height: 88vh; overflow: auto; background: #fff; border-radius: 14px; padding: 20px 22px; box-shadow: 0 16px 50px rgba(0,0,0,.34); font-family: var(--font, sans-serif); }
.cms-ai__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cms-ai__top strong { font-size: 17px; }
.cms-ai__top button { background: none; border: 0; font-size: 22px; line-height: 1; color: #8a97a5; cursor: pointer; }
.cms-ai__hint { font-size: 13px; color: #5b6b7d; margin: 0 0 12px; }
.cms-ai__text { width: 100%; box-sizing: border-box; min-height: 240px; resize: vertical; border: 1px solid var(--line, #ccd); border-radius: 9px; padding: 12px 13px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: #1a1f26; background: #fafbfc; }
.cms-ai__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.cms-ai__status { font-size: 13px; font-weight: 600; color: #166534; }

.cms-sidebar__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.cms-sidebar__kicker {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 4px;
}
.cms-sidebar__top strong { display: block; font-size: 15px; color: var(--ink); }
.cms-sidebar__status {
  display: inline-block; margin-top: 6px;
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.cms-sidebar__status--published { background: #f0fdf4; color: #166534; }
.cms-sidebar__status--draft     { background: rgba(0,150,255,.10); color: var(--accent); }
.cms-sidebar__close {
  background: transparent; border: 0; color: var(--ink-muted);
  font-size: 22px; line-height: 1; padding: 0 4px;
  cursor: pointer;
}
.cms-sidebar__close:hover { color: var(--ink); }
.cms-sidebar__top-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.cms-sidebar__pin {
  background: transparent; border: 0; color: var(--ink-muted); cursor: pointer;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px;
  transition: background .12s var(--ease), color .12s var(--ease);
}
.cms-sidebar__pin:hover { color: var(--ink); background: var(--paper); }
.cms-sidebar__pin svg { transition: transform .15s var(--ease); }
.cms-sidebar__pin[aria-pressed="true"] { color: var(--accent); background: rgba(0,150,255,.12); }
.cms-sidebar__pin[aria-pressed="true"] svg { transform: rotate(-32deg); }

.cms-sidebar__section { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cms-sidebar__section h4 {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-muted); margin: 0 0 10px;
}
.cms-sidebar__item {
  display: block; padding: 8px 0; text-decoration: none;
  color: var(--ink); font-size: 14px; font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color .15s var(--ease);
}
.cms-sidebar__item:hover { color: var(--accent); }
.cms-sidebar__item--primary { color: var(--accent); }
.cms-sidebar__hint { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.55; }

.cms-sidebar__section--meta { margin-top: auto; border-bottom: 0; background: var(--paper); }
.cms-sidebar__section--meta p { margin: 0 0 8px; font-size: 13px; color: var(--ink-muted); }
.cms-sidebar__section--meta a { font-size: 13px; color: var(--accent); }

/* ── Setup / login / 404 pages ── */
.error-page, .setup-page, .login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 48px 24px; background: var(--paper);
}
.error-page__inner, .setup-page__inner, .login-page__inner {
  max-width: 480px; width: 100%; background: var(--bg);
  border: 1px solid var(--line); padding: 48px;
}
.error-page h1 { font-size: 48px; color: var(--ink); margin: 0 0 12px; }
.error-page p, .setup-page p, .login-page p { color: var(--ink-muted); }

/* ── Legal pages (CMS-driven via text_block, but legacy .legal class still used) ── */
.legal { padding: 32px 0 88px; }
.legal h2 { margin: 36px 0 14px; font-size: clamp(22px, 2.4vw, 28px); }
.legal h3 { margin: 24px 0 8px; font-size: 18px; font-weight: 700; }
.legal p, .legal li { color: var(--ink); font-size: 15.5px; line-height: 1.75; }
.legal ul { padding-left: 22px; margin: 8px 0 16px; }

/* ── Section foot link (used by recruiting funnel) ── */
.section-foot-link { text-align: center; margin-top: 32px; font-size: 14.5px; }
.section-foot-link a { color: var(--accent); }
.section-foot-link a:hover { color: var(--accent-hover); }

/* ── Handoff list (join home showpiece — 3-col quote → arrow → action) ── */
.handoff-list { list-style: none; padding: 0; margin: 36px auto 0; max-width: 880px; display: grid; gap: 14px; }
.handoff-row {
  display: grid; grid-template-columns: 1fr auto 1.2fr; align-items: start; gap: 18px;
  padding: 18px 22px; background: var(--paper-2); border: 1px solid var(--line);
  transition: border-color .15s var(--ease);
}
.handoff-row:hover { border-color: var(--ink-muted); }
.handoff-say { color: var(--ink); font-style: italic; font-size: 15.5px; line-height: 1.55; }
.handoff-arrow { color: var(--accent); font-weight: 600; font-size: 18px; line-height: 1.4; }
.handoff-do { color: var(--ink); font-weight: 500; font-size: 15.5px; line-height: 1.55; }
.handoff-foot { margin: 22px auto 0; max-width: 880px; text-align: center; color: var(--ink-muted); font-size: 13.5px; }

/* ── Apply page layout (recruiting funnel /apply) ── */
.apply { padding: 96px var(--section-pad-x); background: var(--paper); }
.apply-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.apply-fast { background: var(--bg); border: 1px solid var(--line); padding: 18px 22px; margin-top: 24px; font-size: 14.5px; color: var(--ink); line-height: 1.6; }
.apply-fast strong { color: var(--accent-hover); }
.apply-plan-card { background: var(--bg); border: 1px solid var(--line); padding: 24px; }
.apply-plan-card-eyebrow { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.apply-plan-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.apply-plan-card-price { font-size: 36px; font-weight: 800; letter-spacing: -.025em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.apply-plan-card-price span { font-size: 14px; font-weight: 500; color: var(--ink-muted); margin-left: 6px; }
.apply-plan-card p { color: var(--ink-muted); font-size: 14px; margin: 14px 0; line-height: 1.6; }
.apply-plan-card ul { list-style: none; padding: 0; margin: 0 0 14px; font-size: 13.5px; color: var(--ink); }
.apply-plan-card ul li { padding: 6px 0; display: flex; align-items: flex-start; gap: 10px; }
.apply-plan-card ul li::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; background: rgba(0,150,255,.10) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230096ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 8l3 3 7-7'/></svg>") center / 10px no-repeat; }
.apply-plan-change { font-size: 13px; color: var(--accent); font-weight: 600; }
/* .apply-grid mobile stack folded into the main responsive block below. */

/* ── Step list (checkout-success "what happens next") ── */
.step-list { list-style: none; counter-reset: stepc; padding: 0; margin: 0 0 18px; }
.step-list li { counter-increment: stepc; position: relative; padding: 14px 0 14px 44px; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.step-list li:last-child { border-bottom: 0; }
.step-list li::before { content: counter(stepc); position: absolute; left: 0; top: 14px; width: 28px; height: 28px; background: rgba(0,150,255,.10); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Generic key/value list (info-list) — contact + legal + checkout ── */
.info-list { margin: 0; padding: 0; font-size: 14.5px; }
.info-row { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--ink-muted); font-weight: 500; font-size: 13.5px; }
.info-row dd { margin: 0; color: var(--ink); }
.info-row dd a { color: var(--accent); text-decoration: none; }
.info-row dd a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Trust strip (survivor — orthogonal stats vocabulary) ── */
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; text-align: center; }
.trust-tile { padding: 16px 8px; }
.trust-tile__number { font-size: clamp(36px, 4.5vw, 56px); font-weight: 700; letter-spacing: var(--letter-tight); color: var(--ink); margin-bottom: 6px; }
.trust-tile__caption { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.trust-tile__sublabel { font-size: 14px; color: var(--ink-muted); margin-top: 6px; }

/* ── Admin shell + CMS editor chrome (only active in edit mode) ── */
.admin-shell { background: var(--paper); min-height: 100vh; }
.admin-shell__top { background: var(--ink); color: var(--paper); padding: 14px var(--section-pad-x); display: flex; justify-content: space-between; align-items: center; }
.admin-shell__top a { color: var(--paper); }
.admin-shell__tabs { display: flex; gap: 4px; padding: 0 var(--section-pad-x); background: var(--bg); border-bottom: 1px solid var(--line); }
.admin-shell__tab { padding: 14px 16px; color: var(--ink-muted); text-decoration: none; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; }
.admin-shell__tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.admin-shell__body { padding: 32px var(--section-pad-x); }

/* In edit mode the public nav drops out of `position: fixed` so it scrolls
   with the page. Without this, the hero block's edit handle (top-right of
   the hero) sits BEHIND the fixed nav and can't be clicked — moving the
   mouse upward to reach it activates the nav instead. The sidebar's
   "Start editing" / "Done" controls cover what the fixed nav was carrying
   during an edit session, so detaching the nav loses nothing. */
.cms-edit-mode .nav { position: relative; background: var(--paper); color: var(--ink); border-bottom-color: var(--line); }
.cms-edit-mode .nav .logo__mark svg { filter: none; }
.cms-edit-mode .nav .dot { color: var(--ink); }

.cms-edit-mode .cms-block { position: relative; outline: 2px dashed transparent; outline-offset: -4px; transition: outline-color .15s var(--ease); }
.cms-edit-mode .cms-block:hover { outline-color: rgba(0,150,255,.55); }
/* Sidebar → page orientation: hovering a section row outlines its block;
   opening a section flashes it. Drag + drop-zone states. */
.cms-block--hl { outline: 2px solid var(--accent) !important; outline-offset: -4px; }
.cms-block--flash { animation: cmsBlockFlash 1.2s var(--ease); }
@keyframes cmsBlockFlash { 0%,100% { box-shadow: 0 0 0 0 rgba(0,150,255,0); } 20% { box-shadow: inset 0 0 0 4px rgba(0,150,255,.45); } }
.cms-section-row.is-dragging { opacity: .5; }
.cms-mediapicker__panel.is-dropping { outline: 2px dashed var(--accent); outline-offset: -8px; }

/* Inline-editable text (rendered elements tagged data-cms-field in edit
   mode become contenteditable). Hover hints clickability; focus shows a
   distinct caret-rail; --saving pulses; --saved flashes once. */
.cms-edit-mode [data-cms-field] {
  position: relative;
  border-radius: 2px;
  transition: background .12s var(--ease), box-shadow .12s var(--ease);
}
.cms-edit-mode [data-cms-field]:hover { background: rgba(0,150,255,.08); box-shadow: 0 0 0 2px rgba(0,150,255,.25); }
.cms-edit-mode [data-cms-field]:focus { outline: 0; background: rgba(0,150,255,.10); box-shadow: 0 0 0 2px var(--accent); }
.cms-edit-mode [data-cms-field].cms-field--saving { background: rgba(0,150,255,.06); box-shadow: 0 0 0 2px rgba(0,150,255,.40); }
.cms-edit-mode [data-cms-field].cms-field--saved  { background: rgba(22,101,52,.10); box-shadow: 0 0 0 2px #16a34a; }
.cms-edit-mode .nav [data-cms-field],
.cms-edit-mode .foot [data-cms-field] { /* belt-and-braces — nav + foot are chrome, never CMS blocks */
  background: transparent; box-shadow: none;
}
/* Section-form inputs (item fields, rich text, image fields) inside the
   sidebar editor. The .cms-section-edit rules above cover direct inputs;
   these style the shared .cms-item / .cms-rt building blocks. */
.cms-section-edit textarea { min-height: 96px; resize: vertical; }

/* Per-field hint text — rendered between the label and the input by
   admin-editor.js (covers both top-level fields and item rows). */
.cms-section-edit .cms-hint,
.cms-item .cms-hint {
  font-size: 11.5px; font-weight: 400;
  color: var(--ink-muted); line-height: 1.45;
  margin: -2px 0 6px;
  text-transform: none; letter-spacing: 0;
}

/* ── CMS items-as-rows editor ─────────────────────────────────────
   Each item in a repeating-items block (capability_cards, strip,
   listings, faq, gallery, etc.) renders as one .cms-item card with
   per-field labeled inputs + head actions (↑ ↓ ×). Replaces the
   prior JSON-blob editing flow. */
.cms-items-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.cms-item {
  background: var(--paper); border: 1px solid var(--line);
  padding: 14px 14px 4px;
}
.cms-item__head {
  display: flex; align-items: center; justify-content: space-between;
  margin: -2px 0 12px;
}
.cms-item__head > span {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-muted);
}
.cms-item__head-actions { display: inline-flex; gap: 2px; }
.cms-item__head-actions button {
  background: transparent; border: 1px solid transparent;
  color: var(--ink-muted);
  width: 26px; height: 26px;
  cursor: pointer; font-size: 14px; line-height: 1;
  display: inline-grid; place-items: center;
  transition: color .12s var(--ease), background .12s var(--ease), border-color .12s var(--ease);
}
.cms-item__head-actions button:hover {
  color: var(--ink); border-color: var(--line); background: var(--bg);
}
.cms-item__head-actions [data-item-remove]:hover {
  color: #991b1b; border-color: #fecaca; background: #fef2f2;
}
.cms-item label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-muted); margin: 8px 0 4px;
}
.cms-item input[type="text"],
.cms-item textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); background: var(--bg);
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  margin-bottom: 6px;
}
.cms-item textarea { min-height: 70px; resize: vertical; line-height: 1.5; }

/* ── CMS insert-block picker (modal) ───────────────────────────
   Replaces the legacy prompt() flow. Centered panel with
   categories → block types → preset buttons. Backdrop dims the
   page; Esc / × / outside-click all close without picking. */
.cms-picker {
  position: fixed; inset: 0; z-index: 110;
  display: none; align-items: center; justify-content: center;
  font-family: var(--font);
}
.cms-picker.is-open { display: flex; }
.cms-picker__backdrop {
  position: absolute; inset: 0;
  background: rgba(12,12,13,.5);
  backdrop-filter: blur(4px);
}
.cms-picker__panel {
  position: relative;
  width: 640px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px -12px rgba(0,0,0,.4);
}
.cms-picker__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.cms-picker__title { font-size: 18px; font-weight: 700; color: var(--ink); }
.cms-picker__close {
  background: transparent; border: 0; color: var(--ink-muted);
  font-size: 26px; line-height: 1; padding: 0 4px; cursor: pointer;
}
.cms-picker__close:hover { color: var(--ink); }
.cms-picker__body {
  padding: 16px 24px 24px;
  overflow-y: auto;
}
.cms-picker__cat { margin-bottom: 22px; }
.cms-picker__cat:last-child { margin-bottom: 0; }
.cms-picker__cat-label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-muted);
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.cms-picker__type {
  display: grid; grid-template-columns: 180px 1fr; gap: 14px;
  align-items: start; padding: 8px 0;
}
.cms-picker__type-label {
  font-size: 14px; font-weight: 600; color: var(--ink); padding-top: 6px;
}
.cms-picker__presets { display: flex; flex-wrap: wrap; gap: 6px; }
.cms-picker__preset {
  background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--line);
  padding: 6px 12px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease);
}
.cms-picker__preset:hover {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-tile { border: 1px solid var(--line); overflow: hidden; cursor: pointer; background: var(--bg); }
.media-tile img { width: 100%; height: 100px; object-fit: cover; display: block; }

/* ── Impersonation banner (operator-only, never shown to public users) ─
   Emitted by tr_render_impersonation_banner() near the top of <body>
   when broker→agent impersonation is active. Visually disruptive
   amber bar so the broker can never forget who they're acting as. */
.impersonation-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 24px;
  background: #d97706; color: #fff;
  font-family: var(--font); font-size: 13px; font-weight: 500;
}
.impersonation-banner__label {
  font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: 11px;
  background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 3px;
}
.impersonation-banner__as { opacity: .85; }
.impersonation-banner__form { margin-left: auto; display: inline-flex; }
.impersonation-banner__exit {
  background: rgba(255,255,255,.15); color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px;
  cursor: pointer; transition: background .15s var(--ease);
}
.impersonation-banner__exit:hover { background: rgba(255,255,255,.25); }
body.has-impersonation-banner { padding-top: 40px; }
body.has-impersonation-banner .nav { top: 40px; }
@media (max-width: 600px) {
  .impersonation-banner { padding: 6px 12px; font-size: 12px; gap: 8px; }
  .impersonation-banner__as { display: none; }
}

/* ── Responsive ─────────────────────────────────────────────────
   F is desktop-first full-bleed. Three tiers compress tokens, stack
   multi-column grids, and swap the nav into a hamburger panel.
     <= 1024px  tablet landscape — light compression
     <=  900px  tablet portrait + large phone — hamburger kicks in
     <=  600px  phone — full stack
   plus a polish tier at <= 380px for the smallest phones.
   ──────────────────────────────────────────────────────────── */

/* Tablet landscape */
@media (max-width: 1024px) {
  :root { --section-pad-x: 40px; --band-pad-y: 96px; }
  .hero__content { padding: 64px 40px; }
  .listings, .cards, .strip, .gallery, .cards--4 { grid-template-columns: 1fr 1fr; }
  .lead, .editorial, .two-col { gap: 48px; }
}

/* Tablet portrait + large phone — hamburger appears */
@media (max-width: 900px) {
  :root { --section-pad-x: 24px; --band-pad-y: 80px; }
  .nav { padding: 14px 24px; flex-wrap: wrap; }
  .nav.scrolled { padding: 12px 24px; }
  .nav__toggle { display: block; color: inherit; }
  .nav__links {
    display: none; width: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    margin-top: 14px; padding: 8px 0;
    border-top: 1px solid var(--line);
  }
  .nav.open .nav__links { display: flex; }
  .nav.open { background: var(--paper); color: var(--ink); border-bottom-color: var(--line); }
  .nav.open .logo__mark svg { filter: none; }
  .nav.open .dot { color: var(--ink); }
  .nav__links a { padding: 12px 4px; font-size: 16px; opacity: .85; border-bottom: 1px solid var(--line); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links .btn-primary { width: 100%; margin-top: 12px; padding: 14px 22px; }
  .section--first { padding-top: 96px; }
  .hero__content { padding: 64px 24px; max-width: 100%; }
  .editorial, .lead, .two-col { grid-template-columns: 1fr; gap: 32px; }
  .editorial__photo--right { order: -1; }
  .editorial__photo { aspect-ratio: 16/10; min-height: 280px; }
  .lead__right { padding: 48px 24px; }
  .lead__left { min-height: 240px; }
  .lead__title { font-size: 38px; }
  .listings, .strip, .cards { grid-template-columns: 1fr 1fr; }
  .listings { row-gap: 40px; }
  .cards--4 { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .foot__top { grid-template-columns: 1fr; }
  .foot__tagline { max-width: none; }
  .plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .band { padding: 80px 24px; }
  .apply { padding: 80px 24px; }
  .handoff-row { grid-template-columns: 1fr; gap: 10px; padding: 16px 18px; }
  .handoff-arrow { display: none; }
  .apply-grid { grid-template-columns: 1fr; gap: 32px; }
  .strip__name { font-size: 17px; }
  .strip__tile { aspect-ratio: 4/5; }
}

/* Phone */
@media (max-width: 600px) {
  :root { --band-pad-y: 64px; }
  .nav { padding: 12px 20px; }
  .nav.scrolled { padding: 10px 20px; }
  .hero { min-height: 88vh; }
  .hero__content { padding: 48px 20px 64px; }
  .hero__title { font-size: clamp(36px, 9vw, 52px); margin-bottom: 18px; }
  .hero__sub { font-size: 16px; max-width: none; margin-bottom: 24px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn-primary, .hero__actions .btn-ghost { flex: 1; padding: 14px 18px; min-width: 0; }
  .hero__scroll { display: none; }
  .hero--text { padding: calc(var(--nav-h) + 64px) 20px 64px; }
  .listings, .cards, .cards--4, .strip, .gallery { grid-template-columns: 1fr; }
  .listings { row-gap: 32px; }
  .strip { gap: 16px; }
  .strip__tile { aspect-ratio: 3/2; }
  .foot { padding: 64px 24px 32px; }
  .foot__top { grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .foot__bot { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 24px; }
  .trust-strip { grid-template-columns: 1fr 1fr; gap: 24px; }
  .lead__title { font-size: 30px; }
  .lead__right { padding: 40px 20px; }
  .lead__form .field-row { grid-template-columns: 1fr; gap: 14px; }
  .band { padding: 64px 24px; }
  .band__inner h2 { font-size: clamp(32px, 7.5vw, 44px); }
  .section { padding: 64px 20px; }
  .section--divider { padding: 16px 0; }
  .section-head { margin-bottom: 40px; max-width: 100%; }
  .editorial__text h3 { font-size: 28px; }
  .editorial__text p { font-size: 16px; }
  .editorial__photo { aspect-ratio: 16/11; min-height: 220px; }
  .plan { padding: 28px 24px; }
  .plan__price { font-size: 40px; }
  .apply { padding: 64px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 14px; }
  .text__title { font-size: clamp(28px, 6vw, 40px); }
  .fee-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fee-table { min-width: 480px; }
  .cms-sidebar__panel { width: calc(100vw - 36px); }
  .cms-sidebar.is-open .cms-sidebar__tab { right: calc(100vw - 36px); }
  .container--narrow { padding: 0 20px; }
}

/* Small phone */
@media (max-width: 380px) {
  .hero__title { font-size: 34px; }
  .lead__title { font-size: 26px; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .nav { padding: 12px 16px; }
  .plan__price { font-size: 36px; }
}

/* ── CMS media picker ─────────────────────────────────────────── */
.cms-imgfield { display:flex; gap:8px; align-items:center; }
.cms-imgfield input { flex:1; }
.cms-mediapicker { position:fixed; inset:0; z-index:9000; display:none; }
.cms-mediapicker.is-open { display:block; }
.cms-mediapicker__backdrop { position:absolute; inset:0; background:rgba(12,12,13,.55); }
.cms-mediapicker__panel { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:min(720px,92vw); max-height:82vh; overflow:auto; background:#fff; border-radius:14px;
  padding:18px 20px; box-shadow:0 24px 60px rgba(0,0,0,.32); }
.cms-mediapicker__top { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.cms-mediapicker__top strong { flex:1; }
.cms-mediapicker__top [data-mp="close"] { background:none; border:none; font-size:24px; cursor:pointer; line-height:1; }
.cms-mediapicker__search { width:100%; margin-bottom:14px; padding:9px 12px; }
.cms-mediapicker__grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; }
.cms-mediapicker__item { padding:0; border:2px solid transparent; border-radius:10px; overflow:hidden; cursor:pointer; background:none; aspect-ratio:4/3; }
.cms-mediapicker__item:hover { border-color:var(--accent,#0096ff); }
.cms-mediapicker__item img { width:100%; height:100%; object-fit:cover; display:block; }
.cms-mediapicker__empty { grid-column:1 / -1; color:#888; text-align:center; padding:24px 0; }

/* ── CMS page-settings panel ──────────────────────────────────── */
.cms-pagesettings { display:flex; flex-direction:column; gap:6px; }
.cms-pagesettings label { font-size:12px; font-weight:600; margin-top:8px; }
.cms-pagesettings input[type=text], .cms-pagesettings textarea { width:100%; padding:7px 9px; font:inherit; }
.cms-inline-check { display:flex; align-items:center; gap:8px; font-weight:500 !important; }
.cms-inline-check input { width:auto; }
.cms-pagesettings__save { margin-top:10px; }
.cms-pagesettings__status { font-size:12px; color:#2a8a4a; min-height:14px; }

/* ── CMS drag-and-drop reorder (edit-mode bonus; sidebar arrows are primary) ── */
body.cms-edit-mode .cms-block { position:relative; }
body.cms-edit-mode .cms-block--dragging { opacity:.45; outline:2px dashed var(--accent,#0096ff); }

/* ── CMS rich-text toolbar ────────────────────────────────────── */
.cms-rt__bar { display:flex; gap:4px; margin-bottom:4px; }
.cms-rt__bar button { padding:3px 9px; border:1px solid var(--border,#ddd); background:#f7f7f8; border-radius:6px; cursor:pointer; font-size:13px; line-height:1.4; }
.cms-rt__bar button:hover { background:#eee; }
.cms-rt textarea { width:100%; }

/* ── News index ───────────────────────────────────────────────── */
.news-card { display:flex; flex-direction:column; text-decoration:none; color:inherit; }
.news-card__photo { display:block; width:100%; aspect-ratio:16/10; background-size:cover; background-position:center; border-radius:10px; margin-bottom:12px; }
.news-card__date { margin-top:auto; font-size:12px; color:var(--muted,#888); padding-top:8px; }
.news-promo {
  display:flex; flex-direction:column; justify-content:center; align-items:center;
  text-align:center; gap:12px;
  background:var(--soft,#f6f3ee);
  border:1px solid var(--line,#e7e3dc);
  border-radius:14px; padding:32px 26px;
}
.news-promo h3 { font-size:19px; line-height:1.25; margin:0; }
.news-promo p { color:var(--muted,#6b6b6b); font-size:14px; line-height:1.5; margin:0; max-width:30ch; }
.news-promo .btn-primary { margin-top:4px; }
.news-pager { display:flex; gap:16px; align-items:center; justify-content:center; margin-top:32px; }
.news-pager__cur { color:var(--muted,#888); font-size:14px; }
.news-index__more { text-align:center; margin-top:24px; }

/* ── News post: full-bleed cream band, article + sidebar (matches the site) ── */
/* .news-body is a normal .section--light band, so it inherits the site's
   --band-pad-y / --section-pad-x padding (clears the hero, full width). */
/* The article+sidebar content sits at 80% width, centered; the cream band
   behind it still spans full width. Hero + CTA bands stay full-bleed. */
.news-body { padding-left: 0; padding-right: 0; }
.news-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 64px; align-items: start;
  max-width: 80%; margin: 0 auto;
}
.news-grid__main { min-width: 0; }
/* In-column blocks read as one cream article: drop their own full-bleed padding
   + surface background; editorial photo+text stacks instead of splitting. */
.news-grid__main .cms-block { background: transparent !important; }
.news-grid__main .section { background: transparent !important; padding: 0 0 28px; }
.news-grid__main .section-head { margin-bottom: 22px; max-width: none; }
.news-grid__main .editorial { grid-template-columns: 1fr; gap: 22px; }
.news-grid__main .editorial__photo { min-height: 300px; border-radius: 12px; }
.news-grid__aside { position: sticky; top: calc(var(--nav-h, 72px) + 24px); display: flex; flex-direction: column; gap: 22px; }
.news-grid--strip { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.news-widget { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.news-widget__title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; color: var(--ink-muted); }
.news-widget__search { display: flex; gap: 8px; }
.news-widget__search input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.news-widget__search .btn-primary { padding: 9px 16px; }
.news-widget__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.news-widget__item a { display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; }
.news-widget__thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 8px; background: var(--line) center/cover no-repeat; }
.news-widget__meta { min-width: 0; }
.news-widget__headline { display: block; font-weight: 600; font-size: 14px; line-height: 1.35; }
.news-widget__item a:hover .news-widget__headline { color: var(--accent); }
.news-widget__date { display: block; font-size: 12px; color: var(--ink-muted); margin-top: 3px; }
.news-widget--cta p { font-size: 14px; line-height: 1.5; color: var(--ink-muted); margin: 0 0 14px; }
@media (max-width: 900px) {
  .news-body { padding-left: var(--section-pad-x); padding-right: var(--section-pad-x); }
  .news-grid { grid-template-columns: 1fr; gap: 32px; max-width: 100%; }
  .news-grid__aside { position: static; }
}

/* ── CMS SEO panel ────────────────────────────────────────────── */
.cms-seo { margin-top:12px; border-top:1px solid var(--border,#e7e3dc); padding-top:12px; }
.cms-seo__label { font-size:12px; font-weight:700; margin-bottom:6px; }
.cms-seo__snippet { background:#fff; border:1px solid var(--border,#e7e3dc); border-radius:8px; padding:10px 12px; }
.cms-seo__url { font-size:12px; color:#3a7d3a; word-break:break-all; }
.cms-seo__title { color:#1a0dab; font-size:15px; line-height:1.3; margin:2px 0; }
.cms-seo__desc { color:#4d5156; font-size:12px; line-height:1.4; }
.cms-seo__checks { list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; }
.cms-seo__chk { font-size:12px; padding-left:18px; position:relative; }
.cms-seo__chk::before { position:absolute; left:0; }
.cms-seo__chk--ok::before   { content:"✓"; color:#2a8a4a; }
.cms-seo__chk--warn::before { content:"!"; color:#b8860b; }

/* ── Editor sidebar: tabs (Content / Page / SEO / Site) ─────── */
.cms-tabs { display:flex; gap:2px; padding:0 12px; border-bottom:1px solid var(--line); }
.cms-tab { flex:1; appearance:none; background:none; border:0; border-bottom:2px solid transparent; padding:12px 4px; font:inherit; font-size:13px; font-weight:600; color:var(--ink-muted); cursor:pointer; transition:color .15s, border-color .15s; }
.cms-tab:hover { color:var(--ink); }
.cms-tab.is-active { color:var(--accent); border-bottom-color:var(--accent); }
.cms-tabpanel { display:none; flex-direction:column; gap:6px; padding:16px 20px; }
.cms-tabpanel.is-active { display:flex; }
/* The page-settings form wraps the Page + SEO panels; show its save bar only
   when one of those tabs is active. */
.cms-pagesettings__bar { display:flex; align-items:center; gap:12px; padding:14px 20px; border-top:1px solid var(--line); }
.cms-sidebar:not([data-active-tab="page"]):not([data-active-tab="seo"]) .cms-pagesettings__bar { display:none; }

/* Inline tooltips — work on hover AND keyboard focus (agents are on phones). */
.cms-tip { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; margin-left:4px; padding:0; border:0; border-radius:50%; background:var(--line); color:var(--ink-muted); font-size:11px; font-weight:700; line-height:1; cursor:help; vertical-align:middle; position:relative; }
.cms-tip:hover, .cms-tip:focus { background:var(--accent); color:#fff; outline:none; }
.cms-tip:hover::after, .cms-tip:focus::after { content:attr(data-tip); position:absolute; bottom:calc(100% + 8px); right:0; width:230px; background:var(--ink); color:#fff; font-size:12px; font-weight:400; line-height:1.45; text-align:left; padding:9px 11px; border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.18); z-index:9600; }

/* Character counter under SEO fields */
.cms-count { font-size:11px; color:var(--ink-muted); align-self:flex-end; min-height:14px; }
.cms-count--ok   { color:#2a8a4a; }
.cms-count--warn { color:#c0392b; }

/* Read-only field (the slug — changed from the full page manager, not inline) */
.cms-input--readonly { background:var(--paper); color:var(--ink-muted); cursor:not-allowed; }

/* Social-card preview (companion to the Google snippet preview) */
.cms-seo__card { margin:8px 0 4px; border:1px solid var(--border,#e7e3dc); border-radius:8px; overflow:hidden; background:#fff; }
.cms-seo__card-img { width:100%; height:120px; background-size:cover; background-position:center; background-color:var(--line); }
.cms-seo__card-img.is-empty { display:flex; align-items:center; justify-content:center; }
.cms-seo__card-img.is-empty::after { content:"No image — add one"; color:var(--ink-muted); font-size:11px; }
.cms-seo__card-body { padding:10px 12px; }
.cms-seo__card-host { font-size:10px; letter-spacing:.05em; color:var(--ink-muted); text-transform:uppercase; }
.cms-seo__card-title { font-size:14px; font-weight:700; color:var(--ink); line-height:1.3; margin:2px 0; }
.cms-seo__card-desc { font-size:12px; color:var(--ink-muted); line-height:1.4; }

/* ── Content tab: Sections manager (the one editing surface) ───── */
.cms-sections { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; }
.cms-section-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.cms-section-row:hover { border-color: var(--accent); }
.cms-section-row.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,150,255,.12); }
.cms-section-row__name { flex: 1; min-width: 0; }
.cms-section-row__name b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cms-section-row__name span { font-size: 11px; color: var(--ink-muted); }
.cms-section-row__controls { display: flex; gap: 2px; flex-shrink: 0; }
.cms-section-row__controls button {
  width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent;
  color: var(--ink-muted); cursor: pointer; font-size: 14px; line-height: 1;
  display: grid; place-items: center; transition: background .12s, color .12s;
}
.cms-section-row__controls button:hover { background: var(--paper); color: var(--ink); }
.cms-section-row__controls button.cms-danger:hover { background: #fdecec; color: #c0392b; }
.cms-sections__add { margin-top: 6px; width: 100%; }
.cms-sections__empty { color: var(--ink-muted); font-size: 13px; padding: 4px 0; }

/* Section edit view — swaps in over the list inside the Content tab. */
.cms-section-edit { padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.cms-section-edit__back {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700;
  cursor: pointer; padding: 0 0 10px;
}
.cms-section-edit__title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 4px; }
.cms-section-edit label { font-size: 12px; font-weight: 600; margin-top: 8px; display: block; }
.cms-section-edit input[type=text], .cms-section-edit textarea, .cms-section-edit select { width: 100%; padding: 7px 9px; font: inherit; }
.cms-section-edit__bar { display: flex; align-items: center; gap: 12px; margin-top: 14px; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 4px; }
.cms-section-edit__status { font-size: 12px; color: #2a8a4a; }

/* ── Agent directory block (.agent-card extends .card) ──────── */
.agent-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.agent-card__photo-wrap { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin-bottom: 16px; flex-shrink: 0; background: var(--line); }
.agent-card__photo-wrap--placeholder { background: var(--line); }
.agent-card__photo { width: 80px; height: 80px; object-fit: cover; display: block; border-radius: 50%; }
.agent-card__name { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.agent-card__title { margin: 0 0 6px; font-size: 14px; color: var(--ink-muted); line-height: 1.4; }
.agent-card__specs { margin: 0 0 12px; font-size: 12px; color: var(--ink-muted); letter-spacing: .03em; }
.agent-card__link { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.agent-card__link:hover { text-decoration: underline; }
.agent-directory-empty { color: var(--ink-muted); font-size: 15px; text-align: center; padding: 40px 0; }
/* Agent-card type badge (team / DBA) */
.agent-card__badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 4px; padding: 2px 7px; margin-bottom: 8px; }
.agent-card__badge--team { background: #e8f0fe; color: #1a56c9; }
.agent-card__badge--dba  { background: #fef3e2; color: #b45d07; }
/* Directory filter chips */
.dir-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.dir-chip { display: inline-block; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-muted); font-size: 13px; font-weight: 500; cursor: pointer; line-height: 1; transition: background .15s, color .15s, border-color .15s; }
.dir-chip:hover { border-color: var(--accent); color: var(--accent); }
.dir-chip--active { background: var(--accent); color: #fff; border-color: var(--accent); }
.cms-seo__chk--bad::before  { content:"✗"; color:#c0392b; }

/* ── Directory sort + show-more controls (#6) ───────────────── */
.dir-controls { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; align-items: flex-start; }
.dir-chips--filter { flex: 1 1 auto; }
.dir-chips--sort { flex: 0 0 auto; }
/* Show-more button */
.dir-showmore { text-align: center; margin-top: 32px; }
.dir-showmore__btn { display: inline-block; padding: 10px 24px; border-radius: 24px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.dir-showmore__btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Team roster block (#7) ─────────────────────────────────── */
/* Linked roster cards use <a> not <div>; extend agent-card for anchor context */
.agent-card--linked { text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.agent-card--linked:hover .agent-card__link { text-decoration: underline; }

/* ── Listings (detail header, filter bar, pager, map) ─────── */
.listing-header .listing-price{ font-size:2rem; font-weight:700; margin:.2em 0; }
.listing-header .listing-stats span{ margin-right:1.25rem; }
.listing-header .listing-addr{ color:var(--ink-muted); }
.listings-filter{ display:flex; flex-wrap:wrap; gap:.6rem; margin:1.25rem 0; }
.listings-filter select,.listings-filter input{ padding:.5rem .7rem; border:1px solid var(--line); border-radius:6px; }
.listings-count{ color:var(--ink-muted); margin:.5rem 0 1rem; }
.listings-pager{ display:flex; gap:.4rem; margin-top:1.5rem; flex-wrap:wrap; }
.listings-pager a{ padding:.4rem .7rem; border:1px solid var(--line); border-radius:6px; }
.listings-pager a.active{ font-weight:700; }
.listings-empty{ padding:2rem 0; color:var(--ink-muted); }
.listing-map{ width:100%; border-radius:8px; overflow:hidden; }
/* Spec sheet — individual `spec` blocks stack into a clean definition grid. */
.spec{ display:grid; grid-template-columns:minmax(120px,35%) 1fr; align-items:baseline; column-gap:1.5rem; row-gap:0; padding:10px 0; border-bottom:1px solid var(--line); }
.spec__label{ color:var(--ink-muted); font-size:13.5px; font-weight:600; line-height:1.4; }
.spec__value{ font-size:14.5px; color:var(--ink); line-height:1.4; }
.agent-card--linked:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }

/* ── Listing page — top zone wrapper ─────────────────────────────────────── */
/* Reduces vertical rhythm between the hero and gallery on listing pages.     */
.listing-top { display: flex; flex-direction: column; }
.listing-top .section { padding-top: 40px; padding-bottom: 40px; }
.listing-top .hero.listing-hero { /* keep hero full height, no override */ }

/* Listing gallery — on listing pages: hero-first-image wide, rest in a grid. */
/* The .listing-top scope means this only fires inside listing detail pages.  */
.listing-top .gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 10px;
}
/* First photo spans the full width — the hero shot */
.listing-top .gallery__tile:first-child {
  grid-column: 1 / -1;
  border-radius: 12px;
}
.listing-top .gallery__tile:first-child img {
  aspect-ratio: 16/7;
  border-radius: 12px;
}
/* Remaining photos: uniform 3/2 cells */
.listing-top .gallery__tile {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.listing-top .gallery__tile img {
  aspect-ratio: 3/2;
  border-radius: 10px;
}
/* Section head (title "Photos") inside listing gallery: compact */
.listing-top .section-head { margin-bottom: 20px; }
.listing-top .section-head h2 { font-size: clamp(18px, 2vw, 24px); font-weight: 700; }

/* Listing detail — 2-column (main + sidebar), stacks on mobile */
.listing-detail{
  display:grid;
  grid-template-columns: minmax(0,1fr) 340px;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 24px 3rem;
  align-items: start;
}
.listing-detail__side{
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Side column — compress section padding on map + lead form cards */
.listing-detail__side .section {
  padding: 24px 28px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
/* The lead form inside the sidebar: hide the full split-photo layout;
   keep only the form portion. The .lead__left photo panel is not useful
   in the narrow sidebar. */
.listing-detail__side .lead { display: block; }
.listing-detail__side .lead__left { display: none; }
.listing-detail__side .lead__right {
  padding: 0;
  background: transparent;
}
.listing-detail__side .lead__title { font-size: clamp(18px, 2vw, 22px); margin-bottom: 12px; }

/* Spec section headings (text_block) inside the main column:
   render as a clean subhead that separates spec groups.             */
.listing-detail__main .section { padding: 0; background: transparent; }
.listing-detail__main .section + .section { margin-top: 2rem; }
.listing-detail__main .text__title {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
/* First spec group: no extra top margin */
.listing-detail__main .section:first-child { margin-top: 0; }

/* Tighten the spec rows in the main column: no max-width cap, flush left */
.listing-detail__main .spec { margin: 0; max-width: none; padding: 9px 0; }
/* Last spec in each group: no bottom hairline */
.listing-detail__main .section .spec:last-of-type { border-bottom: none; }

/* ── bio_links block — link-in-bio button stack ─────────────────────────── */
.bio-links { max-width: 540px; margin: 0 auto; width: 100%; padding: 0 24px; }
.bio-links__head { text-align: center; margin-bottom: 32px; }
.bio-links__head h2 { margin-bottom: 8px; }
.bio-links__head p { color: var(--ink-muted); font-size: 16px; margin: 0; }
.bio-links__stack { display: flex; flex-direction: column; gap: 14px; }
.bio-link-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
  text-decoration: none;
}
.bio-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  border-color: var(--accent);
  color: var(--ink);
}
.section--soft .bio-link-btn, .section--light .bio-link-btn { background: var(--bg); }

/* ── bio_qr block — centered QR code for agent site ────────────────────── */
.bio-qr { max-width: 400px; margin: 0 auto; text-align: center; padding: 0 24px; }
.bio-qr__image-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.bio-qr__img { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 12px; display: block; }
.bio-qr__caption { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.bio-qr__sub { color: var(--ink-muted); font-size: 14px; margin: 0 0 16px; }
.bio-qr__downloads { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.btn-ghost--sm {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.btn-ghost--sm:hover { background: rgba(12,12,13,.04); border-color: var(--ink); color: var(--ink); }

/* ── hero--bio: centered link-in-bio profile card ───────────────────────── *
 *  Replaces the standard full-bleed photo hero on agent /bio pages only.    *
 *  Standard .hero styles do not apply here (layout override via modifier).  *
 *  All values use existing brand tokens — no new palette introduced.        *
 * ─────────────────────────────────────────────────────────────────────────*/

/* Reset the full-screen photo hero defaults for this variant */
.hero--bio {
  min-height: 0;
  background: var(--paper);
  display: block;
  overflow: visible;
  color: var(--ink);
  padding: calc(var(--nav-h) + 48px) 24px 0;
}
/* Suppress the overlay pseudo-element from the base .hero rule */
.hero--bio .hero__bg::after { display: none; }

/* ── Bio inner card — centered single column ── */
.bio-hero__inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

/* ── Avatar ── */
.bio-hero__avatar-wrap {
  margin-bottom: 24px;
}
.bio-hero__avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  /* Full border ring in accent — restrained, premium */
  border: 3px solid var(--line);
  box-shadow: 0 0 0 4px var(--paper), 0 4px 20px rgba(0,0,0,.10);
}
/* Initials fallback: same size/shape as photo avatar */
.bio-hero__avatar--initials {
  background: var(--ink);
  color: var(--paper);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  /* width/height inherited from .bio-hero__avatar */
}

/* ── Identity: name + role·market ── */
.bio-hero__identity {
  margin-bottom: 16px;
}
.bio-hero__name {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 6px;
}
.bio-hero__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ── Quoted bio paragraph ── */
.bio-hero__quote {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 40ch;
  margin: 0 0 32px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  font-style: normal; /* intentional — editorial, not italic */
  position: relative;
}
/* Subtle open-quote glyph above the box — decorative only, not a giant slab */
.bio-hero__quote::before {
  content: '\201C';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  line-height: 1;
  color: var(--line);
  background: var(--paper);
  padding: 0 6px;
}

/* ── Contact action row — equal-width 3-up pill buttons ── */
.bio-hero__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 8px;
}
/* Single button visible (e.g. only phone): collapse to auto-width centered */
.bio-hero__actions:has(:only-child) {
  grid-template-columns: 1fr;
  max-width: 160px;
}
/* Two buttons: 2-col */
.bio-hero__actions:has(> :nth-child(2)):not(:has(> :nth-child(3))) {
  grid-template-columns: repeat(2, 1fr);
  max-width: 280px;
}

.bio-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  /* Equal height — no accidental line-wrap on labels */
  min-height: 72px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.bio-action-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0,150,255,.12);
  transform: translateY(-2px);
  color: var(--ink);
}
.bio-action-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 2px;
}
.bio-action-btn__label {
  white-space: nowrap;
  line-height: 1;
}
/* Phone number sub-line — smaller, muted, intentional second line */
.bio-action-btn__sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-transform: none;
}

/* Graceful reflow on very narrow screens (< 360px) */
@media (max-width: 360px) {
  .bio-hero__actions {
    grid-template-columns: 1fr;
    max-width: 200px;
  }
  .bio-action-btn {
    flex-direction: row;
    gap: 10px;
    padding: 14px 20px;
    min-height: 52px;
    justify-content: flex-start;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
  }
  .bio-action-btn__icon { margin-bottom: 0; }
}

/* ── bio_links: tighten spacing on bio page ── */
.hero--bio ~ .section .bio-links,
.bio-links { max-width: 480px; }

/* Hairline divider between sections on the bio page — clean rhythm */
.hero--bio ~ .section {
  padding-top: 36px;
  padding-bottom: 36px;
}
.hero--bio ~ .section + .section {
  border-top: 1px solid var(--line);
}

/* ── bio_qr refinement: slightly larger, more prominent ── */
.bio-qr__img {
  width: 220px;
  height: 220px;
  border-radius: 16px;
}
.bio-qr__caption {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Listing detail: tablet — sidebar drops below on ≤ 900px */
@media (max-width:900px){
  .listing-detail{ grid-template-columns:1fr; padding:1.5rem 20px 2.5rem; }
  .listing-detail__side{ position:static; }
  /* Gallery on tablet: 2-up grid instead of 3-up */
  .listing-top .gallery { grid-template-columns: repeat(2, 1fr); }
  .listing-top .gallery__tile:first-child img { aspect-ratio: 16/8; }
}
/* Listing detail: phone — 1-up gallery */
@media (max-width:600px){
  .listing-detail{ gap:1.5rem; padding:1rem 16px 2rem; }
  .listing-top .section { padding-top:28px; padding-bottom:28px; }
  .listing-top .gallery { grid-template-columns: 1fr; gap:8px; }
  .listing-top .gallery__tile:first-child { grid-column: auto; border-radius:10px; }
  .listing-top .gallery__tile:first-child img { aspect-ratio:4/3; border-radius:10px; }
  .listing-top .gallery__tile img { aspect-ratio:4/3; }
  .listing-detail__side .section { padding:20px; border-radius:10px; }
}

/* ── Listings import-builder preview (scoped — never affects live pages) ── */
.tr-listing-preview .hero,
.tr-listing-preview .listing-hero { min-height: 380px; }
.tr-listing-preview .listing-detail__side { position: static; }
.tr-listing-preview [data-field].tr-hl { outline: 3px solid var(--accent, #0096ff); outline-offset: 2px; border-radius: 4px; }
.tr-listing-preview .tr-field-cap { position: relative; }

/* ── Listings import-builder: Field map pane ────────────────────────────── */
.import-fieldmap{border:1px solid var(--line,#ccd);border-radius:10px;background:#fff;padding:8px 0;overflow-y:auto;max-height:680px}
.import-fieldmap .fmsec{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted,#667);padding:10px 16px 4px;border-top:1px solid var(--line,#ccd);margin-top:4px}
.import-fieldmap .fmsec:first-child{border-top:none;margin-top:0}
.import-fieldmap .fmrow{display:grid;grid-template-columns:130px 1fr auto;gap:6px 10px;align-items:baseline;padding:4px 16px}
.import-fieldmap .fmrow--warn{background:#fff8e1}
.import-fieldmap .fmlabel{font-size:12px;font-weight:600;color:var(--ink,#111);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.import-fieldmap .fmval{font-size:12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink,#111);word-break:break-all}
.import-fieldmap .fmval--empty{color:var(--muted,#667);font-style:italic;font-family:inherit}
.import-fieldmap .fmsrc{font-size:11px;color:var(--accent,#0070f3);white-space:nowrap;font-weight:500}
.import-fieldmap .fmsrc--warn{color:#b45309;font-weight:600}
