/* =========================================================================
   Dr. İlqar Məmmədov — Revmatoloq
   Hand-written CSS. No framework, no build step.

   Colour architecture (§12): the COMPLETE light palette is defined on bare
   :root. Dark and contrast variants only REDEFINE tokens. No colour ever has
   its single definition inside a media query, so every mode is reachable.
   ========================================================================= */

/* ---------- Fonts (§13) --------------------------------------------------
   IBM Plex Sans, self-hosted, variable weight 100-700, one file per subset.
   latin-ext carries U+0259 (ə) — the most common letter in Azerbaijani.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/plex-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/plex-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/plex-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- Tokens: LIGHT / NORMAL (the base every mode inherits) -------- */
:root {
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Surfaces */
  --bg: #f6f8f9;
  --surface: #ffffff;
  --surface-2: #eaeff2;
  --surface-3: #dfe7eb;

  /* Ink */
  --text: #14202b;
  --text-muted: #47596a;
  --text-faint: #5d7183;

  /* Brand */
  --primary: #0d5f5f;
  --primary-hover: #0a4c4c;
  --primary-ink: #ffffff;
  --primary-soft: #e2efee;
  --primary-line: #0d5f5f;

  /* Accent (used sparingly, never as a CTA) */
  --accent: #8a4b12;
  --accent-soft: #fbf0e4;

  /* Structure */
  --border: #ccd8de;
  --border-strong: #9fb2bd;
  --focus: #0d5f5f;
  --focus-ring: 0 0 0 3px #ffffff, 0 0 0 6px var(--focus);

  /* Notices */
  --warn-bg: #fdf3e7;
  --warn-line: #8a4b12;
  --warn-ink: #6b3a0e;

  /* Scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --r-sm: 6px;  --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(20, 32, 43, .06), 0 6px 20px rgba(20, 32, 43, .07);
  --maxw: 1160px;
  --measure: 68ch;
  --header-h: 68px;

  color-scheme: light;
}

/* ---------- Tokens: DARK ------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d141a;
    --surface: #151f27;
    --surface-2: #1c2932;
    --surface-3: #24333e;
    --text: #e7eef2;
    --text-muted: #a3b5c1;
    --text-faint: #8ea2b0;
    --primary: #5cc6b8;
    --primary-hover: #7ad6c9;
    --primary-ink: #062522;
    --primary-soft: #17302e;
    --primary-line: #5cc6b8;
    --accent: #e0a26a;
    --accent-soft: #2a2015;
    --border: #2c3d49;
    --border-strong: #4a6270;
    --focus: #7ad6c9;
    --focus-ring: 0 0 0 3px #0d141a, 0 0 0 6px var(--focus);
    --warn-bg: #2a2015;
    --warn-line: #e0a26a;
    --warn-ink: #f2d9bd;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d141a;
  --surface: #151f27;
  --surface-2: #1c2932;
  --surface-3: #24333e;
  --text: #e7eef2;
  --text-muted: #a3b5c1;
  --text-faint: #8ea2b0;
  --primary: #5cc6b8;
  --primary-hover: #7ad6c9;
  --primary-ink: #062522;
  --primary-soft: #17302e;
  --primary-line: #5cc6b8;
  --accent: #e0a26a;
  --accent-soft: #2a2015;
  --border: #2c3d49;
  --border-strong: #4a6270;
  --focus: #7ad6c9;
  --focus-ring: 0 0 0 3px #0d141a, 0 0 0 6px var(--focus);
  --warn-bg: #2a2015;
  --warn-line: #e0a26a;
  --warn-ink: #f2d9bd;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ---------- Tokens: GREYSCALE -------------------------------------------
   Palette swapped to neutrals. The desaturation FILTER is applied to media
   only (see below) — never to html/body, which would create a containing
   block and break position:fixed on the header and sticky CTA bar.
   ------------------------------------------------------------------------ */
:root[data-display="grayscale"] {
  --primary: #333c41;
  --primary-hover: #1f272b;
  --primary-ink: #ffffff;
  --primary-soft: #e8ebec;
  --primary-line: #333c41;
  --accent: #4a4a4a;
  --accent-soft: #eeeeee;
  --focus: #1f272b;
  --warn-bg: #eeeeee;
  --warn-line: #4a4a4a;
  --warn-ink: #2b2b2b;
}
:root[data-theme="dark"][data-display="grayscale"],
:root[data-display="grayscale"]:not([data-theme="light"]) {
  --primary: #cbd3d7;
  --primary-hover: #e8eef0;
  --primary-ink: #10171b;
  --primary-soft: #232c31;
  --primary-line: #cbd3d7;
  --accent: #b9c1c5;
  --accent-soft: #22282b;
  --focus: #e8eef0;
  --warn-bg: #22282b;
  --warn-line: #b9c1c5;
  --warn-ink: #dfe4e6;
}
:root[data-display="grayscale"] img,
:root[data-display="grayscale"] picture,
:root[data-display="grayscale"] video,
:root[data-display="grayscale"] iframe,
:root[data-display="grayscale"] svg,
:root[data-display="grayscale"] [data-bg-image] {
  -webkit-filter: grayscale(1);
  filter: grayscale(1);
}

/* ---------- Tokens: HIGH CONTRAST (>=7:1 body text) --------------------- */
:root[data-display="contrast"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f4f5;
  --surface-3: #e6eaec;
  --text: #0a0a0a;
  --text-muted: #1f1f1f;
  --text-faint: #262626;
  --primary: #00453f;
  --primary-hover: #002e2a;
  --primary-ink: #ffffff;
  --primary-soft: #ffffff;
  --primary-line: #00453f;
  --accent: #5c2f00;
  --accent-soft: #ffffff;
  --border: #0a0a0a;
  --border-strong: #0a0a0a;
  --focus: #00453f;
  --focus-ring: 0 0 0 3px #ffffff, 0 0 0 7px var(--focus);
  --warn-bg: #ffffff;
  --warn-line: #5c2f00;
  --warn-ink: #3d1f00;
  --shadow: none;
}
:root[data-theme="dark"][data-display="contrast"],
:root[data-display="contrast"]:not([data-theme="light"]) {
  --bg: #000000;
  --surface: #000000;
  --surface-2: #0d0d0d;
  --surface-3: #171717;
  --text: #ffffff;
  --text-muted: #ededed;
  --text-faint: #e0e0e0;
  --primary: #7fe8da;
  --primary-hover: #a9f2e9;
  --primary-ink: #000000;
  --primary-soft: #000000;
  --primary-line: #7fe8da;
  --accent: #ffc98a;
  --accent-soft: #000000;
  --border: #ffffff;
  --border-strong: #ffffff;
  --focus: #7fe8da;
  --focus-ring: 0 0 0 3px #000000, 0 0 0 7px var(--focus);
  --warn-bg: #000000;
  --warn-line: #ffc98a;
  --warn-ink: #ffe3c2;
  --shadow: none;
}
/* Visitors whose OS asks for more contrast get it by default; the on-page
   toggle still wins because [data-display] beats this media block. */
@media (prefers-contrast: more) {
  :root:not([data-display="normal"]):not([data-display="grayscale"]) {
    --text: #0a0a0a;
    --text-muted: #1f1f1f;
    --border: #0a0a0a;
    --primary: #00453f;
  }
}
:root[data-display="contrast"] .card,
:root[data-display="contrast"] .btn,
:root[data-display="contrast"] input,
:root[data-display="contrast"] select,
:root[data-display="contrast"] textarea,
:root[data-display="contrast"] .chip {
  border-width: 2px;
}

/* ---------- Reset & base ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  font-synthesis-weight: none;
}
@media (max-width: 480px) { body { font-size: 16px; } }

img, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -0.02em; margin: 0 0 var(--sp-3); font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); }
h3 { font-size: clamp(1.12rem, 1rem + .6vw, 1.35rem); }
h4 { font-size: 1.02rem; font-weight: 600; letter-spacing: 0; }
p  { margin: 0 0 var(--sp-4); max-width: var(--measure); }
ul, ol { margin: 0 0 var(--sp-4); padding-inline-start: 1.35em; max-width: var(--measure); }
li { margin-bottom: var(--sp-2); }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-sm);
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-5); }
@media (max-width: 480px) { .wrap { padding-inline: var(--sp-4); } }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--sp-3);
}
.lede { font-size: 1.08rem; color: var(--text-muted); max-width: var(--measure); }
.section { padding-block: var(--sp-8); }
@media (max-width: 700px) { .section { padding-block: var(--sp-7); } }
.section + .section { border-top: 1px solid var(--border); }
.section-head { margin-bottom: var(--sp-6); }

.skip {
  position: absolute; left: var(--sp-3); top: -100px; z-index: 200;
  background: var(--primary); color: var(--primary-ink);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); font-weight: 600;
}
.skip:focus { top: var(--sp-3); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Buttons (§9 CTA discipline) --------------------------------
   .btn-primary is the ONLY filled style. Everything else is quiet.
   ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: var(--sp-3) var(--sp-5);
  border: 1px solid transparent; border-radius: var(--r-pill);
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.btn-ghost {
  background: var(--surface); color: var(--primary);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--primary-hover); }
.btn-sm { min-height: 38px; padding: var(--sp-2) var(--sp-4); font-size: 14px; }

/* Icon-only controls: still >=44px, and always carry an accessible name. */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-2); color: var(--primary);
  border: 1px solid var(--border-strong); cursor: pointer;
  transition: background-color .18s ease;
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Header ------------------------------------------------------
   Drawer cut-off is 1080px, not the conventional 900: brand + nav +
   services dropdown + phone affordance needs ~1066px of run.
   ---------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: var(--header-h);
}
.brand {
  display: flex; flex-direction: column; justify-content: center;
  text-decoration: none; color: var(--text);
  min-width: 0; flex: 0 1 auto; margin-inline-end: auto;
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-role { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav a, .nav button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px var(--sp-3); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: var(--text); background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav button:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }

.has-menu { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0;
  min-width: 290px; padding: var(--sp-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow);
  display: none; z-index: 110;
}
.menu-panel[data-open="true"] { display: block; }
.menu-panel a { display: block; padding: 9px var(--sp-3); font-size: 14px; border-radius: var(--r-sm); }
.menu-caret { transition: transform .18s ease; }
[aria-expanded="true"] .menu-caret { transform: rotate(180deg); }

.header-tools { display: flex; align-items: center; gap: var(--sp-2); }

.drawer-toggle { display: none; }
@media (max-width: 1080px) {
  .nav-desktop { display: none; }
  .drawer-toggle { display: inline-flex; }
}
@media (max-width: 400px) {
  .brand-role { display: none; }
  .brand-name { font-size: 15px; }
  .header-inner { gap: var(--sp-2); }
}

/* Drawer */
.drawer {
  position: fixed; inset: 0; z-index: 150;
  background: var(--surface); overflow-y: auto;
  display: none; padding: var(--sp-4) 0 var(--sp-8);
}
.drawer[data-open="true"] { display: block; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.drawer nav { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-4); }
.drawer nav a {
  padding: var(--sp-3) var(--sp-3); border-radius: var(--r-sm);
  text-decoration: none; color: var(--text); font-weight: 500; font-size: 16px;
}
.drawer nav a:hover { background: var(--surface-2); }
.drawer .drawer-group-label {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); padding: var(--sp-4) var(--sp-3) var(--sp-2);
}

