/* =========================================================================
   Boston Notary Co. — design system v2 "Night Ledger"
   Boston after dark: bronze statues, candle-lit parchment, Cinzel lettering.
   One appearance, always night. A white header bar and a khaki disclaimer
   strip are the only light surfaces; parchment is saved for the FAQ docket.
   Contrast ratios are noted beside each token (WCAG AA or better).
   ========================================================================= */

/* Self-hosted fonts (SIL Open Font License — see /fonts/OFL-*.txt) */
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel.woff") format("woff"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond.woff") format("woff"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-italic.woff") format("woff"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans.woff") format("woff"); font-weight: 100 1000; font-display: swap; }

:root {
  color-scheme: dark;

  /* Night surfaces */
  --bg: #191613;
  --bg-deep: #120f0c;
  --surface: #221e1a;
  --surface-2: #2b2621;
  --surface-3: #352f28;
  --line: #3a322a;
  --line-strong: #5a4a37;
  --brass-line: rgb(214 178 122 / .38);

  /* Ink on night */
  --text: #f3ecdf;          /* 15.2:1 on bg */
  --text-2: #d3c8b2;        /* 11.0:1 on bg */
  --muted: #aa9e88;         /*  6.8:1 on bg, 6.3:1 on surface */
  --accent: #d6b27a;        /*  8.9:1 on bg — links, focus, numerals */
  --accent-soft: #3d3020;

  /* Bronze controls */
  --btn: #5b4128;           /* parchment label 8.4:1 */
  --btn-hover: #6e5032;
  --btn-edge: #7d5f3d;
  --btn-text: #f5f0e6;
  --plaque: #4b3824;        /* plaque label #eadfca 8.9:1 */
  --plaque-text: #eadfca;

  /* Light accents */
  --paper: #fdfcf9;         /* header bar */
  --paper-ink: #2a231b;     /* 15.0:1 on paper */
  --paper-ink-2: #6b5a45;   /*  6.6:1 on paper */
  --khaki: #c4b9a1;         /* disclaimer strip */
  --khaki-ink: #3a3127;     /*  6.6:1 on khaki */
  --parchment: #f1e8d6;     /* FAQ folio */
  --parchment-ink: #2b2219; /* 13.4:1 on parchment */
  --parchment-ink-2: #5d4b36;

  /* Signals (on night) */
  --success: #8fcf9e; --success-bg: #1f2e22;
  --warning: #e6b95f; --warning-bg: #33281a;
  --danger:  #f29a88; --danger-bg:  #3a2220;
  --info:    #9cc3df; --info-bg:    #1d2a33;

  --shadow: 0 1px 2px rgb(0 0 0 / .45), 0 14px 34px rgb(0 0 0 / .38);

  /* Type */
  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-serif: "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif;
  --font-ui: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: var(--font-serif);

  --step--1: .9rem;
  --step-0: 1.25rem;        /* Cormorant at 20px reads like 17px text */
  --step-1: 1.35rem;
  --step-2: clamp(1.5rem, 1.25rem + .9vw, 1.95rem);
  --step-3: clamp(1.9rem, 1.45rem + 1.9vw, 2.85rem);
  --step-4: clamp(2.2rem, 1.5rem + 3.1vw, 3.75rem);

  --radius: 6px;
  --radius-sm: 3px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 84px;
}
@media (prefers-contrast: more) {
  :root { --text-2: var(--text); --muted: var(--text-2); --line: var(--line-strong); --brass-line: var(--accent); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--bg-deep); }
body {
  margin: 0; color: var(--text);
  background: linear-gradient(180deg, #1d1a17 0, var(--bg) 40rem) var(--bg);
  font: 500 var(--step-0)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: .02em; }
h1 { font-size: var(--step-4); line-height: 1.12; }
h2 { font-size: var(--step-3); }
h3 { font: 500 1.08rem/1.3 var(--font-display); letter-spacing: .05em; text-transform: uppercase; }
h4 { font: 600 1.05rem/1.3 var(--font-ui); }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
strong { font-weight: 700; }
::selection { background: #6e5032; color: #fff; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--btn); color: var(--btn-text); padding: 10px 16px; border-radius: var(--radius-sm); font-family: var(--font-ui); }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .88em; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.lead { font-size: clamp(1.3rem, 1.15rem + .55vw, 1.6rem); line-height: 1.5; color: var(--text-2); }
.mono, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }

/* Plaque: the engraved bronze label from the original site */
.plaque {
  display: inline-flex; align-items: center; gap: .55em; width: fit-content; max-width: 100%;
  font: 400 .82rem/1.25 var(--font-serif); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--plaque-text); background: var(--plaque); padding: .45em .85em; border-radius: 1px;
  box-shadow: inset 0 1px 0 rgb(255 235 200 / .08), inset 0 -1px 0 rgb(0 0 0 / .3);
}
.plaque-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.plaque-row img { width: 64px; height: auto; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .5)); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--btn);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .55em 1.35em; border-radius: var(--radius-sm);
  font: 600 1.08rem/1.15 var(--font-serif); letter-spacing: .07em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  background: var(--b); color: var(--btn-text); border: 1px solid var(--btn-edge);
  box-shadow: inset 0 1px 0 rgb(255 230 190 / .1);
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { --b: var(--btn-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--khaki); box-shadow: none; }
.btn-secondary:hover { background: rgb(245 240 230 / .07); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); padding-inline: .6em; box-shadow: none; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-danger { --b: #8a2f24; border-color: #a8473a; color: #fff; }
.btn-danger:hover { --b: #9c372b; }
.btn-lg { min-height: 54px; font-size: 1.18rem; padding-inline: 1.7em; }
.btn-sm { min-height: 38px; padding: .35em .9em; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
.btn svg { flex: none; }

/* ---------- Top strip, header, ledge ---------- */
.topline {
  background: #1b1815; color: var(--text-2); border-bottom: 1px solid #2a251f;
  font: 400 .92rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
}
.topline .wrap { display: flex; align-items: center; justify-content: center; gap: 1rem; min-height: 40px; position: relative; }
.topline em { font: italic 500 1rem/1 var(--font-serif); letter-spacing: .04em; color: var(--khaki); }
.topline-account { position: absolute; right: 0; font: 600 .8rem/1 var(--font-ui); letter-spacing: .04em; text-transform: none; color: var(--khaki) !important; text-decoration: none; }
.topline-account:hover { color: var(--text) !important; text-decoration: underline; }
@media (max-width: 760px) { .topline .wrap > span { font-size: .72rem; } .topline em, .topline-account { display: none; } }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); color: var(--paper-ink); box-shadow: 0 1px 0 rgb(0 0 0 / .08), 0 10px 30px rgb(0 0 0 / .25); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--paper-ink); margin-right: auto; }
.brand img { width: 68px; height: 68px; }
.brand-name { font: 500 1.05rem/1.15 var(--font-display); letter-spacing: .05em; }
.brand-name small { display: block; font: italic 500 .95rem/1.2 var(--font-serif); letter-spacing: 0; color: var(--paper-ink-2); }
.brand-name.is-compact { display: none; }
.nav { display: flex; align-items: center; gap: .15rem; }
.nav a, .nav .nav-text { color: var(--paper-ink); text-decoration: none; font: 600 1.14rem/1 var(--font-serif); padding: .7rem .85rem; position: relative; }
.nav a::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .3rem; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .2s ease; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a.btn { color: var(--btn-text); font-size: .98rem; padding: .45em 1em; margin-left: .5rem; }
.nav a.btn::after { display: none; }
.nav .btn-ghost { color: var(--paper-ink); font-family: var(--font-ui); text-transform: none; letter-spacing: 0; font-size: .92rem; }
.nav .btn-ghost:hover { background: #efe9de; }
.menu-toggle { display: none; }
@media (max-width: 1000px) {
  :root { --header-h: 68px; }
  .brand img { width: 52px; height: 52px; }
  .site-header .nav { display: none; }
  .menu-toggle { display: block; position: relative; }
  .menu-toggle > summary { list-style: none; cursor: pointer; min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 4px; border: 1px solid #d9cfbf; color: var(--paper-ink); }
  .menu-toggle > summary::-webkit-details-marker { display: none; }
  .menu-panel { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--paper); border-top: 1px solid #e6dfd2; box-shadow: 0 20px 40px rgb(0 0 0 / .35); padding: .5rem var(--gutter) 1.25rem; display: grid; max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .menu-panel a { padding: .9rem .25rem; border-bottom: 1px solid #ebe4d8; color: var(--paper-ink); text-decoration: none; font: 600 1.2rem/1.2 var(--font-serif); }
  .menu-panel a[aria-current="page"] { text-decoration: underline; }
  .menu-panel .btn { margin-top: 1rem; border-bottom: 1px solid var(--btn-edge); color: var(--btn-text); }
}
@media (min-width: 1001px) { .menu-panel { display: none; } }
@media (max-width: 520px) { .brand-name { display: none; } }

/* The bronze ledge under the header (from the original design) */
.ledge { height: 9px; background: linear-gradient(180deg, #47362a, #33271c); width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* Khaki disclaimer strip */
.disclaimer-strip { background: var(--khaki); color: var(--khaki-ink); text-align: center; font: italic 500 1.02rem/1.45 var(--font-serif); padding: .6rem var(--gutter); }
.disclaimer-strip p { margin: 0 auto; max-width: 1100px; }

/* ---------- Heroes ---------- */
.night { color: var(--text); }
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(2rem, 4vw, 3.25rem) 0 0; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(900px 520px at 78% 30%, rgb(110 80 50 / .22), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.5rem; align-items: end; }
.hero-copy { padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero h1 { margin: 1.1rem 0 .55em; text-transform: uppercase; max-width: 22ch; }
.hero p { color: var(--text-2); max-width: 50ch; font-size: clamp(1.25rem, 1.12rem + .45vw, 1.45rem); line-height: 1.5; }
.hero .btn-row { margin-top: 1.75rem; }
.hero-figure { align-self: end; justify-self: end; margin: 0 -2rem 0 0; width: min(115%, 600px); }
.hero-figure img { width: 100%; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .55)); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; justify-self: center; width: min(78%, 380px); }
  .hero-copy { padding-bottom: 2.5rem; }
}
.hero-bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: .5; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 18%, rgb(25 22 19 / .55) 60%, rgb(25 22 19 / .2)), linear-gradient(0deg, var(--bg), transparent 45%); }

