/* Global Primary Care (global/): the section's own stylesheet.
   Scoped: every rule after the token block starts with a .gp- class, so nothing leaks into the host site.
   The token block repeats the host design tokens (same names and values as assets/site.css), so global/
   still looks right if it is moved to its own domain without the host stylesheet.
   Pages are generated by global/build/build-global.mjs; do not hand-edit the generated HTML. */
:root{
  --bg:#f6f2e9; --bg-soft:#efe9dc; --surface:#ffffff; --surface-2:#fbf8f1;
  --ink:#15202b; --ink-2:#2a3744; --muted:#5d6673; --line:#e7e0d1; --line-2:#d8cfba;
  --teal:#0c4a47; --teal-2:#0e5c58; --teal-3:#136a65; --teal-soft:#d5e6e4;
  --rust:#b54c2b; --rust-2:#9b3e22; --rust-soft:#f7e3da; --mustard:#b8862d; --mustard-soft:#f6e9c8;
  --r:#b91c1c; --r-bg:#fef2f2; --r-bd:#fecaca; --a:#b45309; --a-bg:#fffbeb; --a-bd:#fde68a;
  --g:#15803d; --g-bg:#f0fdf4; --g-bd:#bbf7d0; --b:#1d4ed8; --b-bg:#eff6ff; --b-bd:#bfdbfe;
  --shadow-2:0 4px 14px rgba(20,30,40,.07), 0 1px 3px rgba(20,30,40,.04);
}

.gp-page{ max-width:1100px; margin:0 auto; padding:26px 4px 72px; }
@media (max-width:760px){ .gp-page{ padding:16px 0 56px; } }