/* ---------- Hero -------------------------------------------------------- */
.hero { padding-block: var(--sp-8) var(--sp-7); }
.hero-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: var(--sp-7); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: var(--sp-6); } }
.hero h1 { margin-bottom: var(--sp-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); align-items: center; }
.hero-portrait {
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--surface-2); box-shadow: var(--shadow); display: block;
}

.factstrip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; margin-top: var(--sp-6);
}
.factstrip div { background: var(--surface); padding: var(--sp-4); }
/* A build gate can delete a cell, leaving an odd count. Let the last one span
   the row so a removed fact never shows as an empty grey box. */
.factstrip > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.factstrip dt, .fact-k {
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 4px;
}
.factstrip dd, .fact-v { margin: 0; font-size: 15px; font-weight: 600; }

/* ---------- Complaint chooser (the most important nav element) ---------- */
.chooser-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: var(--sp-3);
}
.chip {
  display: flex; align-items: center; gap: var(--sp-3);
  min-height: 56px; padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  text-decoration: none; color: var(--text); font-weight: 500; font-size: 15px;
  transition: border-color .18s ease, background-color .18s ease;
}
.chip:hover { border-color: var(--primary-line); background: var(--primary-soft); color: var(--text); }
.chip-arrow { margin-inline-start: auto; color: var(--text-muted); flex: none; }

