/* Rheumatology & Immunology — revmatolog.club
   Academic medical-centre design system: navy, clinical blue, a thin gold accent,
   serif headlines (Source Serif 4) and Golos Text for reading and interface. */

:root {
  --navy: #0b2341;
  --navy-800: #0f2d52;
  --navy-700: #163a66;
  --blue: #0a5cb8;
  --blue-700: #084a96;
  --blue-100: #dbe8f7;
  --blue-50: #eef4fb;
  --gold: #b98a2e;
  --gold-300: #d4a548;
  --gold-50: #fbf5e8;
  --ink: #1b2533;
  --muted: #566476;
  --faint: #8794a5;
  --line: #d9dfe7;
  --line-strong: #bcc6d2;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --coral: #b4472f;
  --coral-100: #f8e5df;
  --amber: #8a5a07;
  --amber-100: #fbefd6;
  --green: #22764a;
  --green-100: #ddf0e5;
  --ivory: #f7f4ed;

  /* legacy aliases used by component scripts */
  --teal: var(--blue);
  --teal-600: var(--blue-700);
  --teal-100: var(--blue-100);
  --teal-50: var(--blue-50);
  --mint: var(--gold-300);

  --serif: "Source Serif 4", "PT Serif", Georgia, "Times New Roman", serif;
  --body: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: var(--body);

  --r-xs: 3px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 35, 65, 0.06);
  --shadow-md: 0 18px 40px -22px rgba(11, 35, 65, 0.35);
  --wrap: 1240px;
  --gutter: 32px;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 17px/1.65 var(--body);
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; color: var(--navy); overflow-wrap: anywhere; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.08; }
h2 { font-size: clamp(26px, 2.7vw, 36px); line-height: 1.18; }
h3 { font-family: var(--body); font-size: 19px; line-height: 1.32; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { color: var(--muted); font-size: 19px; line-height: 1.6; max-width: 680px; }
.muted, .meta { color: var(--muted); font-size: 14.5px; }
.eyebrow { display: inline-block; color: var(--gold); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 10px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Full-bleed helper: breaks out of the centred main column */
.bleed, .page-head, .breadcrumb, .home-hero, .band, .cond-hero, .med-hero, .az-hero {
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
}

/* ---------- Utility bar ---------- */
.utility { background: var(--navy); color: #c9d5e4; font-size: 13.5px; }
.utility-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.utility-note { margin: 0; }
.utility-links { display: flex; align-items: center; gap: 22px; }
.utility-links a { display: inline-flex; align-items: center; gap: 7px; color: #fff; }
.utility-links a:hover { color: var(--gold-300); }
.language-picker select {
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 4px center;
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--r-sm);
  color: #fff; padding: 4px 24px 4px 10px; font-size: 13.5px; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.language-picker select option { color: var(--ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.mark svg { width: 44px; height: 44px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--navy); white-space: nowrap; }
.brand-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; letter-spacing: 0.02em; }
.site-nav { display: flex; align-items: stretch; height: 100%; margin-left: auto; }
.nav-item { position: static; display: flex; }
.nav-link { display: flex; align-items: center; padding: 0 13px; font-size: 15px; font-weight: 500; color: var(--ink); border-bottom: 3px solid transparent; border-top: 3px solid transparent; white-space: nowrap; }
.nav-link:hover, .nav-item:focus-within > .nav-link { color: var(--blue); }
.nav-link.active { border-bottom-color: var(--gold-300); color: var(--navy); font-weight: 600; }
.has-mega > .nav-link::after { content: ""; width: 7px; height: 7px; margin-left: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-3px); opacity: 0.6; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s; z-index: 55;
}
.has-mega:hover > .mega, .has-mega:focus-within > .mega { opacity: 1; visibility: visible; transform: none; }
.mega-inner { max-width: var(--wrap); margin: 0 auto; padding: 32px var(--gutter) 36px; display: grid; grid-template-columns: 1.15fr 1fr 0.95fr; gap: 40px; }
.mega h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin-bottom: 14px; }
.mega-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-list.cols-2 { grid-template-columns: 1fr 1fr; column-gap: 24px; }
.mega-list a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; color: var(--ink); border-bottom: 1px solid transparent; }
.mega-list a:hover { color: var(--blue); }
.mega-list .n { color: var(--faint); font-size: 13.5px; }
.mega-feature { background: var(--bg-alt); border-left: 3px solid var(--gold-300); padding: 22px; }
.mega-feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 14px; }
.mega-feature p { font-size: 15px; color: var(--muted); }
.header-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); cursor: pointer; color: var(--navy); }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); }
.menu { display: none; }
.nav-secondary { display: none; }
.utility-link { color: #c9d5e4; }
.utility-link:hover { color: #fff; }
.search-panel { border-top: 1px solid var(--line); background: var(--bg-alt); }
.search-panel-inner { max-width: 980px; margin: 0 auto; padding: 26px var(--gutter) 30px; }

/* ---------- Buttons, links, tags ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--blue); border-radius: var(--r-sm);
  background: var(--blue); color: #fff;
  padding: 12px 22px; font-weight: 600; font-size: 15.5px; line-height: 1.2; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.button:hover { background: var(--blue-700); border-color: var(--blue-700); }
.button.light { background: var(--gold-300); border-color: var(--gold-300); color: var(--navy); }
.button.light:hover { background: #e2b65b; border-color: #e2b65b; }
.button.outline { background: #fff; border-color: var(--line-strong); color: var(--navy); }
.button.outline:hover { border-color: var(--navy); }
.button.ghost-light { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.button.ghost-light:hover { background: rgba(255, 255, 255, 0.1); }
.button svg { width: 18px; height: 18px; flex: none; }
.cta-appoint { padding: 11px 18px; font-size: 14.5px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.card-link { margin-top: auto; color: var(--blue); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; font-size: 15.5px; }
.card-link svg { width: 16px; height: 16px; transition: transform 0.15s; }
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-link:hover svg { transform: translateX(3px); }
.tag { display: inline-block; align-self: flex-start; padding: 3px 9px; border-radius: var(--r-xs); background: var(--blue-50); color: var(--blue-700); font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; }
.tag.navy { background: #e6ebf2; color: var(--navy-700); }
.tag.amber { background: var(--amber-100); color: var(--amber); }
.tag.coral { background: var(--coral-100); color: var(--coral); }
.badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-xs); background: #fff; border: 1px solid var(--line-strong); color: var(--navy-700); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: #fff; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; line-height: 1.3; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active, .chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .n { color: var(--faint); font-size: 12.5px; }
.chip.active .n, .chip[aria-pressed="true"] .n { color: #a9bdd5; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip-row.filter { margin: 0 0 24px; }

/* ---------- Layout ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 96px; min-height: 60vh; }
main:focus { outline: none; }
.section { margin-top: 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin: 0 0 28px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-heading p { color: var(--muted); margin: 8px 0 0; max-width: 660px; }
.section-heading a.more { color: var(--blue); font-weight: 600; white-space: nowrap; }
.section-heading a.more:hover { text-decoration: underline; text-underline-offset: 3px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.band { background: var(--bg-alt); padding-block: 72px; margin-top: 80px; }
.band > .section-heading { margin-top: 0; }
.band.navy { background: var(--navy); color: #d3deeb; }
.band.navy h2, .band.navy h3 { color: #fff; }

/* Page head band used by inner pages */
.page-head { background: var(--bg-alt); padding-top: 52px; padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 900px; }
.page-head .lead { margin-top: 14px; }
.page-head .eyebrow { margin-bottom: 12px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; background: var(--bg-alt); color: var(--muted); font-size: 14.5px; padding-top: 26px; padding-bottom: 0; }
.breadcrumb a, a.breadcrumb span { color: var(--blue); }
.breadcrumb svg { width: 14px; height: 14px; color: var(--faint); }
.breadcrumb + .page-head { padding-top: 16px; }
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); margin-bottom: 18px; }
.trail a { color: var(--blue); }
.trail a:hover { text-decoration: underline; }
.trail .sep { color: var(--faint); }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px; display: flex; flex-direction: column; }
.card > p { color: var(--muted); margin: 0 0 18px; }
.card h3 { margin: 10px 0 8px; }
.disease-card { padding: 0; overflow: hidden; transition: border-color 0.15s, box-shadow 0.2s; }
.disease-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.disease-card .card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-image { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--ivory); border-bottom: 1px solid var(--line); transition: transform 0.5s ease; }
.disease-card:hover .card-image { transform: scale(1.025); }
.disease-card h3 { margin: 10px 0 6px; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.disease-card p { font-size: 15.5px; }
.tile { position: relative; border-top: 3px solid var(--navy); }
.tile:hover { border-top-color: var(--gold-300); }
.tile .icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--blue); margin-bottom: 6px; }
.tile .icon svg { width: 30px; height: 30px; }
.tile .count { position: absolute; top: 22px; right: 22px; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--line-strong); }
.empty { padding: 40px; background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--r-md); max-width: 760px; }
.empty p { color: var(--muted); }
.info-note { padding: 18px 22px; border-left: 4px solid var(--blue); background: var(--blue-50); margin: 22px 0 30px; }
.info-note p { margin: 4px 0; }
.info-note.warn { border-color: var(--coral); background: var(--coral-100); }
.banner { margin-top: 80px; background: var(--navy); color: #d3deeb; padding: 44px 48px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; border-left: 6px solid var(--gold-300); }
.banner h2 { color: #fff; margin-bottom: 8px; }
.banner p { margin: 0; max-width: 680px; }

/* ---------- Search ---------- */
.search-box { position: relative; max-width: 680px; }
.search-box > svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--faint); pointer-events: none; }
.search-box input { width: 100%; padding: 17px 20px 17px 54px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; font-size: 17px; }
.search-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); outline: none; }
.search-box-xl { max-width: none; }
.search-box-xl input { font-size: 19px; padding-block: 19px; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-md); display: none; max-height: 420px; overflow-y: auto; text-align: left; }
.search-results.open { display: block; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a:focus { background: var(--blue-50); outline: none; }
.search-results .kind { font-size: 12px; font-weight: 600; color: var(--blue-700); background: var(--blue-50); padding: 3px 8px; border-radius: var(--r-xs); flex: none; min-width: 92px; text-align: center; }
.search-results .kind.calc { color: var(--navy-700); background: #e6ebf2; }
.search-results .kind.med { color: var(--amber); background: var(--amber-100); }
.search-results .name { font-weight: 500; }
.search-results .hint { color: var(--muted); font-size: 13.5px; margin-left: auto; white-space: nowrap; }
.search-results .none { padding: 14px 16px; color: var(--muted); margin: 0; }

/* ---------- Home: hero ---------- */
.home-hero { position: relative; min-height: 640px; display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--navy); isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; transform: scale(1.04); animation: hero-zoom 18s ease-out forwards; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 35, 65, 0.96) 0%, rgba(11, 35, 65, 0.86) 38%, rgba(11, 35, 65, 0.25) 72%, rgba(11, 35, 65, 0.05) 100%); }
@keyframes hero-zoom { to { transform: scale(1); } }
.hero-content { max-width: 640px; padding: 88px 0 132px; }
.hero-content .eyebrow { color: var(--gold-300); }
.hero-content h1 { color: #fff; font-size: clamp(40px, 5.2vw, 66px); }
.hero-content .lead { color: #d6e1ee; margin: 22px 0 30px; font-size: 20px; }
.hero-content .search-box { max-width: 600px; }
.hero-content .search-box input { border-color: transparent; padding-block: 19px; font-size: 18px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45); }
.hero-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 20px; font-size: 15px; color: #b9c8da; }
.hero-popular a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.hero-popular a:hover { border-color: var(--gold-300); color: var(--gold-300); }
.hero-actions { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: -64px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.hero-action { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 26px 26px 24px; border-right: 1px solid var(--line); color: var(--ink); transition: background 0.15s; }
.hero-action:last-child { border-right: 0; }
.hero-action:hover { background: var(--blue-50); }
.hero-action .ha-icon { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; color: var(--blue); }
.hero-action .ha-icon svg { width: 32px; height: 32px; }
.hero-action strong { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--navy); line-height: 1.25; }
.hero-action span { font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.hero-action.primary { background: var(--navy); }
.hero-action.primary strong { color: #fff; }
.hero-action.primary span { color: #b9c8da; }
.hero-action.primary .ha-icon { color: var(--gold-300); }
.hero-action.primary:hover { background: var(--navy-800); }

/* ---------- Home: A–Z ---------- */
.az-block { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.az-block .lead { font-size: 17px; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; }
.letters a, .letters span { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--blue); background: #fff; }
.letters a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.letters a[href*="A%E2%80%93Z"] { width: auto; padding: 0 10px; font-size: 15px; }
.letters span { color: #c3cbd6; border-color: var(--line); cursor: default; }
.popular-cols { columns: 2; column-gap: 40px; }
.popular-cols a { display: block; break-inside: avoid; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--blue); font-weight: 500; }
.popular-cols a:hover { text-decoration: underline; text-underline-offset: 3px; }
.popular-cols small { display: block; color: var(--faint); font-size: 13px; font-weight: 400; }

/* ---------- Home: stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 72px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 28px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--serif); font-size: 52px; font-weight: 600; color: var(--navy); line-height: 1; margin-bottom: 10px; }
.stat span { color: var(--muted); font-size: 15px; line-height: 1.4; display: block; }

/* ---------- Home: directions ---------- */
.directions { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.direction { display: flex; flex-direction: column; gap: 6px; padding: 26px 26px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; transition: background 0.15s; }
.direction:hover { background: var(--blue-50); }
.direction strong { font-family: var(--serif); font-size: 21px; font-weight: 600; color: var(--navy); }
.direction span { color: var(--muted); font-size: 14.5px; }
.direction em { font-style: normal; color: var(--blue); font-weight: 600; font-size: 14.5px; margin-top: auto; padding-top: 8px; }

/* ---------- Home: expertise band ---------- */
.expertise { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.expertise blockquote { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.35; color: #fff; font-weight: 500; }
.expertise blockquote::before { content: ""; display: block; width: 56px; height: 3px; background: var(--gold-300); margin-bottom: 26px; }
.expertise cite { display: block; margin-top: 22px; font-style: normal; font-size: 15px; color: #b9c8da; font-family: var(--body); }
.expertise cite strong { color: #fff; font-weight: 600; display: block; font-size: 17px; }
.cred-rows { list-style: none; margin: 0; padding: 0; }
.cred-rows li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.cred-rows li:first-child { padding-top: 0; }
.cred-rows svg { width: 24px; height: 24px; color: var(--gold-300); margin-top: 3px; }
.cred-rows strong { display: block; color: #fff; font-weight: 600; }
.cred-rows span { color: #b9c8da; font-size: 15px; }
.band.navy .actions { margin-top: 30px; }

/* ---------- Home: steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.step { position: relative; padding-top: 58px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; font-family: var(--serif); font-size: 44px; font-weight: 600; color: var(--gold); line-height: 1; }
.step::after { content: ""; position: absolute; left: 44px; right: 0; top: 22px; height: 1px; background: var(--line); }
.step h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; }
.step p { color: var(--muted); font-size: 16px; margin: 0; }

/* ---------- Body map & symptom navigator ---------- */
.explore { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.map-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 0; background: #fff; border: 1px solid var(--line); }
.body-map { width: 100%; height: auto; max-height: 540px; display: block; margin: 0 auto; padding: 18px; }
.bm-hot { cursor: pointer; outline: none; }
.bm-dot { fill: var(--coral); stroke: #fff; stroke-width: 4; transition: r 0.2s, fill 0.2s; }
.bm-ring { fill: var(--coral); opacity: 0.25; transform-origin: center; transform-box: fill-box; animation: bm-pulse 2.6s ease-out infinite; }
.bm-hot:nth-child(odd) .bm-ring { animation-delay: 0.9s; }
.bm-hot:hover .bm-dot, .bm-hot:focus-visible .bm-dot, .bm-hot.active .bm-dot { fill: var(--navy); r: 20; }
.bm-hot.active .bm-ring { opacity: 0.4; animation-duration: 1.3s; }
.bm-hot:focus-visible .bm-ring { stroke: var(--gold-300); stroke-width: 4; opacity: 0.7; }
@keyframes bm-pulse { 0% { transform: scale(0.35); opacity: 0.45; } 70% { transform: scale(1); opacity: 0; } 100% { transform: scale(1); opacity: 0; } }
.map-panel { border-left: 1px solid var(--line); padding: 20px; max-height: 560px; overflow: auto; }
.map-panel h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 10px; }
.map-panel .muted { font-size: 14px; }
.mini-list { display: grid; gap: 4px; }
.mini { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 6px; font-size: 14.5px; font-weight: 500; color: var(--blue); border-bottom: 1px solid var(--line); }
.mini:hover { background: var(--blue-50); }
.mini img { width: 48px; height: 32px; object-fit: cover; background: var(--ivory); flex: none; }
.symptom-col h3 { font-family: var(--serif); font-size: 24px; margin-bottom: 6px; }
.symptom-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.chip.symptom { text-align: left; white-space: normal; padding: 9px 14px; font-size: 14.5px; }
.chip.symptom[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.symptom-result { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue); padding: 20px; }
.symptom-result h3 { margin: 0 0 10px; }
.symptom-result .mini-list { margin-bottom: 12px; }

/* ---------- Joint animation ---------- */
.joint-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.joint-svg { width: 100%; height: auto; max-width: 540px; margin: 0 auto; display: block; background: #fff; border: 1px solid var(--line); }
.joint-svg * { transition: all 0.9s ease; }
.j-bone { fill: #fff; stroke: var(--navy); stroke-width: 5; }
.j-cartilage { fill: #9fd0e6; stroke: none; opacity: 0.9; }
.j-capsule { stroke: var(--navy); stroke-width: 5; }
.j-synovium { stroke: var(--blue); stroke-width: 4; }
.j-fluid { fill: var(--blue-50); }
.j-glow { opacity: 0; }
.j-erosion { fill: var(--coral); opacity: 0; }
.j-cells circle { fill: var(--coral); opacity: 0; }
.joint-stage[data-state="inflamed"] .j-synovium { stroke: var(--coral); stroke-width: 18; }
.joint-stage[data-state="inflamed"] .j-fluid { fill: #f6dcd3; }
.joint-stage[data-state="inflamed"] .j-glow { opacity: 1; }
.joint-stage[data-state="inflamed"] .j-cartilage { opacity: 0.5; }
.joint-stage[data-state="inflamed"] .j-erosion { opacity: 1; }
.joint-stage[data-state="inflamed"] .j-cells circle { opacity: 0.9; animation: drift 2.4s ease-in-out infinite alternate; animation-delay: var(--d); }
.joint-stage[data-state="treated"] .j-synovium { stroke: var(--blue); stroke-width: 7; }
.joint-stage[data-state="treated"] .j-cartilage { opacity: 0.8; }
.joint-stage[data-state="treated"] .j-erosion { opacity: 0.45; }
.joint-stage[data-state="treated"] .j-cells circle { opacity: 0.15; }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(14px, -10px); } }
.joint-controls { display: flex; gap: 0; margin-bottom: 18px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); width: max-content; max-width: 100%; overflow: hidden; }
.joint-step { border: 0; border-right: 1px solid var(--line-strong); background: #fff; padding: 10px 18px; font-weight: 600; font-size: 14.5px; cursor: pointer; color: var(--navy); }
.joint-step:last-child { border-right: 0; }
.joint-step[aria-pressed="true"] { background: var(--navy); color: #fff; }
.joint-stage[data-state="inflamed"] .joint-step[aria-pressed="true"] { background: var(--coral); }
.joint-stage[data-state="treated"] .joint-step[aria-pressed="true"] { background: var(--blue); }
.joint-caption { display: none; font-size: 17px; margin: 0; }
.joint-stage[data-state="healthy"] .joint-caption[data-for="healthy"], .joint-stage[data-state="inflamed"] .joint-caption[data-for="inflamed"], .joint-stage[data-state="treated"] .joint-caption[data-for="treated"] { display: block; }
.joint-text h2 { margin-bottom: 14px; }
.joint-text > p { color: var(--muted); }

/* ---------- Myths ---------- */
.myths .grid { gap: 20px; }
.flip { background: none; border: 0; padding: 0; cursor: pointer; perspective: 1200px; text-align: left; min-height: 220px; font: inherit; color: inherit; }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; min-height: 220px; transition: transform 0.6s; transform-style: preserve-3d; }
.flip[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-front { background: #fff; border-top: 3px solid var(--coral); }
.flip-front strong { font-family: var(--serif); font-size: 21px; color: var(--navy); line-height: 1.3; font-weight: 600; }
.flip-hint { margin-top: auto; font-size: 13.5px; color: var(--blue); font-weight: 600; }
.flip-back { background: var(--navy); color: #dce6f1; transform: rotateY(180deg); font-size: 15px; line-height: 1.55; border-color: var(--navy); border-top: 3px solid var(--gold-300); }
.flip-back .tag { background: var(--gold-300); color: var(--navy); }
.flip:focus-visible .flip-inner { outline: 3px solid var(--gold-300); outline-offset: 3px; }

/* ---------- Diseases A–Z page ---------- */
.az-hero { background: var(--bg-alt); padding-top: 52px; padding-bottom: 40px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.az-hero .lead { margin: 14px 0 26px; }
.az-hero .search-box { max-width: 720px; }
.az-hero .letters { margin-top: 26px; }
.view-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin: 0 0 36px; }
.view-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 16px 20px 13px; font-weight: 600; font-size: 15.5px; color: var(--muted); cursor: pointer; }
.view-tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--gold-300); }
.az-count { margin-left: auto; align-self: center; color: var(--muted); font-size: 14.5px; }
.az-section { display: grid; grid-template-columns: 80px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 20px); }
.az-letter { font-family: var(--serif); font-size: 46px; font-weight: 600; color: var(--navy); line-height: 1; }
.az-list { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 32px; }
.az-list li { break-inside: avoid; padding: 6px 0 10px; }
.az-list a { color: var(--blue); font-weight: 500; font-size: 17px; }
.az-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.az-list small { display: block; color: var(--faint); font-size: 13px; }
.group-block { margin-bottom: 56px; }
.group-block .section-heading h2 { font-size: 28px; }

/* ---------- Condition page (Mayo-style) ---------- */
.cond-hero { background: var(--bg-alt); padding-top: 30px; border-bottom: 1px solid var(--line); }
.cond-hero h1 { max-width: 900px; }
.cond-hero .lead { margin: 14px 0 0; }
.cond-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cond-tabs { display: flex; gap: 0; margin-top: 28px; overflow-x: auto; scrollbar-width: none; }
.cond-tabs::-webkit-scrollbar { display: none; }
.cond-tabs a { padding: 14px 20px 13px; border-bottom: 3px solid transparent; font-weight: 600; font-size: 15.5px; color: var(--muted); white-space: nowrap; }
.cond-tabs a:hover { color: var(--navy); }
.cond-tabs a.current { color: var(--navy); border-bottom-color: var(--gold-300); }
.cond-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; margin-top: 44px; align-items: start; }
.cond-article { max-width: 780px; }
.cond-figure { margin: 0 0 36px; }
.cond-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--ivory); border: 1px solid var(--line); }
.cond-figure figcaption { font-size: 13.5px; color: var(--faint); margin-top: 10px; }
.cond-section { padding: 6px 0 30px; margin-bottom: 30px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.cond-section:last-of-type { border-bottom: 0; }
.cond-section h2 { margin-bottom: 16px; }
.cond-section p { font-size: 18px; line-height: 1.75; max-width: 72ch; }
.cond-section p + p { margin-top: 14px; }
.urgent { display: grid; grid-template-columns: 30px 1fr; gap: 14px; background: var(--coral-100); border-left: 4px solid var(--coral); padding: 20px 22px; margin: 4px 0 34px; }
.urgent svg { width: 26px; height: 26px; color: var(--coral); margin-top: 2px; }
.urgent strong { display: block; color: var(--coral); font-size: 16px; margin-bottom: 4px; }
.urgent p { margin: 0; font-size: 16.5px; }
.cond-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.appoint-card { background: var(--navy); color: #d3deeb; padding: 26px; border-top: 4px solid var(--gold-300); }
.appoint-card h2 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.appoint-card p { font-size: 15px; }
.appoint-card .button { width: 100%; margin-top: 10px; }
.appoint-card .phone { display: block; font-family: var(--serif); font-size: 24px; color: #fff; font-weight: 600; margin: 12px 0 4px; }
.facts-card { border: 1px solid var(--line); background: #fff; }
.facts-card h2 { font-size: 20px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.facts-card dl { margin: 0; }
.facts-card .fact { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.facts-card .fact:last-child { border-bottom: 0; }
.facts-card dt { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--blue-700); margin-bottom: 4px; letter-spacing: 0.01em; }
.facts-card dt svg { width: 17px; height: 17px; flex: none; }
.facts-card dd { margin: 0; font-size: 15px; line-height: 1.5; }
.aside-links { border: 1px solid var(--line); padding: 18px 20px; }
.aside-links h3 { font-size: 15px; margin-bottom: 8px; }
.aside-links a { display: block; padding: 6px 0; color: var(--blue); font-weight: 500; font-size: 15px; }
.aside-links a:hover { text-decoration: underline; }
.aside-tools { display: flex; gap: 10px; }
.aside-tools .button { flex: 1; padding: 10px 12px; font-size: 14px; }
.sources ul { margin: 8px 0 16px; padding-left: 20px; }
.sources li { margin: 8px 0; }
.sources a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.related-medicines { margin: 56px 0 8px; }
.related-medicines .meta { margin-top: 12px; }
.topic-section { margin-bottom: 20px; }
.topic-section h2 { font-size: 24px; margin-bottom: 10px; }
.quick-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* legacy facts block (kept for any older markup) */
.facts { margin: 0 0 28px; border: 1px solid var(--line); padding: 22px 24px; }
.facts h2 { font-size: 22px; margin-bottom: 14px; }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.facts .fact { background: var(--bg-alt); padding: 14px 16px; }
.facts .fact dt { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--blue-700); margin-bottom: 8px; }
.facts .fact dt svg { width: 18px; height: 18px; flex: none; }
.facts .fact dd { margin: 0; font-size: 14.5px; line-height: 1.5; }
.fact-alert { background: var(--coral-100) !important; }
.fact-alert dt { color: var(--coral) !important; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.filters input { flex: 1; min-width: 240px; }
.filters input, .filters select { background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 12px 14px; color: var(--ink); font-size: 16px; }
.filters input:focus, .filters select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); outline: none; }
.filters .count { color: var(--muted); font-size: 14.5px; white-space: nowrap; }

/* ---------- Calculators ---------- */
.calc-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid label, .unit { font-size: 15px; font-weight: 500; display: flex; flex-direction: column; gap: 6px; }
.form-grid input, .form-grid select, .unit select { padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; width: 100%; font-weight: 400; }
.form-grid input:focus, .form-grid select:focus, .unit select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); outline: none; }
.unit { margin-bottom: 20px; max-width: 240px; }
.result { position: sticky; top: calc(var(--header-h) + 20px); border-top: 4px solid var(--navy); }
.score { font-family: var(--serif); font-size: 64px; font-weight: 600; color: var(--navy); line-height: 1.05; margin: 10px 0 8px; }
.level { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; font-size: 15px; margin: 4px 0 12px; align-self: flex-start; }
.level::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.level-remission { background: var(--green-100); color: var(--green); }
.level-low { background: var(--blue-100); color: var(--blue-700); }
.level-moderate { background: var(--amber-100); color: var(--amber); }
.level-high { background: var(--coral-100); color: var(--coral); }
.level-info { background: #e6ebf2; color: var(--navy-700); }
.formula { margin-top: 16px; font-size: 14.5px; }
.formula summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.formula p { overflow-wrap: anywhere; margin-top: 14px; color: var(--muted); }
.formula a { color: var(--blue); text-decoration: underline; }
#error { color: var(--coral); font-weight: 500; margin: 10px 0 0; }
.specialist { margin-top: 64px; }

/* ---------- About & Contacts ---------- */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.profile-card { background: var(--navy); color: #d3deeb; padding: 30px 26px; text-align: center; border-top: 4px solid var(--gold-300); position: sticky; top: calc(var(--header-h) + 24px); }
.profile-card .monogram { margin: 0 auto 16px; }
.profile-card h2 { color: #fff; font-size: 24px; }
.profile-card .role { color: #b9c8da; font-size: 14.5px; margin: 6px 0 16px; }
.profile-card .badge { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.profile-card .actions { justify-content: center; margin-top: 18px; }
.profile-card .actions .button { width: 100%; }
.profile-card .actions .button.outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.profile-card .meta a { color: var(--gold-300); }
.monogram { background: var(--navy); color: var(--gold-300); font-family: var(--serif); font-weight: 600; font-size: 44px; width: 120px; height: 120px; border: 2px solid var(--gold-300); display: grid; place-items: center; flex: none; }
.profile-body h2 { font-size: 28px; margin: 40px 0 16px; }
.profile-body h2:first-child { margin-top: 0; }
.cred-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.cred-list li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cred-list svg { width: 26px; height: 26px; color: var(--blue); flex: none; margin-top: 2px; }
.cred-list strong { display: block; color: var(--navy); font-size: 17px; }
.cred-list span { color: var(--muted); font-size: 15.5px; }
.memberships { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.membership { padding: 20px; border-right: 1px solid var(--line); }
.membership:last-child { border-right: 0; }
.membership b { display: block; font-family: var(--serif); font-size: 30px; color: var(--navy); }
.membership span { font-size: 14px; color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }
.interests { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.05fr; gap: 0; border: 1px solid var(--line); }
.contact-image { width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.contact-layout .card { border: 0; border-radius: 0; padding: 36px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 8px; border-top: 1px solid var(--line); }
.contact-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list .ci { width: 40px; height: 40px; display: grid; place-items: center; color: var(--blue); flex: none; border: 1px solid var(--line); }
.contact-list .ci svg { width: 20px; height: 20px; }
.contact-list small { display: block; color: var(--muted); font-size: 13px; }
.contact-list a, .contact-list b { font-weight: 600; color: var(--navy); }
.contact-number { font-family: var(--serif); font-size: clamp(28px, 3vw, 38px); font-weight: 600; margin: 10px 0 20px; color: var(--navy); }

/* ---------- Medicines & videos ---------- */
.medicine-card { padding: 0; overflow: hidden; }
.medicine-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.med-image { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--ivory); border-bottom: 1px solid var(--line); }
.med-body { padding: 18px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.med-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.med-body h2 { font-size: 22px; margin: 10px 0 6px; }
.med-body p { font-size: 15px; color: var(--muted); margin: 0 0 16px; }
.medicine-card h2, .video-card h2 { font-size: 22px; }
.group-rail { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.group-panel { border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: 26px; margin: 0 0 26px; background: #fff; }
.group-panel h2 { font-size: 28px; margin-bottom: 16px; }
.group-panel dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.gp { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gp dt { font-weight: 600; font-size: 13.5px; color: var(--blue-700); margin-bottom: 6px; }
.gp dd { margin: 0; font-size: 15px; line-height: 1.55; }
.gp-risk { background: var(--coral-100); }
.gp-risk dt { color: var(--coral); }
.med-hero { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: center; background: var(--bg-alt); padding-top: 20px; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.med-hero .page-head { margin: 0; padding: 0; background: none; border: 0; }
.med-hero .eyebrow:hover { text-decoration: underline; }
.med-hero-image { width: 100%; border: 1px solid var(--line); background: var(--ivory); }
.medicine-detail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.medicine-detail h2 { font-size: 22px; margin-bottom: 10px; }
.card-risk { border-top: 4px solid var(--coral); }
.card-risk h2 { color: var(--coral); }
.video-stage { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy), var(--navy-700)); display: grid; place-items: center; overflow: hidden; margin-bottom: 18px; }
.video-stage iframe { width: 100%; height: 100%; border: 0; }
.play-video { background: #fff; color: var(--navy); border: 0; border-radius: var(--r-sm); padding: 12px 20px; cursor: pointer; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.play-video span { color: var(--gold); }
.video-grid { grid-template-columns: repeat(2, 1fr); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3d0df; font-size: 15px; margin-top: 0; }
.footer-top { border-top: 4px solid var(--gold-300); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 64px var(--gutter) 48px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-col h2 { color: #fff; font-size: 19px; margin-bottom: 6px; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-brand { color: #fff; font-family: var(--serif); font-weight: 600; font-size: 24px; margin-bottom: 4px; }
.footer-brand-col p { margin: 0 0 12px; max-width: 42ch; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-bottom-inner { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: #93a6bd; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav-link { padding: 0 9px; font-size: 14.5px; }
  .cta-appoint { display: none; }
  .cond-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
}
@media (max-width: 1024px) {
  :root { --header-h: 68px; }
  .menu { display: grid; place-items: center; width: 44px; height: 44px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
  .menu-bars { width: 20px; height: 2px; background: var(--navy); position: relative; display: block; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--navy); }
  .menu-bars::before { top: -6px; }
  .menu-bars::after { top: 6px; }
  .menu[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu[aria-expanded="true"] .menu-bars::before { top: 0; transform: rotate(45deg); }
  .menu[aria-expanded="true"] .menu-bars::after { top: 0; transform: rotate(-45deg); }
  .header-tools { margin-left: auto; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; height: auto; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); padding: 8px var(--gutter) 16px; max-height: calc(100vh - 120px); overflow: auto; }
  .site-nav.open { display: flex; }
  .nav-item, .nav-secondary { display: block; }
  .utility-links .utility-link { display: none; }
  .nav-link { padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-link.active { border-bottom-color: var(--line); color: var(--blue); }
  .has-mega > .nav-link::after { display: none; }
  .mega { display: none; }
  .hero-actions { grid-template-columns: repeat(2, 1fr); }
  .hero-action:nth-child(2) { border-right: 0; }
  .hero-action:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .az-block, .explore, .expertise, .joint-stage { grid-template-columns: 1fr; gap: 36px; }
  .cond-layout { grid-template-columns: 1fr; }
  .cond-aside { position: static; }
  .profile { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .grid, .directions, .memberships, .medicine-detail, .steps { grid-template-columns: repeat(2, 1fr); }
  .group-panel dl { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .az-list { columns: 2; }
  .calc-layout, .form-grid { grid-template-columns: 1fr; }
  .result { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-image { min-height: 0; max-height: 300px; }
  .med-hero { grid-template-columns: 1fr; }
  .med-hero-image { max-width: 340px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .banner { grid-template-columns: 1fr; }
  .facts dl { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  :root { --gutter: 18px; }
  body { font-size: 16.5px; }
  .utility-note, .utility-links .utility-ig { display: none; }
  .utility-inner { justify-content: space-between; }
  .utility-links { width: 100%; justify-content: space-between; }
  .brand-name { font-size: 16px; }
  .brand-sub { display: none; }
  .mark svg { width: 38px; height: 38px; }
  .header-inner { gap: 12px; }
  .icon-btn, .menu { width: 40px; height: 40px; }
  .home-hero { min-height: 560px; }
  .home-hero::before { background: linear-gradient(180deg, rgba(11, 35, 65, 0.55) 0%, rgba(11, 35, 65, 0.92) 55%, rgba(11, 35, 65, 0.97) 100%); }
  .hero-content { padding: 64px 0 96px; }
  .hero-content .lead { font-size: 17.5px; }
  .hero-actions { grid-template-columns: 1fr; margin-top: -48px; }
  .hero-action { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid, .directions, .memberships, .medicine-detail, .steps, .video-grid, .grid-4, .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .group-panel dl, .facts dl { grid-template-columns: 1fr; }
  .map-wrap { grid-template-columns: 1fr; }
  .map-panel { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  .body-map { max-height: 420px; }
  .section, .band, .banner { margin-top: 56px; }
  .band { padding-block: 52px; }
  .banner { padding: 30px 22px; }
  .page-head { padding-top: 36px; padding-bottom: 30px; margin-bottom: 30px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  .az-section { grid-template-columns: 1fr; gap: 8px; }
  .az-list { columns: 1; }
  .letters a, .letters span { width: 36px; height: 36px; font-size: 16px; }
  .cond-section p { font-size: 17px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; padding: 48px var(--gutter) 32px; }
  .search-results .hint { display: none; }
  .search-results .kind { min-width: 0; }
  .score { font-size: 50px; }
  .card { padding: 22px; }
  .contact-layout .card { padding: 24px; }
  .joint-controls { width: 100%; }
  .joint-step { flex: 1; padding: 10px 8px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .utility, .site-header, .site-footer, .breadcrumb, .actions, .cond-tabs, .cond-aside .appoint-card, .aside-tools, #print-result, .language-picker, .banner, .related-medicines, .video-stage, .hero-actions { display: none !important; }
  main { padding: 0; max-width: 100%; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .page-head, .cond-hero, .breadcrumb, .band, .med-hero, .az-hero { margin-inline: 0; padding-inline: 0; background: #fff; }
  .cond-layout { display: block; }
  .card { break-inside: avoid; padding: 16px; margin-bottom: 16px; }
  input, select { border: none !important; }
  .score { font-size: 40px; }
  .formula { display: none; }
  .result { position: static; }
}

/* Header fit on mid-size desktops */
@media (max-width: 1500px) and (min-width: 1025px) {
  .header-inner { gap: 18px; }
  .nav-link { padding: 0 9px; font-size: 14.5px; }
  .brand-name { font-size: 18px; }
}
@media (max-width: 1260px) and (min-width: 1025px) {
  .cta-appoint { display: none; }
  .brand-sub { display: none; }
}
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .brand { gap: 9px; }
  .brand-name { font-size: 14.5px; white-space: normal; max-width: 150px; line-height: 1.15; }
  .header-tools { gap: 6px; }
}
select { max-width: 100%; }
@media (max-width: 680px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 16px; }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat b { font-size: 40px; }
}