.gp-crumb{ font-size:12.5px; color:var(--muted); margin:0 0 14px; display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.gp-crumb a{ color:var(--teal); text-decoration:none; font-weight:600; }
.gp-crumb a:hover{ text-decoration:underline; }
.gp-crumb span[aria-hidden]{ color:var(--line-2); }

/* ---------- page head ---------- */
.gp-head{ padding:0 0 16px; border-bottom:1px solid var(--line); margin-bottom:20px; }
.gp-eyebrow{ font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--rust); font-weight:700; }
.gp-head h1{ font-family:'Source Serif 4',Georgia,serif; font-weight:500; font-size:clamp(28px,4vw,40px); line-height:1.12; margin:8px 0 10px; color:var(--ink); letter-spacing:-.01em; }
.gp-head h1 em{ font-style:italic; color:var(--teal); }
.gp-lead{ font-size:15.5px; color:var(--ink-2); line-height:1.6; max-width:72ch; margin:0; }
.gp-pills{ display:flex; flex-wrap:wrap; gap:6px; margin:14px 0 0; padding:0; list-style:none; }
.gp-pills li{ font-size:12px; color:var(--ink-2); background:var(--surface); border:1px solid var(--line); border-radius:99px; padding:4px 11px; }
.gp-pills li b{ color:var(--teal); }
.gp-actions{ display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 0; }
.gp-btn{ display:inline-flex; align-items:center; gap:7px; font:inherit; font-size:13.5px; font-weight:700; padding:9px 15px; border-radius:10px; border:1px solid var(--teal); background:var(--surface); color:var(--teal); text-decoration:none; cursor:pointer; line-height:1.2; }
.gp-btn:hover{ background:var(--teal-soft); }
.gp-btn.pri{ background:var(--teal); color:#fdfaf3; }
.gp-btn.pri:hover{ background:var(--teal-2); }
.gp-btn svg{ width:15px; height:15px; flex-shrink:0; }

/* ---------- generic prose blocks (rendered from data) ---------- */
.gp-prose{ font-size:14.5px; line-height:1.6; color:var(--ink-2); }
.gp-prose p{ margin:0 0 9px; }
.gp-prose ul,.gp-prose ol{ margin-block:0 10px; margin-inline:1.2em 0; padding:0; }
.gp-prose li{ margin:0 0 5px; padding-inline-start:2px; }
.gp-prose b,.gp-prose strong{ color:var(--ink); }
.gp-prose a{ color:var(--teal); }
.gp-prose h4{ font-size:14px; font-weight:700; color:var(--ink); margin:12px 0 6px; }
.gp-prose > :last-child{ margin-bottom:0; }
.gp-table-wrap{ overflow-x:auto; margin:0 0 10px; -webkit-overflow-scrolling:touch; }
.gp-table{ width:100%; border-collapse:collapse; font-size:13.5px; background:var(--surface); }
.gp-table th,.gp-table td{ border:1px solid var(--line); padding:7px 9px; text-align:start; vertical-align:top; line-height:1.45; }
.gp-table th{ background:var(--bg-soft); font-weight:700; color:var(--ink); font-size:12.5px; }
.gp-table caption{ caption-side:bottom; text-align:start; font-size:12px; color:var(--muted); padding-top:5px; }
.gp-table td.gp-c-red{ background:var(--r-bg); }
.gp-table td.gp-c-amber{ background:var(--a-bg); }
.gp-table td.gp-c-green{ background:var(--g-bg); }
.gp-callout{ border:1px solid var(--line); border-inline-start:4px solid var(--teal); background:var(--surface-2); border-radius:8px; padding:9px 12px; margin:0 0 10px; }
.gp-callout.red{ border-inline-start-color:var(--r); background:var(--r-bg); }
.gp-callout.amber{ border-inline-start-color:var(--a); background:var(--a-bg); }
.gp-callout.green{ border-inline-start-color:var(--g); background:var(--g-bg); }
.gp-callout.blue{ border-inline-start-color:var(--b); background:var(--b-bg); }
.gp-callout-t{ display:block; font-weight:700; color:var(--ink); margin-bottom:3px; }
.gp-say{ border-inline-start:3px solid var(--mustard); background:var(--mustard-soft); padding:8px 12px; border-start-end-radius:8px; border-end-end-radius:8px; font-style:italic; margin:0 0 10px; }
.gp-say::before{ content:'Say it simply: '; font-style:normal; font-weight:700; color:var(--ink); }
.gp-dl{ display:grid; grid-template-columns:minmax(120px,30%) 1fr; gap:6px 14px; margin:0 0 10px; }
.gp-dl dt{ font-weight:700; color:var(--ink); }
.gp-dl dd{ margin:0; }
@media (max-width:560px){ .gp-dl{ grid-template-columns:1fr; } .gp-dl dd{ margin-bottom:6px; } }
.gp-src{ font-size:11.5px; color:var(--muted); margin:-4px 0 10px; }

/* ---------- protocol sections ---------- */
.gp-proto{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
@media (max-width:860px){ .gp-proto{ grid-template-columns:1fr; } }
.gp-sec{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:16px 18px 14px; min-width:0; }
.gp-sec.wide{ grid-column:1 / -1; }
.gp-sec h2{ display:flex; align-items:center; gap:10px; font-family:'Source Serif 4',Georgia,serif; font-weight:600; font-size:19px; color:var(--ink); margin:0 0 10px; }
.gp-sec h2 .gp-n{ font-family:'DM Sans',sans-serif; font-size:11px; font-weight:800; width:24px; height:24px; border-radius:50%; display:inline-grid; place-items:center; background:var(--teal-soft); color:var(--teal); flex-shrink:0; }
.gp-sec.tone-red{ border-color:var(--r-bd); border-top:4px solid var(--r); }
.gp-sec.tone-red h2 .gp-n{ background:var(--r-bg); color:var(--r); }
.gp-sec.tone-amber{ border-color:var(--a-bd); border-top:4px solid var(--a); }
.gp-sec.tone-amber h2 .gp-n{ background:var(--a-bg); color:var(--a); }
.gp-sec.tone-green{ border-top:4px solid var(--g); }
.gp-sec.tone-teal{ border-top:4px solid var(--teal); }

.gp-sources{ font-size:13px; line-height:1.55; color:var(--ink-2); margin:0; padding-inline-start:1.2em; }
.gp-sources li{ margin-bottom:5px; }
.gp-disclaimer{ margin-top:22px; padding:13px 16px; background:var(--bg-soft); border:1px solid var(--line); border-radius:10px; font-size:12.5px; color:var(--muted); line-height:1.55; }
.gp-disclaimer b{ color:var(--ink-2); }
.gp-related{ margin-top:18px; display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr)); gap:10px; }

