/* =============================================================
   Jessica Mann, Realtor — site styles
   Mobile-first, no framework, no JS for layout.
   Palette is intentionally restrained for a luxury realtor feel.
   ============================================================= */

:root {
  /* Layout / typography — same across all themes */
  --error:        #a23b2c;
  --radius:       4px;
  --shadow-sm:    0 1px 2px rgba(20,24,26,.04), 0 1px 3px rgba(20,24,26,.06);
  --shadow-md:    0 4px 14px rgba(20,24,26,.08);
  --max:          1180px;
  --pad:          clamp(1.25rem, 4vw, 2.5rem);
  --serif:        "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:         "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Default theme = forest. Overridden by [data-theme="..."] on <body>. */
  --bg:           #faf8f4;
  --bg-elev:     #ffffff;
  --ink:          #14181a;
  --ink-soft:    #4a5258;
  --ink-mute:    #8a8f93;
  --line:         #e6e2da;
  --accent:       #2f4a3e;
  --accent-ink:   #1d2f27;
  --accent-soft:  #eef1ec;
  --gold:         #b08a3a;
}

/* -------- THEMES -------------------------------------------------------- */
/* Forest — current/default. Deep evergreen + warm brass on cream.          */
body[data-theme="forest"] {
  --bg: #faf8f4; --bg-elev: #ffffff;
  --ink: #14181a; --ink-soft: #4a5258; --ink-mute: #8a8f93; --line: #e6e2da;
  --accent: #2f4a3e; --accent-ink: #1d2f27; --accent-soft: #eef1ec;
  --gold: #b08a3a;
}
/* Lakeshore — deep navy + soft brass on warm cream. Coastal / classic. */
body[data-theme="lakeshore"] {
  --bg: #f6f4ee; --bg-elev: #ffffff;
  --ink: #11151c; --ink-soft: #3f4a5a; --ink-mute: #7d8390; --line: #e2dfd6;
  --accent: #1f3a5f; --accent-ink: #14263e; --accent-soft: #e7edf4;
  --gold: #b08a3a;
}
/* Charcoal — modern minimal. Deep charcoal + copper on near-white.         */
body[data-theme="charcoal"] {
  --bg: #f7f5f1; --bg-elev: #ffffff;
  --ink: #0e1113; --ink-soft: #3d4348; --ink-mute: #82878c; --line: #e3dfd9;
  --accent: #2a2d31; --accent-ink: #15171a; --accent-soft: #ececea;
  --gold: #b8754a;
}
/* Bordeaux — warm & editorial. Deep burgundy + cream + soft gold.          */
body[data-theme="bordeaux"] {
  --bg: #f8f3ee; --bg-elev: #ffffff;
  --ink: #1a1110; --ink-soft: #54433f; --ink-mute: #8c7e7a; --line: #ebe2da;
  --accent: #6e1f2a; --accent-ink: #4a131a; --accent-soft: #f4e6e6;
  --gold: #c39550;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover, a:focus { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .5em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
p  { margin: 0 0 1em; color: var(--ink-soft); }
.lead { font-size: 1.125rem; color: var(--ink-soft); max-width: 60ch; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: .75rem;
}

/* ---------- layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-title { max-width: 640px; margin-bottom: 2.5rem; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, .92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: -2px;
}
.nav-links { display: none; list-style: none; gap: 2rem; padding: 0; margin: 0; }
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: none;
  position: relative;
}
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--gold);
}
.nav-cta {
  display: none;
  background: var(--accent);
  color: #fff;
  padding: .65rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s ease;
}
.nav-cta:hover, .nav-cta:focus { background: var(--accent-ink); color: #fff; text-decoration: none; }

/* mobile menu */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line);
  width: 42px; height: 42px; border-radius: var(--radius);
  cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; margin: 0; padding: .5rem var(--pad) 1rem; }
.nav-mobile li { border-bottom: 1px solid var(--line); }
.nav-mobile li:last-child { border-bottom: 0; }
.nav-mobile a {
  display: block; padding: 1rem 0;
  color: var(--ink); font-weight: 500;
  text-decoration: none;
}