/* ---------- Cards ------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--sp-4); }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-5);
}
.card h3 { margin-bottom: var(--sp-2); }
.card h3 a { text-decoration: none; color: var(--text); }
.card h3 a:hover { color: var(--primary); }
.card p { color: var(--text-muted); font-size: 15px; margin-bottom: var(--sp-3); }
.card .card-more { margin-top: auto; font-size: 14px; font-weight: 600; }

/* ---------- 5W1H blocks ------------------------------------------------- */
.w-block { padding-top: var(--sp-6); scroll-margin-top: calc(var(--header-h) + 16px); }
.w-block + .w-block { border-top: 1px solid var(--border); }
.w-block h2 { display: flex; align-items: baseline; gap: var(--sp-3); }
.w-num {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  color: var(--primary); flex: none;
}
.w-block ol { counter-reset: step; list-style: none; padding-inline-start: 0; }
.w-block ol > li {
  counter-increment: step; position: relative; padding-inline-start: 40px; margin-bottom: var(--sp-3);
}
.w-block ol > li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 1px;
  width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
  border-radius: 50%; font-size: 13px; font-weight: 700;
}

/* Symptom list — "Nə vaxt müraciət etməli?" */
.symptoms { list-style: none; padding-inline-start: 0; display: grid; gap: var(--sp-2); }
.symptoms li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.symptoms li::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: 10px;
  border-radius: 50%; background: var(--primary);
}

