/* KIMSHEALTH Expressions
   Colours from the Aster DM Healthcare brand guidelines:
   primary blue  Pantone 7687 C  RGB 22 77 146   #164D92
   green         Pantone 339 C   RGB 0 180 141   #00B48D
   grey          Pantone 425 C   RGB 88 89 91    #58595B
   Brand typeface: Titillium (Titillium Web on screen). */
:root {
  --aster-blue: #164d92;
  --aster-blue-dark: #0f3a70;
  --aster-green: #00b48d;
  --aster-green-dark: #008a6c;
  --aster-grey: #58595b;
  --ink: #1d2433;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --line: #dde4ee;
  --tint-blue: #e8eff8;
  --tint-green: #e3f6f1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 37, 70, 0.06), 0 6px 18px rgba(16, 37, 70, 0.07);
  --shadow-hover: 0 2px 4px rgba(16, 37, 70, 0.08), 0 12px 28px rgba(16, 37, 70, 0.12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Titillium Web", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--aster-blue); text-decoration: none; }
a:hover { color: var(--aster-green-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; color: var(--aster-blue-dark); }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 0.75rem; }
code { background: var(--tint-blue); padding: 0.1em 0.35em; border-radius: 4px; }

.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(900px, 100% - 2.5rem); }
.section { margin-block: 2.5rem; }
.center { text-align: center; }
.muted { color: var(--aster-grey); }
.small { font-size: 0.9rem; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 4px solid var(--aster-green);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 8px rgba(16, 37, 70, 0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.6rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; align-items: center; }
.nav-search input { font: inherit; font-size: 0.95rem; width: 190px; padding: 0.42rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); }
.nav-search input:focus { outline: 2px solid var(--aster-green); outline-offset: 1px; background: #fff; }
.nav a { padding: 0.45rem 0.85rem; border-radius: 999px; font-weight: 600; color: var(--aster-grey); }
.nav a:hover { background: var(--tint-blue); color: var(--aster-blue); }
.nav a.active { background: var(--aster-blue); color: #fff; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pad { padding: clamp(1.25rem, 3vw, 2rem); }
.card-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.section-head h2 { position: relative; padding-left: 0.9rem; margin: 0; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 0.15em; bottom: 0.15em; width: 5px; border-radius: 3px; background: var(--aster-green); }
.section-label { margin: 1.75rem 0 0.75rem; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--aster-green-dark); }
.section-label:first-of-type { margin-top: 0.5rem; }
.page-title { margin-bottom: 1.5rem; }
.year { margin: 2rem 0 1rem; color: var(--aster-grey); }

.eyebrow { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--aster-green-dark); margin-bottom: 0.35rem; }
.badge { display: inline-block; background: var(--aster-green); color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.75rem; }
.tag { display: inline-block; align-self: flex-start; background: var(--tint-blue); color: var(--aster-blue); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.55rem; border-radius: 6px; margin-bottom: 0.55rem; }
.lede { font-size: 1.12rem; color: #3b4352; }
.link { font-weight: 600; }
.link::after { content: " →"; }
.small-head { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--aster-grey); margin: 1rem 0 0.4rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.25rem; }
.center-actions { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--aster-blue); color: #fff; font-weight: 600;
  padding: 0.7rem 1.3rem; border-radius: 10px; border: 2px solid var(--aster-blue);
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--aster-blue-dark); border-color: var(--aster-blue-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--aster-blue); }
.btn-ghost:hover { background: var(--tint-blue); color: var(--aster-blue); border-color: var(--aster-blue); }
.btn-small { padding: 0.4rem 0.85rem; font-size: 0.92rem; border-radius: 8px; }

