/* =====================================================================
   Good Legal Lawyers — aklawyer.com.au
   Three themes via [data-theme] on <html>:
     editorial  — dark, cinematic, oxblood + brass
     sandstone  — light, classical, navy + ochre
   ===================================================================== */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- TYPE ---------- */
:root {
  --font-serif: "Cormorant Garamond", "EB Garamond", "Hoefler Text", Georgia, serif;
  --font-sans:  "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono:  "JetBrains Mono", "SF Mono", Menlo, monospace;
}

/* ---------- THEME: EDITORIAL (default, dark) ----------
   Contrast tokens revised per Lighthouse / WCAG 1.4.3 (June 2026 audit).
   --ink-3 raised from #76705f to #9c9788 to meet AA on var(--bg) (#0b0b0d).
   --accent raised from #b08434 to #d4a04a to meet AA for gold-on-dark used
   in eyebrow text, hero em italics, and the "01..06" practice list numerals.
*/
html[data-theme="editorial"] {
  --bg:        #0b0b0d;
  --bg-2:      #131316;
  --bg-3:      #1c1c21;
  --ink:       #ece7df;
  --ink-2:     #c6bfaf;
  --ink-3:     #9c9788;   /* was #76705f — AA on --bg */
  --rule:      #2a2a30;
  --accent:    #d4a04a;   /* was #b08434 — AA on --bg, brand brass */
  --accent-2:  #8a2026;   /* oxblood, slightly brighter for AA */
  --danger:    #e26a5a;   /* was #d85a4a */
  --hero-grain: 0.06;
  --shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}

/* ---------- THEME: SANDSTONE (light, classical) ----------
   Contrast tokens revised: --ink-3 darkened to AA on --bg, --accent darkened
   to AA on --bg (#f5efe4) for the same eyebrow and number labels.
*/
html[data-theme="sandstone"] {
  --bg:        #f5efe4;
  --bg-2:      #ebe3d3;
  --bg-3:      #e1d6c0;
  --ink:       #19243a;   /* deep navy */
  --ink-2:     #2b3651;
  --ink-3:     #585f73;   /* was #6e7892 — AA on --bg */
  --rule:      #c8bda6;
  --accent:    #8a5a1c;   /* was #a26b2a — AA on --bg */
  --accent-2:  #19243a;
  --danger:    #8d2a14;   /* was #a4351f — AA on --bg */
  --hero-grain: 0.04;
  --shadow: 0 18px 40px -18px rgba(25,36,58,.25);
}

/* ----------------------------------------------------------------------
   Stacey palette (preview).
   Built from Stacey Kernaghan's June 2026 brand review: "a palette with
   blues, black, and small accents of gold or white". Navy text on a
   cooler off-white, gold pulled back to a small accent role. Opt-in only.
   ---------------------------------------------------------------------- */
html[data-theme="stacey"] {
  --bg:        #f3eee2;   /* warm off-white */
  --bg-2:      #e6e1d2;
  --bg-3:      #d7d0bc;
  --ink:       #0e1c3a;   /* deep navy */
  --ink-2:     #21345d;
  --ink-3:     #4b5778;   /* AA on --bg */
  --rule:      #c2b89f;
  --accent:    #b07a1c;   /* gold accent, small role */
  --accent-2:  #0e1c3a;   /* navy accent for buttons */
  --danger:    #8d2a14;
  --hero-grain: 0.03;
  --shadow: 0 18px 40px -18px rgba(14,28,58,.22);
}
html[data-theme="stacey"] .brand__mark {
  /* Stacey preview — gold crest works on the off-white background. */
  background-image: url("../img/shield-gold-transparent.png");
  background-image: image-set(
    url("../img/shield-gold-transparent.avif") type("image/avif"),
    url("../img/shield-gold-transparent.webp") type("image/webp"),
    url("../img/shield-gold-transparent.png")  type("image/png")
  );
  filter: none;
}
html[data-contrast="high"][data-theme="stacey"] {
  --ink: #000000;
  --ink-2: #000000;
  --ink-3: #0c1428;
  --bg: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #f6f6f6;
  --rule: #000000;
  --accent: #6b3a00;
}
/* On the stacey preview, switch the hero crest to the gold variant —
   the dark night-shield does not contrast on cream. */
