/* ==========================================================================
   Dr. Md. Isma Azam (Zico): site stylesheet (v1)
   Design tokens first, then base, layout, components, pages.
   Next.js: move tokens to globals.css; components map 1:1 to React parts.
   ========================================================================== */

:root {
  /* colour tokens (light) */
  --bg: #F4F8FC;
  --surface: #FFFFFF;
  --surface-2: #E9F1F8;
  --ink: #0E2233;
  --ink-2: #4A5F72;
  --line: #D3E0EC;
  --brand: #0172C0;
  --brand-strong: #00528E;
  --brand-soft: #E1EFFA;
  --accent: #E2A21B;
  --accent-hover: #CC8F10;
  --on-accent: #0E2233;
  --on-brand: #FFFFFF;
  --danger: #A8261B;
  --danger-soft: #FBE9E6;
  --ok: #1E6B45;
  --ok-soft: #E3F2E9;
  --verify: #F6D77C;
  --verify-bg: #FFF6D9;

  /* type */
  --f-display: "Spectral", Georgia, "Noto Serif Bengali", serif;
  --f-body: "Public Sans", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-bn: "Hind Siliguri", "Noto Sans Bengali", "Public Sans", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* scale */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 2.4vw, 1.875rem);
  --t-2xl: clamp(1.875rem, 3.4vw, 2.5rem);
  --t-3xl: clamp(2.25rem, 5vw, 3.5rem);

  /* space + shape */
  --gap: clamp(16px, 3vw, 24px);
  --section: clamp(56px, 8vw, 96px);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 39, 51, .06), 0 8px 24px rgba(15, 39, 51, .06);
  --max: 1180px;
  --read: 68ch;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --z-header: 50;
  --z-drawer: 80;
  --z-cta: 40;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0A141D;
    --surface: #0F1E2A;
    --surface-2: #152838;
    --ink: #E6EEF5;
    --ink-2: #A3B6C6;
    --line: #223747;
    --brand: #5BB0F0;
    --brand-strong: #8CC9F7;
    --brand-soft: #10304A;
    --accent: #F0B63A;
    --accent-hover: #F5C75E;
    --on-accent: #0E1C27;
    --on-brand: #0A141D;
    --danger: #F08A7E;
    --danger-soft: #3A1B18;
    --ok: #7FD1A3;
    --ok-soft: #173327;
    --verify: #8A6A12;
    --verify-bg: #2E2711;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A141D;
  --surface: #0F1E2A;
  --surface-2: #152838;
  --ink: #E6EEF5;
  --ink-2: #A3B6C6;
  --line: #223747;
  --brand: #5BB0F0;
  --brand-strong: #8CC9F7;
  --brand-soft: #10304A;
  --accent: #F0B63A;
  --accent-hover: #F5C75E;
  --on-accent: #0E1C27;
  --on-brand: #0A141D;
  --danger: #F08A7E;
  --danger-soft: #3A1B18;
  --ok: #7FD1A3;
  --ok-soft: #173327;
  --verify: #8A6A12;
  --verify-bg: #2E2711;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-md)/1.65 var(--f-body);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--ink); line-height: 1.15; margin: 0; text-wrap: balance; font-weight: 600; }
h1 { font-size: var(--t-3xl); letter-spacing: -0.01em; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); font-family: var(--f-body); font-weight: 650; line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
[lang="bn"], .bn { font-family: var(--f-bn); line-height: 1.75; }
h1 [lang="bn"], h2[lang="bn"], h2 [lang="bn"], .bn-title { font-family: var(--f-bn); font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; z-index: 999; font-weight: 700; }
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.section { padding-block: var(--section); }
.section--tint { background: var(--surface-2); }
.section--brand { background: var(--brand-strong); color: #fff; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.split { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } .split--even { grid-template-columns: 1fr 1fr; } }
.lead { font-size: var(--t-lg); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); }
.xsmall { font-size: var(--t-xs); }
.prose { max-width: var(--read); }
.prose > * + * { margin-top: 1em; }
.prose ul li + li { margin-top: .35em; }
.eyebrow { font: 700 var(--t-xs)/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(24px, 4vw, 40px); max-width: 72ch; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- draft / verification mode ---------- */
.draft-bar { background: var(--verify-bg); border-bottom: 1px solid var(--verify); font-size: var(--t-sm); }
.draft-bar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-block: 8px; }
.draft-bar button { font: inherit; font-weight: 600; background: transparent; border: 1px solid currentColor; color: var(--ink); border-radius: 999px; padding: 4px 12px; cursor: pointer; min-height: 32px; }
body.draft .verify { background: var(--verify-bg); box-shadow: inset 0 -2px 0 var(--verify); border-radius: 3px; padding-inline: 2px; }
body.draft .verify[data-note]:hover::after, body.draft .verify[data-note]:focus::after {
  content: attr(data-note); position: absolute; margin-top: 1.6em; margin-left: -2px; max-width: 280px; background: var(--ink); color: var(--bg);
  font: 500 12px/1.4 var(--f-body); padding: 6px 8px; border-radius: 6px; z-index: 60; white-space: normal;
}
body:not(.draft) .draft-bar { display: none; }

