/* Alifa Health · condition + city templates v0.3 (theme 2.0.5): logical properties for Arabic RTL; no font-family here (Thai loader in brand.css stays in charge). Scoped to .ah-* so nothing else in the theme changes.
   Colours fall back to the theme's own variables where they exist. */
.ah-page{--ah-accent:var(--ghost-accent-color,#0e6f6b);--ah-line:#d4dbe2;--ah-soft:#f2f5f7;--ah-muted:#5b6876;--ah-gold:#9a6512;--ah-gold-soft:#fbf1df;--ah-spons:#8a3d64;--ah-spons-soft:#f8ecf2}
/* 2.0.11: dark colours only when the SITE is dark (Ghost dark mode on, or the reader picked dark), the same switch the base theme
   uses. 2.0.5-2.0.10 followed the PHONE's dark setting alone, so on a light site the cards went near-black under dark text
   (Plan your trip heading invisible on mobile, Larry 9 Nov). */
@media (prefers-color-scheme:dark){:root:not([data-user-color-scheme]).is-darkModeAdminSetting-enabled .ah-page{--ah-line:#2e3946;--ah-soft:#1c242d;--ah-muted:#9aa7b4;--ah-gold:#e0b46a;--ah-gold-soft:#2f2617;--ah-spons:#e19bbd;--ah-spons-soft:#33202a}}
[data-user-color-scheme=dark] .ah-page{--ah-line:#2e3946;--ah-soft:#1c242d;--ah-muted:#9aa7b4;--ah-gold:#e0b46a;--ah-gold-soft:#2f2617;--ah-spons:#e19bbd;--ah-spons-soft:#33202a}
.ah-article{max-width:860px;margin:0 auto;padding:24px 20px 56px}
.ah-crumb{font-size:14px;color:var(--ah-muted);margin-bottom:8px}
.ah-crumb a{color:inherit}
.ah-title{font-size:clamp(26px,3.2vw,36px);line-height:1.2;margin:4px 0 8px}
.ah-byline{font-size:14px;color:var(--ah-muted);margin:0 0 18px}
.ah-small{font-size:14px;color:var(--ah-muted)}

/* body blocks written by the repo (HTML cards) */
.ah-keypoints{border-inline-start:4px solid var(--ah-accent);background:var(--ah-soft);padding:12px 16px;margin:18px 0;border-start-start-radius:0;border-end-start-radius:0;border-start-end-radius:6px;border-end-end-radius:6px}
.ah-keypoints ul{margin:6px 0 0;padding-inline-start:20px}
.ah-table-wrap{overflow-x:auto;margin:10px 0 18px;border:1px solid var(--ah-line);border-radius:8px}
.ah-table-wrap table{border-collapse:collapse;width:100%;min-width:600px;font-size:15px;margin:0}
.ah-table-wrap th,.ah-table-wrap td{padding:9px 12px;text-align:start;vertical-align:top;border-bottom:1px solid var(--ah-line)}
.ah-table-wrap th{background:var(--ah-soft);font-size:14px}
.ah-table-wrap tr:last-child td{border-bottom:none}
.ah-zh{display:block;color:var(--ah-muted);font-size:13.5px}
.ah-cityhead{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px;margin-top:22px}
.ah-cityhead h3{margin:0}
.ah-badge{display:inline-block;font-size:12.5px;font-weight:600;color:var(--ah-gold);background:var(--ah-gold-soft);border:1px solid var(--ah-gold);border-radius:4px;padding:1px 6px}
/* 2.0.11: long badges wrap onto balanced lines inside the pill instead of one long strip (Larry 9 Nov); table cells wrap
   here too, so this no longer depends on the code-injection rule (the base theme sets every td to nowrap) */
.ah-badge{white-space:normal;max-width:min(100%,26rem);line-height:1.4;padding:2px 7px;text-wrap:balance;vertical-align:top}
.ah-table-wrap :is(td,th){white-space:normal}
.ah-tier{display:inline-block;font-weight:700;font-size:13px;border:1px solid var(--ah-accent);color:var(--ah-accent);border-radius:4px;padding:1px 7px}
.ah-chart{margin:16px 0;border:1px solid var(--ah-line);border-radius:8px;padding:12px 14px}
.ah-chart figcaption{display:flex;flex-direction:column;gap:2px;margin-bottom:8px}
.ah-chart svg{width:100%;height:auto;max-width:620px;display:block;color:currentColor}
.ah-chart .bar rect{fill:var(--ah-accent)}
.ah-chart .range rect{fill:var(--ah-soft);stroke:var(--ah-accent);stroke-width:1.5}
.ah-chart .tick rect{fill:currentColor}

/* theme-drawn blocks */
.ah-related,.ah-trip,.ah-guides{margin:28px 0;padding:14px 18px;border:1px solid var(--ah-line);border-radius:8px;background:var(--ah-soft)}
.ah-related__title,.ah-trip h2{font-size:18px;margin:0 0 6px}
.ah-related__row{margin:4px 0}
.ah-related__row:not(:has(li)){display:none}
.ah-related:not(:has(li)),.ah-trip:not(:has(li)){display:none}
.ah-related__label{font-weight:600;margin-inline-end:6px}
.ah-inline{display:inline;list-style:none;margin:0;padding:0}
.ah-inline li{display:inline}
.ah-inline li+li::before{content:"·";margin:0 8px;color:var(--ah-muted)}
.ah-guides p{margin:0}
.ah-guides a+a::before{content:"·";margin:0 8px;color:var(--ah-muted);display:inline-block}
.ah-sponsored:not(:has(li)){display:none}
.ah-sponsored{margin:24px 0;padding:12px 16px;border:2px solid var(--ah-spons);background:var(--ah-spons-soft);border-radius:8px}
.ah-sponsored__list{list-style:none;margin:0;padding:0}
.ah-sponsored__label{font-size:12.5px;font-weight:700;color:var(--ah-spons);border:1px solid var(--ah-spons);border-radius:4px;padding:0 6px;margin-inline-end:6px}

/* CTA (theme 2.0.6): own class names. The in-body AH-System block keeps .ah-cta/.ah-btn (site header code injection);
   2.0.4-2.0.5 used the same names here, which put a white border on every in-body button and would have printed the
   theme CTA's text white on light teal. Colours follow the AH-System tokens, with fallbacks. */
.aht-cta{margin:34px 0 10px;padding:1.25rem 1.5rem;border-radius:10px;background:var(--ah-teal-light,#81d6d3);color:var(--ah-ink,#0f1327)}
.aht-cta h2{margin:0 0 6px;color:var(--ah-ink,#0f1327);font-size:1.25rem}
.aht-cta p{color:var(--ah-ink,#0f1327);margin:6px 0}
.aht-cta__more{font-size:14px}
.aht-cta__row{display:flex;flex-wrap:wrap;gap:.75rem;margin:14px 0 6px}
.aht-btn,.aht-btn:visited{display:inline-block;padding:.6rem 1.1rem;border-radius:6px;font-weight:600;font-size:16px;line-height:1.3;text-decoration:none;background:var(--ah-navy,#212a4e);color:#fff !important;border:0}
.aht-btn:hover,.aht-btn:focus-visible{background:var(--ah-teal-deep,#3a8e97);color:#fff !important;text-decoration:none}
.aht-cta a:focus-visible{outline:3px solid var(--ah-navy,#212a4e);outline-offset:2px}
@media (max-width:560px){.aht-cta__row .aht-btn{flex:1 1 100%;text-align:center}}
/* in-body AH-System CTA on desktop: buttons in body-text size so three fit on one row (mobile unchanged: full-width buttons) */
@media (min-width:561px){.ah-cta a.ah-btn{font-size:16px}}



/* v2.0.5 blocks: find-a-hospital (R7 hubs), city list (hub + homepage) */
.ah-block{margin:28px 0;padding:16px 18px;border:1px solid var(--ah-line,#e3e8ef);border-radius:8px}
.ah-block__title{font-size:1.15rem;margin:0 0 10px}
.ah-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px 18px}
.ah-list li{margin:0}
/* hide any drawn block that has nothing in it yet (no published page behind it) */
.ah-block:not(:has(li)),.ah-related:not(:has(li)),.ah-guides:not(:has(a[href*="/"]:not([href$="/tag/conditions-treatments/"]))),.ah-trip:not(:has(li)),.ah-sponsored:not(:has(li)){display:none}
.ah-related__row:not(:has(li)){display:none}
/* links inside dark table headers must stay readable. 2.0.6 (CR1-17): the AH-System rule
   :is(.ah-answer,…,.ah-section,…) a[href]:not([class]) (site header code injection) beat 2.0.5's color:inherit, so header
   links were navy on navy; this rule wins on specificity and !important. */
.gh-content thead a,.c-content thead a,.ah-content thead a{text-decoration:underline}
:is(.ah-section,.ah-key-facts,.c-content,.gh-content,.ah-content) thead th a[href]{color:#fff !important;text-decoration-color:#fff}

/* v2.0.7 Plan your trip: one link per line, links styled as links (they were grey text with no underline) */
.ah-trip__list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.ah-trip__list li{margin:0}
.ah-trip a{color:var(--ah-teal-deep,#3a8e97);text-decoration:underline;text-underline-offset:3px}
.ah-trip a:hover,.ah-trip a:focus-visible{color:var(--ah-navy,#212a4e)}
.ah-trip__all{margin:10px 0 0;font-size:.9rem}

/* v2.0.7 CTA: Botim and WeChat ID as labelled chips beside the WhatsApp/Telegram buttons (same height, outlined, not links) */
.aht-chip{display:inline-flex;align-items:center;gap:.35em;padding:.6rem 1.1rem;border-radius:6px;font-weight:600;font-size:16px;line-height:1.3;background:#fff;color:var(--ah-navy,#212a4e);border:1px solid var(--ah-navy,#212a4e)}
@media (max-width:560px){.aht-cta__row .aht-chip{flex:1 1 100%;justify-content:center}}

/* v2.0.9 Related block: links styled as links; one link per line (long titles) */
.ah-related .ah-inline{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.ah-related .ah-inline li{margin:0}
.ah-related .ah-inline li+li::before{content:none}
.ah-related a{color:var(--ah-teal-deep,#3a8e97);text-decoration:underline;text-underline-offset:3px}
.ah-related a:hover,.ah-related a:focus-visible{color:var(--ah-navy,#212a4e)}
.ah-related__label{display:block;font-weight:600;margin:0 0 4px}

/* v2.0.10 banner on hub, city and condition pages; links in the home/hub lists styled as links */
.ah-hero{margin:18px 0 26px}
.ah-hero .c-feature-image{width:100%;height:auto;border-radius:8px;display:block}
.ah-block .ah-list a{color:var(--ah-teal-deep,#3a8e97);text-decoration:underline;text-underline-offset:3px}
.ah-block .ah-list a:hover,.ah-block .ah-list a:focus-visible{color:var(--ah-navy,#212a4e)}

/* v2.0.11 (CR1-27): "All ..." link under each capped block */
.ah-all{margin:10px 0 0;font-size:.9rem}
.ah-all a{text-decoration:underline;text-underline-offset:3px}
.ah-all a+a::before{content:"·";margin:0 8px;color:var(--ah-muted,#5b6876);display:inline-block}

/* v2.0.12 — hospital profile (class E): departments blocks (RULES §6, CR1-32) and the patient-tips slot (decision point 1).
   Logical properties only (Arabic mirrors); colours from the .ah-page tokens, so dark mode follows the site (theme-rules §1). */
.ah-depts{margin:14px 0 20px}
.ah-depts__list{columns:2 16rem;column-gap:24px;padding-inline-start:1.1em;margin:8px 0}
.ah-depts__list li{break-inside:avoid;margin:0 0 4px}
.ah-depts--key .ah-badge{margin:0 6px 6px 0}
.ah-depts-note{font-size:14.5px;color:var(--ah-muted);border-inline-start:3px solid var(--ah-line);padding-inline-start:10px;margin:6px 0 10px}
.ah-tips{margin:24px 0;padding:12px 16px;border:1px dashed var(--ah-muted);border-radius:8px;background:transparent}
.ah-tips__label{display:inline-block;font-size:12.5px;font-weight:700;letter-spacing:.02em;color:var(--ah-muted);border:1px solid var(--ah-line);border-radius:4px;padding:1px 7px;margin:0 0 8px}
.ah-tips ul{margin:4px 0 0;padding-inline-start:1.1em}
.ah-tips li{margin:0 0 6px}
.ah-tips .ah-small{margin:8px 0 0}
/* theme 2.0.14 — our paid service as its own labelled box after "Being treated here as an international patient" (custom-profile.hbs) */
.ah-paid{margin:18px 0 22px;padding:12px 16px;border:1px solid var(--ah-line);border-inline-start:4px solid var(--ah-accent);border-radius:8px;background:var(--ah-soft);color:inherit}
.ah-paid__label{display:inline-block;margin:0 0 6px;font-size:12.5px;font-weight:700;letter-spacing:.02em;color:var(--ah-muted)}
.ah-paid__link{margin:0;font-size:16px}
.ah-paid__link a,.ah-paid__link a:visited{font-weight:600;color:inherit;text-decoration:underline;text-decoration-color:var(--ah-accent);text-underline-offset:3px}
.ah-paid__link a::after{content:" \2192"}
[dir="rtl"] .ah-paid__link a::after{content:" \2190"}
.ah-paid__note{margin:4px 0 0;font-size:14.5px;color:inherit}
.ah-paid-slot:empty{display:none}
/* theme 2.0.14 — profile national-titles block as compact chips (English badge + Chinese inline), so 29 titles do not run one per line on phones */
.ah-depts--key .ah-depts__list{columns:auto;list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:6px 8px}
.ah-depts--key .ah-depts__list li{margin:0;display:inline-flex;align-items:center;gap:6px;padding:3px 8px 3px 3px;border:1px solid var(--ah-line,#e3e8ee);border-radius:6px}
.ah-depts--key .ah-depts__list li .ah-badge{margin:0}
.ah-depts--key .ah-depts__list li .ah-zh{display:inline;font-size:13px}
.ah-depts--key h3{margin:18px 0 6px;font-size:1.1rem;color:var(--ah-navy,#212a4e)}
.ah-depts p{color:var(--ah-text,inherit)}
/* theme 2.0.14 — city 'Condition guides' line (nav.ah-guides): its links had no link style (same grey as the text, no underline) on
   desktop and phone (Larry 11 Nov, Hospitals in Beijing); now styled like the Plan your trip and Related links */
.ah-guides a{color:var(--ah-teal-deep,#3a8e97);text-decoration:underline;text-underline-offset:3px}
.ah-guides a:hover,.ah-guides a:focus-visible{color:var(--ah-navy,#212a4e)}
.ah-guides a+a::before{text-decoration:none}

/* theme 2.0.16 — /services/ "Our paid services" list (page-services.hbs) */
.ah-paid-list{margin:28px 0 8px}.ah-paid-list h2{margin:0 0 10px}.ah-paid-list .ah-paid{margin:10px 0}

/* theme 2.0.18: homepage + /hospitals/ intros (audit items 2, 3); guide updated date (item 6) */
.ah-index-intro{inline-size:100%}
.ah-home-intro,.ah-hospitals-intro{max-width:46rem;margin-block:14px 6px;margin-inline:0;font-size:1.05rem;line-height:1.6;color:inherit}
.ah-hospitals-az{margin-block:18px 0;font-size:1.25rem}
.c-topper__updated{margin-inline-start:0} /* 2.0.19: separator spacing comes from the markup, as on the date before it */

/* theme 2.0.20: keep '7 min read' on one line in the guide header (Larry 17 Nov, laptop + phone screenshots) */
.c-topper__reading-time{white-space:nowrap}
