/* Médicaments Maroc — mobile-first, RTL-aware (logical properties), light/dark. */
:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --ink: #12201b;
  --ink-2: #33433d;
  --muted: #5f6f69;
  --line: #e1e8e5;
  --brand: #0b7a5c;
  --brand-ink: #075a44;
  --brand-soft: #e2f3ec;
  --brand-softer: #f0f9f5;
  --ok: #157347; --ok-bg: #e3f4ea;
  --info: #1d4ed8; --info-bg: #e6eefc;
  --warn: #9a5b00; --warn-bg: #fdf1dc;
  --bad: #b42318; --bad-bg: #fde8e6;
  --off: #5f6f69; --off-bg: #eef2f0;
  --price: #0b5d47;
  --shadow: 0 1px 2px rgba(16, 32, 27, .05), 0 4px 16px rgba(16, 32, 27, .05);
  --r: 14px;
  --r-sm: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "Noto Sans Arabic", "Inter", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1412; --surface: #141d1a; --surface-2: #18231f; --ink: #e6eeea; --ink-2: #c5d2cc; --muted: #93a59d;
    --line: #25332e; --brand: #33c08f; --brand-ink: #7fdcb9; --brand-soft: #123a2d; --brand-softer: #102a22;
    --ok: #6fd79e; --ok-bg: #133325; --info: #8fb2ff; --info-bg: #182640; --warn: #f2bf62; --warn-bg: #3a2c12;
    --bad: #ff9a8f; --bad-bg: #3d1b18; --off: #a5b5ae; --off-bg: #1f2a26; --price: #7fdcb9;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