@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .nav-links, .nav-cta { display: inline-flex; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: .85rem 1.6rem;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--accent-ink); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover, .btn-ghost:focus { background: var(--ink); color: #fff; text-decoration: none; }
.btn-block { display: block; width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    /* dark overlay so the white headline + body stay readable on any photo */
    linear-gradient(180deg, rgba(20,24,26,.65) 0%, rgba(20,24,26,.45) 45%, rgba(20,24,26,.78) 100%),
    /* the photo itself */
    url('/images/hero-bg.jpg') center/cover no-repeat,
    /* fallback color if the photo ever fails to load */
    radial-gradient(ellipse at 30% 20%, #3a5a4a 0%, #1a2a22 60%, #0e1612 100%);
  color: #fff;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(3.5rem, 9vw, 6rem);
  overflow: hidden;
}
.hero::before {
  /* subtle texture: faint horizon line */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(transparent 78%, rgba(255,255,255,.04) 78%, rgba(255,255,255,.04) 79%, transparent 79%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero .eyebrow { color: rgba(255,255,255,.85); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero p.lead { color: rgba(255,255,255,.85); max-width: 56ch; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero-actions .btn-ghost:hover, .hero-actions .btn-ghost:focus { background: #fff; color: var(--ink); }

/* trust strip */
.trust {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 2rem;
  align-items: center;
  text-align: center;
}
.trust-item { font-size: .85rem; color: var(--ink-mute); letter-spacing: .04em; }
.trust-item strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--ink); margin-bottom: .15rem; }
@media (min-width: 720px) {
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- value cards ---------- */
.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card h3 { margin-top: .25rem; }
.card .icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 50%;
  margin-bottom: 1rem;
}
.card .icon svg { width: 20px; height: 20px; }

/* ---------- search section (MLS + home value) ----------
   Two side-by-side cards. The forms submit GET to the brokerage's existing
   IDX endpoints and open in a new tab so visitors don't lose this site. */
.search-section {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.search-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .search-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
}
.search-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.search-card h3 { margin: .25rem 0 .5rem; }
.search-card p { color: var(--ink-mute); margin: 0 0 1.25rem; }
.search-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.search-row input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.search-row input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.search-row .btn { flex: 0 0 auto; }
@media (max-width: 520px) {
  .search-row .btn { width: 100%; }
}

/* Visually hide labels for screen readers without removing them from the DOM. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden; white-space: nowrap;
}

/* ---------- split section (image + text) ---------- */
.split {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .split.flip > :first-child { order: 2; }
}
.split-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
  display: block;
}
/* Empty placeholder div — give it a fixed shape + gradient. */
.split-image.placeholder {
  background: linear-gradient(135deg, #2f4a3e 0%, #1d2f27 100%);
  aspect-ratio: 4/5;
}
/* Real <img> — let the natural aspect ratio decide the height,
   no cropping. Add height: auto in case width/height attrs are present. */
img.split-image {
  height: auto;
}

/* On mobile (and any time there's no side-by-side layout), constrain the
   image so a tall portrait doesn't take over the whole screen. Caps height
   to 65% of viewport, keeps aspect ratio via width: auto, centers in column. */
@media (max-width: 899px) {
  img.split-image {
    max-height: 65vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
  }
}
.split-image::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(176,138,58,.18) 0%, transparent 60%);
}
.split-image.placeholder::before {
  content: "Your photo here"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.55); font-family: var(--serif); font-size: 1.25rem; letter-spacing: .05em;
}

/* ---------- form ---------- */
.form-section {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.form-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 900px) {
  .form-wrap { grid-template-columns: 1fr 1.2fr; gap: 4rem; }
}
.lead-form {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.field { margin-bottom: 1.25rem; }
.field-row {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }

label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .02em;
  margin-bottom: .35rem;
}
label .req { color: var(--error); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .75rem .85rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47,74,62,.15);
}
textarea { min-height: 110px; resize: vertical; }

.field-group {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.field-group legend {
  font-size: .8rem; font-weight: 600;
  color: var(--ink); padding: 0 .35rem;
  text-transform: uppercase; letter-spacing: .12em;
}
.choice-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.choice {
  flex: 1 1 140px;
  display: flex; align-items: center; gap: .65rem;
  padding: .75rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: all .15s ease;
}
.choice input { accent-color: var(--accent); }
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.conditional { display: none; margin-top: 1rem; }
.conditional.show { display: block; }

.consent {
  margin: .25rem 0 1.25rem;
  padding: .85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.consent-label {
  display: flex; align-items: flex-start; gap: .65rem;
  font-size: .82rem; font-weight: 400;
  color: var(--ink-soft); line-height: 1.5;
  margin: 0; cursor: pointer;
}
.consent-label input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 3px;
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-label a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.consent-label a:hover { color: var(--accent-ink); }

.form-status {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  display: none;
}
.form-status.ok    { display: block; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent); }
.form-status.err   { display: block; background: #fbe8e4; color: var(--error); border: 1px solid var(--error); }

.form-side h2 { margin-bottom: 1rem; }
.form-side .contact-line {
  display: flex; align-items: center; gap: .65rem;
  margin: .35rem 0;
  color: var(--ink); font-weight: 500;
}
.form-side .contact-line svg {
  width: 18px; height: 18px; color: var(--accent);
}

/* ---------- footer ---------- */
.site-footer {
  background: #14181a;
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
  font-size: .9rem;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 {
  color: #fff; font-family: var(--sans);
  font-size: .8rem; letter-spacing: .15em; text-transform: uppercase;
  margin: 0 0 .75rem;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-brand { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin-bottom: .25rem; }

/* Bottom strip: brokerage logo (left) + copyright/attribution (right). */
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem; color: rgba(255,255,255,.55);
}
.footer-broker-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: .9;
  transition: opacity .15s ease;
  flex: 0 0 auto;
}
.footer-broker-logo:hover { opacity: 1; }
.footer-broker-logo img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 180px;
}

/* ---------- portal-only styles ---------- */
.portal-bar {
  background: var(--accent-ink); color: #fff;
  padding: .85rem 0; font-size: .85rem;
}
.portal-bar .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.portal-bar a { color: #fff; text-decoration: underline; }

.portal-toolbar {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-bottom: 1.5rem; align-items: center;
}
.theme-toolbar {
  display: flex; flex-wrap: wrap; gap: .75rem;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.theme-toolbar select {
  width: auto; min-width: 240px; padding: .45rem .6rem;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; cursor: pointer;
}
.portal-toolbar input[type="search"] {
  flex: 1 1 220px; max-width: 320px;
}
.portal-toolbar .count {
  margin-left: auto; color: var(--ink-mute); font-size: .9rem;
}

.lead-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.lead-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 760px; }
.lead-table th, .lead-table td {
  text-align: left; padding: .85rem 1rem;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.lead-table th { background: #f5f1e9; font-weight: 600; color: var(--ink); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.lead-table tr:hover td { background: #fbf8f1; }
.badge {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.badge-buyer  { background: #e8efe9; color: var(--accent-ink); }
.badge-seller { background: #f5ecd9; color: #74561a; }
.badge-both   { background: #ece7df; color: #4a3f23; }
.badge-pre    { background: #fff5d6; color: #8a6a14; margin-left: .35rem; }

.btn-delete {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  color: var(--ink-mute);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-delete:hover, .btn-delete:focus {
  color: var(--error);
  background: #fbe8e4;
  border-color: var(--error);
}
.btn-delete:disabled { opacity: .4; cursor: not-allowed; }

/* Click-to-copy email/phone links in the lead table.
   Visual hint (subtle dotted underline) on hover so the affordance is obvious;
   the underlying mailto:/tel: href is preserved for right-click users. */
.copy-link {
  cursor: copy;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.copy-link:hover,
.copy-link:focus {
  color: var(--accent);
  border-bottom: 1px dotted var(--accent);
  outline: none;
}

/* Toast — fixed-position confirmation banner used by portal.js for
   copy-to-clipboard feedback (and any future transient messages). */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent-ink);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  line-height: 1.3;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1000;
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.toast-error {
  background: var(--error);
}

/* utilities */
.muted { color: var(--ink-mute); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* honeypot */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- portal: posts editor (Trix overrides) ---------- */
trix-editor {
  min-height: 380px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
}
trix-editor:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
trix-toolbar {
  margin-bottom: .5rem;
}
trix-toolbar .trix-button-group {
  border-color: var(--line);
  background: var(--bg-elev);
}
trix-toolbar .trix-button {
  border-color: var(--line);
}
trix-editor h1 { font-family: var(--serif); font-size: 1.75rem; margin: 1.25rem 0 .5rem; }
trix-editor h2 { font-family: var(--serif); font-size: 1.4rem; margin: 1.25rem 0 .5rem; }
trix-editor blockquote {
  border-left: 3px solid var(--accent);
  margin-left: 0; padding-left: 1rem;
  color: var(--ink-mute); font-style: italic;
}
trix-editor figure.attachment img,
trix-editor img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* portal: cover image uploader (used on post + event editors).
   Replaces the old "paste a URL" field. Click "Choose image" or drag-and-drop. */
.cover-uploader {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1rem;
  background: var(--bg-elev);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease, background .15s ease;
}
.cover-uploader.cover-uploader-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cover-uploader-preview img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  border-radius: calc(var(--radius) - 4px);
  background: var(--bg);
}
.cover-uploader-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ink-mute);
}
.cover-uploader-empty svg { color: var(--ink-mute); }
.cover-uploader-controls {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* portal posts: small icon-only edit button next to delete */
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  color: var(--ink-mute);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  margin-right: .25rem;
}
.btn-icon:hover, .btn-icon:focus {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ---------- public: blog list page ---------- */
.blog-toolbar {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.blog-toolbar-field {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .9rem;
}
.blog-toolbar-field select {
  padding: .4rem .6rem;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; cursor: pointer;
}

.blog-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.blog-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elev);
}
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1 1 auto;
  display: flex; flex-direction: column;
}
.blog-card-date { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .35rem; }
.blog-card-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 .5rem;
}
.blog-card-title a { color: var(--ink); text-decoration: none; }
.blog-card-title a:hover { color: var(--accent); }
.blog-card-body p { margin: 0 0 .75rem; color: var(--ink-mute); flex: 1 1 auto; }
.blog-card-more { color: var(--accent); font-weight: 600; text-decoration: none; }
.blog-card-more:hover { text-decoration: underline; }

/* ---------- public: single blog post article ---------- */
.blog-article { padding: 2.5rem 0 4rem; }
.blog-article-head { margin: 1.5rem 0 2rem; }
.blog-article-date {
  font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: .5rem;
}
.blog-article-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0;
}
.post-cover {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  display: block;
}
.blog-article-body {
  font-size: 1.075rem;
  line-height: 1.7;
}
.blog-article-body > * { max-width: 100%; }
.blog-article-body p,
.blog-article-body ul,
.blog-article-body ol,
.blog-article-body blockquote { margin-bottom: 1.25rem; }
.blog-article-body h2 {
  font-family: var(--serif);
  font-size: 1.65rem;
  margin: 2.25rem 0 .75rem;
}
.blog-article-body h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 1.75rem 0 .5rem;
}
.blog-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 1.5rem 0;
}
.blog-article-body a { color: var(--accent); }
.blog-article-body blockquote {
  border-left: 3px solid var(--accent);
  margin-left: 0; padding-left: 1.25rem;
  color: var(--ink-mute); font-style: italic;
}
.blog-article-body pre {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-size: .9rem;
}
.blog-article-body code {
  background: var(--bg-elev);
  padding: .15rem .35rem;
  border-radius: 4px;
  font-size: .92em;
}

/* ---------- share bar (bottom of each blog post) ---------- */
.share-bar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}
.share-bar-label {
  font-weight: 600;
  margin-right: .5rem;
  color: var(--ink-mute);
}
.share-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .85rem;
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.share-btn:hover, .share-btn:focus {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  outline: none;
}
.share-btn svg { flex-shrink: 0; }

/* ---------- portal: top-bar nav links ---------- */
.portal-bar a.active {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- public events ---------- */
/* Event card variation on .blog-card. Past events fade slightly. */
.event-card-past { opacity: .7; }
.event-card-location {
  color: var(--ink-mute);
  font-size: .9rem;
  margin: .25rem 0 0;
}

/* "Jessica will be there" / "Worth checking out" badge */
.event-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 999px;
}
.event-badge-attending {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}
.event-badge-recommended {
  background: var(--bg-elev);
  color: var(--ink-mute);
  border: 1px solid var(--line);
}

/* Event meta row on the detail page (date / time / location pills) */
.event-meta {
  display: flex; flex-wrap: wrap; gap: .75rem 1.25rem;
  margin-top: 1rem;
  font-size: .95rem;
  color: var(--ink-mute);
}
.event-meta-item {
  display: inline-flex; align-items: center; gap: .4rem;
}
.event-meta-item svg { color: var(--accent); }

/* ---------- public reviews ---------- */
.reviews-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
@media (min-width: 760px) {
  .reviews-stats { grid-template-columns: 1fr 1fr; align-items: center; }
}
.reviews-stats-block {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.reviews-stats-google {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
@media (min-width: 760px) {
  .reviews-stats-google { border-top: 0; border-left: 1px solid var(--line); padding-top: 0; padding-left: 1.25rem; }
}
.reviews-stats-stars { color: var(--accent); display: inline-flex; gap: 1px; }
.reviews-stats-text { font-size: .95rem; }
.reviews-stats-text strong { font-size: 1.4rem; color: var(--ink); margin-right: .15rem; font-family: var(--serif); }

.leave-google-row {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.reviews-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }
.review-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column;
  gap: .75rem;
}
.review-stars { color: var(--accent); display: inline-flex; gap: 2px; }
.review-body {
  margin: 0;
  border: 0;
  padding: 0;
  font-style: italic;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
  flex: 1 1 auto;
}
.review-meta { font-size: .85rem; color: var(--ink-mute); margin-top: auto; }

/* ---------- star picker (form input) ---------- */
.star-picker.star-picker-built {
  display: inline-flex; gap: .25rem; padding: 0;
}
.star-picker-fallback {
  display: inline-block;
  margin-right: .5rem;
}
.star-picker.star-picker-built .star-picker-fallback { display: none; }
.star-btn {
  background: transparent;
  border: none;
  padding: .25rem;
  cursor: pointer;
  color: var(--ink-mute);
  border-radius: 4px;
  transition: color .12s ease, transform .12s ease;
}
.star-btn:hover, .star-btn:focus {
  color: var(--accent);
  outline: none;
  transform: scale(1.1);
}
.star-btn-filled svg { fill: currentColor; }
.star-btn.star-btn-filled { color: var(--accent); }

/* ---------- portal: review moderation cards ---------- */
.review-mod-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.review-mod-pending {
  border-left: 4px solid var(--accent);
  background: var(--bg-elev);
}
.review-mod-head {
  display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: .5rem;
  margin-bottom: .75rem;
}
.review-mod-head strong { margin-right: .5rem; }
.review-mod-stars { color: var(--accent); font-size: .85rem; display: inline-flex; align-items: center; gap: .35rem; }
.review-mod-body {
  margin: 0 0 1rem;
  border-left: 3px solid var(--line);
  padding-left: 1rem;
  font-style: italic;
  color: var(--ink);
}
.review-mod-actions {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}
.btn-sm {
  padding: .4rem .85rem;
  font-size: .85rem;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