html[data-theme="stacey"] .hero__crest--day { display: block; }
html[data-theme="stacey"] .hero__crest--night { display: none; }
/* Status card on stacey preview: warm card with navy ink. */
html[data-theme="stacey"] .status-card {
  background: rgba(243,238,226,0.94);
  border-color: rgba(14,28,58,0.15);
  color: #0e1c3a;
}
html[data-theme="stacey"] .status-card__time { color: #0e1c3a; }
html[data-theme="stacey"] .status-card__zone { color: #b07a1c; }
html[data-theme="stacey"] .status-list__row { color: rgba(14,28,58,0.7); }
html[data-theme="stacey"] .status-list__row.is-current { color: #0e1c3a; }
/* Memberships strip in stacey: no inversion, source PNGs work on cream. */
html[data-theme="stacey"] .memberships img { filter: none; }
/* Monogram tile in stacey: gold crest stays gold. */
html[data-theme="stacey"] .monogram__text { color: var(--ink); }
html[data-theme="stacey"] .monogram__crest { filter: none; opacity: 0.45; }

/* ---------- BASE ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Universal visible focus ring — WCAG 2.4.7. The default ring on dark
   themes is invisible on gold; this ring uses the accent and a 2px outline
   offset so it reads against both editorial and sandstone backgrounds. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip-to-content link (added to every page by shell.js). Hidden until
   the keyboard tabs to it. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 12px 18px;
  z-index: 999;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 12px;
  top: 12px;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Hero h1 italic em uses the serif at -0.01em letter-spacing; reserving
   ~1.15 line-height avoids the layout shift Lighthouse saw on the em. */
.hero h1 em { font-style: italic; color: var(--accent); line-height: 1.05; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; }

a { text-decoration: none; }
a.link {
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  transition: color .2s;
}
a.link:hover { color: var(--accent); }

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }

section { padding: 96px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }

@media (max-width: 700px) {
  section { padding: 64px 0; }
  .wrap, .wrap-narrow { padding: 0 20px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.rule {
  width: 64px; height: 1px;
  background: var(--accent);
  margin: 24px 0;
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  padding: 18px 32px;
  max-width: 1240px; margin: 0 auto;
}
.brand { flex: 0 0 auto; min-width: 0; }
.brand {
  display: flex; align-items: center; gap: 14px;
  color: var(--ink);
}
.brand__mark {
  width: 44px; height: 44px;
  display: block;
  /* image-set lets modern browsers pick AVIF (best compression), then WebP,
     then fall back to PNG for old browsers. The PNG fallback below the
     image-set keeps Safari < 14 working. */
  background-image: url("../img/shield-black-transparent.png");
  background-image: image-set(
    url("../img/shield-black-transparent.avif") type("image/avif"),
    url("../img/shield-black-transparent.webp") type("image/webp"),
    url("../img/shield-black-transparent.png")  type("image/png")
  );
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  /* Editorial (Night) — black silhouette inverted to white on dark. */
  filter: invert(1);
}
html[data-theme="sandstone"] .brand__mark {
  /* Sandstone (Day) — gold foil on light. No filter. */
  background-image: url("../img/shield-gold-transparent.png");
  background-image: image-set(
    url("../img/shield-gold-transparent.avif") type("image/avif"),
    url("../img/shield-gold-transparent.webp") type("image/webp"),
    url("../img/shield-gold-transparent.png")  type("image/png")
  );
  filter: none;
}
/* Hide the inline alt text of the old <img> if shell.js still emits one. */
.brand__mark img, .brand__mark::before { display: none; }
.brand__name {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: .02em;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: 4px;
  line-height: 1.55;
}
.brand__sub strong {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .2em;
}
@media (max-width: 700px) {
  .brand__sub { font-size: 9px; letter-spacing: .12em; }
}

.nav {
  display: flex; align-items: center; gap: 22px;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 8px;
}
.nav a {
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: .02em;
  transition: color .2s;
}
.nav a:hover, .nav a.is-active { color: var(--ink); }

.nav__cta {
  background: var(--accent);
  color: var(--bg) !important;
  padding: 10px 18px;
  border-radius: 2px;
  font-weight: 500;
}

.nav__burger { display: none; background: none; border: 0; color: var(--ink); }

@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
         background: var(--bg); flex-direction: column; gap: 0;
         padding: 24px 32px; border-bottom: 1px solid var(--rule); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav__burger { display: inline-flex; }
}

/* ---------- THEME SWITCHER ---------- */
.theme-switch {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: flex; gap: 6px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.theme-switch button {
  width: 34px; height: 34px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  display: grid; place-items: center;
  font-size: 11px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .2s;
}
.theme-switch button:hover { color: var(--ink); border-color: var(--accent); }
.theme-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.theme-switch button svg { display: block; }

/* ---------- ACCESSIBILITY PANEL ---------- */
/* Font-size scaling applied to html via data-font; rem-based content scales with it. */
html[data-font="sm"] { font-size: 14px; }
html[data-font="md"] { font-size: 16px; }
html[data-font="lg"] { font-size: 18px; }
html[data-font="xl"] { font-size: 21px; }

/* Underline-links accessibility option */
html[data-underline="on"] a:not(.btn):not(.brand):not(.nav__cta):not(.nav a) {
  text-decoration: underline;
  text-underline-offset: 2px;
}
html[data-underline="on"] .nav a:not(.nav__cta) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Reduce-motion accessibility option (and respect OS-level preference) */
html[data-motion="reduce"] *,
html[data-motion="reduce"] *::before,
html[data-motion="reduce"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* High-contrast accessibility option (independent of theme) */
html[data-contrast="high"][data-theme="editorial"] {
  --ink: #ffffff;
  --ink-2: #ffffff;
  --ink-3: #e8e8e8;
  --bg: #000000;
  --bg-2: #000000;
  --bg-3: #0a0a0a;
  --rule: #ffffff;
  --accent: #ffd84a;
}
html[data-contrast="high"][data-theme="sandstone"] {
  --ink: #000000;
  --ink-2: #000000;
  --ink-3: #1a1a1a;
  --bg: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #f6f6f6;
  --rule: #000000;
  --accent: #6b3a00;
}
html[data-contrast="high"] a { text-decoration: underline; }
html[data-contrast="high"] .btn { border-width: 2px; }

/* Accessibility button (lives in the topmost utility strip — see UTILITY STRIP) */
.header-a11y {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid;
  background: transparent;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
}
.header-a11y svg { flex-shrink: 0; }
.header-a11y__label { white-space: nowrap; }
@media (max-width: 700px) {
  .header-a11y__label { display: none; }
  .header-a11y { padding: 4px 6px; }
}

/* The accessibility dropdown panel (anchored to the topmost-right corner) */
.a11y-panel {
  position: fixed;
  right: 18px;
  top: 44px;
  z-index: 70;
  width: 320px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.a11y-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (max-width: 480px) {
  .a11y-panel {
    right: 8px; left: 8px;
    width: auto;
    top: 60px;
  }
}
.a11y-panel__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink);
}
.a11y-panel__close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-2);
  cursor: pointer;
  padding: 0 4px;
}
.a11y-panel__close:hover { color: var(--accent); }

.a11y-row {
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}
.a11y-row:first-of-type { border-top: 0; }
.a11y-row__label {
  font-size: 13px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.a11y-row__controls {
  display: flex; gap: 6px; flex-wrap: wrap;
}

/* Font-size buttons — each button shows the letter A in its own scale */
.a11y-row__controls button[data-font] {
  width: 40px; height: 40px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-serif);
  display: grid; place-items: center;
  transition: all .15s;
}
.a11y-row__controls button[data-font="sm"] { font-size: 12px; }
.a11y-row__controls button[data-font="md"] { font-size: 16px; }
.a11y-row__controls button[data-font="lg"] { font-size: 20px; }
.a11y-row__controls button[data-font="xl"] { font-size: 24px; }
.a11y-row__controls button[data-font]:hover { border-color: var(--accent); }
.a11y-row__controls button[data-font][aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Toggle buttons */
.a11y-toggle {
  padding: 6px 14px;
  font-size: 13px;
  font-family: var(--font-mono);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  min-width: 70px;
  transition: all .15s;
}
.a11y-toggle:hover { border-color: var(--accent); }
.a11y-toggle[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.a11y-row--actions { display: flex; justify-content: flex-end; }
.a11y-reset {
  background: transparent;
  border: 0;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.a11y-reset:hover { color: var(--accent); }
.a11y-foot {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

@media (max-width: 480px) {
  .theme-switch { right: 10px; bottom: 10px; }
}

/* ---------- HERO ---------- */
.hero {
  padding: 140px 0 120px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 60%);
  opacity: .9;
  pointer-events: none;
}
.hero__inner { position: relative; }
.hero h1 {
  max-width: 18ch;
  font-weight: 400;
}
/* Hero h1 em: merged into the BASE block at top of file (line-height 1.05). */
.hero__sub {
  margin-top: 24px;
  font-size: 1.25rem;
  color: var(--ink-2);
  max-width: 56ch;
}
.hero__cta {
  margin-top: 40px;
  display: flex; gap: 14px; flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .02em;
  transition: all .2s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--solid {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn--solid:hover { background: transparent; color: var(--accent); }
.btn--danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn--danger:hover { background: transparent; color: var(--danger); }

/* ---------- HERO BADGES ---------- */
.hero__badges {
  margin-top: 64px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border-top: 1px solid var(--rule);
}
.hero__badges > div {
  padding: 24px 18px 0;
  border-right: 1px solid var(--rule);
}
.hero__badges > div:last-child { border-right: none; }
.hero__badges strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent);
  font-weight: 400;
}
.hero__badges span {
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .hero__badges { grid-template-columns: repeat(2, 1fr); }
  .hero__badges > div:nth-child(2) { border-right: none; }
  .hero__badges > div:nth-child(3),
  .hero__badges > div:nth-child(4) { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 24px; }
}

/* ---------- GRID SECTIONS ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- CARDS ---------- */
.card {
  padding: 32px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card__title {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}

/* ---------- PRACTICE LIST ---------- */
.practice-list {
  list-style: none; padding: 0; margin: 0;
}
.practice-list li {
  border-bottom: 1px solid var(--rule);
  padding: 28px 0;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 24px;
  align-items: baseline;
}
.practice-list li:first-child { border-top: 1px solid var(--rule); }
.practice-list .num {
  font-family: var(--font-mono);
  color: var(--ink-3);
  font-size: 13px;
}
.practice-list h3 {
  font-size: 1.4rem;
  margin: 0 0 6px;
}
.practice-list p {
  color: var(--ink-2);
  margin: 0;
  max-width: 70ch;
}
.practice-list .arrow {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.4rem;
}
@media (max-width: 700px) {
  .practice-list li { grid-template-columns: 50px 1fr; }
  .practice-list .arrow { display: none; }
}

/* ---------- QUOTE ---------- */
.quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.35;
  max-width: 32ch;
}
.quote__by {
  display: block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  padding: 72px 0 32px;
  font-size: 14px;
  color: var(--ink-2);
}
.site-footer .grid-4 { gap: 40px; }
/* Was h4; promoted to h3 so the heading order h1 → h2 → h3 in the page
   does not skip a level. The visual rendering stays identical. */
.site-footer h3,
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
  margin-top: 0;
  font-weight: 600;
  line-height: 1.3;
}
.site-footer a {
  color: var(--ink-2);
  display: block;
  /* WCAG 2.5.5: each footer link is its own touch target. 12px vertical
     padding gives a ≥44px tap target without changing the visual rhythm. */
  padding: 12px 0;
  min-height: 44px;
  line-height: 1.4;
}
.site-footer a:hover { color: var(--accent); }
.site-footer__bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px;
  color: var(--ink-3);
}
.site-footer__bottom a { display: inline; }

/* ---------- UTILITY STRIP (top-most bar — emergency message + a11y) ---------- */
.utility-strip {
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  letter-spacing: .02em;
}
.utility-strip__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.utility-strip__msg {
  flex: 1;
  text-align: center;
  line-height: 1.4;
}
.utility-strip a {
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.7);
  font-weight: 600;
  /* WCAG 2.5.5: pad the three inline emergency links so each is a
     comfortable tap target on mobile. */
  padding: 6px 4px;
  display: inline-block;
}
@media (max-width: 700px) {
  .utility-strip a { padding: 10px 4px; }
}
.utility-strip .header-a11y {
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  font-size: 10px;
  padding: 4px 10px;
  margin: 0;
}
.utility-strip .header-a11y:hover {
  background: rgba(255,255,255,0.16);
  border-color: #fff;
  color: #fff;
}
.utility-strip .header-a11y[aria-expanded="true"] {
  background: #fff;
  color: var(--danger);
  border-color: #fff;
}
@media (max-width: 700px) {
  .utility-strip__inner { flex-direction: column; gap: 6px; padding: 8px 16px; }
  .utility-strip__msg { font-size: 12px; }
}

/* ---------- FIRST HOUR TOOL ---------- */
.fh-shell {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 40px;
  margin-top: 32px;
}
.fh-step { display: none; }
.fh-step.is-active { display: block; }
.fh-step h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.fh-step .prompt {
  color: var(--ink-2);
  margin-bottom: 24px;
}
.fh-options {
  display: grid; gap: 12px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 700px) { .fh-options { grid-template-columns: 1fr; } }
.fh-option {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 20px;
  color: var(--ink);
  font-size: 15px;
  transition: all .2s;
}
.fh-option:hover { border-color: var(--accent); transform: translateY(-1px); }
.fh-option strong { display: block; margin-bottom: 4px; }
.fh-option span { color: var(--ink-2); font-size: 13px; }

.fh-advice {
  padding-top: 12px;
}
.fh-advice ol { padding-left: 22px; }
.fh-advice ol li { margin-bottom: 14px; color: var(--ink-2); }
.fh-advice ol li strong { color: var(--ink); }

.fh-call {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.fh-call .num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--accent);
}
.fh-back {
  margin-top: 24px;
  background: none;
  border: none;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: .04em;
}
.fh-back:hover { color: var(--accent); }

.fh-progress {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}

/* ---------- FORMS ---------- */
.form { display: grid; gap: 18px; max-width: 560px; }
.form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.form input, .form select, .form textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent);
}
.form textarea { min-height: 140px; resize: vertical; }