/* ---------- Notices ----------------------------------------------------- */
.notice {
  border: 1px solid var(--border); border-inline-start: 4px solid var(--primary-line);
  background: var(--surface); border-radius: var(--r-sm);
  padding: var(--sp-4) var(--sp-5); margin-block: var(--sp-5);
}
.notice p:last-child { margin-bottom: 0; }
.notice h3 { font-size: 1rem; margin-bottom: var(--sp-2); }
.notice-risk { border-inline-start-color: var(--warn-line); background: var(--warn-bg); }
.notice-risk, .notice-risk h3 { color: var(--warn-ink); }
.notice-emergency {
  border-inline-start-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink);
  font-weight: 600;
}
.notice-emergency a { color: inherit; }

.authorbox {
  display: flex; gap: var(--sp-4); align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-5); margin-block: var(--sp-6);
}
.authorbox img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.authorbox p { font-size: 14px; color: var(--text-muted); margin-bottom: 0; }
.authorbox .a-name { font-weight: 600; color: var(--text); font-size: 15px; }

.updated { font-size: 13px; color: var(--text-faint); margin-top: var(--sp-5); }

/* ---------- Breadcrumb -------------------------------------------------- */
.breadcrumb { padding-block: var(--sp-4) 0; font-size: 13px; color: var(--text-muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0; margin: 0; max-width: none; }
.breadcrumb li { margin: 0; display: flex; gap: var(--sp-2); align-items: center; }
.breadcrumb li + li::before { content: "/"; color: var(--text-faint); }

/* ---------- Accordion FAQ ---------------------------------------------- */
.faq { display: grid; gap: var(--sp-2); max-width: 860px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); min-height: 56px;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--text); text-align: start;
}
.faq-q:hover { background: var(--surface-2); }
.faq-icon { flex: none; transition: transform .2s ease; color: var(--text-muted); }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a { padding: 0 var(--sp-5) var(--sp-5); }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Appointment form ------------------------------------------- */
.form { max-width: 620px; }
.field { margin-bottom: var(--sp-5); }
.field > label, .group-label {
  display: block; font-weight: 600; font-size: 15px; margin-bottom: var(--sp-2);
}
.req { color: var(--accent); font-weight: 700; }
.hint { font-size: 13px; color: var(--text-muted); margin: var(--sp-2) 0 0; }
input[type="text"], input[type="tel"], select, textarea {
  width: 100%; min-height: 46px; padding: 11px var(--sp-3);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font: inherit; font-size: 16px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--focus-ring); }