/* ---------- cards (hub and section indexes) ---------- */
.gp-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr)); gap:12px; }
.gp-card{ display:flex; flex-direction:column; gap:5px; padding:15px 16px; background:var(--surface); border:1px solid var(--line); border-radius:12px; text-decoration:none; color:inherit; transition:.15s ease; min-width:0; }
a.gp-card:hover{ border-color:var(--teal); box-shadow:var(--shadow-2); transform:translateY(-1px); }
.gp-card-k{ font-size:10.5px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--rust); }
.gp-card b{ font-size:15.5px; color:var(--ink); line-height:1.3; }
.gp-card small{ font-size:12.8px; color:var(--muted); line-height:1.45; }
.gp-card .gp-go{ margin-top:auto; padding-top:6px; font-size:12.5px; font-weight:700; color:var(--teal); }
.gp-card.is-planned{ background:var(--surface-2); border-style:dashed; }
.gp-card.is-planned .gp-card-k{ color:var(--muted); }
.gp-hub-sec{ margin:30px 0 0; }
.gp-hub-sec-head{ display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px 16px; border-bottom:1px solid var(--line); padding-bottom:8px; margin-bottom:14px; }
.gp-hub-sec-head h2{ font-family:'Source Serif 4',Georgia,serif; font-weight:500; font-size:clamp(21px,2.6vw,26px); color:var(--ink); margin:0; }
.gp-hub-sec-head p{ margin:4px 0 0; font-size:13.5px; color:var(--muted); max-width:70ch; }
.gp-hub-sec-head a{ font-size:13px; font-weight:700; color:var(--teal); text-decoration:none; white-space:nowrap; }
.gp-planned{ margin:12px 0 0; font-size:12.8px; color:var(--muted); line-height:1.6; }
.gp-planned b{ color:var(--ink-2); }

.gp-hero{ background:linear-gradient(135deg,var(--bg-soft) 0%,var(--bg) 100%); border:1px solid var(--line); border-radius:20px; padding:30px 28px; margin:6px 0 4px; }
@media (max-width:620px){ .gp-hero{ padding:22px 16px; border-radius:16px; } }
.gp-hero h1{ font-family:'Source Serif 4',Georgia,serif; font-weight:500; font-size:clamp(30px,4.6vw,46px); line-height:1.08; color:var(--ink); margin:10px 0 12px; letter-spacing:-.02em; }
.gp-hero h1 em{ font-style:italic; color:var(--teal); }
.gp-hero p{ font-size:16px; line-height:1.6; color:var(--ink-2); max-width:68ch; margin:0 0 10px; }
.gp-who{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,210px),1fr)); gap:10px; margin:18px 0 0; padding:0; list-style:none; }
.gp-who li{ background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:11px 13px; font-size:13px; color:var(--ink-2); line-height:1.45; }
.gp-who li b{ display:block; color:var(--ink); font-size:14px; margin-bottom:2px; }
.gp-note{ margin:28px 0 0; padding:16px 18px; border:1px solid var(--line); border-inline-start:4px solid var(--mustard); background:var(--surface); border-radius:12px; font-size:14px; line-height:1.6; color:var(--ink-2); }
.gp-note h2{ font-family:'Source Serif 4',Georgia,serif; font-size:19px; font-weight:600; color:var(--ink); margin:0 0 6px; }
.gp-note p{ margin:0 0 8px; }
.gp-note p:last-child{ margin:0; }
.gp-note a{ color:var(--teal); font-weight:600; }

/* ---------- course ---------- */
.gp-course-meta{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr)); gap:10px; margin:0 0 18px; }
.gp-course-meta div{ background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:10px 13px; font-size:12.5px; color:var(--muted); }
.gp-course-meta div b{ display:block; font-size:16px; color:var(--ink); }
.gp-toc{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:14px 18px; margin:0 0 20px; }
.gp-toc h2{ font-size:13px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin:0 0 8px; }
.gp-toc ol{ margin:0; padding-inline-start:1.3em; font-size:14.5px; line-height:1.7; }
.gp-toc a{ color:var(--teal); text-decoration:none; font-weight:600; }
.gp-toc a:hover{ text-decoration:underline; }
.gp-lesson{ background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:20px 22px; margin:0 0 18px; scroll-margin-top:130px; }
@media (max-width:620px){ .gp-lesson{ padding:16px 14px; } }
.gp-lesson > h2{ font-family:'Source Serif 4',Georgia,serif; font-weight:600; font-size:clamp(20px,2.6vw,25px); color:var(--ink); margin:2px 0 12px; }
.gp-lesson-k{ font-size:11px; letter-spacing:.12em; text-transform:uppercase; font-weight:800; color:var(--rust); }
.gp-obj{ background:var(--teal-soft); border-radius:10px; padding:10px 14px; margin:0 0 14px; font-size:14px; color:var(--ink-2); }
.gp-obj b{ display:block; color:var(--teal); font-size:12px; letter-spacing:.08em; text-transform:uppercase; margin-bottom:3px; }
.gp-obj ul{ margin:0; margin-inline-start:1.1em; padding:0; }
.gp-case{ border:1px solid var(--a-bd); background:var(--a-bg); border-radius:12px; padding:13px 15px; margin:14px 0; }
.gp-case > b{ display:block; color:var(--a); font-size:12px; letter-spacing:.08em; text-transform:uppercase; margin-bottom:4px; }
.gp-case details{ margin-top:8px; background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:8px 11px; }
.gp-case summary{ cursor:pointer; font-weight:700; color:var(--teal); }
.gp-case details[open] summary{ margin-bottom:6px; }
.gp-keys{ border-top:1px solid var(--line); margin-top:14px; padding-top:12px; }
.gp-keys b{ font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--g); }
.gp-keys ul{ margin:6px 0 0; margin-inline-start:1.1em; padding:0; font-size:14px; line-height:1.55; }

