/* Article and list content of CMS pages. Used inside the site's real shell (src/routes/cms-shell)
   and, with editorial-public.css, in the fallback page. */
.excerpt {
  font-size: 20px;
  line-height: 1.7;
  color: #675b50;
}
.byline,
.updated {
  font-size: 13px;
  color: #706359;
}
/* ---- Article body: the editorial design of the Content OS articles, applied by structure
   (src/lib/server/cmsBody.ts adds the component classes when the page is rendered). ---- */
.article-body {
  --oc-brand: #f66a05;
  --oc-espresso: #2e2a26;
  --oc-muted: #766a62;
  --oc-cream: #fff4ea;
  --oc-line: #ead8ca;
  color: #2b2521;
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.article-body p { margin: 0 0 22px; }
.article-body h2 {
  position: relative;
  margin: 64px 0 22px;
  padding-left: 18px;
  color: #171412;
  font-size: clamp(25px, 3.2vw, 31px);
  font-weight: 720;
  line-height: 1.35;
}
.article-body h2::before {
  position: absolute;
  top: 0.2em;
  bottom: 0.2em;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--oc-brand);
  content: "";
}
.article-body h3 {
  margin: 40px 0 12px;
  color: #3a312b;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.45;
}
.article-body h4 { margin: 30px 0 10px; font-size: 18px; color: #3a312b; }
.article-body a { color: #ac3d17; font-weight: 600; text-underline-offset: 3px; }
.article-body strong { color: #1f1a16; font-weight: 700; }
.article-body ul, .article-body ol { margin: 0 0 26px; padding-left: 1.4em; }
.article-body li + li { margin-top: 8px; }
.article-body li > p { margin: 0 0 8px; }
.article-body ul > li::marker { color: var(--oc-brand); }
.article-body ol > li::marker { color: var(--oc-brand); font-weight: 700; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 32px auto; border-radius: 8px; }
.article-body hr { margin: 48px 0; border: 0; border-top: 1px solid var(--oc-line); }
.article-body blockquote {
  position: relative;
  margin: 36px 0;
  padding: 26px 30px 26px 64px;
  border-radius: 8px;
  background: var(--oc-cream);
  color: #3d332c;
  font-size: 19px;
  line-height: 1.7;
}
.article-body blockquote::before {
  position: absolute;
  top: 20px;
  left: 22px;
  color: var(--oc-brand);
  font: 700 40px/1 Georgia, serif;
  content: "\201C";
}
.article-body blockquote > :last-child { margin-bottom: 0; }
.article-body pre { white-space: pre-wrap; background: #eee7df; padding: 20px; border-radius: 8px; }

/* Opening text: lead block with key cards. */
.article-intro {
  position: relative;
  overflow: hidden;
  margin: 0 0 56px;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid #f0d4bf;
  border-radius: 8px;
  background: radial-gradient(circle at 100% 0, rgba(246, 106, 5, 0.14), transparent 38%), var(--oc-cream);
}
.article-intro::after {
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(246, 106, 5, 0.26);
  border-radius: 50%;
  content: "";
}
.article-intro > p:first-child { color: #493d35; font-size: clamp(19px, 2.4vw, 22px); line-height: 1.72; }
.article-intro > :last-child { margin-bottom: 0; }
.article-keys { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 28px 0 0; }
.article-key { padding: 20px; border: 1px solid rgba(246, 106, 5, 0.19); border-radius: 6px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 10px 28px rgba(80, 53, 34, 0.05); }
.article-key h3 { margin: 0 0 8px; color: var(--oc-espresso); font-size: 17px; }
.article-key p { margin: 0; color: var(--oc-muted); font-size: 14px; line-height: 1.7; }

/* Numbered steps. */
.article-steps { display: grid; gap: 14px; margin: 30px 0; padding: 0; list-style: none; counter-reset: oc-step; }
.article-steps > li { position: relative; min-height: 70px; margin: 0; padding: 19px 22px 19px 78px; border: 1px solid var(--oc-line); border-radius: 7px; background: #fff; counter-increment: oc-step; }
.article-steps > li + li { margin-top: 0; }
.article-steps > li::before { position: absolute; top: 16px; left: 20px; display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--oc-brand); color: #fff; font-size: 14px; font-weight: 800; content: counter(oc-step, decimal-leading-zero); }
.article-steps > li > p:first-child { margin: 0 0 4px; }
.article-steps > li > p:last-child { margin-bottom: 0; color: #4f4640; font-size: 16px; }

/* Tables. */
.article-table { overflow-x: auto; margin: 32px 0; border: 1px solid var(--oc-line); border-radius: 8px; background: #fff; box-shadow: 0 12px 32px rgba(80, 53, 34, 0.06); -webkit-overflow-scrolling: touch; }
.article-table table { display: table; width: 100%; min-width: 620px; margin: 0; border: 0; border-collapse: collapse; font-size: 15px; line-height: 1.65; }
.article-table th, .article-table td { min-width: 0; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--oc-line); text-align: left; vertical-align: top; }
.article-table thead th, .article-table tr:first-child > th { background: var(--oc-espresso); color: #fff; font-size: 13px; font-weight: 750; letter-spacing: 0.02em; }
.article-table tbody tr:nth-child(even) { background: #fff9f4; }
.article-table tbody tr:last-child > * { border-bottom: 0; }
.article-table p { margin: 0; }
.article-table tbody tr > :first-child { min-width: 8.5em; color: #2e2a26; font-weight: 650; }
/* The editor keeps a table's header row inside tbody: its first cell stays white on the dark header. */
.article-table tr:first-child > th:first-child { color: #fff; }

/* FAQ: expandable question cards. */
.article-faq { margin: 64px 0 28px; padding: clamp(26px, 5vw, 46px); border-radius: 8px; background: var(--oc-cream); }
.article-faq > h2 { margin-top: 0; }
.article-faq-item { border-top: 1px solid #e4c9b4; }
.article-faq-item:last-child { border-bottom: 1px solid #e4c9b4; }
.article-faq-item summary { position: relative; padding: 20px 48px 20px 0; color: var(--oc-espresso); font-size: 17px; font-weight: 700; line-height: 1.55; cursor: pointer; list-style: none; }
.article-faq-item summary::-webkit-details-marker { display: none; }
.article-faq-item summary::before, .article-faq-item summary::after { position: absolute; top: 50%; right: 6px; width: 16px; height: 2px; border-radius: 2px; background: var(--oc-brand); content: ""; }
.article-faq-item summary::after { transform: rotate(90deg); transition: transform 0.2s ease; }
.article-faq-item[open] summary::after { transform: rotate(0deg); }
.article-faq-item summary:focus-visible { outline: 2px solid var(--oc-brand); outline-offset: 4px; border-radius: 4px; }
.article-faq-answer { padding: 0 8px 22px 0; color: #4f4640; font-size: 16px; line-height: 1.75; }
.article-faq-answer > :last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .article-body { font-size: 17px; }
  .article-keys { grid-template-columns: 1fr; }
  .article-steps > li { padding: 16px 16px 16px 66px; }
  .article-steps > li::before { left: 14px; width: 36px; height: 36px; }
  .article-body blockquote { padding: 22px 20px 22px 52px; font-size: 17px; }
  .article-body blockquote::before { left: 16px; }
}
.updated {
  text-align: right;
  margin: 44px 0;
}
.consult {
  background: #eee7df;
  border-radius: 20px;
  padding: 35px;
  margin: 60px 0;
}
.consult h2 {
  margin-top: 0;
}
.consult p {
  line-height: 1.7;
  color: #6d6055;
}
.journal {
  max-width: 1320px;
  padding: 70px 5%;
  margin: auto;
}
.journal h1 {
  font-size: 64px;
  font-weight: 450;
  letter-spacing: -2px;
  margin: 12px 0;
}
.journal-intro {
  font-size: 20px;
  color: #78685b;
  margin-bottom: 54px;
}
.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 45px 30px;
}
.journal-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #d9cfc5;
  padding-bottom: 28px;
}
.journal-card > img,
.no-cover {
  width: 100%;
  aspect-ratio: 1.55;
  object-fit: cover;
  border-radius: 6px;
}
.no-cover {
  background: #e9dfd3;
  display: grid;
  place-items: center;
  color: #7d6f61;
  font-size: 28px;
}
.journal-card time {
  font-size: 12px;
  color: #78695b;
  display: block;
  margin-top: 22px;
}
.journal-card h2 {
  font-size: 23px;
  line-height: 1.5;
  font-weight: 550;
  margin: 12px 0;
}
.journal-card p {
  font-size: 14px;
  line-height: 1.7;
  color: #776759;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.journal-card:hover h2 {
  color: #b23c13;
}
.pagination {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin: 60px 0;
}
.preview-notice {
  background: #24201b;
  color: white;
  text-align: center;
  padding: 14px;
  font-size: 14px;
}
@media (max-width: 760px) {
  .article-body {
    font-size: 17px;
  }
  .journal {
    padding: 45px 20px;
  }
  .journal h1 {
    font-size: 46px;
  }
  .journal-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .journal-intro {
    font-size: 17px;
  }
  .consult {
    padding: 25px;
  }
  .article-body h2 {
    font-size: 26px;
  }
  .article-body h3 {
    font-size: 21px;
  }
}

.article-body figure { margin: 36px 0; }
.article-body figure img { margin: 0 auto; }
.article-body iframe {
  display: block;
  margin: 32px 0;
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
}
.article-body figcaption {
  font-size: 13px;
  color: #77634b;
  text-align: center;
  margin-top: 10px;
}
.journal-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 35px;
}
.journal-topics a {
  border: 1px solid #dac8af;
  border-radius: 30px;
  padding: 9px 15px;
  font-size: 12px;
  text-decoration: none;
  color: #8c6b43;
}
.journal-topics a[aria-current="page"] {
  background: #e8dac5;
  color: #6f4e26;
  border-color: #d6bd99;
}
.journal-topics a:hover {
  color: #af3c10;
  border-color: #c97842;
}
.article-toc {display:grid;gap:8px;border-left:2px solid #e65b2c;padding:12px 20px;margin:24px 0;font-size:14px;}
.article-toc a,.article-sources a {color:#944320;overflow-wrap:anywhere;}
.article-sources {margin-top:32px;border-top:1px solid #e5dfd7;padding-top:20px;font-size:14px;}
.reviewer {font-size:13px;color:#6d6256;}
.article-body img[data-align] {display:block;}
.article-body img[data-align="right"] {margin-right:0;}
.article-body h2,.article-body h3 {scroll-margin-top:100px;}

.article-body > :first-child {margin-top:0;}

/* ---- Site chrome parity with RedesignShell (src/lib/server/cmsChrome.ts) ---- */

/* ---- Article parity with the WordPress-era template ---- */
.article-toc { display: block; margin: 0 0 44px; border: 1px solid #ead8ca; border-radius: 8px; padding: 18px 22px; background: #fff; }
.article-toc summary { cursor: pointer; color: #2e2a26; font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.article-toc ol { margin: 14px 0 0; padding-left: 1.3em; display: grid; gap: 6px; color: #4f4640; font-size: 15px; line-height: 1.6; }
.article-toc ol a { color: inherit; text-decoration: none; }
.article-toc ol a:hover { color: #f66a05; }
.article-toc li::marker { color: #f66a05; font-weight: 700; }
.article-video { margin: 32px 0; display: grid; gap: 8px; justify-items: center; }
.article-video video { display: block; width: 100%; max-width: 380px; border-radius: 14px; background: #000; }
.article-video[data-ratio="landscape"] video { max-width: 100%; }
.article-video figcaption { font-size: 13px; color: #706359; text-align: center; }
.article-video figcaption a { color: #944320; }
/* ---- Article frame: the site's article template (the Content OS article page) ---- */
.article { width: min(880px, calc(100% - 40px)); margin: 34px auto 0; color: #2b2521; }
.article a { color: inherit; }
.back { display: inline-flex; align-items: center; min-height: 40px; color: #f66a05; font-size: 14px; font-weight: 700; text-decoration: none; }
.article a.back { color: #f66a05; }
.back::before { content: ""; width: 8px; height: 8px; margin-right: 9px; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(45deg); }
.article-breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; margin: 28px 0 20px; color: #81766e; font-size: 13px; }
.article-breadcrumb a { color: inherit; text-decoration: none; }
.article-breadcrumb a:hover { color: #f66a05; }
.cover { overflow: hidden; margin: 0 0 42px; border-radius: 8px; background: #f1e7df; }
/* The cover is never wider than its file and never taller than most of the first screen: a small, square
   or portrait picture sits at its own size on the cover background instead of being stretched to the
   column (image audit 2026-11-11). Both sizes auto keep the picture's proportions under both limits. */
.cover img { display: block; width: auto; max-width: 100%; height: auto; max-height: min(62vh, 560px); margin: 0 auto; }
/* The same limits from the file's size (--w/--h, set by renderArticle), so the box is reserved before the picture arrives. */
.cover img[width] { width: min(100%, calc(var(--w) * 1px), calc(min(62vh, 560px) * var(--w) / var(--h))); aspect-ratio: var(--w) / var(--h); object-fit: contain; }
.article header { margin: 0 0 36px; padding: 0; }
.category { margin: 0 0 14px; }
.category a, .article .category a { display: inline-block; color: #f66a05; font-size: 13px; font-weight: 800; letter-spacing: 0; text-decoration: none; text-transform: uppercase; }
.article h1 { margin: 0; color: #171412; font-size: clamp(34px, 5vw, 58px); font-weight: 760; letter-spacing: 0; line-height: 1.08; }
.byline { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; color: #81766e; font-size: 14px; line-height: 1.5; }
.byline span + span::before { content: "·"; margin-right: 8px; }

.article-related, .article-watch { margin: 56px 0 0; }
.article-related h2, .article-watch h2 { margin: 0 0 18px; color: #171412; font-size: 22px; letter-spacing: 0; }
.article-related ul, .article-watch ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.article-related a, .article-watch a { display: grid; gap: 10px; align-content: start; color: #171412; text-decoration: none; }
.article-related a:hover strong, .article-watch a:hover strong { color: #f66a05; }
.article-related strong, .article-watch strong { display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 600; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-related time { color: #81766e; font-size: 12px; }
.article-related-thumb { display: block; overflow: hidden; aspect-ratio: 3 / 2; border-radius: 12px; background: #f1e7df; }
.article-related-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.article-watch-thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 9 / 16; border-radius: 12px; background: #12100e; }
.article-watch-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.article-watch-thumb span { position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 999px; background: rgba(18, 16, 14, 0.72); color: #f7f3ee; font-size: 11px; font-weight: 600; line-height: 1; }
.article-wechat { margin: 48px 0 0; overflow: hidden; border: 1px solid #ece8e5; border-radius: 12px; background: #fff; }
.article-wechat img { display: block; width: 100%; height: auto; }

.article-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 22px; margin: 64px 0 0; padding: 28px; border: 1px solid rgba(246, 106, 5, 0.2); border-radius: 8px; background: #fff; }
.article-cta-title { margin: 0; color: #171412; font-size: 18px; font-weight: 800; }
.article-cta-lead { margin: 8px 0 0; color: #5f554f; font-size: 14px; line-height: 1.6; }
.article-cta-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.article-cta-primary, .article .article-cta-primary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; color: #fff; background: #f66a05; font-size: 15px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.article-cta-secondary, .article .article-cta-secondary { color: #81766e; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.article-disclaimer { grid-column: 1 / -1; margin: 0; color: #81766e; font-size: 12px; }

@media (max-width: 760px) {
  .article-related ul { grid-template-columns: 1fr; }
  .article-related a { grid-template-columns: 112px 1fr; column-gap: 12px; }
  .article-related-thumb { grid-row: span 2; }
  .article-watch ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .article { width: min(100% - 28px, 880px); margin-top: 20px; }
  .article h1 { font-size: 34px; }
  .article-cta { grid-template-columns: 1fr; }
  .article-cta-actions { align-items: flex-start; }
}

/* Lists inside the site's shell: links take the card's colours, not the browser default. */
.journal a, .journal-card { color: inherit; text-decoration: none; }
.journal-card h2 { color: #171412; }
.journal-card:hover h2 { color: #f66a05; }
.pagination a { color: #ac3d17; }

/* Medical reviewer line and sources. */
.article-reviewer { margin: 36px 0 0; padding: 14px 18px; border-left: 3px solid #f66a05; border-radius: 0 6px 6px 0; background: #fff; color: #3a312b; font-size: 15px; font-weight: 600; }
.article-sources { margin-top: 32px; border-top: 1px solid #ead8ca; padding-top: 20px; font-size: 14px; }
.article-sources h2 { margin: 0 0 10px; font-size: 18px; color: #171412; }
.article-sources ul { margin: 0; padding-left: 1.2em; }
.article-sources a { color: #944320; overflow-wrap: anywhere; }

/* Disclaimer under the sources, last change at the end of the article. */
.article > .article-disclaimer { margin: 28px 0 0; color: #81766e; font-size: 13px; text-align: center; }
.article-updated { margin: 10px 0 0; color: #81766e; font-size: 13px; text-align: right; }