/* ---------- top bar + header ---------- */
.topbar { background: var(--brand-strong); color: #E7F1F3; font-size: var(--t-xs); }
.topbar .wrap { display: flex; gap: 8px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-block: 7px; }
.topbar a { color: inherit; font-weight: 700; text-decoration: none; }
.topbar .emerg { display: inline-flex; gap: 6px; align-items: center; }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--z-header); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font: 600 1.125rem/1.1 var(--f-display); }
.brand-sub { display: block; font: 600 11px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 3px; }
.nav { display: none; }
.nav > ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 4px; align-items: center; }
.nav a, .nav button.nav-trigger { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font: 600 var(--t-sm) var(--f-body); background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button.nav-trigger:hover, .nav a[aria-current="page"], .nav .has-menu.is-active > button { background: var(--surface-2); color: var(--brand-strong); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); border-radius: 10px 10px 4px 4px; }
.has-menu { position: relative; }
.menu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: min(720px, 90vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.menu[hidden] { display: none; }
.menu a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; min-height: 0; border-radius: 10px; font-weight: 500; }
.menu a strong { display: block; font-weight: 650; color: var(--ink); }
.menu a span { display: block; font-size: var(--t-xs); color: var(--ink-2); }
.menu .ic { width: 36px; height: 36px; flex: none; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.menu .ic svg { width: 20px; height: 20px; }
.menu .menu-all { grid-column: 1 / -1; justify-content: center; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; font-weight: 650; color: var(--brand); }
.header-cta { display: none; }
.menu-toggle { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }
@media (min-width: 1080px) { .nav { display: block; } .header-cta { display: inline-flex; } .menu-toggle { display: none; } }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); display: flex; justify-content: flex-end; background: rgba(8, 20, 26, .5); }
.drawer[hidden] { display: none; }
.drawer-panel { width: min(420px, 100%); height: 100%; background: var(--surface); padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; animation: slidein .22s var(--ease); }
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.drawer nav a { display: flex; min-height: 48px; align-items: center; padding: 0 8px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.drawer nav a[aria-current="page"] { color: var(--brand); }
.drawer .drawer-sub a { font-weight: 500; padding-left: 20px; font-size: var(--t-sm); min-height: 44px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; font: 700 var(--t-sm)/1 var(--f-body); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .18s var(--ease), transform .18s var(--ease), border-color .18s; touch-action: manipulation; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.section--brand .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.section--brand .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 80px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse 60% 70% at 85% 20%, var(--brand-soft), transparent 70%),
  repeating-radial-gradient(circle at 88% 18%, transparent 0 22px, color-mix(in srgb, var(--brand) 7%, transparent) 22px 23px);
  pointer-events: none; }
.hero > .wrap { position: relative; }
.hero h1 .bn-line { display: block; font: 600 clamp(1.25rem, 2.6vw, 1.75rem)/1.35 var(--f-bn); color: var(--brand); margin-top: 12px; }
.hero .lead { margin-top: 20px; }
.hero .btn-row { margin-top: 28px; }
.creds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 600 var(--t-xs)/1.2 var(--f-body); color: var(--ink-2); }
.chip svg { width: 14px; height: 14px; color: var(--brand); }

/* case log ledger (signature element) */
.ledger { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ledger-head h2, .ledger-head h3 { font: 700 var(--t-xs)/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.ledger-total { font: 500 var(--t-xl)/1 var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.ledger ol { list-style: none; margin: 0; padding: 6px 20px 14px; }
.ledger li { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ledger li:last-child { border-bottom: 0; }
.ledger li a, .ledger li span.lbl { color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--t-sm); }
.ledger li a:hover { color: var(--brand); text-decoration: underline; }
.ledger .dots { flex: 1; border-bottom: 1px dotted color-mix(in srgb, var(--ink-2) 45%, transparent); transform: translateY(-4px); min-width: 16px; }
.ledger .n { font: 500 var(--t-md)/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--brand); }
.ledger-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--ink-2); }

/* portrait placeholder */
.portrait { position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--radius); background: linear-gradient(160deg, var(--brand-soft), var(--surface-2)); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.portrait svg { width: 62%; color: color-mix(in srgb, var(--brand) 45%, transparent); }
.portrait .ph-label { position: absolute; left: 12px; bottom: 12px; right: 12px; font-size: var(--t-xs); color: var(--ink-2); background: var(--surface); border-radius: 8px; padding: 6px 10px; border: 1px dashed var(--line); }
.hero-visual { display: grid; gap: 16px; }
@media (min-width: 960px) { .hero-visual { grid-template-columns: .9fr 1.1fr; align-items: end; } }