/* ---------- TABLE ---------- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 32px;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.tbl th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tbl td { color: var(--ink-2); }
.tbl td strong { color: var(--ink); }

/* ---------- INSIGHTS ARTICLES ---------- */
.article {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
}
.article time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .1em;
}
.article h3 { margin: 0 0 8px; font-size: 1.3rem; }
.article p { color: var(--ink-2); margin: 0 0 8px; }
@media (max-width: 700px) {
  .article { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- SUBTLE NUMERIC TICKER ---------- */
.ticker {
  display: flex; gap: 48px; flex-wrap: wrap;
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.ticker div span {
  display: block; color: var(--ink-3); font-size: 12px;
  text-transform: uppercase; letter-spacing: .1em;
}
.ticker div strong {
  font-family: var(--font-serif); font-size: 2rem; color: var(--accent);
  font-weight: 400;
}

/* ---------- KEEP-NEAR-YOU PANEL ---------- */
.keep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (max-width: 720px) { .keep-grid { grid-template-columns: 1fr; } }
.keep-card {
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 22px;
  color: var(--ink);
  cursor: pointer;
  transition: all .2s;
  display: flex; flex-direction: column; gap: 6px;
}
.keep-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.keep-card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}
.keep-card__sub { color: var(--ink-2); font-size: 13px; }

/* ---------- MODAL ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.is-open { display: flex; }
.modal__panel {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 40px;
  max-width: 520px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal__close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: 0; color: var(--ink-2);
  font-size: 24px; line-height: 1;
}
.modal__close:hover { color: var(--accent); }
.modal__body h3 { font-size: 1.4rem; margin-bottom: 12px; }
.modal__body p { color: var(--ink-2); }
.modal__body kbd {
  display: inline-block;
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
}
.modal__actions {
  display: grid; gap: 10px; margin-top: 20px;
}
.modal__platform {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.modal__platform h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px;
}

/* ---------- WATCH ---------- */
.watch-section {
  background:
    radial-gradient(800px 400px at 50% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    var(--bg);
}
.watch {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: center;
  margin: 40px auto 0;
  max-width: 720px;
  text-align: left;
}
@media (max-width: 700px) {
  .watch { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 24px; }
}
.watch__svg {
  width: 320px; height: 320px;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.5));
}
.watch__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.watch__digital {
  font-family: var(--font-serif);
  font-size: 3.6rem;
  color: var(--accent);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.watch__sub {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 14px;
  font-style: italic;
}

/* ---------- BRAND IMAGERY ---------- */
.hero { position: relative; }
.hero__crest {
  position: absolute;
  top: 60px; right: 4%;
  height: auto;
  pointer-events: none;
  /* CLS guard: reserve aspect-ratio space so the hero does not jump while
     the crest image decodes. Audit measured CLS 0.29 with section.hero as
     the main shifter — almost all of it caused by these two crests. */
  aspect-ratio: 1 / 1;
}

/* Night variant — simplified shield, larger, inverted to bright white for definition. */
.hero__crest--night {
  display: none;
  width: clamp(300px, 34vw, 460px);
  opacity: 0.95;
  filter:
    invert(1)
    drop-shadow(0 18px 30px rgba(0,0,0,.55));
}
html[data-theme="editorial"] .hero__crest--night { display: block; }

/* Day variant — full gold-foil heraldic crest at its natural colour. */
.hero__crest--day {
  display: none;
  width: clamp(220px, 26vw, 340px);
  opacity: 0.95;
  filter: drop-shadow(0 12px 22px rgba(25,36,58,.18));
}
html[data-theme="sandstone"] .hero__crest--day { display: block; }
@media (max-width: 800px) {
  /* Theme-specific rules higher up set the crest to display:block
     with chain specificity that beats a bare .hero__crest reset.
     Match that chain so the crest hides on phone (it sits behind
     the hero text and reduces legibility on narrow screens). */
  html[data-theme="editorial"] .hero__crest--night,
  html[data-theme="sandstone"] .hero__crest--day,
  .hero__crest { display: none; }
}

.portrait {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--rule);
  filter: grayscale(0.1);
  box-shadow: var(--shadow);
}
.portrait--bw { filter: grayscale(1) contrast(1.05); }

.about-hero {
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: 64px; align-items: center;
}
@media (max-width: 900px) { .about-hero { grid-template-columns: 1fr; } }

/* ---------- MEMBERSHIPS ROW ---------- */
.memberships {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 48px;
  margin-top: 32px;
}
.memberships img {
  height: 64px; width: auto;
  opacity: 0.85;
  transition: opacity .2s;
}
.memberships img:hover { opacity: 1; }
html[data-theme="editorial"] .memberships img { filter: brightness(0) invert(0.85); }

/* ---------- FH "SEND TO AARON" FORM ---------- */
.fh-send {
  margin-top: 32px;
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
}
.fh-send h4 {
  font-family: var(--font-serif); font-size: 1.2rem;
  margin: 0 0 6px;
  font-weight: 500;
}
.fh-send p.lead-sm { color: var(--ink-2); font-size: 14px; margin: 0 0 16px; }
.fh-send__row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 700px) { .fh-send__row { grid-template-columns: 1fr; } }
.fh-send input, .fh-send textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
}
.fh-send input:focus, .fh-send textarea:focus { outline: none; border-color: var(--accent); }
.fh-send textarea { min-height: 90px; margin-top: 12px; resize: vertical; }
.fh-send__actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.fh-send__hint { color: var(--ink-3); font-size: 12px; margin-top: 10px; }
.fh-send__ok {
  display: none;
  margin-top: 16px;
  padding: 14px;
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-size: 14px;
}
.fh-send__ok.is-shown { display: block; }