/* Illustration palette (hand-drawn SVGs use these through CSS variables) */
:root {
  --ib: #e2f3ec; --ig: #12946c; --igd: #0b6e50; --igl: #a8e3cb; --iw: #ffffff; --ik: #1f3a33; --is: #f5c04a; --isd: #d99a22;
  --it: #e07a4f; --itd: #b9552f; --ip: #f7b3a8; --ipd: #e07f72; --ir: #e5484d; --ird: #b8323a; --iu: #5ba8e5; --iud: #2f7fc4;
  --iul: #d6ecfb; --isn: #f4e4c8; --isnd: #dcc29a; --igy: #dfe7e4; --igyd: #a9b8b2;
  /* city landscapes */
  --csk: #cfe8f7; --csh: #fdeed6; --cse: #3d97d3; --csed: #2875b0; --csel: #b9def5; --cmt: #b4c4d4; --cmtd: #8fa5ba;
  --chl: #a3d6ab; --chld: #6cb582; --cst: #f0deba; --cstd: #d3b885; --cea: #dc915c; --cead: #b56a3b;
  --ccb: #73b6e8; --ccbd: #3e86c4; --ccl: #ffffff; --csa: #f6dfae; --csad: #e5c385;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ib: #16372b; --ig: #2cbf8d; --igd: #179068; --igl: #8fdcbf; --iw: #eef5f2; --ik: #0f1d18; --is: #f2c35a; --isd: #c98f22;
    --it: #e88a62; --itd: #b9603d; --ip: #f2aaa0; --ipd: #d77b70; --ir: #ef5b60; --ird: #b8323a; --iu: #6cb4ec; --iud: #3a8bd0;
    --iul: #cfe6f8; --isn: #e9d8bb; --isnd: #c9ad84; --igy: #c9d4d0; --igyd: #8a9a94;
    --csk: #1e3549; --csh: #3a3f55; --cse: #22618f; --csed: #194b70; --csel: #4a8cbc; --cmt: #34495d; --cmtd: #2a3c4d;
    --chl: #2f6a4c; --chld: #23553c; --cst: #cdb68e; --cstd: #a78e64; --cea: #c47e4d; --cead: #995b33;
    --ccb: #4f95cf; --ccbd: #2f6ea7; --ccl: #b9c7d2; --csa: #cdb487; --csad: #a98e60;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
[dir="rtl"] body, [lang="ar"] { font-family: var(--font-ar); }
[dir="rtl"] body { line-height: 1.7; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 .6em; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.17em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .ic-flip { transform: scaleX(-1); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.main { flex: 1; padding-bottom: 48px; }
bdi { unicode-bidi: isolate; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.logo:hover { text-decoration: none; }
.logo-mark svg { width: 34px; height: 34px; display: block; }
.logo-mark rect { fill: var(--brand); }
.logo-mark path { fill: #fff; }
.logo-txt { display: flex; flex-direction: column; line-height: 1.1; font-size: 1.02rem; }
.logo-txt small { font-weight: 500; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.nav { display: flex; gap: 2px; margin-inline-start: auto; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .93rem; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand-ink); }
.lang { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .92rem; background: var(--surface); }
.lang:hover { border-color: var(--brand); text-decoration: none; }
@media (min-width: 1140px) {
  .nav { order: 0; width: auto; padding-bottom: 0; margin-inline-start: 14px; }
  .nav a { padding: 7px 9px; gap: 5px; }
  .lang { margin-inline-start: 8px; }
}

/* Buttons, chips, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 8px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #06261c; } .btn-primary:hover { color: #06261c; } }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.btn-lg { min-height: 50px; padding: 10px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; font-weight: 500; }
.chip:hover { border-color: var(--brand); color: var(--brand-ink); text-decoration: none; }
.chip-lg { padding: 8px 14px; font-size: .93rem; }
.chip .ic { color: var(--brand); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--off-bg); color: var(--off); white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-off, .b-plain { background: var(--off-bg); color: var(--off); }

/* Search + suggestions */
.search, .filters-q { position: relative; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 5px; padding-inline-start: 42px; box-shadow: var(--shadow); }
.search:focus-within, .filters-q:focus-within { border-color: var(--brand); }
.search-ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.search input, .filters-q input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 9px 4px; font-size: 1rem; }
.search input::placeholder, .filters-q input::placeholder { color: var(--muted); opacity: .85; }
.search-big { padding: 7px; padding-inline-start: 48px; border-radius: 18px; }
.search-big input { font-size: 1.06rem; padding: 12px 4px; }
.search-big .search-ic { inset-inline-start: 18px; }
.search-big .ic { width: 1.25em; height: 1.25em; }
@media (max-width: 520px) { .search .btn { padding: 8px 12px; } .search-big .btn { display: none; } }
.suggest { position: absolute; inset-inline: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .16); z-index: 50; max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; text-align: start; }
.suggest h4 { margin: 8px 10px 4px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); }
.suggest a:hover, .suggest a.act { background: var(--brand-softer); text-decoration: none; }
.suggest a .s-main { flex: 1; min-width: 0; }
.suggest a .s-main b { font-weight: 600; }
.suggest a .s-main small { display: block; color: var(--muted); font-size: .8rem; }
.suggest a .s-price { font-weight: 600; color: var(--price); font-size: .9rem; white-space: nowrap; }
.suggest a.off { opacity: .6; }
.suggest .s-all { border-top: 1px solid var(--line); margin-top: 4px; color: var(--brand-ink); font-weight: 600; }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 50% -120px, var(--brand-soft), transparent 70%), var(--bg); padding: 36px 0 18px; }
.hero-in { display: grid; gap: 4px 48px; align-items: center; }
.hero-text { text-align: center; }
.hero-art { width: min(300px, 82%); margin: 0 auto -6px; }
.hero h1 { font-size: clamp(1.6rem, 1.05rem + 2.4vw, 2.55rem); margin-bottom: .35em; }
.hero-sub { color: var(--ink-2); font-size: 1.04rem; max-width: 680px; margin: 0 auto 22px; }
.popular { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 0; align-items: center; font-size: .9rem; }
.hero .stats { grid-column: 1 / -1; order: 3; }
@media (min-width: 900px) {
  .hero { padding-top: 28px; }
  .hero-in { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .hero-text { text-align: start; order: 1; }
  .hero-art { order: 2; width: 100%; max-width: 470px; margin: 0; }
  .hero-sub { margin-inline: 0; }
  .popular { justify-content: flex-start; }
}
.stats { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; }
.stats b { font-size: 1.35rem; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.stats span { font-size: .82rem; color: var(--muted); }
.stats li:last-child { grid-column: span 2; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(5, 1fr); } .stats li:last-child { grid-column: auto; } }

.how ol { list-style: none; padding: 0; margin: 22px 0 6px; display: grid; gap: 10px; }
.how li { position: relative; display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.how li > .ic { color: var(--brand); width: 1.5em; height: 1.5em; }
.how p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.how-n { position: absolute; top: -9px; inset-inline-start: 12px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
@media (min-width: 760px) { .how ol { grid-template-columns: repeat(3, 1fr); } }

/* Sections */
.sec { margin-top: 34px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { margin: 0; }
.sec-h a { font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 4px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.card-cls { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); height: 100%; }
.card-cls:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow); }
.cls-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
.cls-ic .ic { width: 22px; height: 22px; }
.cls-ic.big { width: 56px; height: 56px; border-radius: 16px; }
.cls-ic.big .ic { width: 28px; height: 28px; }
.cls-txt { display: flex; flex-direction: column; line-height: 1.3; }
.cls-txt b { font-weight: 600; font-size: .96rem; }
.cls-txt small { color: var(--muted); font-size: .82rem; margin-top: 2px; }

.pharma-band { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.pharma-band-in { display: grid; gap: 18px; }
.pharma-band h2 { display: flex; align-items: center; gap: 8px; }
.pharma-band h2 .ic { color: var(--brand); }
@media (min-width: 860px) { .pharma-band-in { grid-template-columns: 300px 1fr; align-items: start; } }
.city-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.city-cards-sm { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.city-cards a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 5px 5px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.city-cards-sm a { background: var(--surface-2); }
.city-cards a:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.city-cards .city-art { border-radius: 12px; }
.cc-txt { display: flex; flex-direction: column; gap: 1px; padding: 0 7px; min-width: 0; }
.cc-txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-txt small, .city-cards a.more small { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.city-cards a.more { justify-content: center; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.city-cards a.more .ic { width: 26px; height: 26px; color: var(--brand); margin-bottom: 4px; }
@media (max-width: 520px) {
  .city-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .city-cards-sm { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
  .city-cards-sm li { scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { .city-cards a { transition: none; } .city-cards a:hover { transform: none; } }
.note { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-bg); color: var(--ink-2); border-radius: var(--r); padding: 14px 16px; font-size: .92rem; }
.note > .ic { color: var(--warn); margin-top: 3px; }
.note p { margin: 0; }

/* Illustrations */
.il { display: block; flex: none; width: 48px; height: 48px; }
.il-card { width: 52px; height: 52px; }
.il-head { width: 92px; height: 92px; }
.scene { display: block; width: 100%; height: auto; }
.band-art { width: 210px; max-width: 70%; margin: -6px 0 6px; }
.city-art { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: var(--csk); }
.city-thumb { width: 45px; height: 30px; flex: none; border-radius: 7px; }
.city-h { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 8px 16px; align-items: center; }
.city-h h1 { margin-top: 0; }
@media (min-width: 760px) { .city-h { grid-template-columns: minmax(0, 1fr) 280px; gap: 8px 32px; } .city-h-art { border-radius: 20px; } }
.page-h-art { display: grid; gap: 8px 32px; align-items: center; }
.page-h-art .head-art { width: min(240px, 60%); margin: 0 auto; grid-row: 1; }
.page-h-art-sm .head-art { width: 150px; }
@media (min-width: 760px) {
  .page-h-art { grid-template-columns: minmax(0, 1fr) 260px; }
  .page-h-art .head-art { grid-row: auto; width: 100%; }
  .page-h-art-sm { grid-template-columns: minmax(0, 1fr) 170px; }
}
@media (max-width: 759px) { .page-h-art-sm .head-art { display: none; } }
.head-scene { width: 112px; flex: none; }
.empty-art { width: 200px; margin: 0 auto 6px; }
.card-cls .il-card, .cls-item .il-card { margin: -2px 0; }

/* Page headers & breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 16px 0 6px; font-size: .86rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs .ic { width: .95em; height: .95em; opacity: .6; }
.crumbs span { color: var(--ink-2); }
.page-h { margin: 8px 0 18px; }
.page-h-icon { display: flex; gap: 16px; align-items: flex-start; }
.lead { color: var(--ink-2); font-size: 1.02rem; max-width: 760px; }
.eyebrow { color: var(--brand-ink); font-weight: 600; font-size: .86rem; margin: 0 0 4px; text-transform: none; }
.ltr-title { text-align: start; }
[dir="rtl"] .ltr-title { text-align: right; }

/* Filters */
.filters { display: grid; gap: 10px; margin-bottom: 14px; }
.filters-q { box-shadow: none; }
.filters-more { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.filters-more > summary { cursor: pointer; list-style: none; padding: 11px 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.filters-more > summary::-webkit-details-marker { display: none; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 0 14px 4px; }
.filters-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); font-weight: 600; }
select { appearance: none; width: 100%; padding: 9px 12px; padding-inline-end: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6f69' stroke-width='2'/%3E%3C/svg%3E") no-repeat; background-position: right 12px center; font-size: .93rem; color: var(--ink); }
[dir="rtl"] select { background-position: left 12px center; }
.filters-act { display: flex; gap: 8px; padding: 12px 14px 14px; }
.count { color: var(--muted); font-size: .9rem; margin: 6px 0 10px; }
.count b { color: var(--ink); }

/* Medicine list */
.meds { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.med-link { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); }
.il-thumb { width: 56px; height: 56px; }
.med-link:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow); }
.med-main { min-width: 0; flex: 1; }
.med-name { font-weight: 700; font-size: 1.04rem; margin: 0; direction: ltr; text-align: start; unicode-bidi: plaintext; }
[dir="rtl"] .med-name { text-align: right; }
.med-dose { font-weight: 500; color: var(--ink-2); }
.med-fam { color: var(--brand-ink); font-weight: 600; font-size: .9rem; margin: 2px 0 2px; }
.med-meta { color: var(--muted); font-size: .85rem; margin: 0; display: flex; flex-wrap: wrap; gap: 0 6px; }
.med-meta .dot::before { content: "·"; margin-inline-end: 6px; }
.med-sub { color: var(--muted); font-size: .8rem; margin: 4px 0 0; text-align: start; letter-spacing: .01em; }
[dir="rtl"] .med-sub { text-align: right; }
.med-sp { color: var(--ink-2); font-size: .82rem; margin: 6px 0 0; display: flex; align-items: center; gap: 6px; }
.med-sp .ic { color: var(--brand); }
.med-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: end; max-width: 220px; }
.med-price { font-weight: 700; color: var(--price); font-size: 1.08rem; margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.med-price.na { color: var(--muted); font-weight: 500; font-size: .86rem; }
.med-side .badges { justify-content: flex-end; }
@media (max-width: 560px) {
  .med-link { grid-template-columns: 44px minmax(0, 1fr); gap: 8px 12px; }
  .il-thumb { width: 44px; height: 44px; }
  .med-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; max-width: none; width: 100%; }
}
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px 0 0; color: var(--muted); font-size: .92rem; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty > .ic { width: 40px; height: 40px; color: var(--brand); }
.empty-page { max-width: 560px; }
.empty-page .search { margin: 18px 0; }

/* Medicine page */
.med-h { margin: 6px 0 18px; display: flex; gap: 18px; align-items: center; }
.med-h-txt { min-width: 0; }
.il-med { width: 104px; height: 104px; }
@media (max-width: 560px) { .med-h { align-items: flex-start; gap: 12px; } .il-med { width: 64px; height: 64px; margin-top: 4px; } }
.med-h h1 { margin-bottom: .2em; direction: ltr; unicode-bidi: plaintext; }
.med-h-sub { color: var(--ink-2); margin-bottom: 10px; }
.med-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .med-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .med-aside { position: sticky; top: 80px; } }
@media (max-width: 899px) { .med-aside { order: -1; } }
.med-col { display: grid; gap: 14px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.box h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.box h2 .ic { color: var(--brand); }
.box-wide { margin-top: 14px; }
.box-use { background: linear-gradient(180deg, var(--brand-softer), var(--surface)); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); display: flex; gap: 16px; align-items: flex-start; }
.use-body { flex: 1; min-width: 0; }
.use-cls { flex: none; }
.il-use { width: 76px; height: 76px; }
@media (max-width: 560px) { .il-use { width: 56px; height: 56px; } }
.use-text { font-size: 1.04rem; color: var(--ink); margin: 0; }
.note-sm { font-size: .82rem; color: var(--muted); margin: 10px 0 0; display: flex; gap: 6px; align-items: flex-start; }
.note-sm .ic { margin-top: 3px; flex: none; }
.sp-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sp-list a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
[dir="rtl"] .sp-list a { padding: 7px 7px 7px 14px; }
.sp-list a:hover { border-color: var(--brand); text-decoration: none; }
.sp-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.sp-list li:not(:first-child) .sp-rank { background: var(--brand-soft); color: var(--brand-ink); }
.comp-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; text-align: left; }
.comp-list a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 8px 14px; margin: 0; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
[dir="rtl"] .kv dd[dir="ltr"] { text-align: right; }
.kv-tight { grid-template-columns: 1fr auto; font-size: .9rem; margin-top: 10px; }
.kv-tight dd { text-align: end; }
.box-price { border: 1.5px solid color-mix(in srgb, var(--brand) 35%, var(--line)); display: grid; gap: 4px; }
.price-label { color: var(--muted); font-size: .85rem; font-weight: 600; margin: 0; }
.price-big { font-size: 2rem; font-weight: 750; color: var(--price); margin: 0; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price-big.na { font-size: 1.2rem; color: var(--muted); }
.ok { color: var(--ok); }
.saving { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 6px; padding: 10px 12px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); }
.saving:hover { text-decoration: none; filter: brightness(.98); }
.saving .ic { margin-top: 3px; }
.saving small { display: block; font-weight: 600; }
.box-price .btn-block { margin-top: 10px; }
.tbl-wrap { overflow-x: auto; margin-top: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.tbl td small { display: block; font-size: .78rem; }
.tbl .num { text-align: end; white-space: nowrap; }
.tbl tr.self td { background: var(--brand-softer); }
.tbl .badge { margin-inline-start: 6px; }
@media (max-width: 640px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl td { border: 0; padding: 2px 0; }
  .tbl td[data-l]:not(:first-child)::before { content: attr(data-l) " : "; color: var(--muted); font-size: .8rem; }
  .tbl .num { text-align: start; }
}
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mini-list a { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface-2); }
.mini-list a:hover { border-color: var(--brand); text-decoration: none; }
.mini-list small { grid-column: 1; color: var(--muted); font-size: .8rem; }
.mini-price { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 700; color: var(--price); white-space: nowrap; font-size: .92rem; }
.see-all-with { margin-top: 16px; }

/* Substance usages */
.uses { display: grid; gap: 10px; margin-bottom: 18px; }
@media (min-width: 820px) { .uses { grid-template-columns: repeat(2, 1fr); } }
.use-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.use-fam { color: var(--brand-ink); font-weight: 650; margin-bottom: 4px; }

/* Classes / specialties / substances */
.cls-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 820px) { .cls-list { grid-template-columns: repeat(2, 1fr); } }
.cls-item { display: flex; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); height: 100%; }
.cls-item:hover { border-color: var(--brand); text-decoration: none; }
.cls-body { display: flex; flex-direction: column; gap: 3px; }
.cls-body .muted { font-size: .9rem; }
.cls-body small { color: var(--brand-ink); font-size: .82rem; font-weight: 500; }
.sp-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.sp-grid a { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); }
.sp-grid a:hover { border-color: var(--brand); text-decoration: none; }
.sp-grid .ic { color: var(--brand); width: 24px; height: 24px; }
.sp-grid span { display: flex; flex-direction: column; }
.sp-grid small { color: var(--muted); }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.az a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; color: var(--ink-2); }
.az a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.sub-list { list-style: none; padding: 0; margin: 0 0 12px; columns: 1; column-gap: 16px; }
@media (min-width: 640px) { .sub-list { columns: 2; } }
@media (min-width: 960px) { .sub-list { columns: 3; } }
.sub-list li { break-inside: avoid; }
.sub-list a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 4px; border-bottom: 1px dashed var(--line); color: var(--ink); font-size: .92rem; }
.sub-list small { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Pharmacies */
.near-box { display: grid; gap: 14px; margin-bottom: 8px; }
.near-box .btn-lg { justify-self: start; }
.near-out { margin-top: 14px; }
.filter-box { position: relative; display: flex; align-items: center; flex: 1; min-width: 220px; }
.filter-box > .ic { position: absolute; inset-inline-start: 12px; color: var(--muted); }
.filter-box input { width: 100%; padding: 10px 12px; padding-inline-start: 38px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .98rem; }
.filter-box input:focus { outline: none; border-color: var(--brand); }
.city-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.city-list a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.city-list a:hover { border-color: var(--brand); text-decoration: none; }
.city-list small { color: var(--muted); font-size: .8rem; }
.city-list .cl-name { flex: 1; min-width: 0; }
.city-list b { color: var(--brand-ink); font-variant-numeric: tabular-nums; font-size: .88rem; }
.ph-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.geo-msg { margin: 0 0 10px; }
.hours-note { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); margin: 0 0 12px; }
.hours-note .ic { margin-top: 3px; color: var(--brand); }
[dir="rtl"] .comp-list { text-align: right; }
.ph-map { height: 380px; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: 14px; z-index: 1; }
.ph-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 820px) { .ph-list { grid-template-columns: repeat(2, 1fr); } }
.ph { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ph.hl { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ph-head { position: relative; padding-inline-end: 70px; }
.ph-head h3 { margin: 0; font-size: 1.02rem; }
.ph-alt { margin: 0; color: var(--muted); font-size: .88rem; }
.ph-dist { position: absolute; top: 0; inset-inline-end: 0; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: .8rem; border-radius: 999px; padding: 2px 9px; }
.ph-info { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; font-size: .9rem; color: var(--ink-2); }
.ph-info li { display: flex; gap: 8px; align-items: flex-start; }
.ph-info .ic { color: var(--brand); margin-top: 4px; }
.ph-info a { font-weight: 600; }
.ph-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.ph-city { font-size: .82rem; color: var(--muted); }
.empty-filter { text-align: center; padding: 20px; }

/* About / prose */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }

/* Footer */
.ftr { border-top: 1px solid var(--line); background: var(--surface); padding: 26px 0 30px; font-size: .9rem; }
.ftr-in { display: grid; gap: 20px; }
@media (min-width: 860px) { .ftr-in { grid-template-columns: 1.4fr 1fr; } }
.ftr-brand { font-weight: 700; }
.ftr-h { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.ftr-h .ic { color: var(--brand); }
.emerg { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.emerg a { color: var(--ink-2); }
.emerg b { color: var(--bad); margin-inline-end: 4px; }

@media print {
  .hdr, .ftr, .filters, .ph-tools, .ph-act, .crumbs, .box-price .btn { display: none !important; }
  body { background: #fff; }
  .box, .med-link, .ph { border-color: #ccc; box-shadow: none; }
}

/* Laboratories */
.lab-mono { --mb: #e3f2ec; --mt: #0b6e50; display: inline-grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 15px;
  background: var(--mb); color: var(--mt); font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; line-height: 1; font-family: Inter, system-ui, sans-serif; }
.lab-c1 { --mb: #e6eefc; --mt: #1d4ed8; } .lab-c2 { --mb: #fdecef; --mt: #b8323a; } .lab-c3 { --mb: #fff3d6; --mt: #946000; }
.lab-c4 { --mb: #efe8fb; --mt: #6b3fc4; } .lab-c5 { --mb: #e0f4f7; --mt: #0e7490; } .lab-c6 { --mb: #fde9df; --mt: #b4532a; } .lab-c7 { --mb: #eceff1; --mt: #37474f; }
@media (prefers-color-scheme: dark) {
  .lab-mono { --mb: #123a2d; --mt: #7fdcb9; }
  .lab-c1 { --mb: #182640; --mt: #8fb2ff; } .lab-c2 { --mb: #3a1a1f; --mt: #f39aa1; } .lab-c3 { --mb: #3a2c12; --mt: #f2bf62; }
  .lab-c4 { --mb: #2a2142; --mt: #c4a8ff; } .lab-c5 { --mb: #10333a; --mt: #7fd6e4; } .lab-c6 { --mb: #3a2318; --mt: #f0a882; } .lab-c7 { --mb: #232b30; --mt: #c3ccd2; }
}
.lab-mono-sm { width: 40px; height: 40px; border-radius: 12px; font-size: .9rem; }
.lab-c0 { --mb: #e3f2ec; --mt: #0b6e50; }
@media (prefers-color-scheme: dark) { .lab-c0 { --mb: #123a2d; --mt: #7fdcb9; } }
/* emblems: original drawings (frame + field mark + initials ribbon) in each laboratory's colours, parts in illus.svg (e-*) */
.lab-em { --mm: color-mix(in srgb, var(--mt) 40%, var(--mb)); display: block; flex: none; width: 64px; height: 64px; }
.lab-em text { font: 700 11px/1 Inter, system-ui, sans-serif; fill: var(--mb); letter-spacing: .03em; direction: ltr; unicode-bidi: plaintext; }
.lab-em-xl { width: 116px; height: 116px; }
.lab-em-sm { width: 42px; height: 42px; }
.lab-em-xs { width: 26px; height: 26px; }
.lab-more .ic { width: 20px; height: 20px; }
.il-mini { width: 26px; height: 26px; }

.lab-search { max-width: 560px; margin: 0 0 16px; }
.lab-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lab-card { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.lab-card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.lab-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.lab-card-name { font-size: 1.04rem; font-weight: 650; line-height: 1.25; }
.lab-card-n { color: var(--muted); font-size: .86rem; }
.lab-card-n b { color: var(--ink); font-variant-numeric: tabular-nums; }
.lab-bar { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.lab-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.lab-areas { display: flex; gap: 4px; margin-top: 2px; }
.lab-area { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .lab-card { transition: none; } .lab-card:hover { transform: none; } }

.lab-h { display: flex; gap: 18px; align-items: center; margin: 8px 0 18px; }
.lab-h h1 { margin: 0 0 4px; }
.lab-h .eyebrow { margin-bottom: 2px; }
.lab-h p.small { margin: 0; }
@media (max-width: 520px) { .lab-h .lab-em-xl { width: 84px; height: 84px; } }
.lab-stats { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.lab-stats li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.lab-stats b { font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.lab-stats span { color: var(--muted); font-size: .85rem; }
.lab-stats .tone-brand b { color: var(--brand-ink); }
.lab-stats .tone-ok b { color: var(--ok); }
.lab-cols { display: grid; gap: 16px; align-items: start; }
.lab-side { display: grid; gap: 16px; }
@media (min-width: 900px) { .lab-cols { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.bars a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 6px; border-radius: 10px; color: var(--ink); }
.bars a:hover { background: var(--surface-2); text-decoration: none; }
.bar-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bar-label { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); opacity: .85; }
.bars b { font-variant-numeric: tabular-nums; font-size: .9rem; }
.form-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.form-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
[dir="rtl"] .form-chips li { padding: 4px 6px 4px 12px; }
.form-chips b { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.lab-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.lab-tools .filter-box { max-width: 520px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: .9rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.seg button small { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.seg button.on { background: var(--brand-soft); color: var(--brand-ink); }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lab-group { margin-top: 22px; scroll-margin-top: 80px; }
.lab-group-h { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lab-group-h small { font-weight: 600; font-variant-numeric: tabular-nums; }
.lab-chips { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.lab-chips a { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 9px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); height: 100%; }
[dir="rtl"] .lab-chips a { padding: 9px 9px 9px 12px; }
.lab-chips a:hover { border-color: var(--brand); text-decoration: none; }
.lab-chips span:last-child { display: flex; flex-direction: column; min-width: 0; }
.lab-chips b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-chips small { color: var(--muted); font-size: .8rem; }
.lab-chips a.more { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.lab-chips a.more b { white-space: normal; }
.lab-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.lab-promo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.lab-promo:hover { border-color: var(--brand); text-decoration: none; }
.lab-promo > span:not(.lab-mono) { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lab-promo small { color: var(--muted); font-size: .78rem; }
.lab-promo b { font-weight: 600; font-size: .92rem; }
.lab-promo > .ic { color: var(--brand); flex: none; }
.more-bars summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; font-size: .9rem; padding: 8px 6px 2px; list-style: none; }
.more-bars summary::-webkit-details-marker { display: none; }
.more-bars summary::before { content: "+ "; }
.more-bars[open] summary::before { content: "− "; }
.ftr-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
/* compact rows on laboratory pages (hundreds of medicines) */
.lab-group .med-link { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 11px 14px; height: 100%; }
.lab-group .il-thumb { width: 44px; height: 44px; }
.lab-group .med-name { font-size: .98rem; }
.lab-group .med-fam { font-size: .85rem; }
.lab-group .med-sp { display: none; }
.lab-group .med-sub { margin-top: 2px; }
.lab-group .med-price { font-size: 1rem; }
@media (min-width: 1000px) { .lab-group .meds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Doctor portraits: one hand-drawn doctor per specialty (parts dp-* and props p-* in illus.svg), colours per portrait */
.doc { --dsk: #f3cfae; --dskd: #dba57f; --dhc: #262022; --dhcd: #0f0c0d; --dbg: #e2f3ec; --dcl: var(--iw); --dcld: var(--igyd);
  --dsh: var(--iul); --dsc: #3d5a99; --dscd: #2a4278; display: block; flex: none; width: 76px; height: 76px; }
.doc-ring { fill: var(--surface); }
.doc-xl { width: 136px; height: 136px; }
.doc-sm { width: 40px; height: 40px; }
.doc-xs { width: 26px; height: 26px; }
.dk-s1 { --dsk: #f6d5b8; --dskd: #e0ad86; } .dk-s2 { --dsk: #e9b98f; --dskd: #cc9166; }
.dk-s3 { --dsk: #c58a5c; --dskd: #a2683d; } .dk-s4 { --dsk: #8a5638; --dskd: #6a3e24; }
.dk-h1 { --dhc: #262022; --dhcd: #0f0c0d; } .dk-h2 { --dhc: #4b3124; --dhcd: #301e15; } .dk-h3 { --dhc: #9a4f2a; --dhcd: #743718; }
.dk-h4 { --dhc: #c3c6ca; --dhcd: #9a9fa6; } .dk-h5 { --dhc: #a87443; --dhcd: #83572e; }
.dk-b1 { --dbg: #e2f3ec; } .dk-b2 { --dbg: #e1effb; } .dk-b3 { --dbg: #f8ecd6; } .dk-b4 { --dbg: #fde6e1; } .dk-b5 { --dbg: #ece7fb; } .dk-b6 { --dbg: #dcf2f3; }
.dk-w1 { --dcl: #46a98b; --dcld: #2f8a6e; } .dk-w2 { --dcl: #5c9fd9; --dcld: #3d7fba; }
.dk-j1 { --dsc: #3d5a99; --dscd: #2a4278; } .dk-j2 { --dsc: #c46f7d; --dscd: #a3505e; } .dk-j3 { --dsc: #c9ab84; --dscd: #a58660; }
.dk-j4 { --dsc: #4f8f78; --dscd: #376f5b; } .dk-j5 { --dsc: #7b5aa6; --dscd: #5d4086; }
@media (prefers-color-scheme: dark) {
  .dk-b1 { --dbg: #1b3a2f; } .dk-b2 { --dbg: #1a3149; } .dk-b3 { --dbg: #3a3122; } .dk-b4 { --dbg: #3d2428; } .dk-b5 { --dbg: #2b2545; } .dk-b6 { --dbg: #143739; }
}
.sp-grid a { padding: 12px 14px; gap: 14px; }
.sp-grid b { line-height: 1.3; }
.head-doc { width: auto; }
@media (max-width: 520px) { .head-doc .doc-xl { width: 96px; height: 96px; } }
.doc-chips { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.doc-chips a { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 7px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); height: 100%; font-weight: 600; font-size: .93rem; line-height: 1.3; }
[dir="rtl"] .doc-chips a { padding: 7px 7px 7px 12px; }
.doc-chips a:hover { border-color: var(--brand); text-decoration: none; }
.doc-chips .doc { width: 56px; height: 56px; }
.sp-list a { padding-inline-start: 5px; }
.sp-av { position: relative; display: block; flex: none; }
.sp-av .doc { width: 36px; height: 36px; }
.sp-av .sp-rank { position: absolute; bottom: -3px; inset-inline-end: -5px; width: 18px; height: 18px; font-size: .64rem; border: 2px solid var(--surface-2); }
.chip .doc-xs { margin-inline-start: -7px; width: 24px; height: 24px; }
@media (max-width: 560px) {
  .doc-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-chips a { gap: 8px; font-size: .84rem; padding-inline-end: 8px; }
  .doc-chips .doc { width: 44px; height: 44px; }
}
/* What each doctor does (specialty pages) */
.sp-info { display: grid; gap: 16px; margin: 0 0 22px; }
@media (min-width: 900px) { .sp-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.sp-info p { line-height: 1.6; }
.sp-helps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sp-helps li { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; font-size: .93rem; line-height: 1.4; }
.sp-helps .ic { color: var(--brand); margin-top: 2px; }
.sp-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; margin: 12px 0 0; font-size: .92rem; line-height: 1.5; }
.sp-note .ic { flex: none; margin-top: 3px; }
.sp-note-n { background: var(--info-bg, var(--brand-soft)); color: var(--ink); }
.sp-note-n .ic, .sp-note-n b { color: var(--info, var(--brand-ink)); }
.sp-general { margin: 12px 0 0; }
.sp-meds-h { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; }
.sp-meds-h .ic { color: var(--brand); }
.sp-tag { color: var(--ink-2); font-size: .88rem; line-height: 1.35; margin: 1px 0 2px; }
.doc-chips a > span { display: flex; flex-direction: column; min-width: 0; }
.doc-chips small { color: var(--muted); font-weight: 500; font-size: .8rem; line-height: 1.3; margin-top: 1px; }
@media (max-width: 560px) { .doc-chips small { display: none; } }
.sp-grid a { height: 100%; }
/* Common diseases (/maladies, /maladie/{slug}) */
.il-dz { width: 64px; height: 64px; flex: none; }
.il-dz-xl { width: 124px; height: 124px; flex: none; }
.il-chip { width: 48px; height: 48px; flex: none; }
.dz-key-h { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; margin: 0 0 10px; }
.dz-key-h .ic { color: var(--brand); }
.dz-key-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.dz-key-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.dz-key-list b { font-size: 1.6rem; font-weight: 700; color: var(--brand-ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.dz-key-list span { color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.dz-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.dz-card { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.dz-card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: reduce) { .dz-card { transition: none; } .dz-card:hover { transform: none; } }
.dz-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.dz-name { font-size: 1.08rem; font-weight: 650; line-height: 1.25; }
.dz-sum { color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.dz-fig { font-size: .86rem; color: var(--ink-2); line-height: 1.45; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.dz-fig b { color: var(--brand-ink); font-weight: 700; }
.dz-docs { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.dz-docs .doc { width: 28px; height: 28px; }
.dz-docs small { color: var(--muted); font-size: .8rem; margin-inline-start: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-foot { display: flex; gap: 6px; align-items: center; margin-top: 18px; }
.dz-h { display: flex; gap: 20px; align-items: center; margin: 8px 0 16px; }
.dz-h h1 { margin: 0 0 4px; }
.dz-h .eyebrow { margin-bottom: 2px; }
.dz-h .lead { margin: 0; }
@media (max-width: 520px) { .dz-h { gap: 14px; } .dz-h .il-dz-xl { width: 84px; height: 84px; } }
.dz-fig-band { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 18px; border-radius: 16px; background: var(--brand-soft); color: var(--ink); margin: 0 0 18px; font-size: 1rem; line-height: 1.5; }
.dz-fig-label { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); }
.dz-fig-band > b { font-size: 1.35rem; color: var(--brand-ink); }
.dz-cols { display: grid; gap: 16px; margin-bottom: 16px; }
@media (min-width: 900px) { .dz-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.dz-text { line-height: 1.65; }
.dz-signs .ic { color: var(--warn); }
.dz-help { margin-bottom: 8px; }
.dz-docs-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.dz-docs-grid a { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); height: 100%; }
[dir="rtl"] .dz-docs-grid a { padding: 10px 10px 10px 14px; }
.dz-docs-grid a:hover { border-color: var(--brand); text-decoration: none; }
.dz-docs-grid .doc { width: 64px; height: 64px; }
.dz-docs-grid span { display: flex; flex-direction: column; gap: 2px; }
.dz-docs-grid b { font-weight: 650; }
.dz-docs-grid small { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.sub-chips .chip small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.dz-class-link { margin: 12px 0 8px; }
.dz-class-link a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.dz-chips small b { color: var(--brand-ink); }
.sp-dz { margin: 0 0 18px; }

/* Pharmacies de garde */
:root { --gd: #3b3a9e; --gd-bg: #ebeafc; --gd-soft: #f5f4fe; }
@media (prefers-color-scheme: dark) { :root { --gd: #bcb9ff; --gd-bg: #27254f; --gd-soft: #1a1935; } }
.gd-eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--gd); }
.gd-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0 0 18px; border-radius: var(--r); background: linear-gradient(90deg, var(--gd-bg), var(--gd-soft)); border: 1px solid color-mix(in srgb, var(--gd) 22%, transparent); color: var(--ink); }
[dir="rtl"] .gd-banner { background: linear-gradient(270deg, var(--gd-bg), var(--gd-soft)); }
.gd-banner:hover { border-color: var(--gd); text-decoration: none; }
.gd-banner > .ic { flex: none; width: 22px; height: 22px; color: var(--gd); }
.gd-banner b { flex: 1; min-width: 0; font-weight: 600; }
.gd-banner-go { display: inline-flex; align-items: center; gap: 4px; color: var(--gd); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.band-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.btn-garde { color: var(--gd); border-color: color-mix(in srgb, var(--gd) 35%, var(--line)); }
.btn-garde:hover { border-color: var(--gd); }
.btn-garde .ic { color: var(--gd); }
.gd-call { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--gd-soft); color: var(--ink-2); font-size: .93rem; }
.gd-call .ic { flex: none; margin-top: 3px; color: var(--gd); }
.gd-sec + .gd-sec { margin-top: 8px; }
.gd-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 22px 0 12px; font-size: 1.15rem; }
.gd-h .ic { color: var(--gd); }
.gd-h small { color: var(--muted); font-weight: 500; font-size: .85rem; }
.gd-badge { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px; background: var(--gd-bg); color: var(--gd); font-size: .78rem; font-weight: 700; }
.gd-24h .gd-badge { background: var(--ok-bg); color: var(--ok); }
.gd-jour .gd-badge { background: var(--warn-bg); color: var(--warn); }
.gd .ph-head { display: flex; flex-direction: column; align-items: flex-start; }
.gd-area { color: var(--ink); font-weight: 600; }
.gd-none { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px dashed color-mix(in srgb, var(--gd) 35%, var(--line)); }
.gd-none > .ic { flex: none; width: 28px; height: 28px; color: var(--gd); }
.gd-none p { margin: 0 0 8px; }
.gd-none p:last-child { margin: 4px 0 0; }
.gd-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gd-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; font-size: .92rem; }
.gd-chips a:hover { border-color: var(--gd); text-decoration: none; }
.gd-chips .ic, .gd-cities small .ic { color: var(--gd); }
.gd-cities small { display: inline-flex; align-items: center; gap: 4px; color: var(--gd); font-weight: 600; }
.note > div p + p { margin-top: 10px; }
.sec + .gd-call { margin-top: 18px; }
@media (min-width: 1140px) and (max-width: 1379px) { .nav a > .ic { display: none; } .nav a { padding: 7px 10px; } }