.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3.25rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: var(--step-3); max-width: 26ch; margin: 1rem 0 .45em; text-transform: uppercase; }
.page-hero .lead { max-width: 62ch; }
.page-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.page-hero-art { width: clamp(150px, 22vw, 300px); filter: drop-shadow(0 20px 30px rgb(0 0 0 / .55)); }
@media (max-width: 760px) { .page-hero-grid { grid-template-columns: 1fr; } .page-hero-art { order: -1; width: 150px; } }
.hero-grid > div > .breadcrumbs, .page-hero .breadcrumbs { margin-bottom: 1rem; }

/* ---------- Search slip ---------- */
.search {
  display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 0; padding: 6px;
  background: var(--bg-deep); border: 1px solid var(--brass-line); border-radius: var(--radius); box-shadow: var(--shadow); max-width: 820px;
}
.search label { display: block; }
.search input, .search select { width: 100%; min-height: 50px; border: 0; background: transparent; color: var(--text); font: 500 1.15rem/1.2 var(--font-serif); padding: 0 1rem; border-radius: 3px; }
.search select option { background: var(--surface); color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search input:focus-visible, .search select:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.search .field-split { border-left: 1px solid var(--line); }
.search .btn { min-height: 50px; }
@media (max-width: 640px) {
  .search { grid-template-columns: 1fr; gap: 6px; }
  .search .field-split { border-left: 0; border-top: 1px solid var(--line); }
}
.quick-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip { display: inline-flex; align-items: center; gap: .4em; min-height: 38px; padding: .3rem .9rem; border-radius: 2px; border: 1px solid var(--line-strong); color: var(--text-2); background: rgb(0 0 0 / .15); text-decoration: none; font: 500 1.02rem/1.1 var(--font-serif); }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; position: relative; }
.section-alt { background: rgb(0 0 0 / .18); border-block: 1px solid #221e1a; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head h2 { margin: .9rem 0 0; text-transform: uppercase; }
.section-head p { margin: .7rem 0 0; color: var(--text-2); max-width: 62ch; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

.card { background: linear-gradient(180deg, rgb(255 240 210 / .025), transparent 60%), var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card h3 { margin-bottom: .5rem; }
.card > p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--brass-line); transform: translateY(-2px); }

/* Engraved bronze icons (ChatGPT-drawn PNGs or medallion fallback) */
.icon-art { width: 80px; height: 80px; object-fit: contain; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .45)); margin-bottom: .9rem; }
.emblem { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-bottom: 1rem; color: #2a1c0e;
  background: radial-gradient(circle at 34% 28%, #f0d59e, #c39a5c 45%, #7d5a31 100%);
  box-shadow: inset 0 0 0 3px rgb(255 240 210 / .25), inset 0 0 0 5px rgb(60 40 20 / .5), 0 6px 14px rgb(0 0 0 / .45); }
.emblem svg { width: 26px; height: 26px; }

/* How it works — numbered, because it is a sequence */
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.step { position: relative; border-color: var(--brass-line); padding-top: 1.4rem; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font: 500 1.1rem/1 var(--font-serif); margin-bottom: 1.1rem; }
.step h3 { font-size: 1.02rem; }
.step p { color: var(--text-2); font-size: 1.12rem; }

/* ---------- Stamp stage (3D) ---------- */
.works-head { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.works-head h2 { font-size: var(--step-4); text-transform: none; font-variant: small-caps; line-height: 1.15; margin: 0; }
.works-head p { color: var(--text-2); max-width: 46ch; margin-top: 1rem; }
@media (max-width: 860px) { .works-head { grid-template-columns: 1fr; } }
.notary-stamp-wrap { width: 100%; height: 520px; background: transparent; display: flex; align-items: center; justify-content: center; overflow: visible; animation: stampFloat 4s ease-in-out infinite; position: relative; }
.notary-stamp-wrap::before { content: ""; position: absolute; width: 60%; height: 60%; border-radius: 50%; background: radial-gradient(circle, rgb(214 178 122 / .16), transparent 70%); z-index: 0; }
.notary-stamp-wrap model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; cursor: grab; position: relative; z-index: 1; }
.notary-stamp-wrap model-viewer:active { cursor: grabbing; }
.notary-stamp-wrap model-viewer:not(:defined) { display: none; }
@keyframes stampFloat { 0% { transform: translateY(0); } 50% { transform: translateY(-12px); } 100% { transform: translateY(0); } }
@media (max-width: 768px) { .notary-stamp-wrap { height: 380px; } }

/* ---------- Find local notaries (statue over night painting) ---------- */
.locale { position: relative; isolation: isolate; overflow: hidden; padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 9px solid #33271c; }
.locale-bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center 30%; opacity: .55; }
.locale-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(25 22 19 / .72), rgb(25 22 19 / .6) 50%, var(--bg)); }
.locale-grid { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.locale-figure { margin: 0; position: sticky; top: calc(var(--header-h) + 1rem); }
.locale-figure img { width: 100%; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .6)); }
.locale-copy h2 { text-transform: uppercase; margin-top: .9rem; }
.locale-copy > p { color: var(--text); font-size: 1.3rem; max-width: 56ch; }
@media (max-width: 800px) { .locale-grid { grid-template-columns: 1fr; } .locale-figure { position: static; width: 200px; justify-self: center; } }
.town-plaques { list-style: none; padding: 0; margin: 2rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: .6rem; }
.town-plaques a { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .8rem 1rem; text-decoration: none; color: var(--text); background: rgb(18 15 12 / .7); border: 1px solid var(--line); border-left: 3px solid var(--btn-edge); font: 500 1.02rem/1.2 var(--font-display); letter-spacing: .03em; transition: border-color .15s, background .15s; }
.town-plaques a:hover { border-color: var(--brass-line); border-left-color: var(--accent); background: rgb(18 15 12 / .9); }
.town-plaques small { font: 500 .95rem/1 var(--font-serif); color: var(--muted); letter-spacing: 0; white-space: nowrap; }