/* Inside the watch, the brand image */
.watch__brand-svg image { opacity: .9; }

/* ---------- POLAROID: LEGAL AID ELIGIBILITY ---------- */
.polaroid-trigger {
  color: var(--ink);
  border-bottom: 1px dashed var(--accent);
  cursor: pointer;
  transition: color .2s;
}
.polaroid-trigger:hover { color: var(--accent); }
.polaroid-trigger::after {
  content: " ⊕";
  color: var(--accent);
  font-size: 0.85em;
  margin-left: 2px;
}

.polaroid-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.polaroid-overlay.is-open { display: flex; }

.polaroid {
  position: relative;
  background: #f5efe2;
  padding: 18px 18px 64px;
  width: clamp(320px, 92vw, 540px);
  box-shadow:
    0 30px 60px -10px rgba(0,0,0,.65),
    0 0 0 1px rgba(0,0,0,.04);
  transform: rotate(-2.4deg) translateY(70px) scale(.96);
  opacity: 0;
  animation: polaroid-in .65s .05s cubic-bezier(.18,.7,.18,1) forwards;
}
@keyframes polaroid-in {
  to { transform: rotate(-2.4deg) translateY(0) scale(1); opacity: 1; }
}

.polaroid__close {
  position: absolute;
  top: -42px; right: -4px;
  background: none; border: 0;
  color: #ffffff; font-size: 32px;
  line-height: 1; cursor: pointer;
  opacity: 0.85;
}
.polaroid__close:hover { opacity: 1; }

