/* charlestonhomes.org — design system v1.4: the BACK of the SC Symbols Deck cards
   (silver security paper, indigo guilloche, a thin holographic foil). Palette from content-package/DESIGN/site-colors.css.
   Indigo #112A58 primary · deep #0B1C3E · paper #F1F3F8 · mist #C6D4EA · silver #AFBDD7 · steel #6F81A7 (lines only) · slate #40547E (meta text)
   No red (principal, 2026-10-20). Stripes and dividers use the card back's double rule: 2px indigo, 3px white gap, 1px steel.
   The dark linen of the card FRONTS appears only inside the card window itself — never as page design.
   No animations or transitions anywhere, except the deck card's click-to-flip (cross-fade under reduced motion). */

:root {
  --primary: #112A58;
  --primary-dark: #0B1C3E;
  --red: #112A58; /* retired: red removed sitewide 2026-10-20; kept as an alias of indigo */
  --red-tint: #E9EDF5;
  --double-rule-top: inset 0 2px 0 #112A58, inset 0 5px 0 #FFFFFF, inset 0 6px 0 #6F81A7;
  --double-rule-bottom: inset 0 -2px 0 #112A58, inset 0 -5px 0 #FFFFFF, inset 0 -6px 0 #6F81A7;
  --double-rule-left: inset 2px 0 0 #112A58, inset 5px 0 0 #FFFFFF, inset 6px 0 0 #6F81A7;
  --white: #FFFFFF;
  --paper: #F1F3F8;
  --alt: #FFFFFF;
  --accent: #C6D4EA;
  --text: #0B1C3E;
  --muted: #40547E;
  --border: #AFBDD7;
  --steel: #6F81A7;
  --silver: #AFBDD7;
  --foil: linear-gradient(100deg, #c6d4ea 0%, #b9c7f0 22%, #d9c8f2 40%, #bfe6ef 58%, #e6d3ee 76%, #c6d4ea 100%);
  --display: "Libre Caslon Display", "Big Caslon", "Book Antiqua", Georgia, serif;
  --error: #8A1C1C;
  --error-bg: #FBEAEA;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; animation: none !important; transition: none !important; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font); font-size: 18px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; color: var(--primary); margin: 0 0 .6em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .005em; }
h1 { line-height: 1.12; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }
p, ul, ol, dl { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); text-decoration-thickness: 3px; }
a:active { background: var(--accent); }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -0.2em; flex: none; }