.phone-row {
  display: grid; grid-template-columns: auto 92px 1fr; gap: var(--sp-2); align-items: stretch;
}
.phone-cc {
  display: flex; align-items: center; padding-inline: var(--sp-3);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); font-weight: 600; font-size: 16px; color: var(--text);
  white-space: nowrap;
}
.check { display: flex; gap: var(--sp-3); align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.check label { font-size: 15px; font-weight: 400; }

.err { display: none; font-size: 14px; font-weight: 600; color: var(--warn-ink); margin-top: var(--sp-2); }
.err::before { content: "\26A0\FE0E  "; }
[data-invalid="true"] .err { display: block; }
[data-invalid="true"] input, [data-invalid="true"] select {
  border-color: var(--warn-line); border-width: 2px;
}

.form-note { font-size: 14px; color: var(--text-muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--sp-4); }

/* ---------- Map facade -------------------------------------------------- */
.map-facade {
  position: relative; display: grid; place-items: center; gap: var(--sp-3);
  min-height: 260px; padding: var(--sp-6);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md); text-align: center;
}
.map-embed { width: 100%; aspect-ratio: 16 / 9; min-height: 300px; border: 0; border-radius: var(--r-md); }

/* ---------- Sticky mobile CTA bar (§9) ---------------------------------
   Mobile primary. Hides while an in-page primary CTA is on screen.
   ---------------------------------------------------------------------- */
.sticky-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--border);
  transition: opacity .2s ease, transform .2s ease;
}
.sticky-cta .btn-primary { flex: 1; }
.sticky-cta[data-hidden="true"] { opacity: 0; transform: translateY(100%); pointer-events: none; }
@media (min-width: 861px) { .sticky-cta { display: none; } }
@media (max-width: 860px) { body { padding-bottom: 84px; } }

/* ---------- Footer ------------------------------------------------------ */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: var(--sp-7) var(--sp-6); margin-top: var(--sp-8); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-6); }
.footer-grid > div { min-width: 0; }
.footer-grid h2 { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-3); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: var(--sp-2); }
.footer-grid a { font-size: 15px; text-decoration: none; color: var(--text); }
.footer-grid a:hover { color: var(--primary); text-decoration: underline; }
.footer-grid address { font-style: normal; font-size: 15px; color: var(--text-muted); }
.footer-bottom {
  margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  font-size: 13px; color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }

/* ---------- Language / theme controls ----------------------------------- */
.switchers { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; min-width: 0; }
/* These controls sit in a ~210px footer column. Without wrapping, the
   three-button display group is ~280px wide and pushes the page sideways
   in the 1000-1100px band — where nothing else overflows, so it is easy
   to miss unless the sweep walks every breakpoint. */
.switch-group { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; }
.switch-group > span { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg button, .seg a {
  min-height: 32px; padding: 0 var(--sp-3); border: 0; background: none; cursor: pointer;
  border-radius: var(--r-pill); font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center;
}
.seg button[aria-pressed="true"], .seg a[aria-current="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.seg button:hover, .seg a:hover { color: var(--text); }

/* ---------- Motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

/* ---------- Windows High Contrast --------------------------------------- */
@media (forced-colors: active) {
  .btn-primary { background: ButtonFace; color: ButtonText; border: 2px solid ButtonText; }
  .btn-ghost, .icon-btn, .card, .chip, .faq-item, .notice { border: 1px solid CanvasText; }
  .icon-btn svg, .faq-icon, .chip-arrow { stroke: CanvasText; color: CanvasText; }
  :focus-visible { outline: 3px solid Highlight; outline-offset: 2px; box-shadow: none; }
  .seg button[aria-pressed="true"] { background: Highlight; color: HighlightText; }
}

/* ---------- Print ------------------------------------------------------- */
@media print {
  .site-header, .sticky-cta, .drawer, .map-facade, .switchers { display: none !important; }
  body { background: #fff; color: #000; padding-bottom: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; }
}