/* ---------- stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; display: flex; flex-direction: column; gap: 6px; }
.stat b { font: 500 clamp(1.625rem, 3vw, 2.125rem)/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.stat span { font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- service cards ---------- */
.svc-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .18s, transform .18s var(--ease), box-shadow .18s; }
.svc-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.svc-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.svc-card .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.svc-card .ic svg { width: 26px; height: 26px; }
.svc-card .n { font: 500 var(--t-xs)/1 var(--f-mono); color: var(--ink-2); background: var(--surface-2); padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.svc-card h3 { font-size: var(--t-lg); }
.svc-card .bn { color: var(--brand); font-weight: 600; font-size: var(--t-sm); margin-top: -6px; }
.svc-card p { color: var(--ink-2); font-size: var(--t-sm); }
.svc-card .more { margin-top: auto; font-weight: 700; font-size: var(--t-sm); color: var(--brand); display: inline-flex; gap: 6px; align-items: center; }
.svc-card .more svg { width: 16px; height: 16px; transition: transform .18s; }
.svc-card:hover .more svg { transform: translateX(3px); }

/* ---------- condition finder ---------- */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.finder label { font-weight: 700; display: block; margin-bottom: 8px; }
.finder-input { position: relative; }
.finder-input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-2); pointer-events: none; }
.finder input { width: 100%; min-height: 54px; padding: 0 16px 0 44px; font: 500 var(--t-md) var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.finder input:focus { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.finder .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.finder .chips button { font: 600 var(--t-xs) var(--f-body); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; min-height: 36px; }
.finder .chips button:hover { border-color: var(--brand); }
.finder-results { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.finder-results a { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--bg); }
.finder-results a:hover, .finder-results a:focus { border-color: var(--brand); }
.finder-results .t { font-weight: 650; }
.finder-results .t small { display: block; font-weight: 500; color: var(--ink-2); font-family: var(--f-bn); }
.finder-results .s { font-size: var(--t-xs); color: var(--brand); font-weight: 700; text-align: right; }
.finder-empty { margin-top: 14px; font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- service page ---------- */
.crumbs { font-size: var(--t-xs); color: var(--ink-2); padding-top: 20px; }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); }
.page-hero { padding-block: clamp(28px, 5vw, 56px) clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.page-hero h1 { font-size: var(--t-3xl); }
.page-hero .bn-line { display: block; font: 600 clamp(1.125rem, 2.3vw, 1.5rem)/1.4 var(--f-bn); color: var(--brand); margin-top: 10px; }
.page-hero .hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.page-hero .big-n { font: 500 clamp(2.5rem, 6vw, 3.5rem)/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--brand); }
.page-layout { display: grid; gap: clamp(28px, 5vw, 56px); grid-template-columns: 1fr; padding-block: clamp(36px, 6vw, 64px); }
@media (min-width: 1024px) { .page-layout { grid-template-columns: 260px minmax(0, 1fr); } }
.toc { align-self: start; }
@media (min-width: 1024px) { .toc { position: sticky; top: 104px; } }
.toc nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.toc h2 { font: 700 var(--t-xs)/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.toc a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: var(--t-sm); font-weight: 500; }
.toc a:hover, .toc a.is-current { background: var(--surface-2); color: var(--brand-strong); }
.toc a .num { color: var(--ink-2); font-size: var(--t-xs); }
.toc .toc-cta { margin-top: 12px; width: 100%; }
.content { min-width: 0; display: flex; flex-direction: column; gap: clamp(40px, 6vw, 64px); }
.block { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 104px; }
.block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.block-head h2 { font-size: var(--t-xl); }
.block-head .bn-sub { display: block; font: 600 var(--t-md)/1.4 var(--f-bn); color: var(--brand); margin-top: 6px; }
.count-pill { font: 500 var(--t-sm)/1 var(--f-mono); background: var(--brand-soft); color: var(--brand-strong); padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.count-pill small { font-family: var(--f-body); font-weight: 600; margin-left: 4px; }
.breakdown { display: flex; flex-wrap: wrap; gap: 6px; }
.breakdown span { font-size: var(--t-xs); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; color: var(--ink-2); }
.breakdown span b { font-family: var(--f-mono); color: var(--ink); font-weight: 500; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.box h3 { font-size: var(--t-md); }
.box ul { padding-left: 1.1em; font-size: var(--t-sm); }
.box ul li + li { margin-top: 4px; }
.box--warn { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.box--warn h3 { color: var(--danger); display: flex; gap: 8px; align-items: center; }
.box--warn h3 svg { width: 20px; height: 20px; }
.bn-box { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 18px 20px; border-left: 4px solid var(--brand); }
.bn-box h3 { font-family: var(--f-bn); font-size: var(--t-md); margin-bottom: 6px; color: var(--brand-strong); }
.steps-list { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.steps-list li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font: 600 var(--t-sm) var(--f-mono); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 650; position: relative; min-height: 52px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details[open] summary { color: var(--brand-strong); }
.faq .ans { padding: 0 18px 18px; color: var(--ink-2); max-width: var(--read); }
.faq .ans > * + * { margin-top: .6em; }
.faq-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.faq-tools input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 var(--t-md) var(--f-body); }

/* ---------- chambers ---------- */
.chamber { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chamber h3 { font-size: var(--t-lg); font-family: var(--f-display); font-weight: 600; }
.chamber dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: var(--t-sm); }
.chamber dt { color: var(--ink-2); font-weight: 600; }
.chamber dd { margin: 0; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font: 700 var(--t-xs)/1.2 var(--f-body); background: var(--surface-2); color: var(--ink-2); width: fit-content; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.is-open { background: var(--ok-soft); color: var(--ok); }
.status.is-today { background: var(--brand-soft); color: var(--brand-strong); }
.phone { font: 500 var(--t-lg)/1.2 var(--f-mono); color: var(--ink); text-decoration: none; }
.phone:hover { color: var(--brand); }

/* ---------- forms ---------- */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 32px); display: flex; flex-direction: column; gap: 20px; box-shadow: var(--shadow); }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.form legend { font: 700 var(--t-xs)/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 650; font-size: var(--t-sm); }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea { font: 500 var(--t-md) var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 50px; width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); border-color: var(--brand); }
.field .help { font-size: var(--t-xs); color: var(--ink-2); }
.field .err { font-size: var(--t-xs); color: var(--danger); font-weight: 650; }
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-sm); }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.form-summary { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--ink); border-radius: 10px; padding: 12px 16px; font-size: var(--t-sm); }
.form-summary ul { margin-top: 6px; }
.form-summary a { color: var(--danger); font-weight: 650; }
.success { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 12px; }
.success h2 { font-size: var(--t-xl); color: var(--ok); }
.success dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: var(--t-sm); }
.success dt { color: var(--ink-2); font-weight: 600; }
.success dd { margin: 0; }
.next-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.next-dates button { font: 600 var(--t-xs) var(--f-body); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 8px; padding: 8px 10px; cursor: pointer; min-height: 36px; }
.next-dates button:hover { border-color: var(--brand); }