.skip-link { position: absolute; left: 8px; top: -100px; background: var(--primary); color: #fff; padding: 12px 16px; z-index: 10; }
.skip-link:focus { top: 8px; }

/* ---------- Header + nav (always visible, no hamburger) ---------- */
.site-header { box-shadow: var(--double-rule-top); padding-top: 6px; background: var(--white); }
.main-nav { border-bottom: 3px solid transparent; border-image: var(--foil) 1; }
.header-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 10px; }
.brand { text-decoration: none; display: flex; flex-direction: column; color: var(--primary); }
.brand-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.brand-tag { font-size: 1rem; color: var(--text); }
.header-phone { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 700; font-size: 1.1rem; }
.main-nav { background: var(--primary); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0; margin: 0 auto; }
.nav-list li { flex: 1 1 auto; }
.nav-list a { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 14px; color: #fff; font-weight: 700; text-decoration: none; text-align: center; }
.nav-list a:hover { background: var(--primary-dark); text-decoration: underline; color: #fff; }
.nav-list a:active { background: #08152E; }
.nav-list a[aria-current="page"] { background: var(--white); color: var(--primary); box-shadow: var(--double-rule-bottom); }
.nav-list a:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.nav-list a[aria-current="page"]:focus-visible { outline-color: var(--primary); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { background: var(--alt); border-bottom: 1px solid var(--accent); font-size: 1rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 10px; padding-bottom: 10px; margin-bottom: 0; }
.breadcrumbs li + li::before { content: "›"; margin: 0 8px 0 4px; color: var(--muted); }
.breadcrumbs a { display: inline-block; padding: 4px 0; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section.alt, .alt { background: var(--alt); }
.page-head { padding: 40px 0 24px; }
.lead { font-size: 1.2rem; max-width: 860px; }
/* security-paper guilloche, very faint — the card back, not the front */
.hero { padding: 40px 0 48px; background-color: var(--white); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120' viewBox='0 0 240 120'%3E%3Cg fill='none' stroke='%236F81A7' stroke-opacity='.13' stroke-width='.8'%3E%3Cpath d='M0 60 C40 20 80 20 120 60 S200 100 240 60'/%3E%3Cpath d='M0 70 C40 30 80 30 120 70 S200 110 240 70'/%3E%3Cpath d='M0 50 C40 10 80 10 120 50 S200 90 240 50'/%3E%3Cpath d='M0 80 C40 40 80 40 120 80 S200 120 240 80'/%3E%3Cpath d='M0 40 C40 0 80 0 120 40 S200 80 240 40'/%3E%3C/g%3E%3C/svg%3E"); border-bottom: 3px solid transparent; border-image: var(--foil) 1; }
.hero h1 { max-width: 900px; }
.two-col { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two-col { grid-template-columns: 3fr 2fr; align-items: start; } }

/* ---------- Buttons (48px+ targets, always text-labeled) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px; border-radius: var(--radius); border: 2px solid var(--primary); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; text-decoration: underline; }
.btn-primary:active { background: #08152E; }
.btn-secondary, .btn-voice { background: var(--white); color: var(--primary); }
.btn-secondary:hover, .btn-voice:hover { background: var(--accent); color: var(--primary-dark); text-decoration: underline; }
.btn-secondary:active, .btn-voice:active { background: #AFBDD7; }
.btn-lg { min-height: 60px; padding: 14px 28px; font-size: 1.2rem; }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; background: #E6E6E6; border-color: #8A8A8A; color: #3A3A3A; text-decoration: none; }
.btn-voice[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .cards-3, .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--white); border: 2px solid var(--accent); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.card > .btn, .card > .soon { margin-top: auto; align-self: flex-start; }
.card-h { font-size: 1.3rem; display: flex; gap: 8px; align-items: flex-start; }
.card .icon { color: var(--primary); }
.alt .card { border-color: var(--border); }
.meta { margin-bottom: .5em; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--text); font-size: 1rem; font-weight: 700; padding: 2px 12px; border-radius: 6px; align-self: flex-start; margin-bottom: .6em; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.soon { display: inline-flex; gap: 8px; align-items: center; min-height: 48px; padding: 8px 16px; border: 2px dashed #6B6B6B; border-radius: var(--radius); color: #3A3A3A; font-weight: 700; margin: 0; }
.placeholder-val { color: var(--muted); font-style: italic; }
[hidden] { display: none !important; }

.photo-ph { aspect-ratio: 16 / 9; background: var(--accent); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text); margin-bottom: 12px; text-align: center; padding: 12px; }
.photo-ph .icon { color: var(--primary); }

/* ---------- Trust + teaser strips ---------- */
.trust-strip { background: var(--white); border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.trust-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; padding-top: 20px; padding-bottom: 8px; }
.trust-items p { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.trust-items .icon { color: var(--primary); width: 1.5em; height: 1.5em; }
.teaser { background: var(--accent); padding: 18px 0; }
.teaser p { margin: 0; font-size: 1.15rem; }

/* ---------- CTA band (one primary CTA per page) ---------- */
.cta-band { background: var(--alt); box-shadow: var(--double-rule-top); padding: 48px 0; text-align: center; }
.cta-band .narrow { display: flex; flex-direction: column; align-items: center; }
.cta-phone { margin: 14px 0 0; }

/* ---------- Stats + tables ---------- */
.stat-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--white); border: 2px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; }
.stat-label { font-size: 1rem; color: var(--muted); }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.stat-note { font-size: 1rem; }
.table-wrap { overflow-x: auto; margin-bottom: 20px; }
.compare { width: 100%; border-collapse: collapse; background: var(--white); min-width: 520px; }
.compare caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.compare th, .compare td { border: 1px solid var(--border); padding: 12px 14px; text-align: left; vertical-align: top; }
.compare thead th { background: var(--primary); color: #fff; }
.compare tbody th { background: var(--paper); }

.check-list { list-style: none; padding: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.check-list .icon { color: var(--primary); margin-top: .25em; }
.steps li { margin-bottom: 8px; }
.link-grid { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.link-grid a { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }

.fact-box { background: var(--alt); border: 2px solid var(--accent); border-left: 6px solid var(--primary); border-radius: var(--radius); padding: 22px; }
.section.alt .fact-box { background: var(--white); }
.fact-box h3 { margin-top: 1em; display: flex; gap: 8px; align-items: center; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.owner-box h2 { display: flex; gap: 8px; align-items: center; }

.callout { background: var(--accent); border-left: 6px solid var(--primary); border-radius: var(--radius); padding: 22px; }
.callout-section { padding-bottom: 0; }
.content-slot { border-left: 4px dashed var(--border); padding-left: 16px; }
.fine { font-size: 1rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq details { border: 2px solid var(--accent); border-radius: var(--radius); margin-bottom: 12px; background: var(--white); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; min-height: 48px; list-style-position: inside; }
.faq summary:hover { background: var(--paper); text-decoration: underline; }
.faq details[open] summary { background: var(--accent); }
.faq details p { padding: 12px 18px 4px; margin: 0 0 1em; }

/* ---------- Timeline + gallery ---------- */
.timeline { list-style: none; padding: 0; border-left: 4px solid var(--primary); }
.timeline li { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 0 0 20px 20px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -12px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 4px solid var(--primary); }
.tl-year { font-weight: 800; font-size: 1.2rem; color: var(--primary); }
.timeline h3 { color: var(--text); margin-bottom: .2em; }
.gallery { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gallery figure { margin: 0; border: 2px solid var(--accent); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.gallery figcaption { padding: 10px 14px; font-weight: 700; }

/* ---------- Forms ---------- */
.stack-form { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 700; }
.req { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 18px; color: var(--text); background: var(--white); border: 2px solid #6F81A7; border-radius: 8px; padding: 10px 12px; min-height: 48px; width: 100%; }
input:hover, select:hover, textarea:hover { border-color: var(--primary); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
input[aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }
.field-error { color: var(--error); font-weight: 700; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { font-weight: 700; margin: 0; min-height: 1.6em; }
.status.is-busy { color: var(--text); }
.status.is-ok { color: var(--primary); background: var(--accent); padding: 10px 14px; border-radius: 8px; }
.status.is-error { color: var(--error); background: var(--error-bg); padding: 10px 14px; border-radius: 8px; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 24px; }
.filter select { width: auto; min-width: 260px; }
.filter .status { flex-basis: 100%; }

.contact-side { background: var(--alt); border-radius: var(--radius); padding: 24px; }
.big-phone { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 800; min-height: 60px; }
.trustscore-ph { border: 2px dashed var(--border); border-radius: var(--radius); padding: 16px; background: var(--white); }
.trustscore-ph p { display: flex; gap: 8px; align-items: center; }

/* ---------- The Charleston Match ---------- */
.match { background: var(--white); border: 3px solid var(--primary); border-radius: 14px; padding: 24px; margin-top: 24px; }
.match-title { font-size: 1.5rem; margin-bottom: .3em; }
.match-prompt { display: block; font-size: 1.35rem; margin-bottom: 4px; }
.hint { margin-bottom: 10px; }
.match textarea { font-size: 1.2rem; min-height: 110px; }
.match-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 10px; }
.match-actions .btn { flex: 1 1 240px; }
/* 2-minute voice recorder: state, countdown and Clear, under the buttons */
.voice-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--border, #C6D4EA); border-radius: 8px; background: #F1F3F8; font-size: 1.05rem; }
.voice-bar[hidden] { display: none; }
.voice-dot { width: 12px; height: 12px; border-radius: 50%; background: #6F81A7; flex: none; }
.voice-bar[data-state="recording"] .voice-dot { background: var(--sc-indigo, #112A58); animation: voice-pulse 1.2s ease-in-out infinite; }
.voice-state { font-weight: 700; color: var(--primary, #112A58); }
.voice-clock { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.2rem; }
.voice-bar[data-state="done"] .voice-clock { color: var(--sc-indigo, #112A58); text-decoration: underline; }
.voice-clear { margin-left: auto; background: none; border: 0; padding: 6px 0; min-height: 44px; color: var(--primary, #112A58); text-decoration: underline; font: inherit; cursor: pointer; }
.voice-clear:hover { color: var(--sc-slate, #40547E); }
@keyframes voice-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .voice-bar[data-state="recording"] .voice-dot { animation: none; } }
.match-results { margin-top: 24px; border-top: 2px solid var(--accent); padding-top: 24px; }
.understood { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.chip { background: var(--accent); border-radius: 6px; padding: 4px 14px; font-weight: 700; font-size: 1rem; }
.match-card .why { font-weight: 700; }
.match-card .rank { font-size: 1rem; font-weight: 700; color: var(--muted); }
.report { margin-top: 32px; background: var(--alt); border-radius: var(--radius); padding: 22px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #fff; padding: 40px 0 20px; margin-top: 0; box-shadow: var(--double-rule-top); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--silver); }
.site-footer a:focus-visible { outline-color: #fff; }
.site-footer .btn-secondary { color: var(--primary); }
.site-footer .btn-secondary:hover { color: var(--primary-dark); }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li a { display: inline-block; padding: 6px 0; }
.footer-social { columns: 2; column-gap: 16px; }
/* the Match: who they are sets the path */
.match.who-55 .mq-form > .mq[data-q="where"], .match.who-sell .mq-form > .mq:not([data-q="who"]),
.match.who-sell .mq-more, .match.who-sell .match-actions, .match.who-55 .places-h, .match.who-55 [data-match-cards], .match.who-55 [data-match-map-wrap] { display: none !important; }
.mq[data-q="who"] .mq-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mq[data-q="who"] .mq-opt.mq-img { max-width: none; }
@media (max-width: 760px) { .mq[data-q="who"] .mq-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mq[data-q="who"] .mq-opt.mq-img b { font-size: .86rem; line-height: 1.25; padding: 7px 6px; overflow-wrap: anywhere; hyphens: auto; } }
.mq-from { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; }
.mq-from[hidden] { display: none; }
.mq-from select { min-height: 44px; max-width: 100%; }
.report-done { background: #F4EEDD; border: 2px solid #D8CDB0; padding: 14px 16px; margin: 14px 0; }
.report-done h3 { margin-top: 0; }
.footer-social a { white-space: nowrap; }
.footer-brand { font-size: 1.3rem; font-weight: 800; }
.footer-h { font-weight: 800; color: var(--silver); }
.footer-phone { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 1.2rem; min-height: 48px; }
.footer-legal { border-top: 1px solid #3D5A86; margin-top: 16px; padding-top: 16px; font-size: 1rem; color: #E6ECF5; }

@media print { .main-nav, .match-actions, .site-footer .btn { display: none; } }

/* ---------- Maps (v1.2) ---------- */
.map-figure { margin: 0 0 28px; }
.map { width: 100%; height: 300px; background: var(--alt); border: 2px solid var(--accent); border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.map.leaflet-container { display: block; font: inherit; font-size: 1rem; }
.map-note { margin: 0; padding: 16px; text-align: center; color: var(--muted); }
.map-figure figcaption { font-size: 1rem; padding-top: 8px; }
.gmap { width: 100%; height: 300px; border: 2px solid var(--accent); border-radius: var(--radius); display: block; }
.map-label { font-size: 0.85rem; font-weight: 700; color: var(--text); padding: 2px 6px; border-color: var(--border); box-shadow: none; }
.map-label-strong { font-size: 0.95rem; border: 2px solid var(--primary); }
.map-label-region { background: rgba(255,255,255,.9); font-size: 1rem; border: 0; }
.map-label::before { display: none; }
.map-legend { background: #fff; border: 2px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; line-height: 1.4; max-width: 220px; }
.map-legend strong { display: block; margin-bottom: 4px; }
.map-key { display: flex; align-items: center; gap: 6px; }
.map-key i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--text); flex: none; }
.map-legend-note { display: block; margin-top: 4px; font-style: italic; color: var(--muted); }
.map-ring-label { font-size: 0.8rem; font-weight: 700; color: var(--text); background: rgba(255,255,255,.85); border-radius: 4px; text-align: center; line-height: 20px; }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 22px !important; }
.leaflet-control-attribution { font-size: 0.75rem; }

/* ---------- Content-package prose (corridor, regions, hidden-gem pages) ---------- */
.prose h3 { margin-top: 1.6em; }
.prose h4 { margin: 1.4em 0 .5em; font-size: 1.1rem; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose li ul { margin-top: .45em; }
.prose .table-wrap { margin: 8px 0 22px; }
.prose blockquote { margin: 0 0 1em; padding: 12px 18px; border-left: 4px solid var(--primary); background: var(--paper); }
.page-head .lead p { font-size: 1.2rem; }
.chatbot-slot { margin-top: 24px; }
.chatbot-slot:empty { display: none; }
.prose p, .prose li, .prose td { overflow-wrap: anywhere; }

/* ---------- News (addendum v1.4) ---------- */
.news-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .news-grid { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.news-col select { margin: 4px 0 12px; }
.news-list { list-style: none; padding: 0; margin: 0 0 12px; }
.news-list li { padding: 10px 0; border-bottom: 1px solid var(--accent); }
.news-list li:last-child { border-bottom: 0; }
.news-list a { font-weight: 700; display: inline-block; }
.news-meta { display: block; font-size: 1rem; color: var(--muted); }
.news-empty { color: var(--muted); font-style: italic; }
.news-cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .news-cols { grid-template-columns: 1fr 1fr; } }
.news-module h3 { margin-top: 0; }
.match-results .news-module { margin-top: 24px; }

/* ---------- SC Symbols Deck window (one card per page, last section before the footer) ---------- */
.deck-section { padding: 48px 0; background: var(--white); border-top: 1px solid var(--accent); }
.deck-panel { position: relative; display: grid; gap: 28px; grid-template-columns: 1fr; background: var(--white); border: 2px solid var(--accent); border-left: 6px solid var(--red); border-radius: var(--radius); padding: 28px 24px 24px; }
.deck-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--foil); border-radius: 6px 6px 0 0; }
@media (min-width: 860px) { .deck-panel { grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; } }
.deck-card-col { text-align: center; }
.deck-card { display: block; width: 100%; max-width: 340px; margin: 0 auto; aspect-ratio: 5 / 7; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1600px; border-radius: 22px; }
.deck-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 6px; }
/* the one permitted motion on the site: a flip, only when the visitor asks for it */
.deck-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s ease !important; }
.deck-card.is-flipped .deck-inner { transform: rotateY(180deg); }
.deck-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; backface-visibility: hidden; -webkit-backface-visibility: hidden; filter: drop-shadow(0 6px 14px rgba(11, 28, 62, .22)); }
.deck-back { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) {
  .deck-inner { transform: none !important; transition: none !important; }
  .deck-face { transform: none; backface-visibility: visible; -webkit-backface-visibility: visible; transition: opacity .35s ease !important; }
  .deck-back { opacity: 0; }
  .deck-card.is-flipped .deck-front { opacity: 0; }
  .deck-card.is-flipped .deck-back { opacity: 1; }
}
.deck-hint { font-size: 1rem; color: var(--muted); margin: 12px 0 0; }
.deck-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; font-weight: 700; color: var(--sc-slate, #40547E); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4em; }
.deck-story h2 { margin-bottom: .2em; }
.deck-meta { color: var(--muted); font-style: italic; }
.deck-retired { background: var(--red-tint); color: var(--red); }
.deck-sources { font-size: 1rem; color: var(--muted); border-top: 1px solid var(--accent); padding-top: 12px; overflow-wrap: anywhere; }

/* ---------- Today in South Carolina ---------- */
.today-strip { background: var(--white); border-bottom: 1px solid var(--accent); padding: 14px 0; }
.today-strip p { margin: 0; font-size: 1.1rem; }
.today-strip .icon, .today-type .icon { color: var(--sc-slate, #40547E); }
.today-datebar { display: grid; gap: 8px; margin-bottom: 20px; }
.today-date { font-family: var(--display); font-size: 1.5rem; color: var(--primary); margin: 0; }
.today-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.today-controls input { width: auto; }
.today-lead { position: relative; display: grid; gap: 20px; grid-template-columns: 1fr; background: var(--white); border: 2px solid var(--accent); border-left: 6px solid var(--red); border-radius: var(--radius); padding: 26px 24px 22px; margin-bottom: 28px; }
.today-lead::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--foil); border-radius: 6px 6px 0 0; }
@media (min-width: 760px) { .today-lead:has(.today-card) { grid-template-columns: 1fr 200px; align-items: start; } }
.today-lead h2 { margin: 0 0 .3em; }
.today-type { font-size: .95rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .3em; }
.today-cite { font-size: 1rem; color: var(--muted); }
.today-note { font-size: 1rem; font-style: italic; color: var(--muted); }
.today-card { margin: 0; }
.today-card img { max-width: 200px; margin: 0 auto; filter: drop-shadow(0 4px 10px rgba(11, 28, 62, .2)); }
.today-card figcaption { font-size: .95rem; color: var(--muted); text-align: center; margin-top: 6px; }
.today-list { list-style: none; padding: 0; }
.today-list li { padding: 12px 0; border-bottom: 1px solid var(--accent); }
.today-list h3 { margin: 0 0 .2em; color: var(--text); }
.today-month { border: 2px solid var(--accent); border-radius: var(--radius); background: var(--white); margin-bottom: 10px; }
.today-month summary { cursor: pointer; padding: 12px 16px; font-weight: 700; min-height: 48px; }
.today-month summary:hover { background: var(--paper); text-decoration: underline; }
.today-month .table-wrap { padding: 0 12px 12px; margin: 0; }
.today-count { font-weight: 400; color: var(--muted); }

/* ---------- Animation (click to play; nothing autoplays) ---------- */
.animation-figure { margin: 8px 0 28px; }
.animation-box { aspect-ratio: 16 / 9; width: 100%; border: 2px solid var(--accent); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.animation-cover { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; background-color: var(--white); background-image: var(--foil); background-size: 100% 4px; background-repeat: no-repeat; }
.animation-title { font-family: var(--display); font-size: 1.8rem; color: var(--primary); margin: 0; }
.animation-frame { width: 100%; height: 100%; border: 0; display: block; }
.animation-figure figcaption { font-size: 1rem; padding-top: 8px; }

.footer-story { font-size: 1rem; color: #DCE3F0; }

/* ==========================================================================
   CARD-BACK FRAME (v1.5) — the website as the back of a deck card:
   an indigo guilloche frame around the whole page, a white + silver double rule inside it,
   framed panels with engraved texture and indigo corner blocks, guilloche bands top and bottom.
   ========================================================================== */
:root {
  --guilloche-dark: url("/assets/guilloche-on-indigo.svg");
  --guilloche-light: url("/assets/guilloche-on-paper.svg");
  --corner: linear-gradient(var(--primary), var(--primary));
}
/* the outer frame */
html { background: var(--primary-dark) var(--guilloche-dark) center / 240px 48px; min-height: 100%; }
/* NOTE: no overflow on body — browsers propagate it to the window and it would block page scrolling.
   The rounded frame corners are clipped on the header and footer instead. */
body { margin: 12px; border-radius: 22px; min-height: calc(100vh - 24px);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--silver), 0 0 0 5px var(--primary); }
@media (max-width: 600px) { body { margin: 6px; border-radius: 14px; min-height: calc(100vh - 12px); } }

/* top band: white engraved paper, then the indigo strip with guilloche (like the card's title bar) */
.site-header { background: var(--white) var(--guilloche-light) center / 240px 48px; }
.main-nav { background: var(--primary) var(--guilloche-dark) center / 240px 48px; box-shadow: inset 0 2px 0 rgba(255,255,255,.55); }
.nav-list a[aria-current="page"] { background: var(--white) var(--guilloche-light) center / 240px 48px; }

/* page heads read like the card's window */
.page-head { background: var(--white) var(--guilloche-light) center / 240px 48px; border-bottom: 3px solid transparent; border-image: var(--foil) 1; }
.hero { background-image: var(--guilloche-light); background-size: 240px 48px; }

/* framed panels — indigo edge, white then silver inner rules, engraved texture, four small indigo corner blocks */
.card, .fact-box, .stat, .match, .report, .contact-side, .callout, .today-lead, .deck-panel, .animation-box, .news-col {
  position: relative;
  border: 2px solid var(--primary);
  border-radius: 14px;
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4px var(--silver);
  background-color: var(--white);
  background-image: var(--corner), var(--corner), var(--corner), var(--corner), var(--guilloche-light);
  background-size: 9px 9px, 9px 9px, 9px 9px, 9px 9px, 240px 48px;
  background-position: left 8px top 8px, right 8px top 8px, left 8px bottom 8px, right 8px bottom 8px, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
}
.fact-box { border-left-width: 2px; }
.deck-panel, .today-lead { box-shadow: var(--double-rule-left); padding-left: 30px; }
.alt .card { border-color: var(--primary); }
.faq details, .today-month { border: 2px solid var(--primary); box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4px var(--silver); }
.cta-band { background: var(--white) var(--guilloche-light) center / 240px 48px; box-shadow: var(--double-rule-top), var(--double-rule-bottom); }
.map, .gmap { border: 2px solid var(--primary); box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--silver); }

/* bottom band: indigo guilloche with the mottoes, as on the card's edges */
.site-footer { background: var(--primary-dark) var(--guilloche-dark) center / 240px 48px; }
.footer-motto { margin: 26px 0 0; padding: 10px 16px; text-align: center; font-family: var(--display); font-size: 1.05rem; letter-spacing: .2em; text-transform: uppercase; color: var(--silver); border-top: 1px solid #3D5A86; border-bottom: 1px solid #3D5A86; }

/* the card: upper-left corner of the page, under the navigation strip */
.wrap.has-deck { max-width: var(--wrap); display: grid; gap: 22px 32px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .wrap.has-deck { grid-template-columns: 250px 1fr; } }
.deck-corner { max-width: 180px; }
@media (min-width: 860px) { .deck-corner { max-width: none; } }
.deck-corner .deck-card { max-width: 250px; margin: 0; }
.deck-corner .deck-hint { text-align: left; margin-top: 10px; }
.deck-jump { font-size: 1rem; margin: 2px 0 0; }
.deck-head > :first-child { margin-top: 0; }
@media (min-width: 860px) { .deck-panel { grid-template-columns: 1fr; } }

/* ---------- About: On-Site Real Estate Agent, click to read more ---------- */
.agent-section { border-top: 1px solid var(--accent); }
.read-more { margin-top: 8px; }
.read-more summary { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 22px; border: 2px solid var(--primary); border-radius: var(--radius); background: var(--white); color: var(--primary); font-weight: 700; cursor: pointer; list-style: none; }
.read-more summary::-webkit-details-marker { display: none; }
.read-more summary::after { content: "▾"; margin-left: 10px; }
.read-more[open] summary::after { content: "▴"; }
.read-more summary:hover { background: var(--accent); text-decoration: underline; }
.read-more .when-open, .read-more[open] .when-closed { display: none; }
.read-more[open] .when-open { display: inline; }
.read-more[open] summary { margin-bottom: 18px; }
.read-more .timeline h4 { color: var(--text); margin: 0 0 .2em; font-size: 1.15rem; }
.check-list li > span { flex: 1; }

/* ---------- Home hero: real-estate photo, headline and the Charleston Match search on top (Zillow-style) ---------- */
.hero.hero-photo { position: relative; min-height: 460px; padding: 40px 0 56px; background-color: var(--primary-dark);
  background-image: linear-gradient(90deg, rgba(11,28,62,.88) 0%, rgba(11,28,62,.66) 36%, rgba(11,28,62,.22) 60%, rgba(11,28,62,0) 74%), url("/images/hero/charleston-home-hero.jpg");
  background-size: cover; background-position: center right; background-repeat: no-repeat; }
.hero-photo h1 { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.5); max-width: 520px; }
.hero-photo .deck-head { max-width: 470px; }
@media (min-width: 1400px) { .hero-photo .deck-head { max-width: 540px; } }
.hero-photo .deck-hint, .hero-photo .deck-jump a { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.hero-photo .match { margin-top: 18px; box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4px var(--silver), 0 10px 30px rgba(11,28,62,.35); }
.hero-credit { position: absolute; right: 14px; bottom: 10px; margin: 0; font-size: .8rem; color: #fff; background: rgba(11,28,62,.6); padding: 2px 8px; border-radius: 4px; }
/* phones: the photo becomes a banner at the top, content below it on white paper */
@media (max-width: 859px) {
  .hero.hero-photo { min-height: 0; background-color: var(--white); background-image: url("/images/hero/charleston-home-hero-800.jpg");
    background-size: 100% auto; background-position: top center; padding-top: calc((100vw - 12px) * .485 + 20px); }
  .hero-photo h1 { color: var(--primary); text-shadow: none; }
  .hero-photo .deck-hint { color: var(--muted); text-shadow: none; }
  .hero-photo .deck-jump a { color: var(--primary); text-shadow: none; }
  .hero-credit { top: calc((100vw - 12px) * .485 - 30px); bottom: auto; }
  .hero-photo .hero-lead { color: var(--text); text-shadow: none; }
  .hero-photo .btn-hero-alt { color: var(--primary); border-color: var(--primary); background: #fff; }
  .hero-how { background: #fff; color: var(--text); }
}

/* rounded frame corners without clipping the page (see note on body) */
.site-header { border-radius: 22px 22px 0 0; overflow: hidden; }
.site-footer { border-radius: 0 0 22px 22px; }
@media (max-width: 600px) { .site-header { border-radius: 14px 14px 0 0; } .site-footer { border-radius: 0 0 14px 14px; } }

/* ---------- Deck v2: small card opens large; uniform full read ---------- */
.deck-thumb { display: block; width: 100%; max-width: 250px; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; }
.deck-thumb img { width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(11, 28, 62, .25)); }
.deck-thumb:hover img { filter: drop-shadow(0 8px 20px rgba(11, 28, 62, .4)); }
.deck-thumb:focus-visible { outline: 3px solid var(--primary); outline-offset: 6px; }
.deck-corner .deck-jump { margin-top: 10px; }
.hero-photo .deck-thumb:focus-visible { outline-color: #fff; }
.deck-dialog { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.deck-dialog::backdrop { background: rgba(11, 28, 62, .82); }
.deck-dialog-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.deck-dialog .deck-card { width: min(86vw, calc(74vh * 5 / 7)); max-width: none; margin: 0; }
.deck-dialog .deck-hint { color: #fff; margin: 0; text-align: center; }
.deck-dialog-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* the full read: white, no red, the card image under the title, red star kept */
.deck-section { background: var(--paper); }
.deck-read { background: var(--white); border: 1px solid var(--silver); border-radius: var(--radius); padding: 28px 26px; }
.deck-read .deck-read-card { width: 100%; max-width: 280px; height: auto; margin: 6px 0 18px; filter: drop-shadow(0 6px 14px rgba(11, 28, 62, .22)); }
.deck-closer { font-family: var(--display); font-size: 1.35rem; color: var(--primary); margin-top: 1.2em; }

/* ---------- Relocate sub-navigation: each tab is a map of the home state ("GA to SC" inside Georgia) ---------- */
.sub-nav { background: var(--white); border-bottom: 1px solid var(--accent); }
.sub-nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; padding-top: 8px; padding-bottom: 8px; margin-bottom: 0; }
.state-tab { display: block; width: 96px; height: 96px; border-radius: 8px; text-decoration: none; }
.state-tab-map { display: block; width: 100%; height: 100%; overflow: visible; }
.state-shape { fill: #DCE5F2; stroke: var(--primary); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.state-label { fill: var(--primary); font-family: var(--font); font-weight: 800; text-anchor: middle; dominant-baseline: middle;
  paint-order: stroke; stroke: #DCE5F2; stroke-width: 5px; stroke-linejoin: round; }
.state-tab:hover .state-shape, .state-tab:focus-visible .state-shape { fill: var(--accent); }
.state-tab:hover .state-label, .state-tab:focus-visible .state-label { stroke: var(--accent); text-decoration: underline; }
.state-tab:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.state-tab[aria-current="page"] .state-shape { fill: var(--silver); stroke-width: 3; }
.state-tab[aria-current="page"] .state-label { stroke: var(--silver); }
.state-tab[aria-current="page"] { box-shadow: var(--double-rule-bottom); }
@media (max-width: 600px) { .state-tab { width: 76px; height: 76px; } }

:target { scroll-margin-top: 16px; }

/* ---------- Concierge note ---------- */
.concierge-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--accent); }
.concierge-note p { margin-bottom: .6em; }

/* ---------- Search ---------- */
.site-search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 480px; }
.site-search input { flex: 1; min-width: 0; }
.site-search .btn { padding: 8px 14px; }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.search-row input { flex: 1 1 260px; }
.search-results { list-style: none; padding: 0; margin: 18px 0; }
.search-results li { padding: 16px 0; border-bottom: 1px solid var(--accent); }
.search-results h2 { font-size: 1.35rem; margin: 0 0 .25em; }
.search-results p { margin: 0 0 .3em; }
.search-section { font-size: .95rem; font-weight: 700; color: var(--sc-slate, #40547E); text-transform: uppercase; letter-spacing: .04em; }
.search-results mark { background: var(--accent); color: inherit; padding: 0 2px; }
.search-try .chip { display: inline-block; margin: 4px 4px 4px 0; text-decoration: none; }
.search-try .chip:hover { text-decoration: underline; }

/* ==========================================================================
   CARD-BACK PANELS (v1.6) — every block of information is contained like the back of a deck card:
   an indigo guilloche title bar (with a "No." box like the card's lower-left corner), a foil hairline,
   a framed white body (indigo edge, white + silver inner rules, indigo corner blocks), and
   sub-topics set in "windows" with their own header strip.
   ========================================================================== */
.section.prose { background: var(--paper); padding: 22px 0; }
.cb-panel { position: relative; background-color: var(--white); border: 2px solid var(--primary); border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(11, 28, 62, .08); }
.cb-panel::after { content: ""; position: absolute; inset: 3px; border: 1px solid var(--silver); border-radius: 11px; pointer-events: none; }
.cb-titlebar { position: relative; display: flex; align-items: stretch; margin: 0; padding: 0; color: #fff;
  background: var(--primary) var(--guilloche-dark) center / 240px 48px; font-family: var(--display); font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.2; border-bottom: 3px solid transparent; border-image: var(--foil) 1; }
h2.cb-titlebar { color: #fff; }
.cb-no { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 66px; padding: 8px 10px;
  background: var(--primary-dark) var(--guilloche-dark) center / 240px 48px; border-right: 2px solid var(--silver);
  font-family: var(--display); font-size: 1.7rem; line-height: 1; color: #fff; }
.cb-no::before { content: "No."; font-family: var(--font); font-size: .75rem; font-weight: 700; letter-spacing: .1em; color: var(--silver); margin-bottom: 3px; }
.cb-no:empty { display: none; }
.cb-title { padding: 14px 20px; align-self: center; }
.cb-body { padding: 22px 26px 28px; background-color: var(--white);
  background-image: var(--corner), var(--corner), var(--guilloche-light);
  background-size: 9px 9px, 9px 9px, 240px 48px;
  background-position: left 9px bottom 9px, right 9px bottom 9px, center;
  background-repeat: no-repeat, no-repeat, repeat; }
.cb-body > :last-child { margin-bottom: 0; }
@media (max-width: 600px) { .cb-body { padding: 18px 16px 22px; } .cb-title { padding: 12px 14px; } .cb-no { min-width: 52px; font-size: 1.4rem; } }

/* sub-topics: "windows" inside the panel */
.cb-sub { margin: 20px 0; border: 1px solid var(--silver); border-left: 5px solid var(--primary); border-radius: 10px; background: #FAFBFD; padding: 0 18px 14px; overflow: hidden; }
.cb-sub > h3:first-child { margin: 0 -18px 14px; padding: 10px 18px; background: #DCE5F2; border-bottom: 1px solid var(--silver);
  font-family: var(--display); font-weight: 400; font-size: 1.3rem; color: var(--primary); }
.cb-sub > :last-child { margin-bottom: 0; }
.cb-sub h4 { color: var(--primary); }
.cb-body .stat-row { margin-bottom: 16px; }
.cb-body .faq details { box-shadow: none; border: 1px solid var(--silver); }
.cb-body .map-figure:last-child { margin-bottom: 0; }

/* "On this page" — the panel with numbered tiles */
.toc-section { padding: 26px 0 4px; }
.page-toc .cb-titlebar { align-items: center; justify-content: space-between; flex-wrap: wrap; }
.page-toc .cb-title { font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase; }
.cb-count { padding: 0 20px 0 0; font-family: var(--font); font-size: .95rem; color: var(--silver); }
.toc-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .toc-grid { grid-template-columns: 1fr 1fr; } }
.toc-grid a { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 14px 6px 6px; border: 1px solid var(--silver);
  border-radius: 8px; background: var(--white); color: var(--primary); font-weight: 700; text-decoration: none; }
.toc-grid a:hover { background: #DCE5F2; text-decoration: underline; }
.toc-no { flex: none; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 6px;
  background: var(--primary) var(--guilloche-dark) center / 240px 48px; color: #fff; font-family: var(--display); font-size: 1.3rem;
  box-shadow: inset 0 0 0 2px var(--primary), inset 0 0 0 3px var(--silver); }

/* ---------- Back to top: fixed on the right edge, shown after scrolling ---------- */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 16px;
  background: var(--primary) var(--guilloche-dark) center / 240px 48px; color: #fff; font-weight: 700; text-decoration: none;
  border: 2px solid var(--primary); border-radius: 10px; box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3px var(--silver), 0 6px 18px rgba(11, 28, 62, .3); }
.to-top .icon { transform: rotate(-90deg); }
.to-top:hover { background-color: var(--primary-dark); color: #fff; text-decoration: underline; }
.to-top:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.to-top.is-hidden { display: none; }
@media (max-width: 600px) { .to-top { right: 12px; bottom: 12px; min-height: 48px; padding: 6px 12px; } }
@media print { .to-top { display: none; } }

/* ---------- Card window: Enlarge (full image size, scrollable) ---------- */
.deck-dialog.is-enlarged { width: 98vw; height: 96vh; max-height: 96vh; overflow: auto; }
.deck-dialog.is-enlarged .deck-dialog-inner { padding: 10px 0 0; }
.deck-dialog.is-enlarged .deck-card { width: min(750px, 94vw); }
.deck-dialog.is-enlarged .deck-dialog-actions { position: sticky; bottom: 0; z-index: 2; width: 100%; padding: 10px; background: rgba(11, 28, 62, .92); border-radius: 10px 10px 0 0; }
.deck-dialog [data-deck-enlarge] .icon { width: 1.1em; height: 1.1em; }

/* ---------- Site Agent page: her special card, larger than the corner cards ---------- */
.special-card { max-width: 340px; margin: 0 auto; }
.special-card .deck-thumb { display: block; width: min(320px, 80vw); max-width: none; }
.special-card .deck-thumb img { width: 100%; height: auto; }
.agent-card-section .two-col { align-items: start; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.video-slot { margin: 24px 0 0; }
.video-ph { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--sc-steel, #6F81A7); border-radius: 10px; background: var(--sc-mist, #C6D4EA); color: var(--sc-indigo, #112A58); text-align: center; padding: 16px; }
.video-ph strong { font-size: 1.2rem; }
.team-cards .card { display: flex; flex-direction: column; }
.team-cards .card .sca-meta { margin-top: auto; }

/* ---------- Site Concierge Assistant: one container that lays out each answer by its shape ---------- */
.sca-log { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sca-log:empty { display: none; }
.sca-turn { max-width: 100%; min-width: 0; }
.sca-who { margin: 0 0 4px; font-size: .9rem; font-weight: 700; color: var(--sc-slate, #40547E); }
.sca-user .sca-body { background: var(--sc-steel, #6F81A7); color: #fff; font-weight: 600; font-size: 1.17rem; /* steel bubble: white bold 18.7px = WCAG large text, passes at 3.9:1 */ border-radius: 10px; padding: 10px 14px; margin-left: auto; max-width: 85%; width: fit-content; }
.sca-user { display: flex; flex-direction: column; align-items: flex-end; }
.sca-assistant .sca-body { background: #fff; border: 1px solid var(--sc-steel, #6F81A7); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sca-body p { margin: 0; }
.sca-text p + p { margin-top: .6em; }
.sca-meta { color: var(--sc-slate, #40547E); font-size: .95rem; }
.sca-note { font-size: .85rem; color: var(--sc-slate, #40547E); border-top: 1px solid var(--sc-steel, #6F81A7); padding-top: 8px; }
.sca-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.sca-card { border: 1px solid var(--sc-steel, #6F81A7); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sca-card h4 { margin: 0; }
.sca-card a { margin-top: auto; }
.sca-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sca-scroll table { min-width: 480px; }
.sca-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.sca-list .sca-meta { display: block; font-size: .9rem; }
.sca-tile { background: var(--sc-paper, #F1F3F8); border-left: 4px solid var(--sc-steel, #6F81A7); border-radius: 0; padding: 12px 14px; }
.sca-tile-label { font-size: .95rem; color: var(--sc-slate, #40547E); }
.sca-tile-value { font-size: 2rem; font-weight: 700; color: var(--sc-indigo, #112A58); line-height: 1.2; }
.sca-tries { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.sca-tries .chip { cursor: pointer; border: 1px solid var(--sc-steel, #6F81A7); min-height: 44px; font: inherit; }
.sca-tries .chip:hover { background: var(--sc-steel, #6F81A7); color: #fff; }
.sca-body .sca-scroll th, .sca-body .sca-scroll td { white-space: nowrap; }
.sca-body .compare thead th { background: var(--sc-steel, #6F81A7); color: #fff; border-color: var(--sc-steel, #6F81A7); }
.cb-titlebar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cb-titlebar a:hover { color: var(--sc-silver, #AFBDD7); }
.mls-notice { margin-top: 16px; }
.tx-jump .chip { display: inline-block; margin: 4px 2px; text-decoration: none; border: 1px solid var(--sc-steel, #6F81A7); }
.tx-cards .card { display: flex; flex-direction: column; gap: 6px; }
.tx-cards .card p { margin: 0; }

/* ---------- Card-back lead forms (DESIGN/lead-forms.html): Form I The Card, Form II The Deck, the Strip ----------
   Parts of the SC Symbols Deck card back: indigo bands, corner boxes with one rounded inner corner, a foil-edged
   window, guilloche paper and the diagonal watermark. No flag, no seal. Light only. */
.lf-section { --lf-card: #E9EDF5; --lf-line: rgba(17,42,88,.10); --lf-wm: rgba(17,42,88,.075); --lf-error: #8A1F2D; --lf-focus: #9DAEE1;
  --lf-foil: linear-gradient(100deg, #c6d4ea 0%, #b9c7f0 22%, #d9c8f2 40%, #bfe6ef 58%, #e6d3ee 76%, #c6d4ea 100%);
  --lf-r-box: 3px 3px 18px 3px; --lf-r-btn: 3px 3px 16px 3px; color-scheme: light; }
.lf-section [hidden] { display: none !important; }
.lf-paper { position: relative; isolation: isolate; border-radius: 22px; background-color: var(--lf-card); color: #112A58; padding: 16px;
  background-image: repeating-radial-gradient(circle at 0% 0%, transparent 0 7px, var(--lf-line) 7px 8px),
    repeating-radial-gradient(circle at 100% 0%, transparent 0 7px, var(--lf-line) 7px 8px),
    repeating-radial-gradient(circle at 50% 120%, transparent 0 9px, var(--lf-line) 9px 10px);
  box-shadow: inset 0 0 0 1px #6F81A7, inset 0 0 0 6px var(--lf-card), inset 0 0 0 7px #112A58, 0 18px 40px -24px rgba(11,28,62,.55); }
.lf-paper::before { content: ""; position: absolute; inset: 7px; border-radius: 16px; z-index: -1; pointer-events: none; background-color: var(--lf-wm);
  -webkit-mask: var(--lf-wm-tile) 0 0 / 300px 150px repeat; mask: var(--lf-wm-tile) 0 0 / 300px 150px repeat; }
.lf-section { --lf-wm-tile: url("data:image/svg+xml,%3Csvg xmlns=%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width=%22300%22 height=%22150%22%3E%3Cg transform=%22rotate(-32 150 75)%22 font-family=%22Georgia%2Cserif%22 font-size=%2215%22 letter-spacing=%222.5%22 fill=%22%23000%22%3E%3Ctext x=%2210%22 y=%2260%22%3Ewww.charlestonhomes.org%3C%2Ftext%3E%3Ctext x=%22-140%22 y=%22135%22%3Ewww.charlestonhomes.org%3C%2Ftext%3E%3Ctext x=%22160%22 y=%22-15%22%3Ewww.charlestonhomes.org%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }
.lf-band, .lf-corner { background: #112A58; color: #fff; box-shadow: inset 0 0 0 3px #112A58, inset 0 0 0 4px rgba(255,255,255,.35); }
.lf-band { border-radius: 3px; }
.lf-title { display: grid; justify-items: center; align-content: center; gap: 6px; padding: 12px 18px; text-align: center; }
.lf-title h2 { margin: 0; color: #fff; font: 400 clamp(1.05rem, 2.6vw, 1.5rem)/1.1 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.lf-plaque { display: inline-block; font: 700 .66rem/1 var(--font); letter-spacing: .2em; text-transform: uppercase; padding: 4px 9px; border: 1px solid rgba(255,255,255,.55); border-radius: 2px; color: #AFBDD7; }
.lf-corner { border-radius: var(--lf-r-box); display: grid; place-items: center; }
.lf-corner.lf-ur { border-radius: 3px 3px 3px 18px; }
.lf-corner.lf-ll { border-radius: 3px 18px 3px 3px; }
.lf-ch { width: 74%; max-width: 86px; aspect-ratio: 1; border-radius: 50%; border: 2px solid #fff; outline: 1px solid rgba(255,255,255,.5); outline-offset: -6px; display: grid; place-items: center; }
.lf-ch span { font: 400 1.6rem/1 var(--display); }
.lf-rosette { width: 74%; max-width: 88px; aspect-ratio: 1; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.55) 0 2deg, transparent 2deg 10deg), radial-gradient(circle, #112A58 0 28%, transparent 29%), repeating-radial-gradient(circle, rgba(255,255,255,.45) 0 1px, transparent 1px 5px);
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px #112A58, 0 0 0 6px rgba(255,255,255,.5); }
.lf-vbanner { writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; justify-content: center; font: 700 .74rem/1 var(--font); letter-spacing: .24em; text-transform: uppercase; padding: 14px 0; }
.lf-window { position: relative; border-radius: 18px; padding: 2px; background: var(--lf-foil); min-width: 0; }
.lf-pane { border-radius: 16px; background: rgba(255,255,255,.78); padding: clamp(18px, 3vw, 30px); height: 100%; }
.lf-num { font: 400 2.2rem/1 var(--display); text-align: center; }
.lf-num small { font: 700 .62rem/1 var(--font); letter-spacing: .2em; display: block; margin-bottom: 4px; color: #AFBDD7; }

.lf-fields { display: grid; gap: 14px; border: 0; margin: 0; padding: 0; min-width: 0; }
.lf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.lf-field { display: grid; gap: 5px; min-width: 0; }
.lf-field > label, .lf-legend { font: 700 .72rem/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #40547E; }
.lf-opt { font-weight: 400; letter-spacing: .04em; text-transform: none; font-style: italic; }
.lf-section input[type=text], .lf-section input[type=email], .lf-section input[type=tel], .lf-section select, .lf-section textarea {
  width: 100%; font: 400 1rem/1.3 var(--font); color: #112A58; background: #fff; border: 1px solid #6F81A7; border-radius: 2px; padding: 11px 12px;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #C6D4EA; }
.lf-section textarea { min-height: 96px; resize: vertical; }
.lf-section input:focus-visible, .lf-section select:focus-visible, .lf-section textarea:focus-visible { outline: 3px solid var(--lf-focus); outline-offset: 1px; border-color: #112A58; }
.lf-field.bad input, .lf-field.bad select { border-color: var(--lf-error); }
.lf-err { color: var(--lf-error); font-size: .86rem; }
.lf-err:empty { display: none; }
.lf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-field label.lf-chip { position: relative; font: 400 .95rem/1.2 var(--font); letter-spacing: 0; text-transform: none; color: #112A58; }
.lf-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lf-chip span { display: inline-block; padding: 8px 13px; border: 1px solid #6F81A7; border-radius: var(--lf-r-btn); font-size: .92rem; background: #fff; }
.lf-chip input:checked + span { background: #112A58; color: #fff; border-color: #112A58; box-shadow: inset 0 0 0 3px #112A58, inset 0 0 0 4px rgba(255,255,255,.4); }
.lf-chip input:focus-visible + span { outline: 3px solid var(--lf-focus); outline-offset: 2px; }
.lf-consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: .86rem; line-height: 1.45; color: #40547E; }
.lf-consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: #112A58; }
.lf-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lf-btn { position: relative; appearance: none; border: 0; cursor: pointer; background: #112A58; color: #fff; font: 700 .82rem/1 var(--font); letter-spacing: .18em; text-transform: uppercase;
  padding: 17px 26px 16px; border-radius: var(--lf-r-btn); box-shadow: 0 10px 22px -14px rgba(11,28,62,.9); transition: background-color .15s ease, transform .15s ease; }
.lf-btn::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(255,255,255,.5); border-radius: 1px 1px 12px 1px; pointer-events: none; }
.lf-btn::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--lf-foil); opacity: 0; transition: opacity .15s ease; border-radius: 2px; }
.lf-btn:hover { background: #0B1C3E; }
.lf-btn:hover::before { opacity: 1; }
.lf-btn:active { transform: translateY(1px); }
.lf-btn:disabled { cursor: progress; opacity: .8; }
.lf-btn:focus-visible { outline: 3px solid var(--lf-focus); outline-offset: 3px; }
.lf-btn.ghost { background: transparent; color: #112A58; box-shadow: inset 0 0 0 1px #6F81A7; }
.lf-btn.ghost::after { border-color: #C6D4EA; }
.lf-btn.ghost:hover { background: #C6D4EA; }
.lf-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 4px; }
.lf-status { margin: 0; font-size: .9rem; color: #40547E; }
.lf-status:empty { display: none; }
.lf-status.bad { color: var(--lf-error); }
.lf-licensee { margin: 0; font-size: .8rem; color: #AFBDD7; text-align: center; padding: 10px 14px; }
.lf-licensee.light { color: #40547E; padding-top: 12px; }
.lf-sent { display: grid; gap: 10px; }
.lf-sent h3 { margin: 0; font: 400 1.5rem/1.15 var(--display); color: #112A58; }
.lf-sent h3:focus { outline: none; }
.lf-sent p { margin: 0; color: #40547E; }
.lf-sent dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 6px 0 0; font-size: .92rem; }
.lf-sent dt { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; color: #40547E; padding-top: 3px; }
.lf-sent dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Form I: The Card */
.lf-card-wrap { max-width: 640px; }
.lf-card .lf-grid { display: grid; grid-template-columns: 70px minmax(0,1fr) 70px; grid-template-rows: 92px auto 64px; gap: 10px; }
.lf-card .lf-ul { grid-column: 1; grid-row: 1; }
.lf-card .lf-top { grid-column: 2; grid-row: 1; }
.lf-card .lf-ur { grid-column: 3; grid-row: 1; }
.lf-card .lf-left { grid-column: 1; grid-row: 2; }
.lf-card .lf-window { grid-column: 2 / 4; grid-row: 2; }
.lf-card .lf-ll { grid-column: 1; grid-row: 3; }
.lf-card .lf-bottom { grid-column: 2 / 4; grid-row: 3; display: grid; place-items: center; }

/* Form II: The Deck */
.lf-deck .lf-grid { display: grid; grid-template-columns: 150px minmax(0,1fr); grid-template-rows: auto 1fr auto; gap: 10px; }
.lf-deck .lf-top { grid-column: 1 / 3; }
.lf-steps { grid-column: 1; grid-row: 2 / 4; display: grid; gap: 10px; align-content: start; list-style: none; margin: 0; padding: 0; }
.lf-deck .lf-window { grid-column: 2; grid-row: 2; }
.lf-deck .lf-bottom { grid-column: 2; grid-row: 3; }
.lf-stepbox { border-radius: 3px 18px 3px 3px; padding: 14px 10px; display: grid; justify-items: center; gap: 4px; color: #112A58; box-shadow: inset 0 0 0 1px #6F81A7, inset 0 0 0 4px var(--lf-card), inset 0 0 0 5px #C6D4EA; }
.lf-stepbox .lf-num small { color: #40547E; }
.lf-what { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #40547E; text-align: center; }
.lf-stepbox[aria-current="step"] { background: #112A58; color: #fff; box-shadow: inset 0 0 0 3px #112A58, inset 0 0 0 4px rgba(255,255,255,.4); }
.lf-stepbox[aria-current="step"] .lf-what, .lf-stepbox[aria-current="step"] .lf-num small { color: #AFBDD7; }
.lf-stepbox.done { box-shadow: inset 0 0 0 1px #112A58, inset 0 0 0 4px var(--lf-card), inset 0 0 0 5px #112A58; }

/* The Strip */
.lf-strip { padding: 10px; border-radius: 16px; }
.lf-strip .lf-grid { display: grid; grid-template-columns: 92px minmax(0, 1.1fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.lf-strip .lf-corner { min-height: 92px; }
.lf-strip .lf-title { justify-items: start; text-align: left; }
.lf-strip .lf-title p { margin: 0; color: #AFBDD7; font-size: .92rem; line-height: 1.4; }
.lf-strip form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 10px 6px; }
.lf-strip form .lf-field { flex: 1 1 200px; }
.lf-strip form .lf-status { flex-basis: 100%; }
.lf-strip .lf-sent { padding: 10px 8px; align-content: center; }

@media (max-width: 640px) {
  .lf-card .lf-grid { grid-template-columns: 46px minmax(0,1fr) 46px; grid-template-rows: 70px auto 56px; gap: 8px; }
  .lf-ch span { font-size: 1.05rem; }
  .lf-vbanner { font-size: .62rem; letter-spacing: .16em; }
  .lf-num { font-size: 1.6rem; }
  .lf-card .lf-bottom .lf-licensee { font-size: .7rem; padding: 6px 8px; }
  .lf-deck .lf-grid { grid-template-columns: 1fr; }
  .lf-deck .lf-top, .lf-steps, .lf-deck .lf-window, .lf-deck .lf-bottom { grid-column: 1; grid-row: auto; }
  .lf-steps { grid-template-columns: repeat(3, 1fr); }
  .lf-what { font-size: .6rem; letter-spacing: .08em; }
  .lf-strip .lf-grid { grid-template-columns: 1fr; }
  .lf-strip .lf-corner { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lf-btn, .lf-btn::before { transition: none; } }

/* compact home hero: headline, one line, two buttons, a fold that explains the Concierge (Match form sits below) */
.hero-photo .hero-lead { color: #fff; font-size: 1.1rem; max-width: 470px; text-shadow: 0 1px 8px rgba(0,0,0,.55); margin: 10px 0 0; }
/* phones: the lead sits on white paper below the photo banner, so it must be dark (this rule comes after the white one above) */
@media (max-width: 859px) { .hero-photo .hero-lead { color: var(--text); text-shadow: none; font-weight: 500; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }
.btn-hero-alt { color: #fff; border-color: #fff; background: rgba(11,28,62,.35); }
.btn-hero-alt:hover { background: rgba(11,28,62,.6); }
.hero-how { margin-top: 16px; max-width: 470px; background: rgba(255,255,255,.94); color: var(--text); border-radius: 3px 3px 16px 3px; box-shadow: inset 0 0 0 1px var(--silver); padding: 10px 16px; font-size: 1rem; }
.hero-how summary { cursor: pointer; font-weight: 700; color: var(--primary); min-height: 32px; display: flex; align-items: center; }
.hero-how ol { margin: 8px 0; padding-left: 20px; }
.hero-how p { margin: 0 0 4px; font-size: .92rem; color: var(--muted); }
.home-match { padding-top: 32px; }

/* =====================================================================================================================
   DESIGN SYSTEM LAYER (DESIGN-SYSTEM.md, approved Oct 20, 2026; specimen: /design/specimen/)
   Governing rule: reading surfaces are white; pattern stops where text begins. Every container is a frame (double rule +
   lacing of card-back paper) around a white window. The lacing tone walks the approved six-step ladder so neighbours differ.
   This layer overrides the older box styles above it. Change components here, not in one-off rules.
   ===================================================================================================================== */
:root {
  --font: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --ds-t1: #E9EDF5; --ds-t2: #D3DCEF; --ds-t3: #E6E1F2; --ds-t4: #C6D4EA; --ds-t5: #DCEBF0; --ds-t6: #DDE2F2;
  --ds-linen: #1B2A5E; --ds-cream: #ECE5D2; --ds-ink: #1F3661;
  --ds-guilloche: repeating-radial-gradient(circle at 0% 0%, transparent 0 7px, rgba(17,42,88,.10) 7px 8px),
    repeating-radial-gradient(circle at 100% 0%, transparent 0 7px, rgba(17,42,88,.10) 7px 8px),
    repeating-radial-gradient(circle at 50% 120%, transparent 0 9px, rgba(17,42,88,.10) 9px 10px);
  --ds-guilloche-dark: repeating-radial-gradient(circle at 0% 0%, transparent 0 7px, rgba(255,255,255,.07) 7px 8px),
    repeating-radial-gradient(circle at 100% 0%, transparent 0 7px, rgba(255,255,255,.07) 7px 8px);
  --ds-light: radial-gradient(120% 80% at 15% 0%, rgba(255,255,255,.55), transparent 60%);
  --ds-wm: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22300%22%20height%3D%22150%22%3E%3Cg%20transform%3D%22rotate(-32%20150%2075)%22%20font-family%3D%22Georgia%2Cserif%22%20font-size%3D%2215%22%20letter-spacing%3D%222.5%22%20fill%3D%22%23112A58%22%20fill-opacity%3D%22.07%22%3E%3Ctext%20x%3D%2210%22%20y%3D%2260%22%3Ewww.charlestonhomes.org%3C%2Ftext%3E%3Ctext%20x%3D%22-140%22%20y%3D%22135%22%3Ewww.charlestonhomes.org%3C%2Ftext%3E%3Ctext%20x%3D%22160%22%20y%3D%22-15%22%3Ewww.charlestonhomes.org%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --ds-rule: 0 0 0 1px #6F81A7, 0 0 0 5px #fff, 0 0 0 6px #112A58;
  --ds-lift: 0 18px 40px -26px rgba(11,28,62,.55);
  --ds-edge: inset 0 0 0 2px #CBD0F0, inset 0 0 0 3px #fff;   /* the window's foil edge, as a hairline */
  --ds-r-box: 3px 3px 18px 3px;
}
body { font-family: var(--font); font-size: 18px; line-height: 1.65; }
h1, h2, h3, h4 { text-wrap: balance; }

/* ---------- reading grounds: white, no pattern (sections with card grids sit on plain paper) ---------- */
main > .section, main > section.section, .prose, .cb-body, .deck-section { background: #fff; background-image: none; }
main > .section.alt, .section.alt { background: var(--paper); background-image: none; }

/* ---------- the frame: lacing in the border, white window inside (C1, C2, C3, C4 share it) ---------- */
.card, .fact-box, .match, .report, .contact-side, .callout, .today-lead, .deck-panel, .news-col, .deck-read, .cb-panel, .stat {
  --tone: var(--ds-t1);
  position: relative;
  border: 12px solid transparent; border-left-width: 12px; border-radius: 22px;
  background-color: var(--tone);
  background-image: linear-gradient(#fff, #fff), var(--ds-light), var(--ds-wm), var(--ds-guilloche);
  background-clip: padding-box, border-box, border-box, border-box, border-box, border-box;
  background-origin: padding-box, border-box, border-box, border-box, border-box, border-box;
  background-size: auto, auto, 300px 150px, auto, auto, auto;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat;
  box-shadow: var(--ds-rule), var(--ds-edge), var(--ds-lift);
  padding: 24px 26px;
}
.stat { border-width: 6px; border-radius: 16px; padding: 14px 16px; box-shadow: var(--ds-rule), var(--ds-edge); }
.deck-panel::before, .today-lead::before, .cb-panel::after { display: none; }
.deck-panel, .today-lead { padding-left: 26px; }
/* the approved ladder, in order, so neighbours always differ */
:is(.card, .fact-box, .match, .report, .contact-side, .callout, .today-lead, .deck-panel, .news-col, .deck-read, .cb-panel, .stat):nth-child(6n+2) { --tone: var(--ds-t2); }
:is(.card, .fact-box, .match, .report, .contact-side, .callout, .today-lead, .deck-panel, .news-col, .deck-read, .cb-panel, .stat):nth-child(6n+3) { --tone: var(--ds-t3); }
:is(.card, .fact-box, .match, .report, .contact-side, .callout, .today-lead, .deck-panel, .news-col, .deck-read, .cb-panel, .stat):nth-child(6n+4) { --tone: var(--ds-t4); }
:is(.card, .fact-box, .match, .report, .contact-side, .callout, .today-lead, .deck-panel, .news-col, .deck-read, .cb-panel, .stat):nth-child(6n+5) { --tone: var(--ds-t5); }
:is(.card, .fact-box, .match, .report, .contact-side, .callout, .today-lead, .deck-panel, .news-col, .deck-read, .cb-panel, .stat):nth-child(6n+6) { --tone: var(--ds-t6); }
/* titled panels are usually only children of their wrapper: walk the ladder by section instead */
main > section:nth-of-type(6n+2) .cb-panel { --tone: var(--ds-t2); }
main > section:nth-of-type(6n+3) .cb-panel { --tone: var(--ds-t3); }
main > section:nth-of-type(6n+4) .cb-panel { --tone: var(--ds-t4); }
main > section:nth-of-type(6n+5) .cb-panel { --tone: var(--ds-t5); }
main > section:nth-of-type(6n) .cb-panel { --tone: var(--ds-t6); }

/* ---------- C1 card: title band with number box on top of the white window, button pinned to the bottom ---------- */
.cards { counter-reset: ds-card; }
.card { counter-increment: ds-card; padding: 0 20px 20px; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.card > .card-h, .card > h2.card-h, .card > h3.card-h {
  display: flex; align-items: center; gap: 12px; margin: 0 -20px 10px; padding: 0 16px 0 0; min-height: 58px;
  background-color: var(--primary); background-image: var(--ds-guilloche-dark); color: #fff;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.35);
  font: 400 1.05rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.card-h .icon { display: none; }
.card-h::before {
  content: counter(ds-card); flex: none; display: grid; place-items: center; min-width: 56px; padding: 6px;
  background-color: var(--ds-ink); background-image: var(--ds-guilloche-dark); color: #fff;
  border-radius: 0 0 18px 0; box-shadow: inset 0 0 0 3px var(--ds-ink), inset 0 0 0 4px rgba(255,255,255,.35);
  font: 400 1.45rem/1 var(--display); letter-spacing: 0; }
.card-h[data-no]::before { content: attr(data-no); }
.card > .card-h { align-items: center; }
.card > .card-h::before, .card > h2.card-h::before, .card > h3.card-h::before { align-self: stretch; }
.alt .card, .section.alt .card, .alt .fact-box, .section.alt .fact-box { border-color: transparent; }
.card-h { align-items: center; }
.card-h > * { align-self: center; }
.card > .card-h::after { content: ""; }
.card > p { margin: 0 0 6px; }
.card .card-fact strong { font: 400 1.2rem/1.2 var(--display); color: var(--primary); }
.card > .btn, .card > .soon { margin-top: auto; align-self: flex-start; }
.grid-note { margin: 14px 0 0; }
/* the card band's text sits beside the number box */
.card > .card-h { text-wrap: balance; }
.card > .card-h { padding-top: 0; }

/* ---------- C2 titled panel: band on top, white window below ---------- */
.cb-panel { padding: 0; overflow: hidden; }
.cb-titlebar { border-bottom: 0; box-shadow: inset 0 -1px 0 rgba(255,255,255,.35); letter-spacing: .1em; text-transform: uppercase; font-size: clamp(1.1rem, 2.2vw, 1.45rem); }
.cb-no { border-right: 0; border-radius: 0 0 18px 0; box-shadow: inset 0 0 0 3px var(--primary-dark), inset 0 0 0 4px rgba(255,255,255,.35); }
.cb-body { background: #fff; padding: 26px 30px 30px; }
.cb-sub { background: #fff; border: 1px solid #6F81A7; border-left: 1px solid #6F81A7; border-radius: 3px 3px 16px 3px; }
.cb-sub > h3:first-child { background: var(--accent); border-bottom: 1px solid #6F81A7; font-family: var(--display); font-weight: 400; }
.cb-body .faq details { box-shadow: none; }

/* ---------- C12 hero: the page head becomes a framed linen hero, the page's card in the corner ---------- */
.page-head { background: #fff; background-image: none; border-bottom: 0; padding: 26px 0 30px; }
.page-head > .wrap { position: relative; border-radius: 22px; padding: 28px 30px 32px;
  background-color: var(--ds-linen); background-image: var(--ds-light), var(--ds-guilloche-dark);
  box-shadow: var(--ds-rule), var(--ds-lift); color: var(--ds-cream); }
.page-head > .wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0 0 22px 22px; background: var(--foil); }
.page-head h1 { color: #fff; }
.page-head .lead, .page-head p { color: var(--ds-cream); }
.page-head a { color: #fff; }
.page-head .deck-jump a, .page-head .deck-hint { color: var(--ds-cream); }
.page-head .fine { color: var(--silver); }
.page-head .deck-thumb:focus-visible, .page-head a:focus-visible { outline-color: #fff; }
.page-head .btn-secondary { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.page-head .btn-secondary::after { border-color: rgba(255,255,255,.4); }
/* the Relocate hero's four draws: C4 tiles on the linen */
.hero-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.hero-tiles .stat { color: var(--primary); }
.hero-tiles .stat a { color: var(--primary); }
.page-head .hero-tiles .stat-note, .page-head .hero-tiles .stat-label { color: var(--muted); }
/* the home photo hero keeps its photo, framed by the double rule and one foil edge */
.hero.hero-photo { box-shadow: var(--double-rule-bottom); }

/* ---------- C4 tile ---------- */
.stat-value { font: 400 1.9rem/1.1 var(--display); color: var(--primary); }
.stat-label { font: 700 .72rem/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 4px; }
.stat-note { font-size: .92rem; }

/* ---------- C5 strip: the CTA band is a framed strip, white window ---------- */
.cta-band { background: var(--paper); background-image: none; box-shadow: none; padding: 40px 0; }
.cta-band > .wrap { position: relative; max-width: 860px; border: 12px solid transparent; border-radius: 22px; padding: 26px 30px;
  background-color: var(--ds-t4);
  background-image: linear-gradient(#fff, #fff), var(--ds-light), var(--ds-wm), var(--ds-guilloche);
  background-clip: padding-box, border-box, border-box, border-box, border-box, border-box;
  background-origin: padding-box, border-box, border-box, border-box, border-box, border-box;
  background-size: auto, auto, 300px 150px, auto, auto, auto;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat, repeat;
  box-shadow: var(--ds-rule), var(--ds-edge), var(--ds-lift); }
.cta-band h2 { margin: -26px -30px 16px; padding: 14px 20px; background-color: var(--primary); background-image: var(--ds-guilloche-dark); color: #fff;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem); letter-spacing: .1em; text-transform: uppercase; }
.today-strip, .trust-strip { background: #fff; background-image: none; box-shadow: var(--double-rule-top), var(--double-rule-bottom); }

/* ---------- C6 forms: the pane is a reading surface ---------- */
.lf-pane { background: #fff; }

/* ---------- C7 questions ---------- */
.faq details, .today-month { border: 0; border-radius: 3px 3px 16px 3px; background: #fff;
  box-shadow: 0 0 0 1px #6F81A7, 0 0 0 4px #fff, 0 0 0 5px var(--primary); margin: 0 0 16px; }
.faq summary, .today-month summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 12px 16px; font: 400 1.1rem/1.35 var(--display); }
.faq summary::-webkit-details-marker, .today-month summary::-webkit-details-marker { display: none; }
.faq summary::before, .today-month summary::before { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  background: var(--primary); color: #fff; font: 400 1.2rem/1 var(--font); border-radius: 3px 3px 10px 3px;
  box-shadow: inset 0 0 0 2px var(--primary), inset 0 0 0 3px rgba(255,255,255,.4); }
.faq details[open] summary::before, .today-month[open] summary::before { content: "–"; }
.faq summary:hover, .faq details[open] summary { background: #fff; }
.faq details p { padding: 0 18px 16px 60px; margin: 0; }

/* ---------- C8 tables ---------- */
.table-wrap { border: 1px solid #6F81A7; border-radius: 12px; background: #fff; }
.compare { background: #fff; }
.compare th, .compare td { border: 0; border-bottom: 1px solid var(--accent); }
.compare thead th { background: var(--primary); color: #fff; font: 700 .74rem/1.25 var(--font); letter-spacing: .12em; text-transform: uppercase; }
.compare tbody tr:nth-child(even) td { background: #F4F6FB; }

/* ---------- C9 media frames ---------- */
.map, .gmap, .gallery figure, .animation-box { border: 2px solid transparent; border-radius: 16px;
  background: var(--foil) border-box; box-shadow: 0 0 0 1px #6F81A7, 0 0 0 5px #fff, 0 0 0 6px var(--primary); }

/* ---------- C10 buttons: the corner box ---------- */
.btn { position: relative; border: 0; border-radius: 3px 3px 16px 3px; font: 700 .8rem/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.btn::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(255,255,255,.5); border-radius: 1px 1px 12px 1px; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 22px -14px rgba(11,28,62,.9); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary, .btn-voice { background: #fff; color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.btn-secondary::after, .btn-voice::after { border-color: var(--accent); }
.btn-secondary:hover, .btn-voice:hover { background: var(--accent); text-decoration: none; }
.btn-lg { font-size: .86rem; }

/* ---------- phones ---------- */
@media (max-width: 600px) {
  .card, .fact-box, .match, .report, .contact-side, .callout, .today-lead, .deck-panel, .news-col, .deck-read, .cb-panel { border-width: 8px; border-radius: 16px; padding: 20px 16px; }
  .card { padding: 0 16px 16px; }
  .card > .card-h, .card > h2.card-h, .card > h3.card-h { margin: 0 -16px 10px; }
  .cb-panel { padding: 0; }
  .cb-body { padding: 20px 16px 22px; }
  .page-head > .wrap { padding: 20px 16px 24px; border-radius: 16px; }
  .cta-band > .wrap { border-width: 8px; padding: 20px 16px; }
  .cta-band h2 { margin: -20px -16px 14px; }
  .faq details p { padding-left: 18px; }
}

/* state tabs: the labels keep a compact sans so the two-letter codes fit the shapes */
.state-label { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

/* iulia's letter on the Site Agent page: her sign-off in Caslon Display */
.letter-sign { font: 400 1.3rem/1.3 var(--display); color: var(--primary); margin: 24px 0 6px; }
.iulia-letter .cb-sub > p { padding: 0 18px; }
@media (max-width: 600px) { .iulia-letter .cb-sub > p { padding: 0 12px; } .iulia-letter .cb-sub > h3:first-child { padding-left: 12px; padding-right: 12px; } .iulia-letter .cb-body { padding-left: 10px; padding-right: 10px; } }

/* ---------- The ribbon under the navigation (js/ribbon.js): one strip, one subject at a time ----------
   An indigo band like the card's title band; the subject sits in a corner box (rounded inner corner facing the field). */
.ribbon { background-color: var(--primary-dark); background-image: var(--ds-guilloche-dark); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 var(--primary), inset 0 -5px 0 #fff, inset 0 -6px 0 #6F81A7; padding: 6px 0 12px; }
.ribbon-inner { display: flex; align-items: stretch; gap: 10px; min-height: 40px; }
.ribbon-label { flex: none; display: grid; place-items: center; padding: 0 14px; min-width: 150px; background: var(--ds-ink);
  border-radius: 3px 3px 14px 3px; box-shadow: inset 0 0 0 2px var(--ds-ink), inset 0 0 0 3px rgba(255,255,255,.4);
  font: 700 .7rem/1.1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: #fff; transform-origin: 50% 0; backface-visibility: hidden; }
.ribbon-field { position: relative; flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center;
  -webkit-mask: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ribbon-track { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; transform-origin: 50% 0; backface-visibility: hidden; will-change: transform; }
.ribbon-track.is-static { padding: 0 24px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ribbon-item { color: #fff; font: 400 1rem/1.3 var(--display); letter-spacing: .02em; text-decoration: none; padding: 2px 0; }
a.ribbon-item:hover, a.ribbon-item:focus-visible { text-decoration: underline; }
a.ribbon-item:focus-visible, .ribbon-pause:focus-visible { outline: 3px solid #9DAEE1; outline-offset: 2px; }
.ribbon-note { color: var(--silver); font: italic 400 .86rem/1.3 var(--font); }
.ribbon-sep { display: inline-block; width: 7px; height: 7px; margin: 0 18px; border-radius: 50%; background: var(--foil); box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.ribbon-pause { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 40px; cursor: pointer;
  background: transparent; color: #fff; border: 0; border-radius: 3px 3px 12px 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
  font: 700 .66rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.ribbon-pause:hover { background: rgba(255,255,255,.12); }
.ribbon-pause .icon { width: 14px; height: 14px; }
@media (max-width: 600px) {
  .ribbon-label { min-width: 0; padding: 0 8px; font-size: .6rem; letter-spacing: .1em; max-width: 92px; text-align: center; }
  .ribbon-pause span[data-ribbon-pause-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ribbon-item { font-size: .95rem; }
}

/* the ribbon on white (principal, Oct 20): white strip framed by the double rule, indigo type; the subject keeps its indigo corner box */
.ribbon { background: #fff; background-image: none; color: var(--primary);
  box-shadow: inset 0 2px 0 var(--primary), inset 0 5px 0 #fff, inset 0 6px 0 #6F81A7, inset 0 -2px 0 var(--primary), inset 0 -5px 0 #fff, inset 0 -6px 0 #6F81A7; padding: 12px 0; }
.ribbon-item { color: var(--primary); }
.ribbon-note { color: var(--muted); }
.ribbon-sep { box-shadow: 0 0 0 1px #6F81A7; }
.ribbon-pause { color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.ribbon-pause:hover { background: var(--accent); }
.ribbon-field { -webkit-mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }

/* ticker type: bold and newsworthy (principal, Oct 20) */
.ribbon-item { font: 700 1.04rem/1.3 var(--font); letter-spacing: .01em; color: var(--primary); }
.ribbon-note { font: italic 700 .86rem/1.3 var(--font); }
.ribbon-label { font-weight: 700; letter-spacing: .16em; }
.ribbon-field { perspective: 500px; }
.ribbon-label, .ribbon-field { transform-origin: 50% 50%; }

/* ---------- Home intro overlay (js/intro.js): the walk-in video, then the hero ---------- */
.intro { position: fixed; inset: 0; z-index: 100000; background: #0B1C3E; display: grid; place-items: center; cursor: pointer; }
.intro[hidden] { display: none; }
.intro video { width: 100%; height: 100%; object-fit: cover; }
.intro-controls { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.intro-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 16px 6px 6px; cursor: pointer;
  background: #112A58; color: #fff; border: 0; border-radius: 3px 3px 16px 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 10px 24px -12px rgba(0,0,0,.7);
  font: 700 .78rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.intro-btn[data-intro-skip] { padding-left: 16px; background: rgba(11,28,62,.75); }
.intro-btn:hover { background: #0B1C3E; }
.intro-btn:focus-visible { outline: 3px solid #9DAEE1; outline-offset: 3px; }
.intro-ch { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; font: 400 .95rem/1 var(--display); letter-spacing: 0; }
/* ---------- Section intro videos (js/intro-video.js) and the three page-head layouts ---------- */
.ivid { margin: 22px 0 0; max-width: 720px; }
.ivid-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0B1C3E; border-radius: 4px 4px 18px 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 0 4px #0B1C3E, 0 0 0 6px var(--coral, #F2A08C), 0 18px 34px -18px rgba(0,0,0,.8); }
.ivid[data-fmt="9x16"] { max-width: 420px; }
.ivid[data-fmt="9x16"] .ivid-frame { aspect-ratio: 9 / 16; }
.ivid video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ivid-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 0 12px; border: 0; background: rgba(11,28,62,.18); cursor: pointer; color: #fff; }
.ivid-play-dot { width: 66px; height: 66px; border-radius: 50%; background: var(--coral, #F2A08C); box-shadow: 0 0 0 3px #0B1C3E, 0 0 0 5px #fff, 0 10px 24px -8px rgba(0,0,0,.7);
  position: relative; transition: transform .15s ease; }
.ivid-play-dot::after { content: ""; position: absolute; left: 26px; top: 20px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #0B1C3E; }
.ivid-play-text { font: 700 .78rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; padding: 7px 12px; border-radius: 3px; background: rgba(11,28,62,.82); }
.ivid-play:hover .ivid-play-dot { transform: scale(1.07); }
.ivid-play:focus-visible { outline: 3px solid var(--coral, #F2A08C); outline-offset: -6px; }
.ivid.is-playing .ivid-play { display: none; }
.ivid figcaption { margin-top: 12px; font-size: .86rem; line-height: 1.45; }
.ivid figcaption a { color: inherit; }
@media (max-width: 859px) { .ivid { margin-left: auto; margin-right: auto; } }
@media (min-width: 860px) {
  /* side: text on the left, the 16:9 player beside it */
  [data-ivid-layout="side"] .deck-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0 32px; align-items: start; }
  [data-ivid-layout="side"] .deck-head > :not(.ivid) { grid-column: 1; }
  [data-ivid-layout="side"] .deck-head > .ivid { grid-column: 2; grid-row: 1 / span 6; margin-top: 6px; max-width: none; }
  /* tall: text on the left, a 9:16 player at card height on the right */
  [data-ivid-layout="tall"] .deck-head { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 0 36px; align-items: start; }
  [data-ivid-layout="tall"] .deck-head > :not(.ivid) { grid-column: 1; }
  [data-ivid-layout="tall"] .deck-head > .ivid { grid-column: 2; grid-row: 1 / span 6; margin-top: 4px; max-width: 236px; }
  [data-ivid-layout="tall"] .ivid-play-dot { width: 56px; height: 56px; }
  [data-ivid-layout="tall"] .ivid-play-dot::after { left: 22px; top: 16px; border-width: 12px 0 12px 19px; }
  /* below: under the text, filling the empty space beside the card */
  [data-ivid-layout="below"] .deck-head > .ivid { max-width: 640px; }
}

/* pop-up intro player (home: "Meet iulia" beside the Match's Start button) */
.cg-meet { margin-left: 10px; }
.ivid-dialog { padding: 18px 18px 14px; border: 0; border-radius: 6px 6px 22px 6px; background: #0B1C3E; color: #DDE5F2; width: min(92vw, 860px); max-height: 94vh; overflow: auto; }
.ivid-dialog::backdrop { background: rgba(11,28,62,.72); }
.ivid-dialog .ivid { margin: 0 auto; max-width: none; }
.ivid-dialog .ivid[data-fmt="9x16"] { max-width: min(420px, 100%); }
.ivid-dialog .ivid[data-fmt="9x16"] .ivid-frame { max-height: 76vh; }
.ivid-dialog .fine { color: #AFBDD7; }
.ivid-dialog .fine a { color: #fff; }
.ivid-close { position: sticky; top: 0; float: right; z-index: 2; width: 40px; height: 40px; margin: -6px -6px 6px 8px; border: 0; border-radius: 50%;
  background: var(--coral, #F2A08C); color: #0B1C3E; font: 700 1.5rem/1 var(--font); cursor: pointer; }
.ivid-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* overlay header (2026-10-29): deep-blue band, a coral strip through its middle with the domain, the CH roundel on the left */
.intro-head { position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: 104px; display: flex; align-items: center;
  padding: 0 max(20px, env(safe-area-inset-left)); background: #0B1C3E; box-shadow: 0 10px 30px -14px rgba(0,0,0,.8); pointer-events: none; }
.intro-strip { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
  height: 46px; background: var(--coral, #F2A08C); color: #0B1C3E; font: 400 1.65rem/1 var(--display); letter-spacing: .04em; white-space: nowrap; }
.intro-logo { position: relative; z-index: 1; width: 88px; height: 88px; border-radius: 50%; box-shadow: 0 0 0 3px #0B1C3E, 0 0 0 5px var(--coral, #F2A08C); }
/* the whole 16:9 frame shows below the header on every screen (desktop used to crop it with object-fit: cover) */
.intro video { position: absolute; left: 0; right: 0; bottom: 0; top: 104px; height: calc(100% - 104px); object-fit: contain; }
@media (max-width: 600px) {
  .intro video { top: 76px; height: calc(100% - 76px); }
  .intro-head { height: 76px; padding-left: 14px; }
  .intro-strip { height: 36px; font-size: 1.2rem; padding-left: 60px; }
  .intro-logo { width: 60px; height: 60px; }
}
html.intro-on, html.intro-on body { overflow: hidden; }
html.intro-on [id^="tochat"], html.intro-on .tochat-widget, html.intro-on [class*="cometchat"], html.intro-on [id*="cometchat"] { visibility: hidden !important; }

/* =========================================================================================
   LIVE MARKET PANELS (Market Monitor charts, CHS Regional MLS). Card-back media frame (C9):
   double rule + foil edge; an indigo band with a pulsing "Live" tag; corner-box tabs. The chart's
   top 21px (Market Monitor profile line) is cropped; the MLS credit at the bottom stays visible.
   ========================================================================================= */
.lm { margin: 0 0 16px; background: var(--white); border-radius: 4px 4px 18px 4px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--steel), 0 0 0 4px var(--white), 0 0 0 5px var(--primary); }
.lm-band { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--primary); color: var(--white);
  font: 700 .74rem/1.2 "Libre Caslon Text", Georgia, serif; letter-spacing: .14em; text-transform: uppercase; }
.lm-live { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 8px; border-radius: 3px;
  background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); color: var(--white); flex: none; }
.lm-dot { width: 8px; height: 8px; border-radius: 50%; background: #9DAEE1; box-shadow: 0 0 0 0 rgba(157,174,225,.9); flex: none; }
.lm-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #AFBDD7; }
.lm-tabs { display: flex; gap: 8px; padding: 12px 14px 0; flex-wrap: wrap; }
.lm-tabs button { cursor: pointer; border: 0; padding: 8px 14px; border-radius: 3px 3px 12px 3px; background: var(--white);
  color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); font: 700 .72rem/1 "Libre Caslon Text", Georgia, serif;
  letter-spacing: .12em; text-transform: uppercase; }
.lm-tabs button[aria-selected="true"] { background: var(--primary); color: var(--white); box-shadow: inset 0 0 0 1px var(--primary), inset 0 0 0 4px var(--primary), inset 0 0 0 5px rgba(255,255,255,.6); }
.lm-tabs button:focus-visible { outline: 3px solid #9DAEE1; outline-offset: 2px; }
.lm-frame { margin: 12px 14px 0; overflow: hidden; border-radius: 6px; padding: 2px;
  background: linear-gradient(100deg, #c6d4ea 0%, #b9c7f0 22%, #d9c8f2 40%, #bfe6ef 58%, #e6d3ee 76%, #c6d4ea 100%); }
.lm-frame img { display: block; width: 100%; height: auto; margin-top: -2.2%; background: var(--white); border-radius: 0 0 4px 4px; }
.lm-meta { margin: 10px 14px 4px; font-size: .9rem; color: var(--muted); }
.lm .mls-notice { margin: 0 14px 14px; }
.lm-down .lm-frame { min-height: 120px; background: var(--paper); }
.lm-down .lm-frame img { visibility: hidden; }
/* small chart at the top of each neighborhood card */
.lm-mini { margin: 0 0 12px; box-shadow: 0 0 0 1px var(--steel), 0 0 0 3px var(--white), 0 0 0 4px var(--primary); border-radius: 3px 3px 12px 3px; }
.lm-mini .lm-band { padding: 7px 10px; font-size: .64rem; }
.lm-mini .lm-live { padding: 3px 7px 3px 6px; }
.lm-mini .lm-frame { margin: 8px; }
.lm-mini .lm-frame img { margin-top: -2.9%; }
/* rent first, then buy */
.rent-first .btn { margin-top: 4px; }
/* =========================================================================================
   NEIGHBORHOOD ENGRAVINGS (card designer, 2026-10-22): same double frame as the live panels
   ========================================================================================= */
.nb-art { display: block; width: 100%; height: auto; background: var(--primary); border-radius: 4px 4px 18px 4px;
  box-shadow: 0 0 0 1px var(--steel), 0 0 0 4px var(--white), 0 0 0 5px var(--primary); }
.nb-card .nb-art { margin: 0 0 14px; border-radius: 3px 3px 12px 3px;
  box-shadow: 0 0 0 1px var(--steel), 0 0 0 3px var(--white), 0 0 0 4px var(--primary); }
.nb-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.nb-overview-art { margin: 0; padding: 5px; }
@media (min-width: 900px) {
  .nb-overview { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 44px; }
  .nb-overview-art { position: sticky; top: 110px; margin-top: 8px; }
}
/* hero v3: the welcome line sits lower-middle in a 16:9 frame, so portrait screens letterbox instead of cropping it */
@media (orientation: portrait) { .intro video { object-fit: contain; } }
/* =========================================================================================
   BRIEFINGS (/briefing/): circulation-loop pieces
   ========================================================================================= */
.briefing-meta { margin-top: 12px; font-size: .95rem; }
.briefing-draft { margin: 18px 0 0; padding: 12px 16px; border-radius: 3px 3px 12px 3px; background: var(--red-tint); box-shadow: inset 0 0 0 1px var(--primary); }
.briefing-note { padding: 10px 14px; border-radius: 3px 3px 12px 3px; background: var(--paper); }
.briefing-sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.briefing-send { margin: 22px 0 8px; }
.briefing-list { list-style: none; padding: 0; }
.briefing-list li { padding: 14px 0; box-shadow: var(--double-rule-bottom); }
.briefing-list a { font-weight: 700; }
/* Episode articles (2026-11-17): the Charleston Today video, loaded on click */
.ep-watch { margin: 0 0 24px; }
.ep-player, .ep-watch iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 3px 3px 14px 3px; overflow: hidden; background: #0B1C3E; position: relative; cursor: pointer; }
.ep-player img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; background: rgba(17, 42, 88, .9); color: #fff; font-size: 30px; line-height: 76px; text-align: center; box-shadow: 0 0 0 3px #ECE5D2; }
.ep-player:hover .ep-play, .ep-player:focus-visible .ep-play { background: #0B1C3E; }
/* Episode-article layout (2026-11-17): hero, numbers strip, answer box, figures */
.art-head { padding-bottom: 18px; }
.art-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.15; }
.art-hero { margin: 0 0 6px; }
.art-hero img { display: block; width: 100%; max-height: 72vh; object-fit: cover; }
.art-hero figcaption, .art-fig figcaption { font-size: .86rem; line-height: 1.5; color: var(--slate, #40547E); font-style: italic; padding-top: 8px; }
.art-stats { list-style: none; padding: 0; margin: 22px 0 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.art-stats li { background: #F1F3F8; border-radius: 3px 3px 14px 3px; padding: 14px 16px; box-shadow: inset 0 0 0 1px #C6D4EA; }
.art-stats strong { display: block; font-family: "Libre Caslon Display", Georgia, serif; font-size: 2.1rem; line-height: 1.05; color: #112A58; }
.art-stats span { display: block; font-size: .95rem; line-height: 1.35; margin-top: 4px; color: #1F3661; }
.art-stats small { display: block; font-size: .74rem; margin-top: 6px; color: #6F81A7; }
.art-answer { font-size: 1.12rem; line-height: 1.6; background: #F1F3F8; border-left: 4px solid #112A58; border-radius: 0 3px 14px 0; padding: 16px 20px; }
.briefing-body h2 { margin-top: 2.1em; }
.briefing-body h3 { margin-top: 1.4em; font-size: 1.15rem; }
.art-fig { margin: 30px 0; }
.art-fig img { display: block; width: 100%; height: auto; border-radius: 3px 3px 14px 3px; }
.art-cards { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.art-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; background: #fff; border-radius: 3px 3px 14px 3px; overflow: hidden; box-shadow: 0 0 0 1px #C6D4EA, 0 2px 8px rgba(17, 42, 88, .08); transition: box-shadow .15s, transform .15s; }
.art-card a:hover, .art-card a:focus-visible { box-shadow: 0 0 0 1.5px #112A58, 0 6px 18px rgba(17, 42, 88, .16); transform: translateY(-2px); }
.art-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0B1C3E; }
.art-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.art-card-body strong { font-family: "Libre Caslon Display", Georgia, serif; font-size: 1.22rem; line-height: 1.25; color: #112A58; }
.art-card-body .ep-badge { margin: 0; align-self: flex-start; }
.ep-badge-plain { background: #F1F3F8; }
.news-episodes { padding-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .art-card a { transition: none; } .art-card a:hover { transform: none; } }
.ep-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 3px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; background: #E9EDF5; color: #112A58; vertical-align: middle; }
/* =========================================================================================
   THE DECK (/deck/): game frame, album, card pages (2026-10-23)
   ========================================================================================= */
.deck-game-frame { border-radius: 4px 4px 22px 4px; overflow: hidden; background: #0B1C3E;
  box-shadow: 0 0 0 1px var(--steel), 0 0 0 4px var(--white), 0 0 0 5px var(--primary); }
.deck-game-frame iframe { display: block; width: 100%; height: 980px; border: 0; background: #0B1C3E; }
@media (max-width: 640px) { .deck-game-frame iframe { height: 1180px; } }
.deck-found { font-weight: 700; }
.deck-album { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.deck-tile { position: relative; display: grid; gap: 4px; padding: 8px 8px 10px; border-radius: 3px 3px 14px 3px; background: var(--white);
  box-shadow: 0 0 0 1px var(--border); color: var(--text); text-decoration: none; height: 100%; }
.deck-tile img { width: 100%; height: auto; border-radius: 6px; filter: grayscale(.85) brightness(.92); opacity: .72; transition: filter .2s, opacity .2s; }
.deck-tile.is-found img, .deck-tile:hover img, .deck-tile:focus-visible img { filter: none; opacity: 1; }
.deck-tile.is-found { box-shadow: 0 0 0 1px var(--steel), 0 0 0 3px var(--white), 0 0 0 4px var(--primary); }
.deck-tile-no { font: 700 .66rem/1.2 "Libre Caslon Text", Georgia, serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.deck-tile-t { font-size: .92rem; line-height: 1.25; }
.deck-tile-y { font-size: .8rem; color: var(--muted); }
.deck-tile-today { justify-self: start; margin-top: 2px; padding: 3px 7px; border-radius: 3px; background: var(--primary); color: var(--white); font: 700 .62rem/1.2 "Libre Caslon Text", Georgia, serif; letter-spacing: .1em; text-transform: uppercase; }
.deck-pair { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin: 0 auto; }
.deck-pair figure { margin: 0; }
.deck-pair img { display: block; width: 100%; height: auto; border-radius: 4.5%/3.2%; }
.deck-pair figcaption { margin-top: 6px; text-align: center; font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) { .deck-pair { grid-template-columns: 1fr; max-width: 380px; } }
.deck-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.deck-actions .deck-hint { flex-basis: 100%; text-align: center; margin: 0; min-height: 1.2em; }
.deck-record { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; }
.deck-record dt { font-weight: 700; }
.deck-record dd { margin: 0; overflow-wrap: anywhere; }
.deck-links { padding-left: 1.2em; }
.deck-prevnext { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.eyebrow-line { margin: 0 0 6px; font: 700 .74rem/1.2 "Libre Caslon Text", Georgia, serif; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- The Charleston Match: one match at a time (2026-10-23) ---------- */
.match-results .cards-3 { display: block; }
.mc-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.mc-track::-webkit-scrollbar { display: none; }
.mc-track:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.mc-slide { flex: 0 0 100%; scroll-snap-align: start; margin: 0; display: grid; gap: 18px; align-items: center; }
.mc-art { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); display: block; background: var(--accent); }
.mc-text .card-h { font-size: 1.6rem; margin: 2px 0 6px; }
.mc-text .btn { margin-top: 8px; }
@media (min-width: 760px) { .mc-slide { grid-template-columns: 1.15fr 1fr; padding: 18px; } }
.mc-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.mc-count { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mc-btn[disabled] { opacity: .45; cursor: default; }
.match-tries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.match-tries .chip { border: 0; cursor: pointer; font: inherit; font-weight: 700; min-height: 44px; }
#ask { scroll-margin-top: 8px; }

/* ---------- The Charleston Match: three questions (2026-10-23) ---------- */
.match-sub { margin: 4px 0 14px; font-size: 1.1rem; }
.mq { border: 2px solid var(--accent); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0 0 12px; min-width: 0; }
.mq legend { background: var(--white); font-weight: 800; font-size: 1.25rem; padding: 0 6px; display: flex; align-items: center; gap: 8px; }
.mq-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--primary); font-size: 1rem; }
.mq-cue { display: none; font-size: .85rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--primary); color: #fff; border-radius: 4px; padding: 2px 8px; }
.mq.is-next { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.mq.is-next .mq-cue { display: inline-block; }
.mq.is-next .mq-n, .mq.is-done .mq-n { background: var(--primary); color: #fff; }
.mq.is-done .mq-n::after { content: "✓"; }
.mq.is-done .mq-n { font-size: 0; }
.mq.is-done .mq-n::after { font-size: 1rem; }
.mq-help { margin: 2px 0 8px; }
.mq-sub { margin-top: 12px; font-weight: 700; }
.mq-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.mq-opt { position: relative; display: inline-flex; }
.mq-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mq-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 2px solid var(--primary); border-radius: 999px; background: var(--white); color: var(--primary); font-weight: 700; cursor: pointer; }
.mq-opt.mq-small span { min-width: 56px; justify-content: center; }
.mq-opt input:checked + span { background: var(--primary); color: #fff; }
.mq-opt input:checked + span::before { content: "✓ "; white-space: pre; }
.mq-opt input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.mq-more { margin: 4px 0 12px; }
.mq-more summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.mq-more textarea { width: 100%; margin-bottom: 8px; }
.mq-form .match-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mq-form [data-match-submit][disabled] { opacity: .5; cursor: not-allowed; }
.mq-left { font-weight: 700; color: var(--muted); }
.mq-map { margin: 6px 0 14px; padding-left: 1.2em; }
.mq-map li { margin-bottom: 4px; }
.mq-addon-note { margin-top: 8px; }
.match, .match-results, .match-results .cards-3, .mc-track { min-width: 0; max-width: 100%; }
.mc-track { width: 100%; }
.has-deck > *, .deck-head { min-width: 0; }

/* ---------- Sample report (2026-10-23) ---------- */
.sr-map { display: grid; gap: 16px; margin: 12px 0 18px; }
@media (min-width: 760px) { .sr-map { grid-template-columns: repeat(3, 1fr); } }
.sr-pages { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .sr-pages { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .sr-pages { grid-template-columns: repeat(4, 1fr); } }
.sr-pages li { margin: 0; min-width: 0; }
.sr-pages img { width: 100%; height: auto; display: block; border: 1px solid var(--accent); border-radius: 6px; box-shadow: 0 2px 8px rgba(11,28,62,.12); }
.sr-pages span { display: block; margin-top: 6px; font-weight: 700; font-size: .95rem; }
.mq-count { background: var(--alt); border: 2px solid var(--primary); border-radius: var(--radius); padding: 12px 16px; margin: 8px 0 16px; }
.mq-count-big { font-size: 1.25rem; margin: 0 0 4px; }
.mq-count .fine { margin: 0; }
.mc-forsale strong { color: var(--primary); }

/* ---------- The Charleston Match: rectangles only, parchment panels, the Where images (2026-10-24) ---------- */
.match-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.match-head .match-title { margin: 0; }
.match-sample { margin-left: auto; }
.mq { background: #ECE5D2; border-color: #D8CDB0; }
.mq legend { background: #ECE5D2; }
.mq-n { border-radius: 2px; }
.mq-cue { border-radius: 2px; }
.mq-opt span { border-radius: 2px; }
.mq-opt.mq-img { flex: 1 1 150px; max-width: 220px; }
.mq-opt.mq-img span { flex-direction: column; align-items: stretch; padding: 0; width: 100%; overflow: hidden; background: var(--white); }
.mq-opt.mq-img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.mq-opt.mq-img b { display: block; padding: 8px 10px; text-align: center; }
.mq-opt.mq-img input:checked + span { outline: 4px solid var(--primary); outline-offset: -4px; }
.mq-opt.mq-img input:checked + span::before { content: none; }
.mq-opt.mq-img input:checked + span b::before { content: "✓ "; }
@media (max-width: 520px) { .mq-opt.mq-img { flex-basis: calc(50% - 8px); max-width: none; } }
.mq[data-q="where"] .mq-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mq[data-q="where"] .mq-opt.mq-img { max-width: none; }
@media (max-width: 620px) { .mq[data-q="where"] .mq-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mq[data-q="what"] .mq-opts:first-of-type, .mq[data-q="howmuch"] .mq-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mq[data-q="what"] .mq-opts:last-of-type { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mq .mq-opt.mq-img { max-width: none; }
.mq-beds .mq-any { display: block; aspect-ratio: 4 / 3; background: repeating-linear-gradient(45deg, #F4EEDD, #F4EEDD 8px, #ECE5D2 8px, #ECE5D2 16px); }
.mq-beds b { font-size: .95rem; }
@media (max-width: 620px) {
  .mq[data-q="what"] .mq-opts:first-of-type, .mq[data-q="howmuch"] .mq-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mq[data-q="what"] .mq-opts:last-of-type { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- iulia's digital concierge leads the Match (2026-10-25) ---------- */
.cg-modes { display: flex; gap: 0; margin: 4px 0 14px; border: 2px solid var(--primary); width: fit-content; max-width: 100%; }
.cg-mode { min-height: 44px; padding: 8px 16px; border: 0; background: var(--white); color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }
.cg-mode[aria-pressed="true"] { background: var(--primary); color: #fff; }
.cg-stage { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 16px; align-items: start; background: #ECE5D2; border: 2px solid #D8CDB0; padding: 14px; margin-bottom: 14px; }
.cg-host { position: relative; border: 2px solid var(--primary); background: #000; aspect-ratio: 4 / 5; overflow: hidden; }
.cg-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-sound { position: absolute; left: 6px; bottom: 6px; min-height: 32px; padding: 4px 8px; border: 1px solid #fff; background: rgba(17,42,88,.85); color: #fff; font: 700 .8rem/1 inherit; cursor: pointer; }
.cg-caption { font-size: 1.2rem; line-height: 1.45; margin: 0 0 12px; min-height: 3em; }
.cg-answers { display: flex; flex-wrap: wrap; gap: 8px; }
.cg-chip { min-height: 40px; padding: 6px 10px; border: 2px solid var(--primary); background: var(--white); color: var(--primary); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.cg-chip small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.cg-chip.is-current { background: var(--primary); color: #fff; }
.cg-chip.is-current small { color: #dfe6f5; }
@media (max-width: 560px) { .cg-stage { grid-template-columns: 110px 1fr; gap: 12px; padding: 10px; } .cg-caption { font-size: 1.05rem; } }
.match:not(.is-cg) .cg-stage, .match:not(.is-cg) .cg-nextrow { display: none; }
.match.is-cg .mq-form > .mq { display: none; }
.match.is-cg .mq-form > .mq.cg-active { display: block; }
.match.is-cg .mq-more, .match.is-cg .match-actions { display: none; }
.match.is-cg.cg-ready .match-actions { display: flex; }
.match.is-cg .mq-cue { display: none; }
.cg-nextrow { margin: 12px 0 0; }
@media (prefers-reduced-motion: no-preference) {
  .match.is-cg .mq.cg-active .mq-opt.cg-in { animation: cg-rise .55s cubic-bezier(.2,.7,.2,1) both !important; animation-delay: calc(var(--i, 0) * 230ms + 250ms) !important; }
}
@keyframes cg-rise { from { opacity: 0; transform: translateY(14px) scale(.97); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }

/* ---- Charleston Match v2: count, crossroads, narrowing, hand-off, doors, CMA request ---- */
.match-head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.match-head-actions .match-sample { margin-left: 0; }
.nw { background: #ECE5D2; border: 2px solid #D8CDB0; padding: 14px 16px; margin: 8px 0 18px; }
.nw-count .mq-count-big { font-size: 1.35rem; margin: 0 0 4px; }
.nw-count p { margin: 0 0 6px; }
.nw-cross { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.nw-cross .btn, .nw-talk .btn, .nw-relax .btn, .nw-fs .btn { border-radius: 2px; }
.nw-q { margin-top: 10px; }
.nw-fs { background: #F4EEDD; }
.nw-opts.nw-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.nw-opts .mq-opt.mq-img { max-width: none; }
.nw-opts .mq-text span { min-height: 64px; justify-content: center; }
.nw-opts .nw-n { display: block; padding: 0 10px 8px; text-align: center; font-weight: 400; font-size: .85rem; color: var(--muted); }
.mq-opt input:checked + span .nw-n { color: inherit; }
.nw-relax, .nw-talk { border-top: 1px solid #D8CDB0; margin-top: 10px; padding-top: 10px; }
.nw .fine { margin: 8px 0 0; }
.places-h { margin: 18px 0 8px; }
.cg-doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 10px 0; }
@media (max-width: 620px) { .cg-doors { grid-template-columns: 1fr; } }
.mq-door { display: flex; flex-direction: column; align-items: stretch; padding: 0; border: 2px solid var(--primary); border-radius: 2px; background: var(--white); color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; overflow: hidden; min-height: 64px; }
.mq-door img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.mq-door b { display: block; padding: 12px 10px; text-align: center; }
.mq-door:hover, .mq-door:focus-visible { background: var(--primary); color: #fff; }
.cg-relo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.cg-relo select { min-height: 44px; }
.cg-cma { background: #F4EEDD; border: 2px solid #D8CDB0; padding: 12px 14px; margin: 10px 0; }
@media (prefers-reduced-motion: no-preference) {
  .match.is-cg .cg-doors > .cg-in, .match.is-cg .nw-fs .cg-in { animation: cg-rise .45s ease-out both !important; animation-delay: calc(var(--i, 0) * 120ms) !important; }
}

.mq-report { margin: 12px 0; }
.mq-report .mq-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.mq-report .mq-opt.mq-img { max-width: none; }

/* ---- iulia stays in view: docked in the left column on wide pages, floating in the corner elsewhere ---- */
.deck-corner.cg-dock { align-self: stretch; }
.deck-corner > .cg-host { position: sticky; top: 16px; margin-top: 18px; width: 100%; }
.deck-corner > .cg-dockcap { position: sticky; top: calc(16px + 250px * 5 / 4 + 4px); margin: 6px 0 0; padding: 8px 10px; background: #ECE5D2; border: 2px solid #D8CDB0; font-size: .95rem; line-height: 1.35; }
.match.cg-docked .cg-stage { grid-template-columns: 1fr; }
.match.cg-docked .cg-stage > .cg-talk, .cg-stage > .cg-talk { grid-column: auto; }
.match:not(.cg-docked) .cg-stage > .cg-talk { grid-column: 2; }
.cg-host.is-pip { position: fixed; left: 12px; bottom: 64px; width: 150px; z-index: 50; box-shadow: 0 8px 24px rgba(11,28,62,.35); }
@media (max-width: 560px) { .cg-host.is-pip { width: 104px; } }
.report-steps { background: #ECE5D2; border: 2px solid #D8CDB0; margin: 12px 0; padding: 12px 16px 12px 36px; }
.report-steps li { margin: 4px 0; }

/* ---- iulia's frame: square 4:5 again (2026-11-01; the circle was tried and dropped). The still (sca-poster.jpg) covers
   the video whenever it isn't playing. The Sound button sits under the frame, off her face. ---- */
.cg-host { overflow: visible; margin-bottom: 40px; }
.cg-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: opacity .15s linear; }
.cg-thumb.is-off { opacity: 0; pointer-events: none; }
.cg-host .cg-sound { left: -2px; right: -2px; top: calc(100% + 6px); bottom: auto; width: calc(100% + 4px); min-height: 32px; z-index: 2; border: 2px solid var(--primary); background: var(--primary); }
.cg-host .cg-sound:hover, .cg-host .cg-sound:focus-visible { background: #0B1C3E; }
.cg-host.is-pip { margin-bottom: 0; bottom: 100px; }
.cg-host.is-pip .cg-sound { min-height: 26px; font-size: .72rem; }
.deck-corner > .cg-dockcap { top: calc(16px + 250px * 5 / 4 + 48px); }

/* Our Team (2026-10-28): four cards read better two by two; long words like the domain wrap inside the card */
@media (min-width: 1000px) { .cards-4.team-grid { grid-template-columns: repeat(2, 1fr); } }
.team-card p { overflow-wrap: anywhere; }
.story-photo { margin: 24px 0 0; }
.story-photo img { display: block; width: 100%; height: auto; box-shadow: 0 0 0 2px var(--coral, #F2A08C), 0 0 0 5px #fff, 0 0 0 6px var(--primary); }
.story-photo figcaption { margin-top: 12px; font-size: .95rem; color: var(--muted, #4a5878); text-align: center; }
.nb-art-note { margin: 6px 0 0; font-size: .8rem; color: var(--muted, #4a5878); text-align: right; }

/* ---------- /market-data/ (js/market-data.js) ---------- */
.md-updated { font-weight: 700; color: var(--primary); }
[data-md-root] h2 { margin-top: 36px; }
[data-md-root] .compare td.num, [data-md-root] .compare th.num { text-align: right; white-space: nowrap; }
.md-big { font-size: 1.25rem; }
.md-big strong { font-size: 2.2rem; color: var(--primary); margin-right: 6px; }
.md-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0 6px; }
.md-search label { flex-basis: 100%; font-weight: 700; }
.md-search input { flex: 1 1 260px; min-height: 46px; padding: 8px 12px; border: 2px solid var(--primary); border-radius: 4px; font: inherit; }
.md-search select { min-height: 46px; padding: 8px 10px; border: 2px solid var(--primary); border-radius: 4px; font: inherit; background: #fff; }
.md-archive { list-style: none; padding: 0; margin: 0 0 20px; }
.md-archive li { border-bottom: 1px solid var(--border); }
.md-archive summary { cursor: pointer; padding: 12px 4px; min-height: 44px; }
.md-date { font-weight: 700; color: var(--primary); }
.md-src { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 3px; background: #E9EDF5; font-size: .9rem; }
.md-archive details p { margin: 0 4px 10px; }

/* ---- The seals: certificates on card pages, /verify/ and /verify/CH-DECK-NNN/ ---- */
.cert-fig { margin: 22px auto 0; max-width: 360px; text-align: center; }
.cert-fig img, .cert-big img, .cert-tile img, .cert-card img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 1px 2px rgba(11,28,62,.15), 0 14px 30px -18px rgba(11,28,62,.55); }
.cert-fig figcaption, .cert-big figcaption { font-size: .9rem; margin-top: 8px; }
.cert-grid { list-style: none; margin: 10px 0 26px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.cert-tile { display: block; color: inherit; text-decoration: none; }
.cert-tile:hover .cert-tile-t, .cert-tile:focus-visible .cert-tile-t { text-decoration: underline; }
.cert-tile-id { display: block; margin-top: 7px; font-size: .78rem; letter-spacing: .06em; color: var(--muted, #4A5672); }
.cert-tile-t { display: block; font-size: .92rem; line-height: 1.3; }
.cert-pair { display: grid; gap: 26px; }
.cert-big { margin: 0; }
.cert-side { max-width: 260px; }
.cert-card { display: block; color: inherit; font-size: .95rem; }
.cert-card span { display: block; margin-top: 8px; }
.cert-status { margin-top: 14px; }
@media (min-width: 860px) { .cert-pair { grid-template-columns: minmax(0, 720px) 240px; justify-content: center; align-items: start; } }
.deck-record code { overflow-wrap: anywhere; font-size: .85em; }
.verify-box { border: 1px solid rgba(17,42,88,.18); border-radius: 10px; background: #fff; padding: 18px; }
.verify-drop { display: block; cursor: pointer; }
.verify-drop-t { display: block; font-weight: 700; margin-bottom: 8px; }
.verify-drop input { max-width: 100%; font-size: 1rem; }
.verify-out:empty { display: none; }
.verify-out { margin-top: 12px; padding: 12px 14px; border-radius: 8px; border-left: 5px solid #8A94A8; background: var(--paper); }
.verify-out p { margin: 0 0 .4em; }
.verify-out.is-good { border-left-color: #1F7A4D; }
.verify-out.is-old { border-left-color: #B7791F; }
.verify-out.is-bad { border-left-color: #7A3E2E; } /* no red on the site: iulia's dark coral */

/* ---------- The Circulation Engine (js/circ.js): a copy's trail, Register / Pass it on, My deck, Where the cards have been ---------- */
.circ-panel { margin: 16px 0 0; padding: 14px 16px; background: #ECE5D2; border: 2px solid #D8CDB0; border-left: 4px solid var(--coral, #F2A08C); }
.deck-corner .circ-panel { padding: 10px 12px; font-size: .92rem; }
.circ-panel p { margin: 0 0 8px; }
.circ-head { font-weight: 700; color: var(--primary); }
.circ-trail { margin: 4px 0 10px; padding-left: 22px; }
.circ-trail li { margin: 2px 0; }
.circ-trail span { color: var(--muted); font-size: .9em; }
.circ-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.circ-form { display: grid; gap: 10px; margin: 10px 0; max-width: 520px; }
.circ-form label { display: grid; gap: 4px; font-weight: 700; }
.circ-form input, .circ-form select { min-height: 44px; padding: 8px 10px; border: 2px solid var(--primary); background: var(--white); font: inherit; font-weight: 400; }
.circ-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.circ-check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; }
.circ-check input { min-height: 0; width: 20px; height: 20px; }
.circ-opt { font-weight: 400; color: var(--muted); }
.circ-msg { min-height: 1.2em; margin: 0; }
.circ-done { font-weight: 700; color: var(--primary); }
.circ-slot:empty { display: none; }
.circ-album .deck-tile.is-mine img { filter: none; opacity: 1; }
.circ-album .deck-tile.is-mine { box-shadow: 0 0 0 1px var(--steel), 0 0 0 3px var(--white), 0 0 0 4px var(--coral, #F2A08C); }
.circ-totals { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.circ-totals li { background: #ECE5D2; border: 2px solid #D8CDB0; padding: 12px 14px; }
.circ-totals b { display: block; font-size: 1.8rem; color: var(--primary); }
.circ-list span { color: var(--muted); }
.circ-table { width: 100%; border-collapse: collapse; }
.circ-table th, .circ-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #D8CDB0; }
.circ-table td:not(:first-child), .circ-table th:not(:first-child) { text-align: right; }
@media (max-width: 560px) { .circ-row { grid-template-columns: 1fr; } }

/* "How did you hear about us?" chips (site.js CHHeard), 2026-11-02 */
.heard { margin: 14px 0 6px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 8px; background: var(--white); color: var(--text); text-align: left; }
.heard-q { margin: 0 0 8px; font-weight: 700; }
.heard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.heard .chip { border: 1px solid var(--sc-steel, #6F81A7); cursor: pointer; font: inherit; font-size: .95rem; font-weight: 600; min-height: 44px; color: var(--text); }
.heard .chip:hover, .heard .chip:focus-visible { background: var(--primary); color: var(--white); }
.heard-other { margin: 8px 0 0; }
.heard-other input { min-height: 44px; padding: 6px 8px; font: inherit; max-width: 100%; }
.heard-thanks:empty { display: none; }
.heard-thanks { margin: 6px 0 0; }

/* ---------- Send this card: smaller buttons, and the icon tray that opens under them (js/deck.js) ---------- */
.deck-dialog-actions, .deck-actions { gap: 8px; }
.deck-dialog-actions .btn, .deck-actions .btn { min-height: 34px; padding: 5px 12px; font-size: .7rem; letter-spacing: .1em; gap: 6px; }
.deck-dialog-actions .btn .icon, .deck-actions .btn .icon { width: 16px; height: 16px; }
.deck-share { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; max-width: 640px; margin: 4px auto 0; }
.deck-share[hidden] { display: none; }
.deck-share-h { margin: 4px 0 0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.deck-dialog .deck-share-h, .deck-dialog .deck-share-msg { color: #fff; }
.deck-share-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.deck-share-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 2px solid var(--silver, #C9CED8); border-radius: 50%; background: #fff; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.deck-share-btn svg { width: 22px; height: 22px; }
.deck-share-btn:hover { transform: translateY(-2px); border-color: var(--primary); }
.deck-share-btn:focus-visible { outline: 3px solid var(--accent, #F2A08C); outline-offset: 2px; }
.deck-share-msg { margin: 2px 0 0; min-height: 1.2em; font-size: .9rem; text-align: center; }
/* with the tray open, the card gets smaller so the icons fit on the screen */
.deck-dialog.is-sharing { overflow-y: auto; }
.deck-dialog.is-sharing:not(.is-enlarged) .deck-card { width: min(70vw, calc(52vh * 5 / 7)); }
@media (prefers-reduced-motion: reduce) { .deck-share-btn { transition: none; } .deck-share-btn:hover { transform: none; } }

/* ---------- The Piazza (/piazza/, js/piazza.js): the door form and the five doors ---------- */
.pz-form { display: grid; gap: 14px; max-width: 30rem; }
.pz-form input { font: inherit; padding: 10px 12px; border: 1px solid var(--muted); border-radius: 6px; }
.pz-msg { min-height: 1.4em; margin: 0; color: var(--primary); font-weight: 700; }
.pz-welcome-h { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.pz-doors { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.pz-door { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; background: #fff; border: 1px solid var(--accent); border-radius: 8px; }
.pz-door h3 { margin: 0 0 4px; }
.pz-door p { margin: 0 0 4px; }
.pz-no { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--primary); }
.pz-door.is-open { border-color: var(--primary); }
.pz-door.is-here { box-shadow: 0 0 0 3px var(--accent); }
.pz-here { font-weight: 700; color: var(--primary); }

/* ---------- The Piazza: the chat (AtomChat's docked widget, themed to the card back; js/piazza-chat.js does the icons) ----------
   AtomChat ships its own fonts, greys and a red "busy" dot; these rules put it in the site's indigo, paper, mist and
   foil, in the site's fonts. Colours and type only: AtomChat's layout is left alone so its updates can't break it. */
#cometchat, #cometchat *, [class*="cometchat_"] { font-family: var(--font) !important; }
#cometchat_userstab, .cometchat_tabtitle, .cometchat_userstabtitle { background: var(--primary) !important; color: #fff !important; }
.cometchat_tabtitle, .cometchat_userstabtitle { border-bottom: 3px solid transparent !important; border-image: var(--foil) 1 !important; }
#cometchat .cometchat_userstab_text, #cometchat .cometchat_userstabtitle, #cometchat .cometchat_groupname, #cometchat .cometchat_primarytabtitle,
.cometchat_userstab_text, .cometchat_userstabtitle, .cometchat_groupname, .cometchat_primarytabtitle { font-family: var(--display) !important; font-weight: 400 !important; letter-spacing: .02em; }
#cometchat .cometchat_userstab_text, #cometchat .cometchat_groupname, .cometchat_userstab_text, .cometchat_groupname { font-size: 15px !important; }
.cometchat_tabcontent, .cometchat_primarytabcontent, .cometchat_wrapper { background: var(--paper) !important; color: var(--text) !important; }
.cometchat_tabcontenttext { background: #fff !important; }
.cometchat_search_wrapper, .cometchat_searchbar, .cometchat_search { background: #fff !important; }
.cometchat_search { border: 1px solid var(--silver) !important; border-radius: 2px !important; color: var(--primary) !important; }
.cometchat_userlist, .cometchat_grouplist { background: #fff !important; border-color: var(--accent) !important; }
.cometchat_userlist_hover, .cometchat_grouplist_hover, .cometchat_searchlist_hover, .cometchat_botlist_hover { background: #E9EDF5 !important; }
.cometchat_groupscontentname, .cometchat_userscontentname { color: var(--primary) !important; font-weight: 700 !important; }
.cometchat_groupusercount, .cometchat_groupusercount *, .cometchat_userscontentstatus { color: var(--muted) !important; }
.cometchat_groupscontentavatarimage { border-radius: 50%; }
.cometchat_grouptype_labels, .cometchat_nogroupcreated, .cometchat_nofriends { background: var(--paper) !important; color: var(--muted) !important;
  letter-spacing: .14em; text-transform: uppercase; font-size: 10px !important; font-weight: 700 !important; }
/* messages: yours in indigo, everyone else's on white with a mist rule */
.cometchat_chatboxmessagecontent { background: #fff !important; color: var(--text) !important; border: 1px solid var(--accent); font-size: 14px !important; }
.cometchat_chatboxmessagecontent.cometchat_self, .cometchat_self { background: var(--primary) !important; color: #fff !important; border-color: var(--primary); }
.cometchat_chatboxmessagefrom, .cometchat_chatboxmessagefrom * { color: var(--muted) !important; font-weight: 700; }
.cometchat_prependCrMessages { color: var(--primary) !important; text-decoration: underline; }
.cometchat_tabcontentinput { background: #fff !important; border-top: 1px solid var(--accent) !important; }
.cometchat_textarea { color: var(--text) !important; font-size: 14px !important; }
.cometchat_unreadCount, .cometchat_unreadmsgcount, .cometchat_msgcount_cr { background: var(--coral, #F2A08C) !important; color: var(--primary-dark) !important; }
/* status: no red anywhere on the site, so "busy" is slate */
.cometchat_user_busy { background: var(--muted) !important; }
.invitebutton { background: var(--primary) !important; font-family: var(--font) !important; }
/* calls open from the Parlor up (js/piazza-chat.js sets pz-calls); AtomChat's Role Based Access is the real rule */
html:not(.pz-calls) .cometchat_audiochat, html:not(.pz-calls) .cometchat_avchat, html:not(.pz-calls) .cometchat_audiocallsvg_icon { display: none !important; }
/* on phones AtomChat shows a small speech bubble instead of the bar: make it The Piazza's roundel, round like the WhatsApp button */
.cometchat_ccmobiletab_redirect { width: 52px !important; height: 52px !important; padding: 0 !important; border-radius: 50% !important;
  background: var(--primary) url("/images/piazza/piazza.svg") center / 100% no-repeat !important; box-shadow: 0 4px 14px -4px rgba(11, 28, 62, .6) !important; font-size: 0 !important; }
.cometchat_ccmobiletab_redirect::before, .cometchat_ccmobiletab_redirect::after { display: none !important; }
/* coral, the site's one warm accent, used the way the rest of the site uses it: rings round roundels, a left bar on what's
   chosen, a hairline under the indigo band (principal, 2026-11-03: "sprinkle the coral throughout the branding") */
.cometchat_userstabtitle, .cometchat_tabtitle { box-shadow: inset 0 -2px 0 var(--coral, #F2A08C) !important; }
#cometchat_userstab { box-shadow: inset 0 3px 0 var(--coral, #F2A08C) !important; }
.cometchat_tab_clicked { box-shadow: inset 0 -3px 0 var(--coral, #F2A08C) !important; }
.cometchat_userlist_hover, .cometchat_grouplist_hover, .cometchat_searchlist_hover, .cometchat_botlist_hover { box-shadow: inset 4px 0 0 var(--coral, #F2A08C) !important; }
.cometchat_groupscontentavatarimage, .cometchat_userscontentavatarimage { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--coral, #F2A08C); border-radius: 50%; }
.cometchat_grouptype_labels { border-left: 3px solid var(--coral, #F2A08C) !important; }
.cometchat_chatboxmessagecontent.cometchat_self, .cometchat_self { box-shadow: inset -3px 0 0 var(--coral, #F2A08C); }
.cometchat_tabcontentinput { border-top: 2px solid var(--coral, #F2A08C) !important; }
.cometchat_textarea { caret-color: var(--coral, #F2A08C); }
.cometchat_prependCrMessages { text-decoration-color: var(--coral, #F2A08C) !important; }
.cometchat_ccmobiletab_redirect { box-shadow: 0 0 0 3px #0B1C3E, 0 0 0 5px var(--coral, #F2A08C), 0 6px 16px -4px rgba(11, 28, 62, .6) !important; }
.pz-no { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--coral, #F2A08C); }
.pz-door.is-here { box-shadow: inset 4px 0 0 var(--coral, #F2A08C), 0 0 0 3px var(--accent); }
.pz-welcome-h { border-left: 4px solid var(--coral, #F2A08C); padding-left: 12px; }
/* Lordicon icons on the site (js/lordicons.js): indigo lines with coral details, still unless pointed at */
lord-icon.lordi { display: inline-block; flex: none; }
.pz-door { align-items: center; }
.pz-door .pz-icon { margin-left: -4px; }
.pz-rooms { list-style: none; padding: 0; margin: 16px 0 22px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pz-room { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: #fff; border: 1px solid var(--accent); border-left: 4px solid var(--coral, #F2A08C); border-radius: 8px; }
.pz-room h3 { margin: 0; font-size: 1.05rem; }
.pz-room p { margin: 0 0 2px; font-size: .95rem; }
.pz-room .pz-room-door { font: 700 .7rem/1.4 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lordi-h { display: flex; align-items: center; gap: 12px; }
.lordi-line { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.pz-deck { margin: 0 0 18px; padding: 14px 16px; background: var(--paper); border-left: 4px solid var(--coral, #F2A08C); border-radius: 6px; }
.pz-deck-h { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-weight: 700; color: var(--primary); }
.circ-piazza { border-left: 4px solid var(--coral, #F2A08C); padding-left: 12px; }

/* Our Team (/agents/): portraits and fact lists (2026-11-03) */
.team-card .team-photo { width: 100%; max-width: 240px; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 8px;
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px #fff, 0 0 0 5px var(--coral, #F2A08C); margin: 4px 0 16px; }
.team-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 10px; font-size: .95rem; }
.team-facts dt { font: 700 .72rem/1.6 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.team-facts dd { margin: 0; }
@media (max-width: 520px) { .team-facts { grid-template-columns: 1fr; } .team-facts dd { margin-bottom: 6px; } }

/* Our Team: the brokerage sits inside the McMasters Team card (2026-11-03), so the two cards fill one row with no empty space */
.team-sub { margin: 14px 0 16px; padding-top: 14px; border-top: 1px solid var(--coral, #F2A08C); }
.team-sub .badge { margin-bottom: 6px; }
.team-sub-h { margin: 0 0 6px; font-size: 1.05rem; color: var(--primary); }
.team-sub p:last-child { margin-bottom: 0; }

/* The Piazza: "Email me my door link" for alumni and graduates without a report number (2026-11-03) */
.pz-mail { margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--coral, #F2A08C); }
.pz-mail[hidden] { display: none; }

/* The Piazza: each room's next live session (2026-11-03) */
.pz-live { margin-top: 6px; padding-left: 10px; border-left: 3px solid var(--coral, #F2A08C); }

/* ---------- Main navigation menus (principal, 2026-11-06; markup: generator/build.mjs NAV, behaviour: js/nav.js) ----------
   Each heading links to its hub page; the arrow beside it opens a menu panel the width of the page. With a mouse on a wide
   screen the panel also opens on hover. Phones keep every heading visible (no hamburger); the panel opens under the strip. */
.main-nav { position: relative; z-index: 50; }
.site-header { overflow: visible; } /* the menus hang below the header; its rounded top corners clip nothing (the backgrounds follow the radius) */
.nav-list .nav-item { display: flex; align-items: stretch; }
.nav-list .nav-item > .nav-top { flex: 1 1 auto; }
.nav-list .has-menu > .nav-top { padding-right: 4px; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; min-height: 52px; padding: 0 6px 0 0; margin: 0;
  border: 0; background: transparent; color: #fff; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; fill: currentColor; transition: transform .15s ease; }
.nav-toggle:hover { background: var(--primary-dark); }
.nav-toggle:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.has-menu.open > .nav-toggle svg { transform: rotate(180deg); }
.nav-item.is-current > .nav-toggle { background: var(--white); color: var(--primary); box-shadow: var(--double-rule-bottom); }
.nav-item.is-current > .nav-toggle:focus-visible { outline-color: var(--primary); }

.nav-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); color: var(--text);
  border-top: 3px solid transparent; border-image: var(--foil) 1; box-shadow: 0 14px 28px rgba(11, 28, 62, .22), 0 2px 0 var(--primary);
  max-height: min(78vh, 640px); overflow-y: auto; text-align: left; }
.has-menu.open > .nav-menu { display: block; }
@media (hover: hover) and (min-width: 900px) { .has-menu:hover > .nav-menu { display: block; } .has-menu:hover > .nav-toggle svg { transform: rotate(180deg); } }
.nav-menu-inner { display: grid; gap: 8px 32px; padding-top: 18px; padding-bottom: 20px; }
@media (min-width: 900px) { .nav-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nav-cols-3 { grid-template-columns: 1.1fr 1fr 1fr; } }
.nav-group-h { margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(17, 42, 88, .18); font-size: .85rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-menu-inner.nav-cols-1 .nav-group ul { columns: 2 220px; column-gap: 32px; }
.nav-group li { break-inside: avoid; }
.nav-list .nav-menu a, .nav-list .nav-menu a:hover, .nav-list .nav-menu a[aria-current="page"] {
  display: block; min-height: 0; padding: 9px 10px; margin: 0 -10px; justify-content: flex-start; text-align: left;
  color: var(--primary); font-weight: 600; background: none; box-shadow: none; border-radius: 3px; }
.nav-list .nav-menu a:hover { background: var(--paper); text-decoration: underline; }
.nav-list .nav-menu a:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.nav-list .nav-menu a[aria-current="page"] { font-weight: 800; box-shadow: inset 4px 0 0 var(--primary); }
@media (max-width: 899px) {
  .nav-menu-inner { padding-top: 12px; padding-bottom: 14px; }
  .nav-list .nav-menu a, .nav-list .nav-menu a:hover, .nav-list .nav-menu a[aria-current="page"] { padding: 12px 10px; } /* thumb-sized */
}
@media print { .nav-toggle, .nav-menu { display: none !important; } }
/* The Burden of Proof seal check on /verify/ (js/verify.js) */
.bp-verify { display: grid; gap: 8px; margin-top: 12px; }
.bp-verify label { font-weight: 700; }
.bp-row { display: flex; flex-wrap: wrap; gap: 10px; }
.bp-row input { flex: 1 1 240px; min-height: 48px; padding: 10px 12px; font: inherit; letter-spacing: .06em; text-transform: uppercase; border: 1.5px solid rgba(17, 42, 88, .35); border-radius: 3px; }

/* Regions page: "The four regions at a glance" sits outside the section's .wrap, wider than it (principal 2026-11-11).
   Desktop: up to 1440 px; tablet: the full width less a gutter; phone: each region stacks as a labelled block, so no side-scroll. */
.glance-wide { width: min(1440px, calc(100% - 32px)); margin: 0 auto 4px; }
.glance-wide .table-wrap { overflow-x: visible; }
.compare.glance { min-width: 0; table-layout: fixed; }
.compare.glance th[scope="col"]:first-child { width: 14%; }
.compare.glance th, .compare.glance td { padding: 14px 18px; line-height: 1.5; }
@media (max-width: 699px) {
  .glance-wide { width: calc(100% - 16px); }
  .compare.glance, .compare.glance tbody, .compare.glance tr, .compare.glance th, .compare.glance td { display: block; width: auto; }
  .compare.glance caption { display: block; padding: 12px 14px 4px; }
  .compare.glance thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare.glance tbody tr { border-top: 2px solid var(--primary); }
  .compare.glance tbody th { background: var(--primary); color: #fff; padding: 10px 14px; font-size: 1.08rem; }
  .compare.glance td { padding: 8px 14px 10px; }
  .compare.glance td::before { content: attr(data-label); display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
}

/* /agents/ "Our brokerage" pane (principal 2026-11-11): text left, the brokerage logo upper right, Teresa's photo lower right.
   The images size to the pane; the pane keeps its width. */
.team-sub.has-art { display: grid; grid-template-columns: minmax(0, 1fr) minmax(64px, 30%); grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 12px; }
.team-sub.has-art .team-sub-text { grid-column: 1; grid-row: 1 / span 2; }
.team-sub-logo { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; width: 100%; max-width: 120px; height: auto; }
.team-sub-photo { grid-column: 2; grid-row: 2; justify-self: end; align-self: end; width: 100%; max-width: 180px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--silver); }
/* the pane grows to the bottom of the card, so Teresa sits low and balances iulia's photo in the card beside it (principal 2026-11-11) */
.team-card:has(.team-sub.has-art) { display: flex; flex-direction: column; }
.team-card .team-sub.has-art { flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) minmax(120px, 42%); }
.team-card:has(.team-sub.has-art) > .btn { align-self: flex-start; }

/* ---- /thanks/, /thanks/peer/, /gift/dum-spiro-spero/ (2026-11-12): branded, with iulia (cut out) in the lower right ---- */
.thanks-head { text-align: center; }
.thanks-head .lead { margin-left: auto; margin-right: auto; }
.thanks-roundel { display: block; margin: 0 auto 12px; width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 0 3px #F2A08C; }
.spoken-embed { display: block; width: 100%; height: 780px; border: 0; border-radius: 14px; background: #112A58; box-shadow: 0 0 0 1px var(--border), 0 20px 40px -24px rgba(11,28,62,.5); }
.thanks-more { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 8px; }
.gift-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px; align-items: start; max-width: 960px; }
.gift-card { margin: 0; }
.gift-card img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 0 0 1px var(--border), 0 24px 44px -24px rgba(11,28,62,.6); }
.gift-actions h2 { margin-top: 0; }
.gift-actions h2 + p { margin-top: 0; }
.gift-link input { width: min(100%, 520px); padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.iulia-corner { position: fixed; right: 96px; bottom: 0; width: 230px; height: auto; z-index: 40; pointer-events: none;
  filter: drop-shadow(0 10px 24px rgba(11,28,62,.35)); }
@media (max-width: 1180px) { .iulia-corner { width: 170px; } }
@media (max-width: 859px) {
  .gift-grid { grid-template-columns: 1fr; }
  .gift-card { max-width: 320px; margin: 0 auto; }
  .spoken-embed { height: 720px; }
  .iulia-corner { position: static; display: block; width: 200px; margin: 8px 0 0 auto; filter: none; }
}
/* /thanks/: the review button opens Spoken directly (embedding lost answers to browser storage blocking, 2026-11-13) */
.review-cta { text-align: center; padding: 28px 22px; border-radius: 16px; background: #F6F1E4; box-shadow: 0 0 0 1px var(--border), 0 20px 40px -26px rgba(11,28,62,.45); }
.review-cta-steps { max-width: 520px; margin: 0 auto 16px; }
.btn.btn-review { font-size: 1.15rem; padding: 16px 30px; background: #F2A08C; color: #112A58; border-color: #F2A08C; }
/* review page: record in the browser (2026-11-13) */
.rv-rec-row .btn { font-size: 1.05rem; }
.rv-recorder { margin: 12px 0; padding: 14px; border-radius: 14px; background: #F6F1E4; box-shadow: 0 0 0 1px var(--border); }
.rv-recorder video, .rv-recorder audio { display: block; width: 100%; max-width: 480px; margin: 0 auto 10px; border-radius: 10px; background: #0B1C3E; }
.rv-rec-status { font-weight: 600; text-align: center; }
.rv-rec-status.live::before { content: "● "; color: #C0392B; }

/* /piazza/: the talk sign-up (GuidedTrack run link in a frame, 2026-11-17) */
.pz-talk-frame{display:block;width:100%;min-height:780px;border:0;border-radius:14px;background:#14204a;box-shadow:0 10px 30px -18px rgba(17,42,88,.6)}
@media (max-width:600px){.pz-talk-frame{min-height:900px}}

/* Talk sign-up bar + home block (2026-11-18): on every page until the Dec 13 sellers talk ends. */
.talk-bar { background: #F2A08C; color: #0B1C3E; border-bottom: 2px solid #112A58; }
.talk-bar[hidden], .talk-home[hidden] { display: none; }
.talk-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding-top: 8px; padding-bottom: 8px; }
.talk-bar p { margin: 0; font-size: .98rem; line-height: 1.35; text-align: center; }
.talk-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.talk-bar-btn { display: inline-block; padding: 6px 14px; background: #112A58; color: #fff; font-weight: 700; text-decoration: none; border-radius: 2px; white-space: nowrap; }
.talk-bar-btn:hover, .talk-bar-btn:focus-visible { background: #0B1C3E; color: #fff; outline: 2px solid #fff; outline-offset: 1px; }
.talk-home { background: #F6F1E4; border-top: 3px solid #F2A08C; border-bottom: 3px solid #F2A08C; }
.talk-home h2 { text-align: center; }
.talk-home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 18px; }
.talk-home .talk-when { margin: 10px 0 6px; font-weight: 700; color: #112A58; letter-spacing: .02em; }
.talk-home .fine { text-align: center; margin-top: 16px; }
/* 2026-11-20 (principal): the banner is the first thing inside the page frame, so it carries the frame's curved top corners;
   the header under it then has square top corners. When the banner is hidden or past its date, the header keeps its own. */
.talk-bar { border-radius: 22px 22px 0 0; }
.talk-bar:not([hidden]) + .site-header { border-radius: 0; }
.talk-bar-btn { border-radius: 3px 3px 12px 3px; box-shadow: 0 0 0 1px #F6F1E4 inset; padding: 7px 16px; }
@media (max-width: 600px) { .talk-bar { border-radius: 14px 14px 0 0; } .talk-bar:not([hidden]) + .site-header { border-radius: 0; } }
@media print { .talk-bar { display: none; } }

/* /payment/: the monthly payment calculator (js/payment.js) */
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.pay-inputs h2 { font-size: 1.35rem; margin: 26px 0 10px; }
.pay-inputs form:first-child h2:first-child { margin-top: 0; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.pay-row.three { grid-template-columns: 1fr 1fr 1fr; }
.pay-row label, .pay-inputs > form > label { display: block; margin-bottom: 6px; }
.pay-lookup { display: flex; gap: 12px; margin-bottom: 8px; }
.pay-lookup input { flex: 1; }
.pay-result { position: sticky; top: 16px; background: var(--white); border: 2px solid var(--accent); border-top: 6px solid var(--primary); border-radius: var(--radius); padding: 22px; }
.pay-total { display: flex; flex-direction: column; margin: 0 0 16px; }
.pay-total span { font-weight: 700; color: var(--muted); }
.pay-total strong { font-size: 2.6rem; line-height: 1.1; color: var(--primary); }
.pay-table { min-width: 0; }
.pay-table .num, .pay-table td.num { text-align: right; white-space: nowrap; }
.pay-result h3 { font-size: 1.15rem; margin: 18px 0 8px; }
.pay-steps { margin: 0 0 10px; padding-left: 20px; }
.pay-46 { margin-top: 16px; padding: 16px 18px; }
.pay-46 p { margin: 0; }
@media (max-width: 860px) { .pay-grid { grid-template-columns: 1fr; gap: 24px; } .pay-result { position: static; } .pay-row.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pay-row, .pay-row.three { grid-template-columns: 1fr; } .pay-lookup { flex-direction: column; } }