.polaroid__photo {
  background: #ffffff;
  padding: 22px 22px 26px;
  border: 1px solid #e0d8c4;
  /* Develop animation: starts grayscale, blurry, sepia; resolves to crisp. */
  filter: blur(14px) saturate(0.15) sepia(0.5) brightness(1.05);
  animation: polaroid-develop 1.8s .55s ease-out forwards;
}
@keyframes polaroid-develop {
  30%  { filter: blur(8px) saturate(0.35) sepia(0.45) brightness(1.04); }
  60%  { filter: blur(3px) saturate(0.7)  sepia(0.2)  brightness(1.02); }
  100% { filter: blur(0)   saturate(1)    sepia(0)    brightness(1); }
}

.polaroid__photo h3 {
  font-family: var(--font-serif);
  margin: 0 0 4px;
  font-size: 1.5rem;
  color: #19243a;
}
.polaroid__photo .sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: #6e7892;
  margin: 0 0 16px;
}
.polaroid__cols {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 540px) { .polaroid__cols { grid-template-columns: 1fr; } }

.polaroid__col h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: #19243a;
  border-bottom: 1px solid #c8bda6;
  padding-bottom: 4px;
}
.polaroid__col .row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  font-size: 12px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 5px;
}
.polaroid__col .yes {
  color: #2a6f3a; font-weight: 700;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .1em;
}
.polaroid__col .no {
  color: #a4351f; font-weight: 700;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .1em;
}

.polaroid__caption {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: #5a4a30;
  opacity: 0;
  animation: polaroid-caption 0.7s 2.1s ease forwards;
}
@keyframes polaroid-caption { to { opacity: 1; } }

/* ---------- BOOKING PAGE ---------- */
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 16px;
}
@media (max-width: 800px) { .book-grid { grid-template-columns: 1fr; } }

