/* nephroblogger theme - matches the watch face / phone theme:
   deep navy → teal / indigo / purple gradient, aqua-violet-magenta glow accents.
   Uses logical properties (inline/block) so RTL locales mirror automatically. */
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-Variable.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
/* v1.1: Arabic + Urdu (self-hosted, SIL OFL 1.1 - see assets/fonts/OFL-Noto.txt). Subset to Arabic-script ranges;
   unicode-range means the files are only downloaded when Arabic-script text is on the page. */
@font-face { font-family: "KC Naskh"; src: url("../assets/fonts/NotoNaskhArabic-subset.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "KC Nastaliq"; src: url("../assets/fonts/NotoNastaliqUrdu-subset.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
:root {
  --navy: #0b1640; --navy-2: #0a1030; --teal: #087882; --indigo: #163c8c; --purple: #601e8c;
  --aqua: #3eecd6; --violet: #a779ff; --magenta: #e85adc; --text: #f0f8fa; --muted: #b9c3e6;
  --card: rgba(255,255,255,.07); --card-b: rgba(255,255,255,.14);
  --danger: #ff7a8a; --danger-bg: rgba(255,80,110,.14); --warn: #ffc56b; --warn-bg: rgba(255,190,90,.12);
  --radius: 18px; --tap: 48px;
  --grad: linear-gradient(90deg, var(--aqua), var(--violet) 55%, var(--magenta));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-block-size: 100vh; color: var(--text);
  font: 400 16px/1.55 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: transparent;
}
html {
  min-block-size: 100%; background-color: #1a1f6a;
  background-image:
    radial-gradient(60% 40% at 15% 10%, rgba(8,150,160,.45), transparent 70%),
    radial-gradient(55% 45% at 90% 95%, rgba(130,40,180,.45), transparent 70%),
    linear-gradient(160deg, #0a3f5a 0%, var(--indigo) 45%, #2a1d72 75%, var(--purple) 100%);
}
a { color: var(--aqua); }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; border-radius: 8px; }
.skip-link { position: absolute; inset-inline-start: -999px; inset-block-start: 0; background: var(--aqua); color: #04202a; padding: 8px 12px; z-index: 10; }
.skip-link:focus { inset-inline-start: 8px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; max-inline-size: 760px; margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { border-radius: 9px; box-shadow: 0 0 14px rgba(167,121,255,.45); }
.wordmark { font-weight: 800; font-size: 19px; letter-spacing: .01em; }
.brand-text { display: grid; line-height: 1.1; }
.brand-by { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; inline-size: var(--tap); block-size: var(--tap); color: var(--text); border-radius: 50%; }
.icon-btn:hover { background: var(--card); }
.mode-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.mode-badge.mode-clinician { color: var(--aqua); border-color: rgba(62,236,214,.5); }
.mode-badge.mode-patient { color: #f3b3ff; border-color: rgba(232,90,220,.55); }

main:focus, main:focus-visible { outline: none; }
main { max-inline-size: 760px; margin-inline: auto; padding: 4px 16px 120px; outline: none; }
.loading { color: var(--muted); }
h1, h2, h3 { line-height: 1.25; margin-block: 0 .5em; }
.page-title { font-size: 26px; font-weight: 800; margin-block-start: 8px; }
.section-title { font-size: 17px; font-weight: 700; color: var(--muted); margin-block: 6px 12px; }
.muted { color: var(--muted); }
.note { font-size: 13.5px; color: var(--muted); border-inline-start: 3px solid var(--violet); padding-inline-start: 10px; margin-block: 14px; }

.hero { text-align: center; padding-block: 6px 10px; }
.hero-art { display: block; margin: 0 auto; block-size: 170px; inline-size: auto; filter: drop-shadow(0 0 22px rgba(167,121,255,.55)); }
.hero-title { font-size: 34px; font-weight: 800; margin: 6px 0 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tag { color: var(--muted); margin: 2px 0 10px; }

.mode-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .mode-grid { grid-template-columns: 1fr 1fr; } }
.mode-card {
  display: flex; gap: 14px; align-items: flex-start; text-align: start; inline-size: 100%;
  padding: 18px; border-radius: var(--radius); cursor: pointer; color: var(--text); font: inherit;
  background: linear-gradient(var(--navy-2), var(--navy-2)) padding-box, var(--grad) border-box;
  border: 1.5px solid transparent; background-color: transparent;
  box-shadow: 0 8px 30px rgba(0,0,0,.25), 0 0 24px rgba(62,236,214,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.mode-card { background: linear-gradient(rgba(12,20,60,.92), rgba(30,20,80,.92)) padding-box, var(--grad) border-box; }
.mode-card:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(0,0,0,.3), 0 0 30px rgba(167,121,255,.3); }
.mode-icon { flex: 0 0 52px; block-size: 52px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.06); }
.mode-icon svg { inline-size: 34px; block-size: 34px; }
.mode-clinician .mode-icon { color: var(--aqua); }
.mode-patient .mode-icon { color: #f3b3ff; }
.mode-text { display: grid; gap: 3px; }
.mode-name { font-weight: 800; font-size: 18px; }
.mode-who { font-size: 13px; font-weight: 700; color: var(--aqua); }
.mode-patient .mode-who { color: #f3b3ff; }
.mode-desc { font-size: 14.5px; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); padding: 16px 18px; margin-block: 14px; backdrop-filter: blur(6px); }
.card h2 { font-size: 19px; }
.card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--aqua); margin-block: 14px 4px; }
.card ul, .alert ul, .cond-body ul { margin: 4px 0; padding-inline-start: 20px; }
.card li, .cond-body li { margin-block: 3px; }
.disclaimer-card { text-align: center; font-weight: 700; margin-block: 22px 6px; padding: 12px 14px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.3); background: rgba(0,0,0,.18); }
.disclaimer-strong { font-weight: 800; color: var(--warn); }
.gate h1 { font-size: 22px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: rgba(0,0,0,.2); margin-block: 14px; cursor: pointer; }
.check input { inline-size: 24px; block-size: 24px; accent-color: var(--aqua); flex: 0 0 auto; margin: 0; }
.row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.btn { min-block-size: var(--tap); padding: 0 20px; border-radius: 999px; font: 700 15.5px/1 inherit; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; border: 1.5px solid transparent; }
.btn-primary { color: #071a24; background: linear-gradient(90deg, var(--aqua), #8fb7ff 60%, var(--violet)); box-shadow: 0 0 18px rgba(62,236,214,.35); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost { color: var(--text); background: transparent; border-color: rgba(255,255,255,.3); }

.chip-group { border: 0; padding: 0; margin: 18px 0 0; }
.chip-group legend { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-block-end: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; min-block-size: var(--tap); padding: 10px 16px; text-align: start;
  border-radius: 16px; font: 600 15px/1.3 inherit; font-family: inherit; color: var(--text); cursor: pointer;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.18); transition: background .12s, border-color .12s, box-shadow .12s;
}
.chip:hover { border-color: rgba(62,236,214,.6); }
.chip-tick { inline-size: 20px; block-size: 20px; border-radius: 6px; border: 2px solid rgba(255,255,255,.45); flex: 0 0 auto; display: grid; place-items: center; }
.chip[aria-pressed="true"] { background: linear-gradient(90deg, rgba(62,236,214,.22), rgba(167,121,255,.22)); border-color: var(--aqua); box-shadow: 0 0 16px rgba(62,236,214,.3); }
.chip[aria-pressed="true"] .chip-tick { background: var(--aqua); border-color: var(--aqua); }
.chip[aria-pressed="true"] .chip-tick::after { content: ""; inline-size: 5px; block-size: 10px; border: solid #062028; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }

.action-bar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 4; display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  padding: 12px max(16px, calc((100vw - 760px) / 2 + 16px)); padding-block-end: max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(15,15,60,.75), rgba(20,12,60,.97)); border-block-start: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px);
}
.action-bar .count { margin-inline-end: auto; color: var(--muted); font-weight: 700; }

.selection { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-block: 6px 12px; }
.tag { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(62,236,214,.14); border: 1px solid rgba(62,236,214,.35); }
.link { font-size: 14px; font-weight: 700; margin-inline-start: 6px; }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); margin-block: 14px; }
.alert svg { flex: 0 0 auto; margin-block-start: 2px; }
.alert h2 { font-size: 16.5px; margin: 0 0 6px; }
.alert p { margin: 0; }
.alert-emergency { background: var(--danger-bg); border: 1.5px solid var(--danger); color: #ffe3e7; }
.alert-emergency svg { color: var(--danger); }
.alert-urgent { background: var(--warn-bg); border: 1.5px solid var(--warn); color: #fff1dc; }
.alert-urgent svg { color: var(--warn); }
.actions h3 { color: var(--warn); }

.cond-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cond-item details { background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); }
.cond-item details[open] { border-color: rgba(167,121,255,.55); }
.cond-item summary { display: flex; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; align-items: flex-start; }
.cond-item summary::-webkit-details-marker { display: none; }
.cond-item summary .chev { flex: 0 0 auto; margin-block-start: 4px; color: var(--muted); transition: transform .2s; }
.cond-item details[open] summary .chev { transform: rotate(180deg); }
.cond-head { display: grid; gap: 6px; flex: 1; min-inline-size: 0; }
.cond-name { font-weight: 800; font-size: 17px; }
.cond-sub { font-size: 13px; color: var(--muted); }
.pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-inline-start: 4px; letter-spacing: .03em; text-transform: uppercase; }
.pill-warn { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
.cond-body { padding: 0 18px 16px; }
.cond-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--aqua); margin-block: 14px 4px; }
.cond-body p { margin-block: 4px; }
.sources a { word-break: break-word; }
.status { font-size: 12px; color: var(--warn); margin-block-start: 12px; font-weight: 700; }