/* ---------- about / timeline / logbook ---------- */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.timeline li { position: relative; padding-left: 22px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline .when { font: 500 var(--t-xs)/1.2 var(--f-mono); color: var(--ink-2); }
.timeline .what { font-weight: 650; }
.logbook { width: 100%; border-collapse: collapse; font-size: var(--t-sm); background: var(--surface); }
.logbook-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.logbook th, .logbook td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.logbook th { font: 700 var(--t-xs)/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: var(--surface-2); }
.logbook td.n { font-family: var(--f-mono); text-align: right; font-variant-numeric: tabular-nums; }
.logbook tr.grp td { background: var(--brand-soft); font-weight: 700; color: var(--brand-strong); }
.logbook tr:last-child td { border-bottom: 0; }

/* ---------- blog ---------- */
.post-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); }
.post-card:hover { border-color: var(--brand); color: var(--ink); }
.post-card .tag { font: 700 var(--t-xs)/1 var(--f-body); color: var(--brand); letter-spacing: .06em; text-transform: uppercase; }
.post-card h3 { font-family: var(--f-bn); font-size: var(--t-lg); }
.upcoming { list-style: none; padding: 0; display: grid; gap: 8px; }
.upcoming li { padding: 12px 16px; border: 1px dashed var(--line); border-radius: 10px; font-size: var(--t-sm); color: var(--ink-2); }
.article { max-width: 72ch; margin: 0 auto; }
.article h1 { font-family: var(--f-bn); font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.3; }
.article h2 { font-family: var(--f-bn); font-size: var(--t-xl); margin-top: 1.6em; }
.article p, .article li { font-family: var(--f-bn); font-size: 1.125rem; line-height: 1.85; }
.article > * + * { margin-top: 1em; }
.article table { width: 100%; border-collapse: collapse; font-family: var(--f-bn); font-size: var(--t-md); }
.article th, .article td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.article th { background: var(--surface-2); }
.byline { display: flex; gap: 12px; align-items: center; font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- CTA band + footer ---------- */
.cta-band { background: var(--brand-strong); color: #EAF3F5; border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); display: grid; gap: 20px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1.4fr 1fr; } }
.cta-band h2 { color: inherit; font-size: var(--t-2xl); }
.cta-band p { opacity: .9; margin-top: 8px; }
.cta-band .btn-row { justify-content: flex-start; }
@media (min-width: 860px) { .cta-band .btn-row { justify-content: flex-end; } }
.cta-band .btn-ghost { color: inherit; border-color: currentColor; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: inherit; }
.notice { font-size: var(--t-xs); color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 16px; max-width: 90ch; }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 48px calc(env(safe-area-inset-bottom, 0px) + 96px); font-size: var(--t-sm); margin-top: var(--section); }
@media (min-width: 1080px) { .site-footer { padding-bottom: 40px; } }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h2 { font: 700 var(--t-xs)/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; color: var(--ink-2); font-size: var(--t-xs); }
.theme-toggle { font: 600 var(--t-xs) var(--f-body); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 32px; }

/* sticky mobile CTA */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-cta); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 10px); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
@media (min-width: 1080px) { .mobile-cta { display: none; } }
.to-top { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); z-index: var(--z-cta); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }
@media (min-width: 1080px) { .to-top { bottom: 24px; } }

/* emergency strip on service pages */
.emergency { display: flex; gap: 12px; align-items: flex-start; background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: var(--radius-sm); padding: 14px 16px; font-size: var(--t-sm); }
.emergency svg { width: 22px; height: 22px; color: var(--danger); flex: none; margin-top: 2px; }
.emergency strong { color: var(--danger); }

/* ---------- small-screen header fit ---------- */
.brand { min-width: 0; }
.brand > span:last-child { min-width: 0; }
@media (max-width: 1079px) { .site-header .wrap { gap: 12px; } }
@media (max-width: 480px) {
  .brand-name { font-size: 1rem; }
  .brand-sub { font-size: 10px; letter-spacing: .06em; }
  .brand-mark { width: 36px; height: 36px; }
  .topbar .emerg { display: none; }
}

/* ---------- v1 polish ---------- */
.topbar svg { width: 14px; height: 14px; flex: none; }
.hero h1 { font-size: clamp(2.25rem, 4.2vw, 3.25rem); }
@media (min-width: 960px) {
  .hero .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
  .hero-visual { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}
.ledger li a, .ledger li span.lbl { white-space: nowrap; }
.site-header .header-cta { display: none; }
@media (min-width: 1080px) { .site-header .header-cta { display: inline-flex; } }
.toc a.toc-cta { justify-content: center; font-weight: 700; color: var(--on-accent); padding: 0 16px; }
.toc a.toc-cta:hover { background: var(--accent-hover); color: var(--on-accent); }
.hero-visual { align-items: center; }
@media (max-width: 959px) { .hero-visual .portrait { aspect-ratio: 16 / 10; } .hero-visual .portrait svg { width: 34%; } }

/* ==========================================================================
   v1.1: image slots, header theme icon, PA phone, galleries
   ========================================================================== */
/* image slot: shows the real image when assets/img/<file> exists, otherwise a labelled placeholder */
.ph { position: relative; margin: 0; width: 100%; max-width: 100%; border-radius: var(--radius); overflow: hidden; background:
  repeating-linear-gradient(135deg, color-mix(in srgb, var(--brand) 5%, transparent) 0 12px, transparent 12px 24px), var(--surface-2);
  border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, transparent); }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; border: 0; }