.book-card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 36px;
  display: flex; flex-direction: column;
}
.book-card--urgent {
  border-left: 3px solid var(--danger);
}
.book-card__title {
  font-size: 1.9rem;
  margin: 8px 0 6px;
}
.book-card__price {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--accent);
  margin: 0;
}
.book-card--urgent .book-card__price { color: var(--danger); }
.book-card__inc {
  font-size: 0.9rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 6px;
}
.book-list { list-style: none; padding: 0; margin: 0 0 16px; }
.book-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.book-list li:last-child { border-bottom: 0; }
.book-list strong {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}
.book-list span { color: var(--ink); }

.book-card .btn { align-self: flex-start; margin-top: auto; }
.book-card code {
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 12px;
}

/* ---------- FIRM STATS ROW ---------- */
.stat {
  padding: 28px 24px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
}
.stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.6rem;
  color: var(--accent);
  font-weight: 400;
  line-height: 1;
}
.stat span {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Inline credentials table within a person profile */
.tbl--inline {
  margin-top: 24px;
}
.tbl--inline th {
  width: 160px;
  vertical-align: top;
}
.tbl--inline td { color: var(--ink-2); }
.tbl--inline td strong { color: var(--ink); }

/* ---------- TEAM PROFILE CARDS ---------- */
.person {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: center;
}
.person--reverse { grid-template-columns: 7fr 5fr; }
.person--reverse .person__image { order: 2; }
.person--reverse .person__body  { order: 1; }
@media (max-width: 900px) {
  .person, .person--reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .person--reverse .person__image,
  .person--reverse .person__body { order: initial; }
}
.person__image { display: flex; justify-content: center; }
.person__body h2 { margin-bottom: 6px; }

/* Monogram placeholder for team members without a photo */
.monogram {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%),
    var(--bg-3);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.monogram--alt {
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent-2) 26%, transparent), transparent 65%),
    var(--bg-3);
}
.monogram__text {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 10vw, 7.5rem);
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0,0,0,.35);
}
html[data-theme="sandstone"] .monogram__text { color: var(--ink); }
.monogram__crest {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 36px;
  opacity: 0.5;
  filter: invert(1);
}
html[data-theme="sandstone"] .monogram__crest { filter: none; opacity: 0.35; }

/* ---------- TIP CARDS (for booking guidance) ---------- */
.tip-card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 28px 32px;
}
.tip-card--gold { border-left-color: var(--accent); }
.tip-card h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.tip-card ul { margin: 0; padding-left: 22px; }
.tip-card li { color: var(--ink-2); margin-bottom: 10px; line-height: 1.55; }
.tip-card li strong { color: var(--ink); }

/* Quick-pick dropdown near the top of the booking page */
.quick-pick-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}
.quick-pick { display: flex; flex-direction: column; gap: 12px; }
.quick-pick label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.quick-pick__row {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.quick-pick select {
  flex: 1;
  min-width: 280px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 15px) 50%;
  background-size: 7px 7px;
  background-repeat: no-repeat;
  padding-right: 44px;
}
.quick-pick select:focus { outline: none; border-color: var(--accent); }
.quick-pick optgroup {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.quick-pick option {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-2);
  letter-spacing: normal;
  text-transform: none;
}

/* Tabs above the live embed */
.book-tabs {
  display: inline-flex;
  margin: 24px 0 18px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-2);
}
.book-tab {
  background: transparent;
  border: 0;
  padding: 14px 22px;
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: .02em;
  cursor: pointer;
  border-right: 1px solid var(--rule);
}
.book-tab:last-child { border-right: 0; }
.book-tab:hover { color: var(--ink); }
.book-tab.is-active {
  background: var(--accent);
  color: var(--bg);
}