.footer { text-align: center; padding: 18px 16px 90px; color: var(--muted); font-size: 13px; }
.footer p { margin: 2px 0; }
.footer-review { margin-block: 6px; }
.reviewed-line { font-weight: 700; }
.footer-links { margin-block-start: 8px; }
.footer-links a { display: inline-block; padding: 12px 8px; min-block-size: var(--tap); }
.footer-brand { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.noscript { padding: 16px; text-align: center; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (forced-colors: active) { .chip[aria-pressed="true"] { outline: 3px solid Highlight; } }

details.alert { display: block; padding: 0; }
details.alert > summary { display: flex; gap: 10px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; font-weight: 800; }
details.alert > summary::-webkit-details-marker { display: none; }
details.alert > summary .chev { margin-inline-start: auto; transition: transform .15s; }
details.alert[open] > summary .chev { transform: rotate(180deg); }
details.alert > ul { padding: 0 16px 14px 46px; margin: 0; font-size: 14.5px; }
[dir="rtl"] details.alert > ul { padding: 0 46px 14px 16px; }
details.alert li { margin-block: 4px; }
.count-pill { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--danger); color: #2a0610; }
.tag { font-size: 12.5px; padding: 3px 9px; }

/* v0.2: investigation guide + referral step */
.inv { margin-block: 14px 6px; padding: 12px 14px; border-radius: 14px; background: rgba(62,236,214,.08); border: 1px solid rgba(62,236,214,.35); }
.cond-body .inv-title { margin-block-start: 0; font-size: 14px; color: var(--aqua); }
.inv h4 { font-size: 13.5px; margin: 10px 0 2px; color: var(--text); }
.mgmt-note { font-size: 12.5px; color: var(--muted); font-style: italic; }
.referral { display: flex; gap: 10px; align-items: flex-start; margin-block: 16px 4px; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(62,236,214,.16), rgba(167,121,255,.18)); border: 1.5px solid var(--violet); }
.referral svg { flex: 0 0 auto; color: var(--aqua); margin-block-start: 1px; }
[dir="rtl"] .referral svg { transform: scaleX(-1); }
.referral-sub { display: block; font-size: 13px; color: var(--muted); margin-block-start: 2px; }
/* v0.4: OPTIONAL WhatsApp link for personal guidance - deliberately secondary (outline, muted), never the main next step */
.guidance-optional { margin-block: 10px 4px; padding: 10px 14px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.25); background: rgba(0,0,0,.12); }
.guidance-lead { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.btn-guidance { gap: 8px; color: var(--text); background: transparent; border-color: rgba(255,255,255,.35); font-weight: 600; font-size: 14.5px; box-shadow: none; }
.btn-guidance:hover { background: rgba(255,255,255,.06); }
.guidance-via { display: block; font-size: 12px; color: var(--muted); margin-block-start: 4px; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-guidance { display: inline-flex; line-height: 1.25; padding-block: 8px; white-space: normal; text-align: center; }
.btn-guidance .guidance-icon { flex: 0 0 auto; display: block; }
.referral > div { flex: 1; min-inline-size: 0; }
.btn-guidance svg { color: var(--muted); margin: 0; }
/* v0.3: patient categories with icons */
.chip-group-icon legend { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); text-transform: none; letter-spacing: 0; }
.group-icon { inline-size: 34px; block-size: 34px; border-radius: 10px; display: grid; place-items: center; color: #f3b3ff;
  background: linear-gradient(135deg, rgba(62,236,214,.18), rgba(232,90,220,.22)); border: 1px solid rgba(232,90,220,.4); }
.group-icon svg { inline-size: 20px; block-size: 20px; }
.chip-group-icon { padding-block-end: 4px; border-block-end: 1px solid rgba(255,255,255,.08); }

/* privacy / static pages */
.static-page { max-inline-size: 760px; margin-inline: auto; padding: 8px 16px 24px; }
.static-page h1 { font-size: 26px; line-height: 1.25; margin: 8px 0 4px; }
.static-page h2 { font-size: 18px; margin: 0 0 6px; }
.static-page .card { margin-block: 14px; }
/* v0.5: static warning signs (patient pathway, same for everyone) */
.warning-static { margin-block: 16px; }
.ws-title { font-size: 18px; margin: 0 0 2px; }
.ws-note { font-size: 13px; margin: 0 0 8px; }
.warning-static .alert h3 { font-size: 15.5px; margin: 0 0 4px; }
.alert-compact { padding: 8px 12px; font-size: 13.5px; margin-block: 8px 12px; }
.alert-compact p { margin: 0; }
/* Further reading for clinicians (external links, clinician cards only) */
.fr { margin-block: 14px 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.14)); }
.fr .fr-title { margin-top: 0; }
.fr h4 { font-size: 13.5px; margin: 10px 0 2px; color: var(--text); text-transform: none; }
.fr-list { margin-block: 2px 4px; font-size: 14px; line-height: 1.35; padding-inline-start: 18px; }
.fr-list li { margin-block: 5px; }
.fr-list a::after { content: " \2197"; font-size: .85em; opacity: .75; }
.fr-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.cond-body .fr-title { margin-block-start: 0; font-size: 14px; color: var(--violet); }