/* ---------- Listing card ---------- */
.listing-card { display: grid; grid-template-columns: 76px 1fr; gap: 1.1rem; padding: 1.3rem; position: relative; transition: border-color .15s; }
.listing-card:hover { border-color: var(--brass-line); }
.listing-card.is-featured { border-color: var(--btn-edge); box-shadow: inset 0 3px 0 var(--accent); }
.listing-card h3 { font-size: 1.1rem; margin: .1rem 0 0; }
.listing-card h3 a { color: var(--text); text-decoration: none; }
.listing-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.listing-card h3 a:focus-visible::after { outline: 2px solid var(--accent); }
.listing-card .headline { color: var(--text-2); margin: .35rem 0 .6rem; font-size: 1.12rem; line-height: 1.4; }
.listing-card .meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font: 500 .86rem/1.4 var(--font-ui); color: var(--muted); }
.listing-card .meta span { display: inline-flex; align-items: center; gap: .3em; }
.seal {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #f6ecd8, #d9c49d); color: #4a3520;
  font: 600 1.35rem/1 var(--font-display); border: 2px solid #b89a68; box-shadow: inset 0 0 0 4px #f6ecd8, inset 0 0 0 5px #b89a68, 0 6px 14px rgb(0 0 0 / .4);
}
.seal img { width: 100%; height: 100%; object-fit: cover; }
.seal-lg { width: 132px; height: 132px; font-size: 2.2rem; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; position: relative; z-index: 1; }
.badge { display: inline-flex; align-items: center; gap: .3em; font: 600 .76rem/1.2 var(--font-ui); letter-spacing: .01em; padding: .28rem .6rem; border-radius: 2px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge-verified { background: var(--success-bg); color: var(--success); border-color: transparent; }
.badge-featured { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge svg { width: 13px; height: 13px; }

/* Directory layout with filters */
.directory { display: grid; grid-template-columns: 290px 1fr; gap: 2rem; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); font-family: var(--font-ui); font-size: .95rem; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.filters legend { font: 500 .8rem/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: .65rem; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.results-bar h2 { text-transform: none; }
.results { display: grid; gap: 1rem; }
@media (max-width: 900px) {
  .directory { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters-body { display: none; }
  .filters[open] .filters-body, details.filters[open] .filters-body { display: block; }
}
details.filters > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; min-height: 28px; font-weight: 600; }
details.filters > summary::-webkit-details-marker { display: none; }
@media (min-width: 901px) { details.filters > summary { display: none; } details.filters .filters-body { display: block; } }

/* Empty state */
.empty { text-align: center; padding: 2.75rem 1.25rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.empty h3 { font-size: 1.15rem; }

/* ---------- Profile ---------- */
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
.profile-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.profile-aside { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 900px) { .profile-layout { grid-template-columns: 1fr; } .profile-aside { position: static; } .profile-head { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; margin: 0; }
.facts dt { color: var(--muted); font-size: .95rem; }
.facts dd { margin: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; list-style: none; }
.tag-list li { padding: .3rem .75rem; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--line); font-size: 1.02rem; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 1.25rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; position: relative; }
.plan.is-highlighted { border-color: var(--accent); background: linear-gradient(180deg, rgb(214 178 122 / .09), transparent 45%), var(--surface); box-shadow: var(--shadow); }
.plan-flag { position: absolute; top: -14px; left: 1.5rem; }
.plan h3 { font: 400 1.6rem/1.2 var(--font-display); text-transform: none; letter-spacing: .03em; margin: 0; }
.plan .tagline { color: var(--text-2); min-height: 3em; margin: .45rem 0 1.1rem; font-size: 1.15rem; line-height: 1.4; }
.price { display: flex; align-items: baseline; gap: .4rem; }
.price strong { font: 400 2.8rem/1 var(--font-display); color: var(--text); }
.price span { color: var(--muted); }
.price-note { color: var(--muted); font-size: 1.02rem; margin: .4rem 0 1.25rem; min-height: 1.4em; }
.plan ul { list-style: none; padding: 1.1rem 0 0; margin: 0 0 1.5rem; display: grid; gap: .6rem; flex: 1; border-top: 1px solid var(--line); }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: .6rem; font-size: 1.1rem; line-height: 1.4; }
.plan li::before { content: ""; width: 7px; height: 7px; margin: .55em 0 0 4px; transform: rotate(45deg); background: var(--accent); }
.billing-toggle { display: inline-flex; padding: 4px; border-radius: 3px; background: var(--bg-deep); border: 1px solid var(--line-strong); margin-bottom: 2rem; font-family: var(--font-ui); }
.billing-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.billing-toggle label { min-height: 40px; display: inline-flex; align-items: center; padding: 0 1.2rem; border-radius: 2px; cursor: pointer; font-weight: 600; font-size: .95rem; color: var(--text-2); }
.billing-toggle input:checked + label { background: var(--btn); color: var(--btn-text); }
.billing-toggle input:focus-visible + label { outline: 2px solid var(--accent); }
.save-pill { margin-left: .35rem; color: var(--success); }
[data-billing="month"] .show-annual, [data-billing="year"] .show-month { display: none !important; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font: 400 .95rem/1.5 var(--font-ui); }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .76rem/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgb(255 240 210 / .025); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* =========================================================================
   The Docket — FAQ as a notary's index and folio.
   No JS / narrow screens: every entry is an open parchment folio.
   Wide screens with JS: an index of questions beside one folio (tabs).
   ========================================================================= */
.docket-intro { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.docket-intro h2 { margin: .9rem 0 0; text-transform: uppercase; }
.docket-intro p { margin: .6rem 0 0; color: var(--text-2); max-width: 52ch; }
.docket { display: grid; gap: 1.25rem; }
.docket-index { display: none; }
.folio {
  position: relative; background: var(--parchment); color: var(--parchment-ink);
  background-image: radial-gradient(120% 90% at 50% 0%, rgb(255 255 255 / .35), transparent 60%), linear-gradient(180deg, #f3ebda, #e9dcc3);
  border-radius: 2px; padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.25rem, 3.5vw, 2.75rem) clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: 0 1px 0 #fff8 inset, 0 18px 40px rgb(0 0 0 / .45);
}
.folio::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgb(122 85 48 / .35); outline: 1px solid rgb(122 85 48 / .18); outline-offset: 3px; pointer-events: none; }
.folio-q { font: 500 clamp(1.1rem, 1rem + .5vw, 1.35rem)/1.35 var(--font-display); letter-spacing: .02em; text-transform: none; color: var(--parchment-ink); margin: 0 4.5rem .75rem 0; }
.folio-mark { display: block; font: italic 600 1.05rem/1 var(--font-serif); color: #7a5530; margin-bottom: .6rem; letter-spacing: .04em; }
.folio-a { font-size: 1.25rem; line-height: 1.6; color: var(--parchment-ink); }
.folio-a p:last-child { margin-bottom: 0; }
.folio-a a { color: #6b4520; }
.folio-seal { position: absolute; top: 1.1rem; right: 1.2rem; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #c76a52, #8f2f22 55%, #5e1a12); color: #f4d9c8; font: 600 1.25rem/1 var(--font-display);
  box-shadow: inset 0 0 0 4px rgb(0 0 0 / .14), inset 0 0 0 6px rgb(255 210 190 / .12), 0 3px 6px rgb(60 10 5 / .35); transform: rotate(-8deg); }
.folio-foot { margin: 1.25rem 0 0; padding-top: .75rem; border-top: 1px solid rgb(122 85 48 / .25); font: italic 500 .98rem/1.4 var(--font-serif); color: var(--parchment-ink-2); }
.docket:not(.is-live):not(.is-inline) .folio:not(:last-child) .folio-foot { display: none; }
.docket-cta { margin-top: 1.5rem; display: flex; gap: .75rem 1.25rem; align-items: center; flex-wrap: wrap; color: var(--text-2); }

/* Question rows (shared by both live layouts) */
.docket-tab { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 1.4rem 1fr auto; gap: .55rem; align-items: start; width: 100%; padding: 1rem 1.25rem 1rem 1.05rem; cursor: pointer; font: 500 1.17rem/1.35 var(--font-serif); color: var(--text-2); border-left: 3px solid transparent; position: relative; -webkit-tap-highlight-color: transparent; }
.docket-tab + .docket-tab, .folio + .docket-tab { border-top: 1px solid var(--line); }
.docket-tab::before { content: "§"; color: var(--muted); font-style: italic; }
.docket-tab:hover { color: var(--text); background: rgb(255 240 210 / .03); }
.docket-tab[aria-selected="true"], .docket-tab[aria-expanded="true"] { color: var(--text); background: var(--surface-2); border-left-color: var(--accent); }
.docket-tab[aria-selected="true"]::before, .docket-tab[aria-expanded="true"]::before { color: var(--accent); }
.docket-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* Wide: index beside one folio */
@media (min-width: 900px) {
  .docket.is-live { grid-template-columns: minmax(280px, .9fr) 1.35fr; gap: 0; align-items: stretch; }
  .docket.is-live .docket-index { display: block; border: 1px solid var(--line); border-right: 0; background: var(--surface); border-radius: var(--radius) 0 0 var(--radius); padding: .5rem 0; align-self: start; }
  .docket.is-live .folio[hidden] { display: none; }
  .docket.is-live .folio { min-height: 100%; }
  .docket.is-live .docket-tab[aria-selected="true"]::after { content: ""; position: absolute; right: -1px; top: 50%; translate: 0 -50%; border: 11px solid transparent; border-right-color: #f1e7d4; }
  .docket.is-live .folio.is-entering { animation: folioIn .25s ease; }
}

/* Phones: the folio unfolds under its question */
.docket.is-inline { display: block; }
.docket.is-inline .docket-index { display: block; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.docket.is-inline .docket-tab { min-height: 56px; }
.docket.is-inline .docket-tab::after { content: ""; width: 8px; height: 8px; margin-top: .45em; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg); transition: transform .2s ease; }
.docket.is-inline .docket-tab[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: .7em; }
.docket.is-inline .folio { margin: 0 .6rem .75rem; box-shadow: 0 10px 24px rgb(0 0 0 / .4); padding: 1.25rem 1.15rem 1.1rem; }
.docket.is-inline .folio[hidden] { display: none; }
.docket.is-inline .folio-q { display: none; } /* the question is already the row above */
.docket.is-inline .folio-mark { margin-right: 3.5rem; }
.docket.is-inline .folio-seal { width: 46px; height: 46px; font-size: 1rem; top: .8rem; right: .8rem; }
.docket.is-inline .folio-a { font-size: 1.18rem; margin-top: .4rem; }
.docket.is-inline .folio .folio-foot { display: block; font-size: .92rem; }
.docket.is-inline .folio.is-entering { animation: folioDrop .22s ease; }
@keyframes folioDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes folioIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Small disclosures that are not FAQs (checkout summaries, account) */
.disclosure { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.disclosure + .disclosure { margin-top: .5rem; }
.disclosure > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; font: 600 .98rem/1.3 var(--font-ui); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.disclosure[open] > summary::before { transform: rotate(45deg); }
.disclosure > div { padding: 0 1rem 1rem 2.2rem; color: var(--text-2); font: 400 .95rem/1.6 var(--font-ui); }

/* ---------- Prose (guides, legal) ---------- */
.prose { font-size: 1.28rem; line-height: 1.7; }
.prose h2 { font-size: var(--step-2); margin-top: 2.4rem; }
.prose h3 { font-size: 1.05rem; margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .35rem; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--accent); font-style: italic; font-size: 1.4rem; color: var(--text-2); }
.prose table { margin: 1.25rem 0; border: 1px solid var(--line); }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose figure { margin: 2rem 0; }
.prose figcaption { font-size: 1rem; color: var(--muted); margin-top: .5rem; font-style: italic; }
.callout { border-radius: var(--radius); padding: 1rem 1.2rem; border: 1px solid var(--line); background: var(--surface); }
.callout-info { background: var(--info-bg); border-color: transparent; color: var(--text); }
.callout-warn { background: var(--warning-bg); border-color: transparent; }
.toc { font-size: 1.05rem; }
.toc a { color: var(--text-2); text-decoration: none; display: block; padding: .35rem 0; }
.toc a:hover { color: var(--accent); }

/* Breadcrumbs */
.breadcrumbs { font: 500 .85rem/1.4 var(--font-ui); color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: .35rem; }
.breadcrumbs a { color: var(--khaki); }

/* Town index */
.town-columns { columns: 4 200px; column-gap: 2rem; }
.town-columns a { display: block; padding: .3rem 0; color: var(--text); text-decoration: none; break-inside: avoid; }
.town-columns a:hover { color: var(--accent); }
.town-columns .count { color: var(--muted); font-size: .9rem; margin-left: .3rem; }
.letter-head { font: 500 1rem/1 var(--font-display); color: var(--accent); margin: 1rem 0 .4rem; break-after: avoid; }

/* ---------- Forms (DM Sans for legibility) ---------- */
.form { display: grid; gap: 1.1rem; font-family: var(--font-ui); font-size: 1rem; }
.field { display: grid; gap: .4rem; align-content: start; font-family: var(--font-ui); font-size: 1rem; }
.field > label, .label { font: 600 .95rem/1.3 var(--font-ui); color: var(--text); }
.field .hint { font-size: .86rem; color: var(--muted); margin: 0; }
.field .error, .error-text { font-size: .88rem; color: var(--danger); margin: 0; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: .6rem .8rem; border-radius: 4px;
  border: 1px solid #4d4236; background: #14110e; color: var(--text); font: 400 1rem/1.4 var(--font-ui);
}
.input::placeholder, .textarea::placeholder { color: #8a7f6d; }
.select option { background: var(--surface); }
.textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; align-items: start; font: 400 .97rem/1.5 var(--font-ui); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: .1rem 0 0; accent-color: var(--accent); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: .55rem 1rem; }
.form-section { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: var(--surface); font-family: var(--font-ui); }
.form-section > h2, .form-section > legend { font: 500 1rem/1.3 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 1.1rem; padding: 0; }
fieldset.form-section { margin: 0; min-width: 0; }
fieldset.form-section > legend { float: left; width: 100%; }
fieldset.form-section > legend + * { clear: both; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; position: sticky; bottom: 0; padding: .85rem 0; background: linear-gradient(0deg, var(--bg) 70%, transparent); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.counter { font-size: .8rem; color: var(--muted); text-align: right; }

/* Alerts */
.alert { border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; display: flex; gap: .6rem; align-items: start; font: 500 .95rem/1.5 var(--font-ui); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgb(143 207 158 / .25); }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: rgb(242 154 136 / .25); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: rgb(230 185 95 / .25); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: rgb(156 195 223 / .25); }
.alert ul { margin: .25rem 0 0; padding-left: 1.1rem; }

/* ---------- Auth ---------- */
.auth-page { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 124px); }
.auth-art { position: relative; isolation: isolate; padding: 3rem clamp(1.5rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: end; overflow: hidden; border-right: 1px solid var(--line); }
.auth-art .hero-bg { opacity: .55; }
.auth-art .auth-statue { position: absolute; right: 4%; bottom: 0; width: min(62%, 380px); z-index: -1; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .6)); }
.auth-art blockquote { position: relative; font: italic 500 1.75rem/1.35 var(--font-serif); margin: 1rem 0 0; max-width: 18ch; color: var(--text); text-shadow: 0 2px 12px rgb(0 0 0 / .7); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem var(--gutter); }
.auth-form .inner { width: min(100%, 440px); }
.auth-form h1 { font-size: var(--step-3); text-transform: uppercase; }
.auth-form .inner > p, .auth-form .inner .muted { font-size: 1.15rem; }
@media (max-width: 860px) { .auth-page { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- App shell (portal & admin): same night, DM Sans for work ---------- */
.app-body { --font-body: var(--font-ui); font-size: 1rem; }
.app-body .btn { font: 600 .95rem/1.2 var(--font-ui); text-transform: none; letter-spacing: 0; border-radius: 5px; min-height: 42px; }
.app-body .btn-lg { font-size: 1.02rem; min-height: 48px; }
.app-body .btn-sm { font-size: .88rem; min-height: 36px; }
.app-body h3 { font: 600 1.02rem/1.3 var(--font-ui); text-transform: none; letter-spacing: 0; }
.app-body .lead { font: 400 1.1rem/1.5 var(--font-ui); }
.app-body .plaque { font-family: var(--font-ui); font-size: .72rem; }
.app-body .chip, .app-body .tag-list li { font-family: var(--font-ui); font-size: .9rem; }
.app-body .prose { font: 400 1rem/1.7 var(--font-ui); }
.app-body .plan .tagline, .app-body .plan li, .app-body .price-note { font-family: var(--font-ui); font-size: .95rem; }
.app-header .wrap { width: auto; margin: 0; padding: 0 clamp(16px, 3vw, 28px); min-height: 68px; }
.app-header .brand img { width: 50px; height: 50px; }
.app-header .nav { display: flex; }
.app-header .nav-text { font: 500 .9rem/1 var(--font-ui); color: var(--paper-ink-2); }
@media (max-width: 640px) { .app-header .nav-text { display: none; } }
.app { display: grid; grid-template-columns: 268px 1fr; min-height: calc(100vh - 68px); }
.sidebar { border-right: 1px solid var(--line); background: var(--bg-deep); padding: 1.25rem .85rem; position: sticky; top: 68px; height: calc(100vh - 68px); overflow: auto; font-family: var(--font-ui); }
.sidebar h2 { font: 500 .72rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 1.4rem .7rem .55rem; }
.sidebar h2:first-child { margin-top: .35rem; }
.sidebar a { display: flex; align-items: center; gap: .65rem; min-height: 40px; padding: 0 .7rem; border-radius: 4px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .94rem; border-left: 2px solid transparent; }
.sidebar a:hover { background: var(--surface); color: var(--text); }
.sidebar a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; border-left-color: var(--accent); border-radius: 0 4px 4px 0; }
.sidebar svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.sidebar .count { margin-left: auto; font-size: .75rem; font-weight: 700; background: var(--btn); color: var(--btn-text); border-radius: 999px; padding: .1rem .5rem; }
.app-main { padding: clamp(1.25rem, 3vw, 2.25rem); min-width: 0; }
.app-main > header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.app-main h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); margin: 0; text-transform: uppercase; }
.app-main h1 + p { margin: .45rem 0 0; color: var(--text-2); }
.app-main h2 { font-size: 1.15rem; letter-spacing: .06em; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: .25rem; overflow-x: auto; padding: .5rem var(--gutter); }
  .sidebar h2 { display: none; }
  .sidebar a { white-space: nowrap; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--btn-edge); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.stat .label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.stat .value { font: 400 2rem/1.2 var(--font-display); margin-top: .25rem; font-variant-numeric: tabular-nums; color: var(--text); }
.stat .value small { font: 500 .9rem var(--font-ui); color: var(--muted); }
.stat a { font-size: .88rem; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #a87c43, var(--accent)); border-radius: inherit; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.checklist li { display: grid; grid-template-columns: 26px 1fr auto; gap: .6rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.checklist .done .dot { background: var(--accent); border-color: var(--accent); color: #2a1c0e; }
.checklist .done .dot::after { content: "✓"; font-size: .8rem; font-weight: 700; }
.checklist .done .title { color: var(--muted); text-decoration: line-through; }
.thread { display: grid; gap: 1rem; }
.msg { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1rem 1.15rem; }
.msg.is-staff { border-color: var(--btn-edge); background: linear-gradient(180deg, rgb(214 178 122 / .07), transparent), var(--surface); }
.msg.is-internal { border-style: dashed; background: var(--warning-bg); }
.msg header { display: flex; justify-content: space-between; gap: 1rem; font-size: .87rem; color: var(--muted); margin-bottom: .45rem; }
.msg header strong { color: var(--text); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.toolbar .input, .toolbar .select { width: auto; min-height: 40px; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; font-family: var(--font-ui); }
.tabs a { padding: .75rem .95rem; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .94rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-size: .78rem; color: var(--muted); margin-left: .25rem; }
.pagination { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: 1.5rem; justify-content: center; font-family: var(--font-ui); }
.pagination a, .pagination span { min-width: 42px; min-height: 42px; display: grid; place-items: center; padding: 0 .7rem; border-radius: 3px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .94rem; }
.pagination a:hover { border-color: var(--brass-line); }
.pagination [aria-current="page"] { background: var(--btn); color: var(--btn-text); border-color: var(--btn-edge); }
.pagination .disabled { color: var(--muted); opacity: .6; }
.split { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; font: 400 .95rem/1.5 var(--font-ui); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.inline-form { display: inline; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 1.05rem; letter-spacing: .12em; padding: .6rem .8rem; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 4px; overflow-wrap: anywhere; }

/* ---------- CTA band (Beacon Hill at night) ---------- */
.cta-band { border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.75rem); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2.5rem; align-items: center; position: relative; overflow: hidden; isolation: isolate; border: 1px solid var(--brass-line); background: #15120f; }
.cta-band .hero-bg { opacity: .6; }
.cta-band .hero-bg::after { background: linear-gradient(90deg, rgb(18 15 12 / .95) 30%, rgb(18 15 12 / .55)); }
.cta-band h2 { font-size: var(--step-3); margin: .9rem 0 .4rem; text-transform: uppercase; max-width: 22ch; }
.cta-band p { color: var(--text-2); margin: 0; max-width: 54ch; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* Feature rows with art (membership, about, guides) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.feature > .feature-art { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.feature-art { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.feature-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature-art figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem 1.25rem .9rem; background: linear-gradient(0deg, rgb(10 8 6 / .85), transparent); font: italic 500 1.05rem/1.3 var(--font-serif); color: var(--text-2); }
.feature h2 { text-transform: uppercase; margin-top: .9rem; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } }
.guide-list { display: grid; gap: .75rem; }
.guide-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--btn-edge); border-radius: 0 var(--radius) var(--radius) 0; transition: border-color .15s; }
.guide-row:hover { border-color: var(--brass-line); border-left-color: var(--accent); }
.guide-row h3 { margin: 0 0 .25rem; font-size: .98rem; }
.guide-row p { margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.4; }
.guide-row .arrow { color: var(--accent); font-size: 1.4rem; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, #1c1916, #13100d); color: var(--text-2); padding: 3.75rem 0 2.25rem; margin-top: auto; border-top: 1px solid #2a251f; font-size: 1.08rem; }
.site-footer a { color: var(--text-2); text-decoration: underline; text-decoration-color: rgb(196 185 161 / .5); }
.site-footer a:hover { color: var(--text); text-decoration-color: currentColor; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.15fr; gap: 2.5rem; }
.footer-grid h2 { font: 500 1.05rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-bottom: 1.1rem; }
.footer-brand h2 { text-transform: none; font-variant: small-caps; font-size: 1.3rem; }
.footer-brand p { max-width: 40ch; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-grid ul a { font: 500 .98rem/1.3 var(--font-serif); text-transform: uppercase; letter-spacing: .03em; display: inline-flex; gap: .55rem; align-items: baseline; }
.footer-grid ul a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--khaki); flex: none; translate: 0 -.15em; }
.footer-legal { border-top: 1px solid #2f2923; margin-top: 2.75rem; padding-top: 1.6rem; font-size: 1rem; line-height: 1.6; color: var(--muted); display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: end; }
.footer-legal p { margin: 0; max-width: 92ch; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } .footer-legal { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Motion: brief, and off for people who ask */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .topline, .sidebar, .btn, .form-actions, .notary-stamp-wrap { display: none !important; }
  body { background: #fff; color: #000; }
}
.site-footer a.btn { color: var(--btn-text); text-decoration: none; margin-top: .5rem; }

/* ---------- Notary medallion (portrait or engraved initials in a bronze laurel frame) ---------- */
.medallion { --m: 84px; position: relative; width: var(--m); height: var(--m); flex: none; filter: drop-shadow(0 8px 14px rgb(0 0 0 / .45)); }
.medallion-lg { --m: 148px; }
.medallion-core { position: absolute; inset: 17.5%; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 38% 30%, #4a3622, #2a1e12 62%, #1a120a); box-shadow: inset 0 2px 6px rgb(0 0 0 / .6); }
.medallion-core img { width: 100%; height: 100%; object-fit: cover; }
.medallion-core span { font: 500 calc(var(--m) * .2)/1 var(--font-display); letter-spacing: .04em; color: #e2c48c;
  text-shadow: 0 1px 0 rgb(0 0 0 / .7), 0 -1px 0 rgb(255 230 180 / .25); }
.medallion-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* With a real photo: no laurel frame, the face fills the circle inside a thin bronze ring. */
.medallion-photo .medallion-core { inset: 0; border: 3px solid var(--accent, #c9a464);
  box-shadow: 0 0 0 1px rgb(0 0 0 / .55), 0 0 0 6px rgb(201 164 100 / .16), inset 0 2px 6px rgb(0 0 0 / .35); }
.medallion-photo.medallion-lg { --m: 176px; }
.listing-card { grid-template-columns: 84px 1fr; }
@media (max-width: 480px) { .listing-card { grid-template-columns: 64px 1fr; gap: .85rem; } .listing-card .medallion { --m: 64px; } }

/* ---------- Phone refinements: same layout language as desktop, sized for a thumb ---------- */
@media (max-width: 640px) {
  .hero { padding-top: 1.25rem; }
  .hero-figure { width: min(70%, 300px); margin: 0 auto -1rem; }
  .hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.4rem); margin-top: .9rem; }
  .hero p { font-size: 1.18rem; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .plaque { font-size: .72rem; letter-spacing: .08em; }
  .plaque-row img { width: 48px; }
  .disclaimer-strip { font-size: .95rem; }
  .locale-figure { width: 150px; }
  .town-plaques { grid-template-columns: 1fr 1fr; gap: .45rem; }
  .town-plaques a { flex-direction: column; align-items: flex-start; gap: .2rem; padding: .65rem .75rem; font-size: .92rem; }
  .needs { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .needs .card { padding: 1rem; }
  .needs .icon-art { width: 56px; height: 56px; margin-bottom: .6rem; }
  .needs h3 { font-size: .86rem; letter-spacing: .03em; }
  .needs p { font-size: 1rem; line-height: 1.35; }
  .works-head h2 { font-size: 2rem; }
  .notary-stamp-wrap { height: 320px; }
  .section-head .btn { width: 100%; }
  .listing-card .badges .badge:nth-child(n+4) { display: none; } /* keep cards short on phones */
  .cta-band h2 { font-size: 1.7rem; }
  .cta-band .btn { width: 100%; }
}

/* "Continue with Google" — Google's dark-theme button spec, adapted to our sizing */
.btn-google { display: flex; align-items: center; justify-content: center; gap: .75rem; width: 100%; min-height: 50px; padding: .6rem 1rem; border-radius: 6px;
  background: #131314; border: 1px solid #8e918f; color: #e3e3e3; font: 500 1rem/1.2 var(--font-ui); text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn-google:hover { background: #1f1f20; border-color: #c4c7c5; color: #fff; text-decoration: none; }
.btn-google svg { flex: none; }
.auth-divider { display: flex; align-items: center; gap: .9rem; margin: 1.25rem 0; color: var(--muted); font: 500 .85rem/1 var(--font-ui); text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

/* Hero statue v2: HD portrait statue, large, standing on the disclaimer strip */
@media (min-width: 861px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero-figure { position: relative; width: min(100%, 520px); margin: 0 -1rem 0 0; justify-self: end; }
.hero-figure::before { content: ""; position: absolute; inset: 8% -10% 18% -10%; background: radial-gradient(closest-side, rgb(214 178 122 / .2), transparent); z-index: -1; }
.hero-figure img { width: 100%; height: auto; filter: drop-shadow(0 28px 36px rgb(0 0 0 / .6)); }
@media (max-width: 860px) { .hero-figure { width: min(78%, 360px); margin: 0 auto -.5rem; justify-self: center; } }
@media (max-width: 640px) { .hero-figure { width: min(72%, 280px); } }

/* Checkout receipt & discounts */
.code-row { display: flex; gap: .5rem; }
.code-row .input { text-transform: uppercase; letter-spacing: .06em; }
.discount-applied { display: flex; gap: .6rem; align-items: center; padding: .75rem .9rem; margin-bottom: 1rem; border-radius: 6px; background: var(--success-bg); color: var(--success); font: 500 .95rem/1.4 var(--font-ui); border: 1px solid rgb(143 207 158 / .25); }
.receipt { display: grid; grid-template-columns: 1fr auto; gap: .55rem 1rem; margin: 1.25rem 0; padding: 1rem 0 0; border-top: 1px solid var(--line); font: 400 .95rem/1.4 var(--font-ui); }
.receipt dt { color: var(--text-2); }
.receipt dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.receipt small { display: block; color: var(--muted); font-size: .8rem; }
.receipt-off { color: var(--success) !important; }
.receipt-total { padding-top: .6rem; border-top: 1px dashed var(--line-strong); font-weight: 700; color: var(--text) !important; font-size: 1.1rem; }
dd.receipt-total { font: 400 1.6rem/1 var(--font-display); }
.receipt-note { font-size: .82rem; color: var(--muted) !important; }
.percent-picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.percent-picker .chip { font-family: var(--font-ui); font-size: .85rem; min-height: 34px; cursor: pointer; }
.percent-input { display: flex; align-items: center; gap: .6rem; }
.percent-input .input { width: 110px; font: 400 1.5rem/1 var(--font-display); text-align: center; }
.percent-input span { color: var(--text-2); font-weight: 600; }
[data-months-field][hidden] { display: none; }

/* =========================================================================
   Motion & reactivity ("alive, not busy").
   Everything below only runs when JS adds html.motion, and never when the
   visitor asks for reduced motion.
   ========================================================================= */
@property --spot { syntax: "<number>"; inherits: false; initial-value: 0; }

/* Page-to-page cross-fade (Chrome/Edge/Safari 18+), header stays put */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
.site-header { view-transition-name: site-header; }

/* Scroll-in reveals */
.motion .reveal { opacity: 0; transform: translateY(24px) scale(.985); transition: opacity .75s cubic-bezier(.2, .7, .2, 1), transform .75s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.motion .reveal.is-in { opacity: 1; transform: none; }

/* Hero entrance on first load */
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes statueIn { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }
.motion .hero-copy > * { animation: riseIn .8s cubic-bezier(.2, .7, .2, 1) both; }
.motion .hero-copy > :nth-child(2) { animation-delay: .08s; }
.motion .hero-copy > :nth-child(3) { animation-delay: .16s; }
.motion .hero-copy > :nth-child(4) { animation-delay: .24s; }
.motion .hero-copy > :nth-child(5) { animation-delay: .32s; }
.motion .hero-figure { animation: statueIn 1.1s .15s cubic-bezier(.2, .7, .2, 1) both; }

/* Hero: the statue leans toward the cursor; a lantern glow follows it */
.hero { --px: 0; --py: 0; --hx: 70%; --hy: 40%; }
.motion .hero-figure img { transform: translate3d(calc(var(--px) * 14px), calc(var(--py) * 8px), 0) rotateY(calc(var(--px) * 4deg)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.motion .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .9;
  background: radial-gradient(420px circle at var(--hx) var(--hy), rgb(214 178 122 / .13), transparent 65%); transition: background-position .2s; }

/* Brass spotlight that follows the pointer across cards */
.motion .spot { --mx: 50%; --my: 50%;
  background-image: radial-gradient(320px circle at var(--mx) var(--my), rgb(214 178 122 / calc(var(--spot) * .16)), transparent 70%), linear-gradient(180deg, rgb(255 240 210 / .025), transparent 60%);
  transition: --spot .35s ease, border-color .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.motion .spot:hover { --spot: 1; border-color: var(--brass-line); }
.motion .card-link.spot:hover, .motion .listing-card.spot:hover, .motion .plan.spot:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgb(0 0 0 / .45), 0 0 0 1px rgb(214 178 122 / .12); }
.motion .plan.is-highlighted.spot:hover { transform: translateY(-6px); }

/* Icons wake up on hover */
.motion .card-link .icon-art, .motion .card .icon-art { transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.motion .card-link:hover .icon-art, .motion .card:hover .icon-art { transform: translateY(-4px) rotate(-4deg) scale(1.06); }

/* Buttons: light sweep + press */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.motion .btn::after { content: ""; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgb(255 236 200 / .22) 48%, transparent 66%); transform: translateX(-120%); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.motion .btn:hover::after { transform: translateX(120%); }
.motion .btn:active { transform: translateY(1px) scale(.98); }
.motion .nav a.btn::after { display: block; }

/* Town plaques: brass fill sweeps in from the left edge */
.town-plaques a { background-image: linear-gradient(90deg, rgb(125 95 61 / .35), rgb(125 95 61 / .35)); background-repeat: no-repeat; background-size: 0 100%; transition: background-size .45s cubic-bezier(.2, .7, .2, 1), border-color .2s; }
.motion .town-plaques a:hover { background-size: 100% 100%; }

/* Guide rows & FAQ rows nudge forward */
.motion .guide-row .arrow, .motion .docket-tab::before { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); display: inline-block; }
.motion .guide-row:hover .arrow { transform: translateX(6px); }
.motion .docket-tab:hover::before { transform: translateX(3px) rotate(-8deg); }

/* Header tightens once you scroll */
.site-header .wrap, .brand img { transition: min-height .3s ease, width .3s ease, height .3s ease; }
.site-header.is-scrolled .wrap { min-height: 64px; }
.site-header.is-scrolled .brand img { width: 52px; height: 52px; }

/* Reading progress line under the header (long pages) */
.scroll-progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 60; pointer-events: none; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #7d5f3d, var(--accent), #f0d59e); }
@supports (animation-timeline: scroll()) {
  .motion .scroll-progress { animation: progressGrow linear both; animation-timeline: scroll(root); }
  @keyframes progressGrow { to { transform: scaleX(1); } }
}

/* Live numbers */
.motion .stat .value { transition: color .3s; }
.price strong { display: inline-block; }
.motion .price strong.is-ticking { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .motion .reveal { opacity: 1 !important; transform: none !important; }
  .motion .hero-figure img { transform: none !important; }
  .motion .hero::after, .scroll-progress { display: none; }
  @view-transition { navigation: none; }
}
@media (hover: none) { .motion .hero::after { display: none; } }
.motion .plan.is-highlighted.spot { background-image: radial-gradient(320px circle at var(--mx) var(--my), rgb(214 178 122 / calc(var(--spot) * .18)), transparent 70%), linear-gradient(180deg, rgb(214 178 122 / .09), transparent 45%); }

/* =========================================================================
   v2.1 usability pass (same theme): search-first hero, compact header,
   scannable notary cards, compact how-it-works, 44px touch targets.
   ========================================================================= */
:root { --header-h: 76px; }
.site-header .brand img { width: 56px; height: 56px; }
.site-header .header-cta { margin-left: .75rem; min-height: 44px; font-size: 1rem; }
@media (max-width: 1000px) {
  :root { --header-h: 64px; }
  .site-header .brand img { width: 48px; height: 48px; }
  .site-header .header-cta { margin-left: auto; padding-inline: .9rem; font-size: .95rem; }
  .menu-toggle { margin-left: .5rem; }
  .brand { margin-right: 0; }
}

/* Hero: value proposition + search first */
.hero-copy { padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.hero h1 { margin: .9rem 0 .45em; }
.hero p { max-width: 52ch; }
.hero .search { margin-top: 1.5rem; }
.hero-secondary { margin: 1.1rem 0 0; font-size: 1.1rem; color: var(--text-2); }
.hero-secondary a { font-weight: 600; }

/* Search with persistent labels */
.search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 14px; max-width: 620px; background: rgb(18 15 12 / .92); }
.search .search-field { display: grid; gap: 6px; }
.search label { font: 600 .9rem/1.3 var(--font-ui); color: var(--text); }
.search .optional { font-weight: 400; color: var(--muted); }
.search input, .search select { min-height: 48px; font: 400 1rem/1.3 var(--font-ui); border: 1px solid #4d4236; background: #14110e; border-radius: 4px; }
.search input:focus-visible, .search select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.search .btn { grid-column: 1 / -1; min-height: 52px; font-size: 1.12rem; }
.quick-links-label { color: var(--muted); font-size: 1rem; align-self: center; }
@media (max-width: 560px) { .search { grid-template-columns: 1fr; } }

/* Mobile: headline and search before the statue */
@media (max-width: 860px) {
  .hero-figure { order: 0; width: min(64%, 300px); margin: 0 auto -.5rem; }
  .hero-copy { padding-bottom: 1rem; }
}

/* Notary cards: quick comparison */
.listing-card { align-content: start; }
.listing-card .where { display: flex; align-items: center; gap: .35rem; margin: .2rem 0 0; font: 500 .92rem/1.4 var(--font-ui); color: var(--text-2); }
.listing-card .where svg { color: var(--accent); flex: none; }
.listing-card .headline { margin: .45rem 0 .5rem; }
.listing-card .meta { margin-bottom: .1rem; }
.listing-card .badges { margin-top: .7rem; }
.listing-card .view { display: inline-block; margin-top: .8rem; font: 600 .92rem/1 var(--font-ui); color: var(--accent); }
.listing-card:hover .view { text-decoration: underline; }

/* Browse by need: one column with the icon beside the text on small screens */
@media (max-width: 640px) {
  .needs { grid-template-columns: 1fr; }
  .needs .card { display: grid; grid-template-columns: 56px 1fr; column-gap: 1rem; align-items: start; }
  .needs .icon-art { grid-row: span 2; margin: 0; }
  .needs h3 { margin-top: .2rem; }
}

/* How it works: fits in one desktop viewport */
.works-head { margin-bottom: 1rem; }
.notary-stamp-wrap { height: 400px; }
.works-head h2 { font-size: var(--step-3); }
@media (max-width: 860px) { .notary-stamp-wrap { height: 300px; } .works-head h2 { font-size: 2rem; } }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 0; position: relative; }
  .steps::before { content: ""; position: absolute; left: 18px; top: 24px; bottom: 24px; width: 1px; background: var(--brass-line); }
  .step.card { background: none; border: 0; padding: 0 0 1.5rem 3.4rem; position: relative; }
  .step::before { position: absolute; left: 0; top: 0; margin: 0; background: var(--bg); }
}

/* CTA button never wraps awkwardly */
.cta-band .btn { white-space: nowrap; }

/* 44px touch targets on touch screens */
@media (pointer: coarse), (max-width: 760px) {
  .chip { min-height: 44px; }
  .pagination a, .pagination span { min-width: 44px; min-height: 44px; }
  .site-footer .footer-grid ul a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer .footer-grid ul { gap: 0; }
}
.site-header .header-cta { white-space: nowrap; }
@media (max-width: 360px) { .site-header .header-cta { padding-inline: .7rem; font-size: .85rem; letter-spacing: .04em; } .site-header .brand img { width: 44px; height: 44px; } }

/* Two-step setup QR code */
.qr-setup { margin: 0 0 1rem; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.qr-setup svg { width: 200px; height: 200px; background: #fff; padding: 6px; border-radius: 6px; border: 1px solid var(--line); }
.qr-setup figcaption { font-size: .85rem; color: var(--muted); max-width: 32ch; }

/* Admin: short numbered how-to inside a settings card */
.steps-mini { margin: .25rem 0 0; padding-left: 1.2rem; font-size: .9rem; color: var(--muted); }
.steps-mini li { margin: .25rem 0; }
.steps-mini code { font-size: .85em; }

/* Email confirmation code box */
.code-input { font-family: ui-monospace, Menlo, monospace; font-size: 1.6rem; letter-spacing: .35em; text-align: center; max-width: 16rem; }

/* Trust signals (claims mirror the legal pages) */
.trust { list-style: none; margin: 1.25rem 0 .4rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem 1.25rem; }
.trust li { display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; line-height: 1.45; }
.trust li strong { display: block; font-weight: 600; color: var(--text); }
.trust .trust-text { display: block; color: var(--muted); font-size: .86rem; margin-top: .15rem; }
.trust-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--brass-line); color: var(--accent); background: var(--accent-soft); }
.trust-compact { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem 1rem; }
.trust-compact li { align-items: center; font-size: .85rem; }
.trust-links { margin: .2rem 0 0; }
.site-footer .trust { margin: 2.25rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* Portal bell + toasts */
.bell { position: relative; }
.bell-btn { position: relative; }
.bell-btn svg { width: 22px; height: 22px; }
.bell-count { position: absolute; top: -2px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #b0453a; color: #fff; font: 700 .7rem/19px var(--font-ui); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.bell-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; z-index: 60; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 18px 40px rgb(0 0 0 / .45); }
.bell-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.bell-head .btn { font-size: .78rem; padding: .25rem .45rem; }
.bell-list { list-style: none; margin: 0; padding: .25rem 0; }
.bell-list a, .toast { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .9rem; color: var(--text); text-decoration: none; }
.bell-list a:hover { background: var(--surface-2); text-decoration: none; }
.bell-list .is-read { opacity: .62; }
.bell-empty { padding: 1rem .9rem; color: var(--muted); font-size: .92rem; }
.bell-text { display: grid; gap: .1rem; font-size: .9rem; line-height: 1.35; min-width: 0; }
.bell-text strong { font-weight: 600; }
.bell-body { color: var(--text-2); overflow-wrap: anywhere; }
.bell-time { color: var(--muted); font-size: .78rem; }
.bell-dot { flex: none; width: 10px; height: 10px; margin-top: .35rem; border-radius: 50%; background: var(--accent); }
.bell-payments, .bell-membership { background: #8fcf9e; }
.bell-cancellations, .bell-alert { background: #f29a88; }
.bell-signups, .bell-account { background: #8ab4f8; }
.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: .6rem; width: min(360px, calc(100vw - 32px)); }
.toast { position: relative; background: var(--surface); border: 1px solid var(--brass-line); border-left: 4px solid var(--accent); border-radius: 10px; box-shadow: 0 14px 34px rgb(0 0 0 / .5); transform: translateY(12px); opacity: 0; transition: transform .3s ease, opacity .3s ease; padding-right: 2.2rem; }
.toast.is-in { transform: none; opacity: 1; }
.toast:hover { text-decoration: none; border-color: var(--accent); }
.toast-close { position: absolute; top: .35rem; right: .4rem; background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: .2rem .35rem; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* AI Notary Assistant widget */
.ai { position: fixed; right: 16px; bottom: 16px; z-index: 70; font-family: var(--font-ui); }
.ai-launch { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.15rem; border-radius: 999px; border: 1px solid var(--btn-edge); background: var(--btn); color: var(--btn-text); font: 600 .95rem/1 var(--font-ui); cursor: pointer; box-shadow: 0 10px 28px rgb(0 0 0 / .45); }
.ai-launch:hover { background: var(--btn-hover); }
.ai-launch svg { width: 20px; height: 20px; }
.ai.is-open .ai-launch { display: none; }
.ai-panel { width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 60px rgb(0 0 0 / .55); overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ai-head img { border-radius: 50%; background: #fbf8f2; padding: 2px; flex: none; }
.ai-head div { flex: 1; display: grid; line-height: 1.25; }
.ai-head strong { color: var(--text); font-size: 1rem; }
.ai-head small { color: var(--muted); font-size: .78rem; }
.ai-icon-btn { background: none; border: 0; color: var(--text-2); font-size: 1.25rem; line-height: 1; padding: .35rem .45rem; border-radius: 6px; cursor: pointer; }
.ai-icon-btn:hover { background: var(--surface-3); color: var(--text); }
.ai-log { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .7rem; }
.ai-msg { max-width: 88%; padding: .65rem .85rem; border-radius: 12px; font-size: .93rem; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg p { margin: 0 0 .5rem; } .ai-msg p:last-child { margin-bottom: 0; }
.ai-msg ul { margin: .2rem 0 .5rem; padding-left: 1.15rem; } .ai-msg li { margin: .2rem 0; }
.ai-bot { align-self: flex-start; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-user { align-self: flex-end; background: var(--btn); color: var(--btn-text); border-bottom-right-radius: 4px; }
.ai-bot a { color: var(--accent); text-decoration: underline; }
.ai-sources { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; padding-top: .55rem; border-top: 1px solid var(--line); }
.ai-sources a { font-size: .76rem; padding: .2rem .5rem; border: 1px solid var(--brass-line); border-radius: 999px; color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.ai-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ai-chips button { font: 500 .82rem/1.2 var(--font-ui); padding: .45rem .7rem; border-radius: 999px; border: 1px solid var(--brass-line); background: transparent; color: var(--text-2); cursor: pointer; text-align: left; }
.ai-chips button:hover { border-color: var(--accent); color: var(--text); }
.ai-typing { display: inline-flex; gap: 4px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .15s; } .ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-form { display: flex; gap: .5rem; align-items: flex-end; padding: .7rem; border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; padding: .6rem .7rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg-deep); color: var(--text); font: .95rem/1.4 var(--font-ui); }
.ai-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ai-form .btn { min-height: 42px; }
.ai-foot { margin: 0; padding: 0 .9rem .7rem; font-size: .72rem; color: var(--muted); }
.toast-stack { bottom: 88px; }
@media (max-width: 560px) { .ai { right: 10px; bottom: 10px; } .ai-launch span { display: none; } .ai-launch { padding: .85rem; } .ai-panel { height: calc(100vh - 20px); } }
@media (prefers-reduced-motion: reduce) { .ai-typing span { animation: none; } }
@media print { .ai, .toast-stack { display: none !important; } }
.ai-msg.ai-wide { max-width: 100%; }
.ai-plans { display: grid; gap: .6rem; margin-top: .7rem; }
.ai-plan { border: 1px solid var(--line-strong); border-radius: 10px; padding: .75rem .8rem; background: var(--surface); }
.ai-plan.is-pick { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--brass-line); }
.ai-plan.is-current { opacity: .8; }
.ai-plan-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.ai-plan-head strong { font-size: 1rem; }
.ai-plan-tag { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--brass-line); border-radius: 999px; padding: .1rem .45rem; }
.ai-plan-price { font: 600 1.15rem/1.3 var(--font-ui); color: var(--text); margin: .2rem 0; }
.ai-plan p { margin: 0 0 .35rem; color: var(--text-2); font-size: .84rem; }
.ai-plan ul { margin: 0 0 .6rem; padding-left: 1.05rem; font-size: .82rem; color: var(--text-2); }
.ai-plan .btn { text-decoration: none; }
.ai-plan .btn-block { display: flex; justify-content: center; width: 100%; }
.ai-plan-month { display: block; text-align: center; margin-top: .35rem; font-size: .78rem; color: var(--muted); }

/* ── Mobile polish ─────────────────────────────────────────── */
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
.mobile-contact { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { min-width: 0; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar a { padding-block: .65rem; }
  .sidebar a[aria-current="page"] { scroll-margin-inline: 40px; }
  /* Sticky "Save" bar: solid, so the form behind it never shows through. */
  .form-actions { bottom: max(10px, env(safe-area-inset-bottom)); z-index: 20; padding: .7rem .8rem; border: 1px solid var(--line-strong); border-radius: 12px; background: rgb(18 15 12 / .96); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 10px 28px rgb(0 0 0 / .45); }
  .form-actions > p, .form-actions > .small { flex: 1 1 100%; margin: 0; font-size: .8rem; }
  /* Profile: Call / Request always within thumb reach. */
  .mobile-contact { display: flex; gap: .5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; padding: .65rem var(--gutter, 16px) calc(.65rem + env(safe-area-inset-bottom)); background: rgb(18 15 12 / .97); border-top: 1px solid var(--line-strong); box-shadow: 0 -10px 24px rgb(0 0 0 / .4); }
  .mobile-contact .btn { flex: 1 1 0; justify-content: center; min-height: 48px; padding-inline: .5rem; font-size: .9rem; }
  body:has(.mobile-contact) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  body:has(.mobile-contact) .ai { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body:has(.form-actions) .ai { bottom: calc(96px + env(safe-area-inset-bottom)); }
  body:has(.mobile-contact) .toast-stack, body:has(.form-actions) .toast-stack { bottom: 160px; }
  #request { scroll-margin-top: calc(var(--header-h, 76px) + 12px); }
}
@media (max-width: 640px) {
  input[type="file"] { font-size: 16px; max-width: 100%; }
  .ai-launch { width: 56px; height: 56px; justify-content: center; padding: 0; }
  .app-main { padding-inline: 16px; }
  .table-wrap table { font-size: .9rem; }
  .table-wrap th, .table-wrap td { padding-inline: .6rem; }
}
@media (max-width: 900px) {
  .tabs { scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tabs::-webkit-scrollbar { display: none; }
  /* Focused forms (listing, checkout, account): keep the screen clear of the chat button. */
  body:has(.form-actions) .ai:not(.is-open) { display: none; }
}
@media (max-width: 640px) {
  .bell { position: static; }
  .bell-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h, 76px) + 6px); width: auto; max-height: calc(100vh - var(--header-h, 76px) - 24px); }
  .bell-head { flex-wrap: wrap; }
}
.bell-panel { color: var(--text); font-family: var(--font-ui); text-align: left; }
.bell-head strong { color: var(--text); }
.bell-head .btn { color: var(--accent); }
.bell-count { box-shadow: 0 0 0 2px var(--paper, #fbf8f2); }
.bell-list a, .bell-text, .toast { font-family: var(--font-ui); }

/* Commission certificate card (portal): trust signals */
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.trust-list li { display: grid; grid-template-columns: 18px 1fr; gap: .5rem; align-items: start; line-height: 1.45; }
.trust-list li svg { color: var(--success, #6fbf8f); margin-top: .15rem; }

/* Admin visitor stats: one-series column chart + horizontal share bars (theme bronze) */
.vbars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; align-items: end; height: 180px; border-bottom: 1px solid var(--line, #3a332b); }
.vbar { position: relative; height: 100%; display: flex; align-items: flex-end; cursor: default; outline: none; }
.vbar span { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.vbar:hover span, .vbar:focus-visible span { background: #e8cfa2; }
.vbar:hover::after, .vbar:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: var(--surface-3); color: var(--text); border: 1px solid var(--line, #3a332b); padding: .3rem .5rem; border-radius: 6px; font-size: .8rem; z-index: 5; pointer-events: none; }
.vbars-axis { display: flex; justify-content: space-between; margin-top: .4rem; }
.hbar { margin: 0 0 .75rem; }
.hbar-label { display: flex; justify-content: space-between; gap: .75rem; font-size: .92rem; margin-bottom: .3rem; }
.hbar-track { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.split > * { min-width: 0; }