/* Cal.com inline embed container */
.cal-embed {
  width: 100%;
  min-height: 680px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.cal-embed.is-hidden { display: none; }
.cal-embed iframe {
  width: 100% !important;
  min-height: 680px;
  border: 0 !important;
  display: block;
}

/* ---------- UTILITIES ---------- */
.tac { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 32px; }
.muted { color: var(--ink-3); }
.serif { font-family: var(--font-serif); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ===================================================================== */
/* AT THE FIRM RIGHT NOW — Rolex clock + Split-flap status                */
/* ===================================================================== */

.now {
  padding: 80px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.now__wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.now__title { margin: 8px 0 14px; }
.now__sub { color: var(--ink-2); max-width: 520px; }
.now__cta {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px;
}
.now__right {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
}
@media (max-width: 880px) {
  .now__wrap { grid-template-columns: 1fr; gap: 40px; }
}

/* ----- Rolex-style clock — theme-aware colour tokens ----- */
:root[data-theme="editorial"] {
  /* Night: black dial, steel case, gold accents */
  --rolex-case-1: #d9d9d9;
  --rolex-case-2: #f3f3f3;
  --rolex-case-3: #8a8a8a;
  --rolex-bezel-1: #b0b0b0;
  --rolex-bezel-2: #ededed;
  --rolex-dial-1: #050505;
  --rolex-dial-2: #1a1a1a;
  --rolex-dial-rim: #2a2a2a;
  --rolex-ink: #f1f1f1;
  --rolex-ink-2: #b8b8b8;
  --rolex-accent: #c9a35e;
  --rolex-date-bg: #f5f5f5;
  --rolex-date-ink: #111;
}
:root[data-theme="sandstone"] {
  /* Day: white/champagne dial, steel case, gold accents */
  --rolex-case-1: #c8c8c8;
  --rolex-case-2: #ececec;
  --rolex-case-3: #7c7c7c;
  --rolex-bezel-1: #aaaaaa;
  --rolex-bezel-2: #e6e6e6;
  --rolex-dial-1: #f6f1e1;
  --rolex-dial-2: #fbf7eb;
  --rolex-dial-rim: #c8b988;
  --rolex-ink: #1a1a1a;
  --rolex-ink-2: #6a6a6a;
  --rolex-accent: #8a6a2a;
  --rolex-date-bg: #ffffff;
  --rolex-date-ink: #111;
}
:root[data-theme="stacey"] {
  /* Stacey preview: navy-blue dial, steel case, small gold accent */
  --rolex-case-1: #cfd3da;
  --rolex-case-2: #e8ebef;
  --rolex-case-3: #8a8e96;
  --rolex-bezel-1: #a6acb4;
  --rolex-bezel-2: #dde0e5;
  --rolex-dial-1: #0e1c3a;
  --rolex-dial-2: #1a2a4e;
  --rolex-dial-rim: #2a3a60;
  --rolex-ink: #f3eee2;
  --rolex-ink-2: #c0c8d8;
  --rolex-accent: #b07a1c;
  --rolex-date-bg: #f3eee2;
  --rolex-date-ink: #0e1c3a;
}

.rolex {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.rolex svg {
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.32));
  border-radius: 50%;
}
.rolex__hand {
  transition: transform 0.05s linear;
}
.rolex__hand--second {
  /* Sweep second — incremented in JS each second */
}
.rolex__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.rolex__time {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink);
  letter-spacing: 0.12em;
}
.rolex__zone {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ----- Split-flap status board ----- */
.splitflap {
  width: 100%;
  max-width: 340px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 14px 16px 12px;
  box-shadow:
    0 6px 16px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
:root[data-theme="sandstone"] .splitflap {
  background: #141414;
}
.splitflap__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: #c9a35e;
  margin-bottom: 10px;
}
.splitflap__row {
  display: flex;
  gap: 4px;
  justify-content: flex-start;
}
.splitflap__cell {
  position: relative;
  width: 22px;
  height: 32px;
  background: linear-gradient(180deg, #1a1a1a 0%, #1a1a1a 49.5%, #0a0a0a 50%, #0a0a0a 100%);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.6);
  font-family: "Inter", monospace;
  font-weight: 600;
  font-size: 22px;
  color: #f4f4f4;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 200px;
}
.splitflap__cell::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 49.5%;
  height: 1px;
  background: rgba(0,0,0,0.7);
  z-index: 2;
}
.splitflap__cell.is-flipping {
  animation: flap 0.4s ease-in-out;
}
@keyframes flap {
  0%   { transform: rotateX(0deg); }
  50%  { transform: rotateX(-90deg); }
  51%  { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

/* ============================================================
   Sticky mobile call button
   Floats bottom-right on mobile only. Disappears on print and
   on viewports above 760px. Tap target 56px (above the 44px
   WCAG minimum). Uses brand accent and a discreet ring + shadow
   so it reads as deliberate, not as a chat widget.
   ============================================================ */
.ak-call-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  /* Sized to clear the WCAG 2.5.5 minimum of 44px with 12-16px clear space
     on either side. Was 56px / 18px offset; bumped to 64px / 24px so the
     FAB does not crowd footer links on mobile. */
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: none;            /* hidden on desktop by default */
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.08) inset;
  text-decoration: none;
  z-index: 9990;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ak-call-fab:hover,
.ak-call-fab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.32), 0 0 0 1px rgba(0,0,0,0.08) inset;
  outline: none;
}
.ak-call-fab:active {
  transform: translateY(0);
}
.ak-call-fab svg {
  width: 24px;
  height: 24px;
  fill: var(--bg);
}
.ak-call-fab__label {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.ak-call-fab:hover .ak-call-fab__label,
.ak-call-fab:focus-visible .ak-call-fab__label {
  opacity: 0.95;
}
@media (max-width: 760px) {
  .ak-call-fab {
    display: inline-flex;
  }
  /* On mobile, keep the label hidden by default; tapping calls directly. */
  .ak-call-fab__label { display: none; }
}
@media print {
  .ak-call-fab { display: none !important; }
}
.splitflap__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #aaa;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.splitflap__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #888;
  flex-shrink: 0;
  transition: background 0.2s;
}
.splitflap__dot[data-state="open"]    { background: #4ec57a; box-shadow: 0 0 8px rgba(78,197,122,0.6); }
.splitflap__dot[data-state="busy"]    { background: #e8b13e; box-shadow: 0 0 8px rgba(232,177,62,0.6); }
.splitflap__dot[data-state="closed"]  { background: #c94c4c; box-shadow: 0 0 8px rgba(201,76,76,0.4); }
.splitflap__dot[data-state="travel"]  { background: #6aaee0; box-shadow: 0 0 8px rgba(106,174,224,0.6); }


/* ===================================================================== */
/* LIVE STATUS CARD — tucked under the emblem on the right of the hero   */
/* ===================================================================== */
.status-card {
  position: absolute;
  right: 4%;
  bottom: 60px;
  width: 260px;
  z-index: 3;
  background: rgba(11,11,13,0.72);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 14px 16px 12px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  color: #ece7df;
}
html[data-theme="sandstone"] .status-card {
  background: rgba(25,36,58,0.86);
  border-color: rgba(255,255,255,0.12);
  color: #f5efe4;
}
.status-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 10px;
}
.status-card__time {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #ece7df;
}
html[data-theme="sandstone"] .status-card__time { color: #f5efe4; }
.status-card__zone {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b08434;
}
html[data-theme="sandstone"] .status-card__zone { color: #c89647; }

.status-list {
  margin: 0; padding: 0;
  list-style: none;
  display: flex; flex-direction: column;
  gap: 4px;
}
.status-list__row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(236,231,223,0.6);
  padding: 4px 0;
}
.status-list__row.is-current {
  color: #ece7df;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 4px;
}
html[data-theme="sandstone"] .status-list__row { color: rgba(245,239,228,0.7); }
html[data-theme="sandstone"] .status-list__row.is-current { color: #f5efe4; }

.status-list__when {
  flex: 0 0 44px;
  font-size: 10px;
  color: rgba(236,231,223,0.5);
  letter-spacing: 0.1em;
}
.status-list__row.is-current .status-list__when {
  color: #b08434;
  font-weight: 600;
}
.status-list__what {
  flex: 1;
  letter-spacing: 0.18em;
}

/* Flap animation — applies to .flap when text changes (class added by JS) */
.flap {
  display: inline-block;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}
.flap.is-flapping {
  animation: flap-flip 0.45s ease-in-out;
}
@keyframes flap-flip {
  0%   { transform: rotateX(0deg); }
  49%  { transform: rotateX(-90deg); opacity: 0.4; }
  50%  { transform: rotateX(90deg); opacity: 0.4; }
  100% { transform: rotateX(0deg); }
}

@media (max-width: 900px) {
  .status-card {
    position: static;
    width: auto;
    max-width: 360px;
    margin: 28px auto 0;
    bottom: auto; right: auto;
  }
}
/* Below 600px the static status card overlaps the absolutely
   positioned hero crest because both occupy the same vertical
   slot inside the hero. Hide the card on phones; the same
   information (call line, open/closed) is in the utility strip
   and footer. */
@media (max-width: 600px) {
  .status-card { display: none; }
}

/* ============================================================
   MOBILE & TABLET POLISH (June 2026 audit follow-up)
   Tightens audit-added blocks for narrow viewports so nothing
   overflows horizontally on a 360px phone and the structure
   reads cleanly on a 768px tablet.
   ============================================================ */

/* Charge pages — "this page authored by" practical-detail block
   (inline styled on every charge page). Soften the decorative
   circle on phones; allow the byline to wrap cleanly. */
@media (max-width: 540px) {
  .charge-shell { gap: 14px !important; padding: 0 4px; }
  .charge-shell > div[aria-hidden="true"]:first-child {
    width: 40px !important; height: 40px !important;
  }
  .charge-shell > div[style*="min-width"] { min-width: 0 !important; }
}

/* Court pages — the inline-styled CTA banner under the hero
   (display:flex with flex-wrap) needs left-aligned text and a
   stacked button row on phones. */
@media (max-width: 600px) {
  .court-shell { padding: 0 4px; }
  section .wrap > div[style*="border-left: 3px solid var(--accent)"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 14px 16px !important;
  }
  section .wrap > div[style*="border-left: 3px solid var(--accent)"] > div { width: 100%; }
  section .wrap > div[style*="border-left: 3px solid var(--accent)"] .btn { width: 100%; margin: 0 !important; }
}

/* "Related across the firm" cluster footer (inline ul on charges,
   courts, and the homepage). Increase tap target on phone so
   neighbouring links are not mis-tapped. */
@media (max-width: 600px) {
  ul[style*="list-style: none"] > li[style*="padding: 6px 0"] {
    padding: 12px 0 !important;
  }
}

/* Homepage hero CTA row — let the two buttons stack and go full
   width below 460px. */
@media (max-width: 460px) {
  .hero__cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero__cta .btn { width: 100%; text-align: center; }
}

/* Homepage news/status section — defensive wrap for any inline
   grid-template-columns: repeat(3, 1fr) blocks. */
@media (max-width: 600px) {
  section .wrap div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  section .wrap div[style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
}

/* Floating call FAB — stay clear of the bottom-edge home indicator
   on iOS and do not overlap footer links. */
@media (max-width: 600px) {
  .ak-call-fab { bottom: max(16px, env(safe-area-inset-bottom)); right: 16px; }
}

/* Long URLs, email addresses, and unbroken codes that appear in
   body copy (Apple DNS TXT strings, court emails, etc.) should
   wrap rather than blow the layout. */
.wrap p, .wrap li, .court-section p, .court-section li,
.ak-section p, .ak-section li {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Charge pages — past-outcomes table (.charge-table). On phone, 4
   columns force the viewport to ~511px and the page renders
   zoomed-out. Stack each row as a labelled card on phone, keep
   the table on tablet but tighten cell padding. */
@media (max-width: 700px) {
  table.charge-table { display: block; width: 100%; }
  table.charge-table thead { display: none; }
  table.charge-table tbody, table.charge-table tr { display: block; width: 100%; }
  table.charge-table tr {
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--bg-2);
  }
  table.charge-table td {
    display: block;
    padding: 4px 0;
    border-bottom: 0;
    font-size: 14px;
    line-height: 1.5;
  }
  table.charge-table td:nth-child(1) {
    font-family: var(--font-serif);
    color: var(--ink);
    font-size: 1.05rem;
    margin-bottom: 6px;
  }
  table.charge-table td:nth-child(2)::before { content: "Detail \00a0 \2014 \00a0"; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
  table.charge-table td:nth-child(3)::before { content: "Plea / hearing \00a0 \2014 \00a0"; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
  table.charge-table td:nth-child(4)::before { content: "Outcome \00a0 \2014 \00a0"; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
  table.charge-table td:nth-child(4) { padding-top: 6px; }
}
@media (min-width: 701px) and (max-width: 900px) {
  table.charge-table th, table.charge-table td { padding: 10px 10px; font-size: 13px; }
}