/* ---------- v1.1: languages (English / العربية / اردو) + RTL ---------- */
html:lang(ar) body { font-family: "Manrope", "KC Naskh", "Noto Naskh Arabic", system-ui, sans-serif; font-size: 17px; line-height: 1.75; }
html:lang(ur) body { font-family: "Manrope", "KC Nastaliq", "Noto Nastaliq Urdu", "KC Naskh", system-ui, sans-serif; font-size: 17px; line-height: 2.15; }
html:lang(ur) h1, html:lang(ur) h2, html:lang(ur) h3, html:lang(ur) h4, html:lang(ur) legend { line-height: 1.9; }
html:lang(ar) h1, html:lang(ar) h2, html:lang(ar) h3 { line-height: 1.5; }
html:lang(ur) .chip, html:lang(ur) .btn, html:lang(ur) .tag, html:lang(ur) .mode-badge { line-height: 1.9; }
html:lang(ur) .btn { padding-block: 4px; }
html:lang(ar) .chip, html:lang(ar) .btn { line-height: 1.5; }
/* Arabic script must never be letter-spaced or case-transformed (it breaks letter joining) */
[dir="rtl"] *, [dir="rtl"] *::before, [dir="rtl"] *::after { letter-spacing: 0 !important; text-transform: none !important; }
[dir="rtl"] .fr-list a::after { content: " \2196"; }
/* Latin-only fragments (brand, e-mail, status codes) keep LTR order inside RTL text */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
/* language switcher: first screen + About screen */
.lang-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-block: 2px 14px; }
.lang-switch-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.lang-switch-about { justify-content: flex-start; margin-block: 8px 0; }
.lang-opts { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.18); }
.lang-btn { min-block-size: 40px; min-inline-size: 64px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer; font: 700 15px/1 inherit; font-family: inherit; color: var(--text); background: transparent; }
.lang-btn[lang="ar"] { font-family: "KC Naskh", "Noto Naskh Arabic", sans-serif; font-size: 17px; }
.lang-btn[lang="ur"] { font-family: "KC Nastaliq", "Noto Nastaliq Urdu", "KC Naskh", sans-serif; font-size: 16px; line-height: 1.6; }
.lang-btn:hover { background: rgba(255,255,255,.08); }
.lang-btn[aria-pressed="true"] { color: #071a24; background: linear-gradient(90deg, var(--aqua), #8fb7ff 60%, var(--violet)); }
/* translation-review notice (shown only for locales whose translation is not yet reviewed) */
.i18n-notice { max-inline-size: 760px; margin: 0 auto 6px; padding: 8px 14px; font-size: 13.5px; color: #fff1dc; background: var(--warn-bg);
  border: 1px solid rgba(255,197,107,.55); border-radius: 12px; display: flex; gap: 8px; align-items: flex-start; }
.i18n-notice[hidden] { display: none; }
.i18n-notice svg { flex: 0 0 auto; color: var(--warn); margin-block-start: 3px; }
@media (max-width: 792px) { .i18n-notice { margin-inline: 16px; } }

/* ---------- links panel: button grid at the bottom of the page, above the footer ---------- */
.links-panel { padding: 8px 16px 16px; }
.lp-list { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-inline-size: 760px; }
.lp-link { --c: #0E7C86; display: flex; align-items: center; gap: 8px; min-block-size: 44px; padding: 6px 8px; box-sizing: border-box;
  border-radius: 14px; background: rgba(255,255,255,.06); color: inherit; text-decoration: none; font-weight: 700; font-size: 13px; line-height: 1.2;
  border: 1px solid rgba(255,255,255,.08); border-inline-start: 4px solid var(--c); transition: background .15s, transform .15s; }
.lp-link:hover { background: rgba(255,255,255,.11); }
.lp-link:active { transform: scale(.99); }
.lp-link:focus-visible { outline: 3px solid #8ab4ff; outline-offset: 2px; }
.lp-ic { inline-size: 28px; block-size: 28px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--c); }
.lp-ic svg { inline-size: 17px; block-size: 17px; fill: #fff; }
.lp-label { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-chev { display: none; flex: none; opacity: .6; }
.lp-chev svg { inline-size: 18px; block-size: 18px; display: block; }
html[dir="rtl"] .lp-chev svg { transform: scaleX(-1); }
.lp-wa { --c: #25D366; } .lp-yt { --c: #FF0000; } .lp-ig { --c: #E1306C; } .lp-tt { --c: #25F4EE; } .lp-x { --c: #E7E9EA; } .lp-sc { --c: #FFFC00; } .lp-all { --c: #0E7C86; }
.lp-sc .lp-ic { background: #FFFC00; } .lp-sc .lp-ic svg { fill: #fff; stroke: #000; stroke-width: 1.4; }
.lp-ig .lp-ic { background: linear-gradient(45deg,#F58529,#DD2A7B 50%,#8134AF); }
.lp-tt .lp-ic { background: #000; box-shadow: inset -2px -2px 0 #FE2C55, inset 2px 2px 0 #25F4EE; }
.lp-x .lp-ic { background: #000; border: 1px solid #444; }
@media (max-width: 359.98px) { .lp-list { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .lp-link { transition: none; } }

/* ---------- Learn & tools (Huawei 4.1 enrichment) ---------- */
.hub-grid { display: grid; gap: 12px; margin-block: 12px 18px; }
@media (min-width: 720px) { .hub-grid { grid-template-columns: 1fr 1fr; } }
.hub-card {
  display: grid; gap: 4px; text-align: start; inline-size: 100%; text-decoration: none; color: inherit;
  padding: 16px 16px 14px; border-radius: var(--radius); cursor: pointer; font: inherit;
  background: rgba(12, 18, 48, .55); border: 1px solid rgba(255,255,255,.16);
  border-inline-start: 4px solid var(--aqua);
}
.hub-card:hover { border-color: rgba(62,236,214,.55); }
.tone-topics { border-inline-start-color: #f3b3ff; }
.tone-reference { border-inline-start-color: var(--violet); }
.tone-stages { border-inline-start-color: var(--warn); }
.tone-tool { border-inline-start-color: var(--aqua); }
.tone-lessons { border-inline-start-color: #8fb7ff; }
.tone-dosing { border-inline-start-color: var(--magenta); }
.tone-check { border-inline-start-color: #ffc56b; }
.hub-kind { font-size: 12px; font-weight: 800; color: var(--aqua); }
.hub-card-title { font-weight: 800; font-size: 17px; }
.hub-card-desc { color: var(--muted); font-size: 14.5px; }
.back-row { margin: 4px 0 8px; }
.field { display: grid; gap: 6px; margin-block: 12px; font-weight: 700; }
.field input, .field select {
  min-block-size: var(--tap); border-radius: 12px; border: 1.5px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.28); color: var(--text); padding: 0 12px; font: 600 16px/1.4 inherit; font-weight: 600;
}
.field legend { font-weight: 800; padding: 0; }
.result-box { margin-block: 14px; padding: 16px 18px; border-radius: var(--radius); background: rgba(62,236,214,.1); border: 1.5px solid rgba(62,236,214,.45); }
.result-warn { background: var(--warn-bg); border-color: var(--warn); }
.result-figure { font-size: 40px; font-weight: 800; margin: 0 0 8px; line-height: 1.1; }
.clinical-en { margin-block: 8px; }
.cite { font-size: 14px; }
.g-chart { display: grid; gap: 8px; }
.g-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 8px; align-items: center; }
.g-id { font-weight: 800; }
.g-track { display: block; block-size: 10px; border-radius: 999px; background: rgba(255,255,255,.12); }
.g-fill { display: block; block-size: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--aqua), var(--violet)); }
.g-range { color: var(--muted); font-size: 13px; }
.heat-wrap { overflow-x: auto; margin-block: 8px 16px; }
table.heat { border-collapse: collapse; inline-size: 100%; min-inline-size: 280px; font-size: 13px; }
table.heat th, table.heat td { border: 1px solid rgba(255,255,255,.16); padding: 8px; text-align: center; }
table.heat td { font-weight: 800; }
.risk-low { background: rgba(62,236,214,.28); }
.risk-moderate { background: rgba(255,197,107,.32); color: #2a1a00; }
.risk-high { background: rgba(232,90,220,.38); }
.risk-very-high { background: rgba(255,80,110,.5); }
.az { display: flex; gap: 6px; overflow-x: auto; padding-block: 4px 8px; }
.az-btn { min-block-size: 40px; min-inline-size: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: var(--text); font: 700 14px/1 inherit; cursor: pointer; }
.az-btn[aria-pressed="true"] { color: #071a24; background: var(--aqua); border-color: var(--aqua); }
.lesson-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.lesson-link { display: grid; gap: 2px; text-decoration: none; color: inherit; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.step-label { font-weight: 800; margin: 0; }
.dots { display: flex; gap: 8px; margin: 8px 0 12px; flex-wrap: wrap; }
.dot { inline-size: 14px; block-size: 14px; border-radius: 50%; background: rgba(255,255,255,.28); }
.dot.on { background: var(--aqua); }
table.dose { inline-size: 100%; border-collapse: collapse; }
table.dose th, table.dose td { text-align: start; vertical-align: top; padding: 8px 8px 8px 0; border-block-end: 1px solid rgba(255,255,255,.12); }
table.dose th { inline-size: 28%; color: var(--aqua); font-size: 13px; }
.dose-card h2 { margin-block-end: 0; }
.prep-sheet h2 { font-size: 18px; }
@media (max-width: 560px) {
  table.dose, table.dose tbody, table.dose tr, table.dose th, table.dose td { display: block; inline-size: 100%; }
  table.dose th { padding-block-end: 0; }
}
@media print {
  body, html { background: #fff !important; color: #000 !important; }
  .topbar, .links-panel, .footer, .i18n-notice, .no-print, .skip-link, .back-row { display: none !important; }
  main { max-inline-size: none; padding: 0; }
  .prep-sheet, .prep-sheet * { color: #000 !important; background: transparent !important; }
}
@media (min-width: 900px) {
  .lp-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-link { gap: 12px; min-block-size: 56px; padding: 8px 10px; border-radius: 16px; border-inline-start-width: 5px; font-size: 15px; }
  .lp-ic { inline-size: 36px; block-size: 36px; border-radius: 11px; }
  .lp-ic svg { inline-size: 20px; block-size: 20px; }
  .lp-chev { display: block; }
}

/* 24 Oct 2026: top-bar language selector, audience chooser dialog, audience line */
.top-lang-select { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 4px 8px; font: inherit; font-size: 13px; max-width: 100px; }
.top-lang-select option { color: #000; }
button.mode-badge { background: transparent; cursor: pointer; font-family: inherit; }
.aud-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.aud-card { background: linear-gradient(160deg, var(--indigo), var(--navy-2)); color: var(--text); border: 1px solid var(--card-b); border-radius: 18px; padding: 20px; max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.aud-card h2 { margin-block: 0 8px; }
.aud-card .mode-card[aria-pressed="true"] { outline: 2px solid currentColor; }
.aud-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-small { padding: 4px 12px; font-size: 13px; min-height: 0; }
.other-track summary { cursor: pointer; font-weight: 700; }
button.mode-badge { white-space: nowrap; }

/* 24 Oct 2026: Books library column */
.books-col { max-inline-size: 760px; margin: 0 auto 16px; padding-inline: 16px; }
.books-details { background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); padding: 10px 14px; }
.books-details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; min-block-size: var(--tap); }
.books-details > summary::-webkit-details-marker { display: none; }
.books-details > summary::after { content: "▾"; margin-inline-start: auto; color: var(--muted); }
.books-details[open] > summary::after { content: "▴"; }
.books-h { margin: 0; font-size: 18px; }
.books-icons { display: inline-flex; gap: 6px; margin-inline-start: 10px; vertical-align: middle; }
.book-icon { inline-size: 24px; block-size: 32px; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.books-lead { margin-block: 0 10px; font-size: 13px; }
.book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.book-card { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 14px; border: 1px solid var(--card-b); color: inherit; text-decoration: none; background: rgba(255,255,255,.04); }
a.book-card:hover, a.book-card:focus-visible { border-color: var(--aqua); }
.book-card.is-soon { opacity: .75; cursor: default; }
.book-cover { inline-size: 72px; block-size: 100px; object-fit: cover; border-radius: 6px; flex: none; }
.book-text { display: flex; flex-direction: column; gap: 3px; min-inline-size: 0; }
.book-title { font-weight: 700; }
.book-meta, .book-desc { font-size: 13px; color: var(--muted); }
.book-soon { align-self: flex-start; margin-block-start: 4px; font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--warn); color: var(--warn); }
.book-view { display: flex; flex-wrap: wrap; gap: 18px; }
.book-cover-lg { inline-size: 180px; block-size: auto; border-radius: 10px; }
.about-attribution .footer-brand { font-weight: 700; }
@media (min-width: 1024px) {
  body { padding-inline-end: 316px; }
  .books-col { position: fixed; inset-block-start: 72px; inset-inline-end: 16px; inline-size: 284px; max-block-size: calc(100vh - 88px); overflow: auto; margin: 0; padding: 0; z-index: 5; }
  .books-details > summary { cursor: default; pointer-events: none; }
  .books-details > summary::after, .books-details[open] > summary::after { content: none; }
}
@media print { .books-col { display: none !important; } }

/* 24 Oct 2026: Illustrated Nephrology - live book card actions + chapter gallery + lightbox */
.btn-sm { min-block-size: 36px; padding: 0 14px; font-size: 13.5px; }
.book-card.is-live { border-color: var(--aqua); }
.book-card a.book-title { color: inherit; text-decoration: none; }
.book-card a.book-title:hover, .book-card a.book-title:focus-visible { text-decoration: underline; }
.book-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.gallery-sec { font-size: 16px; margin: 22px 0 10px; }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.gallery-item { display: flex; flex-direction: column; gap: 6px; }
.gallery-thumb { padding: 0; border: 1px solid var(--card-b); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; display: block; aspect-ratio: 3 / 4; }
.gallery-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: top; display: block; }
.gallery-thumb:focus-visible, .gallery-thumb:hover { outline: 2px solid var(--aqua); outline-offset: 2px; }
.gallery-cap { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.gallery-ch { color: var(--muted); font-size: 12px; }
.gallery-title { font-weight: 600; line-height: 1.3; text-align: start; }
.gallery-page { font-size: 12.5px; color: var(--aqua); }
.lightbox { padding: 0; border: 0; border-radius: 12px; inline-size: min(1100px, 96vw); max-block-size: 94vh; background: var(--navy); color: var(--text); }
.lightbox::backdrop { background: rgba(0,0,0,.75); }
.lb-bar { position: sticky; top: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; background: inherit; border-block-end: 1px solid var(--card-b); }
.lb-title { flex: 1 1 200px; font-weight: 700; font-size: 14px; }
.lb-body { overflow: auto; max-block-size: calc(94vh - 60px); background: #fff; }
.lb-img { display: block; inline-size: 100%; block-size: auto; }

/* 24 Oct 2026: Illustrated Nephrology Question Bank page */
.qb-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.qb-list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.qb-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--card-b); background: var(--card); }
.qb-row:not(.is-soon) { border-color: var(--aqua); }
.qb-row.is-soon { opacity: .72; }
.qb-text { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; flex: 1 1 260px; }
.qb-label { font-size: 12px; color: var(--muted); text-align: start; }
.qb-title { font-weight: 700; text-align: start; }
.qb-meta { font-size: 13px; color: var(--aqua); }
.qb-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Contact screen */
.contact-lead { font-size: 1.05rem; }
.contact-card .row { gap: .5rem; flex-wrap: wrap; }
.contact-emergency { border-inline-start: 4px solid #c62828; background: #fdecea; color: #7f1d1d; padding: .75rem 1rem; border-radius: 10px; }
.contact-link { display: inline-flex; align-items: center; justify-content: center; color: inherit; }