.ph:has(> img) { border-style: solid; border-color: var(--line); }
.ph-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; text-align: center; color: var(--ink-2); }
.ph-inner svg { width: 30px; height: 30px; color: var(--brand); opacity: .75; }
.ph-inner strong { color: var(--ink); font-size: var(--t-sm); line-height: 1.3; }
.ph-file { font: 500 11.5px/1.3 var(--f-mono); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; color: var(--brand-strong); word-break: break-all; }
.ph-desc { font-size: 12px; line-height: 1.4; max-width: 34ch; }
.ph--sm .ph-desc { display: none; }
.ph figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 10px 14px; font-size: var(--t-xs); color: #fff; background: linear-gradient(transparent, rgba(8, 20, 26, .75)); }
.ph:not(:has(> img)) figcaption { display: none; }

/* header additions */
.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; } :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; } }
.header-phone { display: none; flex-direction: column; line-height: 1.15; text-decoration: none; color: var(--ink); padding: 0 6px; }
.header-phone span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.header-phone b { font: 500 var(--t-sm) var(--f-mono); }
.header-phone:hover b { color: var(--brand); }
@media (min-width: 1240px) { .header-phone { display: flex; } }
.topbar .pa { font-weight: 700; }

/* chamber cards with photo */
.chamber .ph { aspect-ratio: 16 / 9; margin: -22px -22px 4px; width: calc(100% + 44px); max-width: none; border-radius: var(--radius) var(--radius) 0 0; border-width: 0 0 1.5px 0; }
.grid-3c { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* section figures on service pages */
.figure-row { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) { .figure-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.page-hero .hero-card .ph { aspect-ratio: 16 / 10; }

/* home: team band, stories, videos, gallery */
.team-band { display: grid; gap: clamp(20px, 4vw, 48px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .team-band { grid-template-columns: 1.2fr 1fr; } }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.story .ph { border-radius: 0; border-width: 0 0 1.5px 0; aspect-ratio: 4 / 3; }
.story-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.story-body .tag { font: 700 var(--t-xs)/1 var(--f-body); color: var(--brand); letter-spacing: .06em; text-transform: uppercase; }
.video-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.video-card .ph { aspect-ratio: 16 / 9; }
.video-card .play { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; box-shadow: var(--shadow); }
.video-card .play svg { width: 26px; height: 26px; }
.video-card:hover strong { color: var(--brand); }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.gallery .ph { aspect-ratio: 4 / 3; }
.gallery .ph.wide { grid-column: span 2; aspect-ratio: 8 / 3; }
@media (max-width: 520px) { .gallery .ph.wide { grid-column: auto; aspect-ratio: 4 / 3; } }
.post-card .ph { aspect-ratio: 16 / 9; margin: -22px -22px 6px; width: calc(100% + 44px); max-width: none; border-radius: var(--radius) var(--radius) 0 0; border-width: 0 0 1.5px 0; }
.article .ph { aspect-ratio: 16 / 9; }
/* header fit with phone + theme icon */
@media (min-width: 1080px) {
  .brand-name { white-space: nowrap; }
  .nav a, .nav button.nav-trigger { padding: 0 10px; }
  .site-header .header-cta { white-space: nowrap; padding: 0 16px; }
}
.header-phone b, .header-phone span { white-space: nowrap; }
@media (max-width: 1279px) { .header-phone { display: none; } }
@media (min-width: 1080px) and (max-width: 1199px) { .brand-sub { display: none; } }
@media (min-width: 1080px) { .brand-sub { white-space: nowrap; } }
@media (min-width: 1080px) and (max-width: 1479px) { .site-header .brand-sub { display: none; } }
.site-header .brand { flex: none; }
@media (min-width: 1080px) { .site-header .wrap { gap: 14px; } .nav a, .nav button.nav-trigger { padding: 0 9px; } }
.site-header .wrap, .topbar .wrap, .draft-bar .wrap { max-width: 1340px; }
@media (min-width: 1280px) { .header-phone { display: flex; } }

/* ==========================================================================
   v1.2: full-width rhythm, sample photos, before/after, carousel, lightbox
   ========================================================================== */
:root { --max: 1280px; --band-bg: #0A3A63; --band-ink: #EAF3F5; --band-muted: rgba(234, 243, 245, .72); --band-line: rgba(234, 243, 245, .16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --band-bg: #0B2740; } }
:root[data-theme="dark"] { --band-bg: #0B2740; }
.site-header .wrap, .topbar .wrap, .draft-bar .wrap { max-width: var(--max); }

/* sample photo badge (shown only while a free sample stands in for the real photo) */
.ph.is-sample::after { content: "Sample photo · replace"; position: absolute; z-index: 3; top: 10px; left: 10px; font: 700 11px/1 var(--f-body); letter-spacing: .04em; background: rgba(8, 20, 26, .72); color: #fff; padding: 6px 8px; border-radius: 6px; pointer-events: none; }
body:not(.draft) .ph.is-sample::after { display: none; }

/* image that fills its box */
.ph--fill { aspect-ratio: auto !important; height: 100%; }

/* hero: text in the grid, portrait bleeds to the right edge */
.hero--bleed { padding: 0; }
.hero-grid { display: grid; grid-template-columns: 1fr; position: relative; }
.hero-text { padding: clamp(36px, 7vw, 72px) clamp(16px, 4vw, 32px) 32px; position: relative; z-index: 2; }
.hero-media { position: relative; padding: 0 clamp(16px, 4vw, 32px) 40px; display: grid; gap: 16px; }
.hero-media .ph--fill { height: auto; aspect-ratio: 4 / 5 !important; max-height: 560px; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); min-height: clamp(620px, calc(100vh - 150px), 760px); }
  .hero-text { align-self: center; padding: 56px 64px 56px max(32px, calc((100vw - var(--max)) / 2 + 32px)); }
  .hero-media { padding: 0; display: block; }
  .hero-media .ph--fill { position: absolute; inset: 0; height: 100%; max-height: none; aspect-ratio: auto !important; border-radius: 0; border: 0; }
  .ledger--float { position: absolute; left: -84px; bottom: 40px; width: 330px; z-index: 4; }
}
@media (min-width: 960px) and (max-width: 1180px) { .ledger--float { left: 24px; } }

/* stats as a full-width band */
.stats-band { background: var(--band-bg); color: var(--band-ink); padding-block: clamp(28px, 4vw, 44px); }
.stats--band { background: transparent; border: 0; border-radius: 0; }
.stats--band .stat { border-color: var(--band-line); padding: 12px 20px; }
.stats--band .stat b { color: var(--band-ink); font-size: clamp(1.875rem, 3.4vw, 2.625rem); }
.stats--band .stat span { color: var(--band-muted); }

/* full-bleed photo with caption card */
.bleed { position: relative; height: clamp(340px, 44vw, 580px); overflow: hidden; background: var(--surface-2); }
.bleed .ph--fill { position: absolute; inset: 0; border-radius: 0; border: 0; }
.bleed-caption { position: absolute; left: 0; right: 0; bottom: clamp(16px, 3vw, 36px); z-index: 4; pointer-events: none; }
.caption-card { pointer-events: auto; max-width: 460px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.caption-card p { font-size: var(--t-sm); color: var(--ink-2); }

/* half-bleed: image to the left edge, text in the grid */
.half-bleed { display: grid; grid-template-columns: 1fr; }
.hb-media { position: relative; min-height: 300px; }
.hb-media .ph--fill { position: absolute; inset: 0; border-radius: 0; border: 0; }
.hb-text { padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 32px); }
@media (min-width: 960px) {
  .half-bleed { grid-template-columns: 1fr 1fr; min-height: 520px; }
  .hb-text { align-self: center; padding: 64px max(32px, calc((100vw - var(--max)) / 2 + 32px)) 64px 64px; }
}

/* full-width CTA band */
.cta-full { background: var(--band-bg); color: var(--band-ink); margin-top: var(--section); }
.cta-full .cta-band { background: transparent; border-radius: 0; padding-inline: 0; color: var(--band-ink); }
.cta-full + .site-footer, .cta-full ~ .site-footer { margin-top: 0; }
main:has(> .cta-full:last-child) + .site-footer { margin-top: 0; }

.section-head--row { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; max-width: none; gap: 16px; }
.section-head--row .stack-sm { max-width: 64ch; }
svg.flip { transform: scaleX(-1); }

/* before / after compare */
.ba-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.ba { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-2); touch-action: pan-y; }
.ba-layer { position: absolute; inset: 0; }
.ba-layer .ph--fill { height: 100%; border-radius: 0; border: 0; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); z-index: 2; }
.ba-before .ph { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent) 10%, transparent) 0 12px, transparent 12px 24px), var(--surface-2); }
.ba-tag { position: absolute; z-index: 5; bottom: 10px; font: 700 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: rgba(8, 20, 26, .72); padding: 6px 9px; border-radius: 6px; pointer-events: none; }
.ba-tag--b { left: 10px; } .ba-tag--a { right: 10px; }
.ba-handle { position: absolute; z-index: 4; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); pointer-events: none; }
.ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: #fff; box-shadow: var(--shadow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230172C0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 7-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E"); background-size: 22px; background-repeat: no-repeat; background-position: center; }
.ba-range { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-range:focus-visible ~ .ba-handle, .ba:focus-within .ba-handle { background: var(--accent); }
.ba-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.ba-body .tag { font: 700 var(--t-xs)/1 var(--f-body); color: var(--brand); letter-spacing: .06em; text-transform: uppercase; }
.ba-body h3 { font-size: var(--t-md); }
.ba-body .bn { color: var(--brand); }
.ba-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }

/* carousel */
.carousel { display: flex; flex-direction: column; gap: 14px; }
.car-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 360px); gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.car-track > * { scroll-snap-align: start; }
.car-nav { display: flex; gap: 8px; justify-content: flex-end; }

/* filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.filter-bar button { font: 600 var(--t-sm) var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; min-height: 40px; cursor: pointer; }
.filter-bar button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* photo gallery with lightbox */
.gallery--lb { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.lb-item { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.lb-item .ph { aspect-ratio: 4 / 3 !important; }
.lb-item.wide { grid-column: span 2; }
.lb-item.wide .ph { aspect-ratio: 8 / 3 !important; }
@media (max-width: 560px) { .lb-item.wide { grid-column: auto; } .lb-item.wide .ph { aspect-ratio: 4 / 3 !important; } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); width: 100%; }
.lightbox::backdrop { background: rgba(6, 14, 18, .86); }
.lightbox img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; border-radius: 10px; display: block; }
.lightbox .lb-cap { color: #fff; text-align: center; margin-top: 10px; font-size: var(--t-sm); }
.lightbox .lb-close { position: absolute; top: 8px; right: 8px; z-index: 2; }
.ba .ph-desc { display: none; }
.ba-before .ph-inner { right: 50%; }
.ba-after .ph-inner { left: 50%; }
.ba .ph-inner strong { font-size: 12px; }
.ba .ph-file { font-size: 10px; }

/* ---------- v1.3 fixes ---------- */
.topbar { background: var(--band-bg); color: var(--band-ink); }
.cta-band { background: var(--band-bg); color: var(--band-ink); }
.cta-band h2, .cta-band p { color: var(--band-ink); }
.cta-band .btn-ghost { color: var(--band-ink); border-color: var(--band-line); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: var(--band-ink); }
/* hero: case-log card sits inside the photo, never over the text */
@media (min-width: 960px) { .ledger--float { left: 32px; bottom: 32px; width: 300px; } }
.hero-media .ph--fill > img { object-position: center top; }
/* mega menu breathing room */
.menu { width: min(780px, 92vw); padding: 16px; gap: 8px 14px; }
.menu a { padding: 12px 14px; min-height: 60px; align-items: center; gap: 14px; }
.menu a strong { margin-bottom: 3px; }
.menu .menu-all { margin-top: 8px; padding-top: 14px; min-height: 48px; }
/* carousels: no visible scrollbar, arrows + autoplay instead */
.car-track { scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 4px; }
.car-track::-webkit-scrollbar { display: none; }
.carousel--photos .car-track { grid-auto-columns: minmax(240px, calc((100% - 3 * var(--gap)) / 4)); }
@media (max-width: 1000px) { .carousel--photos .car-track { grid-auto-columns: minmax(220px, calc((100% - var(--gap)) / 2)); } }
@media (max-width: 560px) { .carousel--photos .car-track { grid-auto-columns: 78%; } }
.carousel--photos .ph { aspect-ratio: 4 / 5 !important; border-radius: var(--radius); }
.car-nav { align-items: center; }
/* v1.4: photo framing */
#team .hb-media .ph > img { object-position: center 22%; }
.about-portrait .ph > img { object-fit: contain; object-position: center bottom; padding-top: 28px; background: linear-gradient(180deg, var(--brand-soft), var(--surface-2)); }
.hero-media .ph--fill > img { object-position: center 15%; }
/* v1.5: hero cut-out portrait on the striped panel */
.hero-media .ph--fill { border: 0; }
.hero-media .ph--fill > img { object-fit: cover; object-position: center top; }
@media (max-width: 959px) { .hero-media .ph--fill { aspect-ratio: 720 / 771 !important; max-height: 620px; } }
@media (min-width: 960px) { .hero-media .ph--fill > img { object-position: 62% top; } }
/* v1.5: video carousel + popup player */
.carousel--videos .car-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
@media (max-width: 1000px) { .carousel--videos .car-track { grid-auto-columns: calc((100% - var(--gap)) / 2); } }
@media (max-width: 560px) { .carousel--videos .car-track { grid-auto-columns: 86%; } }
.vc-thumb { position: relative; }
.carousel--videos .ph { aspect-ratio: 16 / 9 !important; }
.video-card { gap: 6px; }
.video-card strong { margin-top: 6px; line-height: 1.35; }
.video-card .play { transition: transform .2s ease; }
.video-card:hover .play, .video-card:focus-visible .play { transform: translate(-50%, -50%) scale(1.1); }
.video-modal { border: 0; padding: 0; background: transparent; width: min(1040px, 94vw); max-width: none; overflow: visible; }
.video-modal::backdrop { background: rgba(6, 14, 18, .88); }
.vm-box { position: relative; padding-top: 56px; }
.vm-close { position: absolute; top: 0; right: 0; background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.vm-close:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.vm-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.vm-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.vm-title { color: #fff; margin: 12px 2px 0; font-weight: 600; }
.hero-media .ph:has(> img) .ph-inner { display: none; }
@media (min-width: 960px) { .hero-media .ph--fill > img { object-fit: contain; object-position: 72% bottom; padding-top: 36px; } }
@media (min-width: 960px) and (max-width: 1599px) { .ledger--float { left: 20px; bottom: 20px; width: 292px; } .ledger--float li { font-size: 14px; gap: 6px; } }
.vc-thumb .ph-inner { justify-content: flex-end; padding-bottom: 12px; }
.vc-thumb .ph-inner > svg, .vc-thumb .ph-inner strong, .vc-thumb .ph-desc { display: none; }

/* service page photo carousel */
.carousel--photos .car-track { grid-auto-columns: minmax(200px, 250px); }
.car-photo { display: block; padding: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; aspect-ratio: 3 / 4; }
.car-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 520px) { .carousel--photos .car-track { grid-auto-columns: 70%; } }

/* Patient photos: exactly four cards on desktop, with the whole image visible. */
.carousel--patients .car-track { grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); }
.carousel--patients .car-photo { min-width: 0; aspect-ratio: 4 / 5; }
.carousel--patients .car-photo img { object-fit: contain; }
@media (max-width: 1000px) {
  .carousel--patients .car-track { grid-auto-columns: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 560px) {
  .carousel--patients .car-track { grid-auto-columns: 100%; }
}

/* logo in header and footer */
.brand-logo { display: block; height: 52px; width: auto; max-width: 100%; }
.site-footer .brand-logo { height: 52px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) { .brand-logo { height: 40px; } }
:root[data-theme="dark"] .brand-logo { background: #fff; padding: 4px 10px; border-radius: 10px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { background: #fff; padding: 4px 10px; border-radius: 10px; } }

/* Facebook latest posts */
.fb-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .fb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fb-grid { grid-template-columns: 1fr; } }
.fb-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.fb-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.fb-media a, .fb-media img, .fb-media video { display: block; width: 100%; height: 100%; }
.fb-media img, .fb-media video { object-fit: cover; background: #000; }
.fb-media--text { display: grid; place-items: center; background: var(--brand-soft); }
.fb-f { font: 700 64px/1 var(--f-body); color: var(--brand); opacity: .5; }
.fb-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(8, 20, 30, .65); color: #fff; display: grid; place-items: center; font-size: 20px; padding-left: 4px; pointer-events: none; }
.fb-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.fb-date { font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; }
.fb-text { font-size: var(--t-sm); line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.fb-more { margin-top: auto; font-size: var(--t-sm); font-weight: 600; }
.fb-skel .fb-body span { display: block; height: 12px; border-radius: 6px; background: var(--surface-2); }
.fb-skel .fb-body span:last-child { width: 60%; }
.fb-feed.is-ready .fb-skel { display: none; }
.fb-sample-note { display: none; }
body.draft .fb-feed.is-sample .fb-sample-note { display: block; background: var(--verify-bg); border: 1px solid var(--verify); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 16px; }
.fb-media { overflow: hidden; }
.fb-media > a, .fb-media > video { position: absolute; inset: 0; }
.fb-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Supplied portraits, hospital photos and operating theatre gallery. */
.hero-media .ph--fill > img { object-fit: contain; object-position: center bottom; }
@media (min-width: 960px) {
  .hero-media .ph--fill > img { object-position: 72% bottom; }
}
@media (max-width: 959px) {
  .hero-media .ph--fill { aspect-ratio: 1212 / 1297 !important; }
}
.chamber .ph > img { object-fit: contain; }
.bleed--ot { height: clamp(400px, 44vw, 620px); display: block; isolation: isolate; background: #17323d; }
.bleed--ot::before { content: ""; position: absolute; inset: -28px; z-index: 0; background: url("../img/ot-team-microscope.jpg") center / cover no-repeat; filter: blur(22px) brightness(.72); transform: scale(1.04); }
.bleed--ot .ph--fill { position: absolute; inset: 0; z-index: 1; height: 100%; aspect-ratio: auto !important; background: transparent; }
.bleed--ot .ph--fill > img { object-fit: contain; object-position: 72% center; }
.bleed--ot .bleed-caption { position: absolute; inset: auto 0 clamp(20px, 3vw, 36px); z-index: 3; }
.bleed--ot .caption-card { max-width: 460px; padding: 22px 24px; border: 1px solid rgba(255, 255, 255, .65); border-radius: 18px; background: rgba(244, 251, 255, .82); box-shadow: 0 14px 42px rgba(3, 20, 29, .18), inset 0 1px rgba(255, 255, 255, .45); color: #17323d; }
.bleed--ot .caption-card .eyebrow { color: #0a638a; }
.bleed--ot .caption-card p { color: #17323d; line-height: 1.65; }
@supports ((backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px))) {
  .bleed--ot .caption-card { background: rgba(244, 251, 255, .6); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
}
.gallery--ot { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery--ot > * { min-width: 0; }
.ot-photo-frame { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; aspect-ratio: 4 / 3 !important; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); overflow: visible; }
.ot-photo-frame > img { position: static; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
@media (max-width: 1000px) { .gallery--ot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .bleed--ot { height: clamp(390px, 90vw, 520px); }
  .bleed--ot .ph--fill > img { object-position: center top; }
  .bleed--ot .caption-card { padding: 18px 20px; max-width: min(460px, 100%); }
}
@media (max-width: 560px) { .gallery--ot { grid-template-columns: minmax(0, 1fr); } }

/* Floating contact control and native, keyboard-accessible appointment dialog. */
.floating-call { position: fixed; right: 24px; bottom: 24px; z-index: var(--z-cta); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 22px; border: 1px solid color-mix(in srgb, var(--on-brand) 20%, transparent); border-radius: 999px; background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 28px rgba(8, 42, 44, .25); font: 700 var(--t-sm)/1 var(--f-body); cursor: pointer; transition: background .2s, transform .2s; }
.floating-call svg { width: 24px; height: 24px; }
.floating-call:hover { background: var(--brand-strong); transform: translateY(-2px); }
.to-top { bottom: 94px; right: 24px; }
.contact-modal { width: min(680px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: clamp(18px, 4vw, 28px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); font: inherit; box-shadow: var(--shadow); overflow-y: auto; overscroll-behavior: contain; }
.contact-modal::backdrop { background: rgba(6, 20, 26, .72); backdrop-filter: blur(4px); }
.contact-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 10px; }
.contact-heading h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); margin-top: 7px; }
.contact-heading .icon-btn { flex-shrink: 0; }
.contact-hospitals { display: grid; gap: 12px; margin-top: 20px; }
.contact-hospital { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.contact-hospital > img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 10px; background: var(--surface-2); }
.contact-hospital h3 { font-size: 1rem; line-height: 1.4; }
.contact-hospital-info { min-width: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.contact-actions .btn { min-height: 42px; padding: 8px 12px; font-size: var(--t-xs); }
.contact-actions .btn svg { width: 16px; height: 16px; }
.contact-assistant { display: grid; gap: 6px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.contact-assistant a { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: var(--t-sm); font-weight: 650; }
.contact-assistant svg { width: 18px; height: 18px; }
@media (max-width: 1079px) {
  .floating-call { right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); width: 56px; padding: 0; border-radius: 50%; }
  .floating-call span { display: none; }
  .to-top { right: 21px; bottom: calc(env(safe-area-inset-bottom, 0px) + 152px); }
}
@media (max-width: 560px) {
  .contact-hospital { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .contact-actions .btn { flex: 1 1 130px; justify-content: center; }
}