/* quiz (assets/global-course.js) */
.gp-quiz fieldset{ border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin:0 0 12px; background:var(--surface); min-width:0; }
.gp-quiz legend{ font-weight:700; padding:0 4px; line-height:1.45; color:var(--ink); }
.gp-quiz label{ display:flex; gap:8px; align-items:flex-start; padding:5px 0; line-height:1.45; cursor:pointer; font-size:14.5px; }
.gp-quiz label input{ margin-top:4px; flex-shrink:0; }
.gp-exp{ margin:8px 0 0; padding:8px 10px; border-radius:8px; font-size:14px; line-height:1.5; }
.gp-exp.ok{ background:var(--g-bg); }
.gp-exp.no{ background:var(--r-bg); }
.gp-result{ margin:14px 0 0; font-size:15px; line-height:1.55; }
.gp-result .ok{ color:var(--g); font-weight:700; }
.gp-result .no{ color:var(--r); font-weight:700; }
.gp-result .gp-btn{ margin:8px 8px 0 0; }
.gp-certs{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.gp-certs li{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:10px 13px; font-size:14px; }
.gp-certs li span{ flex:1 1 220px; min-width:0; }

/* ---------- trainer pack ---------- */
.gp-plan td:first-child{ white-space:nowrap; font-weight:700; color:var(--teal); }
.gp-answer{ margin-top:6px; padding:8px 11px; border-radius:8px; background:var(--g-bg); border:1px solid var(--g-bd); font-size:14px; }
.gp-answer b{ color:var(--g); }
.gp-qlist{ margin:0; padding-inline-start:1.3em; font-size:14.5px; line-height:1.55; }
.gp-qlist > li{ margin-bottom:10px; }
.gp-qlist ol{ list-style:upper-alpha; margin:4px 0 0; margin-inline-start:1.2em; padding:0; }
.gp-key{ font-size:14px; line-height:1.6; }

/* ---------- language switch (English | العربية), shown only when the other version exists ---------- */
.gp-lang{ display:flex; justify-content:flex-end; align-items:center; gap:8px; margin:0 0 8px; font-size:13px; }
.gp-lang a,.gp-lang-on{ font-weight:700; padding:3px 9px; border-radius:999px; text-decoration:none; }
.gp-lang a{ color:var(--teal); border:1px solid var(--line-2); background:var(--surface); }
.gp-lang a:hover{ border-color:var(--teal); }
.gp-lang-on{ color:var(--ink-2); background:var(--bg-soft); }
.gp-lang-sep{ color:var(--line-2); }
.gp-lang :lang(ar){ font-family:'Noto Sans Arabic','Noto Naskh Arabic',Tahoma,Arial,sans-serif; }

/* ---------- diagnostic reasoning cases (assets/global-case.js adds the step-by-step reveal) ---------- */
.gp-tests{ font-size:13.5px; background:var(--surface-2); border:1px dashed var(--line-2); border-radius:8px; padding:7px 10px; }
.gp-steps-hint{ font-size:13.5px; color:var(--muted); margin:-4px 0 12px; }
.gp-steps{ list-style:none; margin:0; padding:0; display:grid; gap:12px; }
.gp-step{ border:1px solid var(--line); border-radius:12px; padding:12px 14px; background:var(--surface-2); scroll-margin-top:130px; }
.gp-step-k{ display:block; font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; color:var(--rust); }
.gp-step h3{ font-size:16px; line-height:1.4; color:var(--ink); margin:4px 0 8px; }
.gp-ans{ background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:8px 11px; }
.gp-ans > summary{ cursor:pointer; font-weight:700; color:var(--teal); }
.gp-ans[open] > summary{ margin-bottom:6px; }
.gp-ddx{ margin-top:10px; border-top:1px dashed var(--line-2); padding-top:8px; }
.gp-ddx-t{ display:block; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:5px; }
.gp-ddx ul{ list-style:none; margin:0; padding:0; display:grid; gap:4px; }
.gp-ddx li{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:2px 10px; font-size:13.5px; padding:4px 8px; border-radius:6px; border:1px solid var(--line); background:var(--surface); }
.gp-ddx-n{ min-width:0; }
.gp-ddx-s{ font-size:12px; font-weight:700; color:var(--muted); }
.gp-ddx-lead{ border-color:var(--teal) !important; background:var(--teal-soft) !important; }
.gp-ddx-lead .gp-ddx-s{ color:var(--teal); }
.gp-ddx-less{ opacity:.8; }
.gp-ddx-out{ opacity:.6; }
.gp-ddx-out .gp-ddx-n{ text-decoration:line-through; text-decoration-color:var(--line-2); }
.gp-ddx li.is-up .gp-ddx-s small{ color:var(--g); }
.gp-ddx li.is-down .gp-ddx-s small{ color:var(--a); }
.gp-mnm-tag{ font-size:10.5px; font-weight:800; color:var(--r); background:var(--r-bg); border:1px solid var(--r-bd); border-radius:999px; padding:0 6px; white-space:nowrap; }
.gp-decide{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:10px; }
@media (max-width:760px){ .gp-decide{ grid-template-columns:1fr; } }
.gp-decide-c{ border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:var(--surface); font-size:13.5px; line-height:1.5; min-width:0; }
.gp-decide-c > b{ display:block; font-size:14px; color:var(--ink); margin-bottom:4px; }
.gp-decide-c ul{ margin:0; margin-inline-start:1.1em; padding:0; }
.gp-decide-treat{ border-top:4px solid var(--g); }
.gp-decide-observe{ border-top:4px solid var(--a); }
.gp-decide-refer{ border-top:4px solid var(--r); }
.gp-decide-c.is-this{ box-shadow:0 0 0 2px var(--teal); }
.gp-decide-this{ display:inline-block; font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#fdfaf3; background:var(--teal); border-radius:999px; padding:1px 8px; margin-bottom:6px; }
.gp-reveal-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0 0 12px; font-size:13px; color:var(--muted); }
.gp-step-next{ margin-top:10px; }
.gp-page [hidden]{ display:none !important; }   /* the hidden attribute wins over .gp-btn and other display rules */
.gp-spoil-note{ font-size:13.5px; color:var(--muted); border:1px dashed var(--line-2); border-radius:10px; padding:10px 12px; }

/* ---------- right-to-left languages (Arabic): fonts and small adjustments; layout uses logical properties ---------- */
html[lang="ar"] body, html[lang="ar"] .gp-page, html[lang="ar"] .gp-foot{ font-family:'Noto Sans Arabic','Noto Naskh Arabic',Tahoma,Arial,sans-serif; }
html[lang="ar"] .gp-page h1, html[lang="ar"] .gp-page h2, html[lang="ar"] .gp-page h3, html[lang="ar"] .gp-sec h2 .gp-n{ font-family:'Noto Sans Arabic','Noto Naskh Arabic',Tahoma,Arial,sans-serif; letter-spacing:0; }
html[lang="ar"] .gp-page *, html[lang="ar"] .gp-foot *{ letter-spacing:0 !important; }
html[lang="ar"] .gp-prose, html[lang="ar"] .gp-hero p, html[lang="ar"] .gp-lead{ line-height:1.8; }
html[lang="ar"] .gp-head h1 em, html[lang="ar"] .gp-hero h1 em, html[lang="ar"] .gp-say{ font-style:normal; }
html[lang="ar"] .gp-say::before{ content:'قلها ببساطة: '; }
html[dir="rtl"] .gp-ic-arrow{ transform:scaleX(-1); }
/* host header pieces drawn by CSS (assets/site.css) on narrow screens; text set by platform.js on Arabic pages */
html[lang="ar"] .rgp-search::after{ content:"بحث"; }
html[lang="ar"] .rgp-cookie, html[lang="ar"] .rgp-nav, html[lang="ar"] .rgp-iface-bar{ font-family:'Noto Sans Arabic','Noto Naskh Arabic',Tahoma,Arial,sans-serif; }
html[dir="rtl"] .gp-plan td:first-child{ unicode-bidi:plaintext; }

@media print{
  .gp-actions,.gp-crumb,.gp-toc,.gp-quiz-wrap,.gp-lang,.gp-reveal-bar,.gp-step-next,.gp-spoil-note{ display:none !important; }
  .gp-step[hidden],.gp-spoil[hidden]{ display:block !important; }
  .gp-sec,.gp-lesson,.gp-card{ break-inside:avoid; box-shadow:none; }
  .gp-case details{ display:block; }
  .gp-case details > *,.gp-ans > *{ display:block; }
}

/* Case steps: let wide tables scroll inside their own box on phones (31 Oct 2026). */
.gp-step,.gp-step > *,.gp-ans,.gp-ans .gp-prose{min-width:0;max-width:100%}