/* Article cards */
.article-card { display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.article-card:hover, .issue-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.article-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint-blue); border-bottom: 1px solid var(--line); }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.article-card:hover .article-thumb img { transform: scale(1.04); }
.thumb-placeholder { display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 1rem; background: linear-gradient(135deg, var(--aster-blue) 0%, #0b5c7a 70%, var(--aster-green) 140%); }
.thumb-placeholder span { color: #fff; font-weight: 700; font-size: 1.3rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.9; }
.card-standfirst { font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.82rem; font-weight: 600; color: var(--aster-grey); }
.article-card h3 a { color: var(--aster-blue-dark); }
.article-card h3 a:hover { color: var(--aster-green-dark); }

/* Issue cards */
.issue-card { display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.issue-card-cover { display: block; aspect-ratio: 991 / 1323; background: var(--tint-blue); }
.issue-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-actions { margin-top: auto; padding-top: 0.75rem; display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }

/* Issue page */
.crumbs { font-size: 0.9rem; color: var(--aster-grey); margin-bottom: 1rem; }
.issue-head { display: grid; grid-template-columns: 200px 1fr; gap: 1.75rem; align-items: center; }
.issue-head-cover { border-radius: 8px; box-shadow: var(--shadow); }
.section-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.section-chips a { background: var(--tint-blue); color: var(--aster-blue); font-size: 0.85rem; font-weight: 600; padding: 0.25rem 0.7rem; border-radius: 999px; }
.section-chips a:hover { background: var(--aster-blue); color: #fff; }

/* About */
.about-strip { display: grid; grid-template-columns: minmax(220px, 420px) 1fr; border-top: 5px solid var(--aster-green); }
.about-strip img { width: 100%; height: 100%; object-fit: cover; object-position: center 80%; }
.prose p { font-size: 1.05rem; }

/* Footer */
.site-footer { background: var(--aster-blue-dark); color: #d7e2f1; margin-top: 3rem; padding-top: 2rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #7fe3cb; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 1.5rem; }
.footer-title { font-weight: 700; color: #fff; font-size: 1.1rem; }
.footer-label { display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.6rem; }
.footer-inner { align-items: center; }
.footer-logos { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; background: #fff; border-radius: 10px; padding: 0.7rem 1.1rem; }
.footer-logos img { height: 40px; width: auto; flex: 0 0 auto; }
@media (max-width: 760px) { .footer-logos { justify-content: center; } .footer-logos img { height: 32px; } }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-block: 1rem; font-size: 0.85rem; }

/* Hero: the latest issue's cover story */
.hero { background: linear-gradient(135deg, var(--aster-blue) 0%, var(--aster-blue-dark) 60%, #0b4f5c 100%); padding-block: 2.5rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.lead-story .lead-image { display: block; aspect-ratio: 16 / 8; overflow: hidden; }
.lead-story .lead-image img { width: 100%; height: 100%; object-fit: cover; }
.lead-story h1 a { color: var(--aster-blue-dark); }
.lead-story h1 a:hover { color: var(--aster-green-dark); }
.issue-panel-cover { display: block; }
.issue-panel-cover img { width: 100%; height: auto; }
.issue-panel-title { font-size: 1.4rem; font-weight: 700; color: var(--aster-blue-dark); margin: 0; }
.cover-lines { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.4rem; }
.cover-lines li { border-left: 4px solid var(--aster-green); background: var(--tint-green); padding: 0.4rem 0.7rem; border-radius: 6px; font-weight: 600; font-size: 0.95rem; }
.cover-lines a { color: var(--ink); }
.cover-lines a:hover { color: var(--aster-blue); }

/* Article page */
.article-page { padding-top: 1.5rem; }
.article-header { margin-bottom: 1.5rem; }
.article-header h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.article-hero { margin: 0; background: #0f1d33; }
.article-hero img { width: auto; max-width: 100%; max-height: 560px; margin-inline: auto; }
.article-hero figcaption { background: var(--surface); color: var(--aster-grey); font-size: 0.85rem; font-style: italic; padding: 0.6rem clamp(1.25rem, 3vw, 2rem) 0; }
.byline { display: flex; flex-wrap: wrap; gap: 0.35rem 1.2rem; font-size: 0.92rem; color: var(--aster-grey); margin: 0.5rem 0 0; }
.byline-name { font-weight: 700; color: var(--aster-blue); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
.article-aside { display: grid; gap: 1rem; align-content: start; }
.issue-mini { display: grid; grid-template-columns: 70px 1fr; gap: 0.9rem; align-items: center; }
.issue-mini img { border-radius: 4px; box-shadow: var(--shadow); }
.issue-mini p { margin: 0; }
.toc-mini ol { list-style: none; padding: 0; margin: 0; font-size: 0.92rem; }
.toc-mini li a { display: flex; gap: 0.6rem; padding: 0.3rem 0.4rem; border-radius: 6px; color: var(--ink); line-height: 1.3; }
.toc-mini li a:hover { background: var(--tint-blue); }
.toc-mini li.current a { background: var(--aster-blue); color: #fff; }
.toc-page { flex: 0 0 0.9rem; font-weight: 700; color: var(--aster-green-dark); }
.toc-mini li.current .toc-page { color: #bfeee2; }

.prose { font-family: "Source Serif 4", Georgia, serif; font-size: 1.12rem; line-height: 1.75; color: #232a36; }
.prose h2, .prose h3 { font-family: "Titillium Web", "Segoe UI", sans-serif; margin: 2rem 0 0.6rem; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.2rem; color: var(--aster-blue); }
.prose > :first-child { margin-top: 0; }
.prose > p:first-of-type::first-letter { float: left; font-family: "Titillium Web", sans-serif; font-size: 3.6rem; line-height: 0.85; font-weight: 700; color: var(--aster-blue); padding: 0.35rem 0.5rem 0 0; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--aster-green-dark); font-weight: 700; }
.prose blockquote { margin: 1.75rem 0; padding: 1rem 1.4rem; border-left: 5px solid var(--aster-green); background: var(--tint-green); border-radius: 0 10px 10px 0; font-size: 1.25rem; font-style: italic; color: var(--aster-blue-dark); }
.prose blockquote p { margin: 0; }
.prose a { text-decoration: underline; text-decoration-color: var(--aster-green); text-underline-offset: 3px; }
.figure { margin: 1.75rem 0; }
.figure img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.figure figcaption { font-family: "Titillium Web", sans-serif; font-size: 0.88rem; color: var(--aster-grey); margin-top: 0.5rem; line-height: 1.45; }
.author-note { margin-top: 2rem; padding-top: 1rem; border-top: 3px solid var(--aster-green); font-family: "Titillium Web", sans-serif; font-size: 0.95rem; color: var(--aster-blue); font-style: italic; }

/* Blocks inside articles */
.block { margin: 1.75rem 0; }
.block-box { background: var(--tint-blue); border: 1px solid #cfdcee; border-radius: 12px; padding: 1.25rem 1.5rem; }
.block-box > :first-child { margin-top: 0; }
.block-box > :last-child { margin-bottom: 0; }
.block-box .figure { max-width: 260px; margin: 0 auto 1rem; }
.block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.block-gallery .figure { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.block-gallery .figure img { border: 0; border-radius: 0; aspect-ratio: 16 / 9.2; object-fit: cover; }
.block-gallery .figure figcaption { padding: 0.75rem 0.9rem 0.9rem; margin: 0; color: #3b4352; }
.kind-gallery.prose > p:first-of-type::first-letter, .kind-news.prose > p:first-of-type::first-letter, .kind-books.prose > p:first-of-type::first-letter { all: unset; }
.block-news { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.block-news:last-of-type { border-bottom: 0; }
.block-news h2 { margin-top: 0; }
.block-news .figure { float: right; width: min(42%, 340px); margin: 0.3rem 0 1rem 1.5rem; }
.block-news::after { content: ""; display: block; clear: both; }
.block-book { display: grid; grid-template-columns: 170px 1fr; gap: 0 1.5rem; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.block-book .figure { grid-row: span 6; margin: 0; }
.block-book .figure img { border: 0; background: #fff; }
.block-book .figure figcaption { display: none; }
.block-book h2 { margin: 0 0 0.3rem; color: var(--aster-blue-dark); }
.block-book p { margin-bottom: 0.6rem; }

.barchart { font-family: "Titillium Web", sans-serif; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; margin: 1.5rem 0; }
.barchart-title { font-weight: 700; color: var(--aster-blue-dark); margin-bottom: 1rem; }
.bar { display: grid; grid-template-columns: 200px 1fr 60px; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; font-size: 0.95rem; }
.bar-track { background: #e3e9f2; border-radius: 6px; height: 26px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--aster-blue), #2f6cb8); border-radius: 6px; }
.bar-value { font-weight: 700; color: var(--aster-blue); }
.barchart-source { font-size: 0.8rem; color: var(--aster-grey); margin: 0.8rem 0 0; }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; }
.prev-next a { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 1.25rem; color: var(--aster-blue-dark); }
.prev-next a:hover { box-shadow: var(--shadow-hover); }
.prev-next .next { text-align: right; grid-column: 2; }

/* Search */
.search-form { display: flex; gap: 0.6rem; padding: 0.6rem; margin-top: 1rem; }
.search-form input { flex: 1; font: inherit; border: 0; padding: 0.5rem 0.75rem; background: transparent; color: var(--ink); }
.search-form input:focus { outline: none; }
.results { display: grid; gap: 1rem; margin-top: 1rem; }
.result { display: grid; grid-template-columns: 160px 1fr; gap: 1.25rem; padding: 0.9rem; color: var(--ink); }
.result img, .result .thumb-placeholder { width: 160px; height: 110px; object-fit: cover; border-radius: 8px; }
.result h3 { color: var(--aster-blue-dark); }
.result:hover { box-shadow: var(--shadow-hover); }

@media (max-width: 960px) {
  .hero-grid, .article-layout { grid-template-columns: 1fr; }
  .issue-panel { display: grid; grid-template-columns: 150px 1fr; }
  .article-aside { position: static; }
  .toc-mini { display: none; }
}

@media (max-width: 760px) {
  .issue-head, .about-strip { grid-template-columns: 1fr; }
  .issue-head-cover { max-width: 180px; }
  .about-strip img { max-height: 220px; }
  .site-header { position: relative; }
  .header-inner { padding-block: 0.5rem; }
  .brand img { height: 34px; }
  .nav a { padding: 0.35rem 0.7rem; font-size: 0.95rem; }
  .nav-search { width: 100%; }
  .nav-search input { width: 100%; }
  .prose { font-size: 1.05rem; }
  .block-book { grid-template-columns: 1fr; }
  .block-book .figure { max-width: 170px; margin-bottom: 1rem; }
  .block-news .figure { float: none; width: 100%; margin: 0 0 1rem; }
  .bar { grid-template-columns: 1fr 50px; }
  .bar-label { grid-column: 1 / -1; }
  .result { grid-template-columns: 1fr; }
  .result img, .result .thumb-placeholder { width: 100%; height: 160px; }
  .prev-next { grid-template-columns: 1fr; }
  .prev-next .next { grid-column: auto; }
}

@media print {
  .site-header, .site-footer, .actions { display: none; }
  .card { box-shadow: none; }
}

/* About page */
.about-photo { margin-bottom: 1.25rem; }
.about-photo img { width: 100%; height: 360px; object-fit: cover; object-position: center 80%; }
.about-text.prose > p:first-of-type::first-letter { all: unset; }

/* ------------------------------------------------------------------
   Boxed layout: the whole site sits in one centred box on a coloured
   page, and every section inside it is its own bordered panel.
   ------------------------------------------------------------------ */
html { background: #0f3a70; }
body {
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 180, 141, 0.28), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(0, 180, 141, 0.18), transparent 40%),
    linear-gradient(160deg, #164d92 0%, #0f3a70 55%, #0b2c55 100%) fixed;
  padding: 28px 18px;
  min-height: 100vh;
}
.site-box {
  max-width: 1280px;
  margin: 0 auto;
  background: #eaf0f7;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(4, 18, 40, 0.45), 0 0 0 6px rgba(255, 255, 255, 0.06);
  overflow: clip;
}
.site-box .wrap { width: calc(100% - 2.5rem); max-width: 1220px; }
.site-header { border-radius: 0; }
.site-box main { padding-bottom: 1.5rem; }

/* Each section is a bordered panel; cards inside it are white tiles. */
.section,
.article-page {
  background: #f7f9fc;
  border: 1px solid #d3deeb;
  border-radius: 16px;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  box-shadow: 0 1px 3px rgba(16, 37, 70, 0.06);
  margin-block: 1.5rem;
}
.article-page .section { background: none; border: 0; padding: 0; box-shadow: none; margin-block: 2rem 0; }
.article-page { padding-top: 1.25rem; }

/* The hero becomes a coloured panel inside the box instead of a full-width band. */
.hero {
  width: calc(100% - 2.5rem);
  max-width: 1220px;
  margin: 1.5rem auto 0;
  border-radius: 16px;
  border: 1px solid #0f3a70;
  padding: clamp(1rem, 2.5vw, 1.75rem);
}
.hero .wrap { width: 100%; }

.site-footer { margin-top: 0; border-top: 5px solid var(--aster-green); }

@media (max-width: 760px) {
  body { padding: 0; }
  .site-box { border-radius: 0; border: 0; box-shadow: none; }
  .site-box .wrap, .hero { width: calc(100% - 1.5rem); }
}

@media print {
  body { background: #fff; padding: 0; }
  .site-box { box-shadow: none; border: 0; }
}

/* Tables and stat tiles inside articles */
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-family: "Titillium Web", sans-serif; font-size: 0.98rem; line-height: 1.45; border: 1px solid #d3deeb; border-radius: 10px; overflow: hidden; }
.prose th { background: var(--aster-blue); color: #fff; text-align: left; padding: 0.65rem 0.8rem; font-weight: 700; }
.prose td { padding: 0.6rem 0.8rem; border-top: 1px solid #d3deeb; vertical-align: top; }
.prose tr:nth-child(even) td { background: #f3f7fc; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.9rem; margin: 1.25rem 0 1.75rem; font-family: "Titillium Web", sans-serif; }
.stat { display: flex; flex-direction: column; gap: 0.15rem; background: #fff; border: 1px solid #d3deeb; border-left: 5px solid var(--aster-green); border-radius: 10px; padding: 0.8rem 1rem; line-height: 1.35; }
.stat-label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--aster-grey); }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--aster-blue-dark); }
.stat-note { font-size: 0.88rem; color: #4a5263; }
@media (max-width: 760px) { .prose table { font-size: 0.9rem; } .prose th, .prose td { padding: 0.5rem; } }

/* Live search panel under the header */
.search-pop { position: absolute; left: 0; right: 0; top: 100%; background: #eaf0f7; border-bottom: 4px solid var(--aster-green); box-shadow: 0 18px 40px rgba(4, 18, 40, 0.25); max-height: min(75vh, 720px); overflow-y: auto; z-index: 20; }
.search-pop-inner { padding-block: 1rem 1.25rem; }
.search-pop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.75rem; }
.search-pop-head .eyebrow { margin: 0; }
.search-pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.75rem; }
.search-pop .result { grid-template-columns: 110px 1fr; gap: 0.9rem; padding: 0.7rem; }
.search-pop .result img, .search-pop .result .thumb-placeholder { width: 110px; height: 80px; }
.search-pop .result .thumb-placeholder span { font-size: 0.75rem; }
.search-pop .result h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.search-pop .result .small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.result-author { font-size: 0.9rem; font-weight: 600; color: var(--aster-blue); margin: 0 0 0.25rem; }
.result mark, .search-pop mark { background: #c9f0e5; color: inherit; padding: 0 0.1em; border-radius: 3px; }
.nav-search.is-hidden { display: none; }
.search-form input { font-size: 1.1rem; padding: 0.7rem 0.9rem; }
@media (max-width: 760px) {
  .search-pop { max-height: 70vh; }
  .search-pop .result { grid-template-columns: 80px 1fr; }
  .search-pop .result img, .search-pop .result .thumb-placeholder { width: 80px; height: 64px; }
}

/* Article page: no inner boxes. The header, text and sidebar sit
   directly on the article panel instead of in white cards. */
.article-header,
.article-body,
.article-aside .card {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.article-header .pad,
.article-body.pad { padding-inline: 0; }
.article-header .pad { padding-bottom: 1.25rem; border-bottom: 1px solid #d3deeb; }
.article-hero { border-radius: 12px; overflow: hidden; }
.article-hero figcaption { background: #f7f9fc; padding-inline: 0; }
.article-body.pad { padding-top: 0.5rem; }
.article-aside .card.pad { padding: 0 0 1rem; }
.article-aside .toc-mini { border-top: 1px solid #d3deeb; padding-top: 1rem; }

/* ------------------------------------------------------------------
   Reading tools (public/js/reader.js)
   ------------------------------------------------------------------ */
:root { --reader-scale: 1; }
.article-text > p:first-of-type::first-letter { float: left; font-family: "Titillium Web", sans-serif; font-size: 3.6rem; line-height: 0.85; font-weight: 700; color: var(--aster-blue); padding: 0.35rem 0.5rem 0 0; }
.kind-gallery .article-text > p:first-of-type::first-letter, .kind-news .article-text > p:first-of-type::first-letter, .kind-books .article-text > p:first-of-type::first-letter { all: unset; }
.article-body.prose { font-size: calc(1.12rem * var(--reader-scale)); }

/* Progress bar along the top of the window */
.read-progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--aster-green), #36d1ad); transform-origin: left; transform: scaleX(0); transition: transform 0.15s linear; }

/* Tool row under the byline */
.reader-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.tool { display: inline-flex; align-items: center; gap: 0.45rem; font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--aster-blue); background: var(--surface); border: 1px solid #c9d6e7; border-radius: 999px; padding: 0.42rem 0.95rem; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.tool:hover { border-color: var(--aster-blue); background: var(--tint-blue); }
.tool svg { width: 18px; height: 18px; fill: currentColor; }
.tool-listen { background: var(--aster-blue); border-color: var(--aster-blue); color: #fff; }
.tool-listen:hover { background: var(--aster-blue-dark); border-color: var(--aster-blue-dark); }
.tool-sub { font-weight: 400; opacity: 0.85; margin-left: 0.2rem; }
.tool-ask { color: var(--aster-green-dark); border-color: #9fdccb; }
.tool-ask:hover { background: var(--tint-green); border-color: var(--aster-green-dark); }
.aa { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; }
.tool-menu { position: relative; }
.text-panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-hover); padding: 0.9rem 1rem 1rem; }
.text-panel .eyebrow { font-size: 0.72rem; margin: 0 0 0.4rem; }
.seg { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.9rem; }
.seg:last-child { margin-bottom: 0; }
.seg button { flex: 1; font: inherit; font-weight: 600; font-size: 0.92rem; padding: 0.4rem; border: 1px solid #c9d6e7; border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.seg button:hover { border-color: var(--aster-blue); }
.seg button[aria-pressed="true"] { background: var(--aster-blue); border-color: var(--aster-blue); color: #fff; }
.seg output { flex: 1; text-align: center; font-weight: 600; color: var(--aster-grey); }

/* Continue where you left off */
.resume { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 1.25rem; padding: 0.7rem 1rem; background: var(--tint-green); border-left: 4px solid var(--aster-green); border-radius: 0 10px 10px 0; font-weight: 600; color: var(--aster-blue-dark); }
.resume[hidden] { display: none; }
.resume-close { margin-left: auto; font-size: 1.4rem; line-height: 1; background: none; border: 0; color: var(--aster-grey); cursor: pointer; }

/* Key takeaways */
.takeaways { font-family: "Titillium Web", sans-serif; margin: 0 0 2rem; padding: 1.1rem 1.4rem 1.2rem; background: var(--tint-blue); border-radius: 12px; border-top: 4px solid var(--aster-blue); }
.takeaways .eyebrow { margin-bottom: 0.5rem; }
.takeaways ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.takeaways li { position: relative; padding-left: 1.7rem; margin: 0; font-size: 1.02em; line-height: 1.45; color: var(--ink); }
.takeaways li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--aster-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center / 75% no-repeat; }

/* Pull quotes */
.pullquote { margin: 2.25rem 0; padding: 0.4rem 0 0.4rem 1.6rem; border-left: 6px solid var(--aster-green); }
.pullquote blockquote { margin: 0; padding: 0; background: none; border: 0; font-family: "Titillium Web", sans-serif; font-size: 1.6em; line-height: 1.3; font-weight: 600; font-style: normal; color: var(--aster-blue-dark); }
.pullquote blockquote::before { content: "“"; color: var(--aster-green); margin-right: 0.08em; }
.pullquote blockquote::after { content: "”"; color: var(--aster-green); }
.pullquote figcaption { margin-top: 0.6rem; font-family: "Titillium Web", sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--aster-grey); }
.stat-value { font-size: 1.75rem; }

/* Paragraph being read aloud */
.is-speaking { background: linear-gradient(transparent 2%, rgba(0, 180, 141, 0.16) 2%, rgba(0, 180, 141, 0.16) 98%, transparent 98%); box-shadow: -14px 0 0 rgba(0, 180, 141, 0.16), 14px 0 0 rgba(0, 180, 141, 0.16); border-radius: 4px; transition: background 0.3s; }
.article-header h1.is-speaking { box-shadow: none; }

/* Ask a doctor */
.ask-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding: 1.1rem 1.3rem; border: 1px solid #9fdccb; background: var(--tint-green); border-radius: 12px; font-family: "Titillium Web", sans-serif; }
.ask-cta p { margin: 0; }
.ask-title { font-weight: 700; font-size: 1.1rem; color: var(--aster-blue-dark); }
.ask-dialog { width: min(560px, calc(100% - 2rem)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 80px rgba(4, 18, 40, 0.45); color: var(--ink); background: var(--surface); }
.ask-dialog::backdrop { background: rgba(8, 24, 48, 0.55); }
.ask-form { position: relative; display: grid; gap: 0.85rem; padding: 1.6rem 1.6rem 1.4rem; }
.ask-form h2 { font-size: 1.3rem; margin: 0; padding-right: 2rem; }
.ask-form .eyebrow { margin: 0; }
.ask-form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.95rem; }
.ask-form input:not([type="checkbox"]), .ask-form textarea { font: inherit; font-weight: 400; padding: 0.6rem 0.75rem; border: 1px solid #c9d6e7; border-radius: 8px; background: var(--surface); color: var(--ink); }
.ask-form input:focus, .ask-form textarea:focus { outline: 2px solid var(--aster-green); outline-offset: 1px; }
.ask-form .check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; font-size: 0.88rem; color: var(--aster-grey); }
.ask-form .check input { margin-top: 0.25rem; }
.ask-form .hp { position: absolute; left: -9999px; }
.ask-status { min-height: 1.2em; margin: 0; color: #b42318; font-size: 0.9rem; }
.ask-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.dialog-close { position: absolute; top: 0.8rem; right: 0.9rem; font-size: 1.6rem; line-height: 1; background: none; border: 0; color: var(--aster-grey); cursor: pointer; }

/* Share popover for selected text */
.share-pop { position: absolute; z-index: 70; display: flex; gap: 2px; padding: 4px; background: #0f3a70; border-radius: 10px; box-shadow: 0 10px 30px rgba(4, 18, 40, 0.35); }
.share-pop[hidden] { display: none; }
.share-pop button { font: inherit; font-size: 0.88rem; font-weight: 600; color: #fff; background: none; border: 0; border-radius: 7px; padding: 0.4rem 0.75rem; cursor: pointer; white-space: nowrap; }
.share-pop button:hover { background: rgba(255, 255, 255, 0.14); }
.share-pop button[data-share="whatsapp"] { color: #7ff0c4; }
.share-pop button[hidden] { display: none; }

/* Up next, related reading */
.up-next { display: grid; gap: 0.75rem; margin-top: 2rem; }
.next-story { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; align-items: center; padding: 1rem; border: 1px solid #d3deeb; border-radius: 14px; background: var(--surface); color: var(--ink); transition: box-shadow 0.2s, transform 0.2s; }
.next-story:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); color: var(--ink); }
.next-story img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.next-body { display: grid; gap: 0.3rem; }
.next-body .eyebrow { margin: 0; }
.next-body strong { font-size: 1.35rem; line-height: 1.25; color: var(--aster-blue-dark); }
.prev-story { justify-self: start; font-weight: 600; }
@media (max-width: 640px) { .next-story { grid-template-columns: 1fr; } }

/* Sticky audio player */
.player { position: fixed; z-index: 55; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); background: #0f3a70; color: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(4, 18, 40, 0.45); border-top: 3px solid var(--aster-green); }
.player[hidden] { display: none; }
.player-inner { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.7rem; }
.pl-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #fff; cursor: pointer; }
.pl-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pl-btn svg { width: 22px; height: 22px; fill: currentColor; }
.pl-play { width: 48px; height: 48px; background: var(--aster-green); }
.pl-play:hover { background: #00c99d; }
.pl-play .i-pause, .player.is-playing .pl-play .i-play { display: none; }
.player.is-playing .pl-play .i-pause { display: block; }
.pl-info { flex: 1; min-width: 0; display: grid; gap: 0.1rem; padding: 0 0.5rem; color: #fff; }
.pl-info:hover { color: #fff; }
.pl-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meta { display: flex; gap: 0.8rem; font-size: 0.82rem; color: #bfeee2; }
.pl-mood:empty { display: none; }
.pl-bar { height: 3px; background: rgba(255, 255, 255, 0.2); border-radius: 3px; overflow: hidden; margin-top: 0.25rem; }
.pl-bar span { display: block; height: 100%; background: var(--aster-green); transform-origin: left; transform: scaleX(0); transition: transform 0.3s; }
.pl-rate { flex: none; font: inherit; font-weight: 700; font-size: 0.9rem; min-width: 52px; padding: 0.35rem 0.5rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.35); background: none; color: #fff; cursor: pointer; }
.player-mini { width: min(520px, calc(100% - 24px)); }
body.has-player .site-footer { padding-bottom: 6rem; }
@media (max-width: 560px) { .player { bottom: 0; width: 100%; border-radius: 14px 14px 0 0; } .player [data-pl="prev"], .player [data-pl="next"] { display: none; } }
@media print { .reader-tools, .player, .share-pop, .read-progress, .resume, .ask-cta { display: none !important; } }

/* ------------------------------------------------------------------
   Page colours: sepia and dark
   ------------------------------------------------------------------ */
html[data-theme="sepia"] {
  --bg: #f4ecd8; --surface: #fbf5e6; --line: #e2d5b8; --tint-blue: #efe3c6; --tint-green: #e8ead0; --ink: #3b2f20;
}
html[data-theme="sepia"] .site-box { background: #efe5cc; }
html[data-theme="sepia"] .site-header { background: #fbf5e6; }
html[data-theme="sepia"] .section, html[data-theme="sepia"] .article-page { background: #f8f0dc; border-color: #e2d5b8; }
html[data-theme="sepia"] .prose { color: #3b2f20; }
html[data-theme="sepia"] .lede { color: #5b4a33; }
html[data-theme="sepia"] .article-header .pad, html[data-theme="sepia"] .article-aside .toc-mini { border-color: #e2d5b8; }
html[data-theme="sepia"] .article-hero figcaption { background: #f8f0dc; }

html[data-theme="dark"] {
  --bg: #121a26; --surface: #182233; --line: #2a3a52; --tint-blue: #1d2b42; --tint-green: #143a35; --ink: #dfe6f0;
  --aster-blue-dark: #9cc2f2; --aster-blue: #7fb0ee; --aster-green-dark: #3fd3b0; --aster-grey: #9aa7b8;
  color-scheme: dark;
}
html[data-theme="dark"] .site-box { background: #0e1520; border-color: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .site-header { background: #121b2a; border-color: #2a3a52; }
html[data-theme="dark"] .brand img { filter: invert(1) hue-rotate(180deg); mix-blend-mode: lighten; }
html[data-theme="sepia"] .brand img { mix-blend-mode: multiply; }
html[data-theme="dark"] .section, html[data-theme="dark"] .article-page { background: #131c2a; border-color: #263449; box-shadow: none; }
html[data-theme="dark"] .prose { color: #d6dde8; }
html[data-theme="dark"] .lede, html[data-theme="dark"] .block-gallery .figure figcaption, html[data-theme="dark"] .stat-note { color: #aab6c6; }
html[data-theme="dark"] .article-header .pad, html[data-theme="dark"] .article-aside .toc-mini, html[data-theme="dark"] .next-story { border-color: #2a3a52; }
html[data-theme="dark"] .article-hero figcaption { background: #131c2a; }
html[data-theme="dark"] .block-box { border-color: #2a3a52; }
html[data-theme="dark"] .stat, html[data-theme="dark"] .prose td, html[data-theme="dark"] .prose table { background: #182233; border-color: #2a3a52; }
html[data-theme="dark"] .prose tr:nth-child(even) td { background: #1b273a; }
html[data-theme="dark"] .bar-track { background: #26344a; }
html[data-theme="dark"] .tool { border-color: #34465f; }
html[data-theme="dark"] .tool-listen { background: #2c6bc0; border-color: #2c6bc0; }
html[data-theme="dark"] .seg button { border-color: #34465f; }
html[data-theme="dark"] .ask-cta { border-color: #24564d; }
html[data-theme="dark"] .ask-form input:not([type="checkbox"]), html[data-theme="dark"] .ask-form textarea { border-color: #34465f; }
html[data-theme="dark"] .toc-mini li.current a { background: #2c6bc0; }
html[data-theme="dark"] .figure img, html[data-theme="dark"] .article-thumb { border-color: #2a3a52; }
html[data-theme="dark"] .nav a:not(.active) { color: #c9d6e7; }
html[data-theme="dark"] .nav-search input { background: #0e1520; border-color: #2a3a52; }
html[data-theme="dark"] .nav a.active { background: #2c6bc0; color: #fff; }

/* Events page: one panel per issue */
.events-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.events-issue { margin-bottom: 1.5rem; scroll-margin-top: 1rem; }
.events-issue .section-head { margin-bottom: 0.25rem; }
