/* =========================================================
   Contin-U Medical — Article / Editorial layer
   Restyles the long-form guide + compound library in the
   new design language. Content markup is unchanged; every
   legacy class below is re-expressed with v1 tokens.
   Depends on: tokens.css, fonts.css, base.css, components.css
   ========================================================= */

/* ---------------------------------------------------------
   Container variants (legacy modifiers)
   --------------------------------------------------------- */
.container--default { max-width: var(--container-max); }
.container--narrow  { max-width: 860px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================
   ARTICLE HERO
   ========================================================= */
.article-hero,
.cmp-hero,
.page-hero {
  position: relative;
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 7rem) var(--space-12);
  border-bottom: 1px solid var(--hairline-color);
  overflow: hidden;
}

/* soft chevron wash behind the hero */
.article-hero::before,
.cmp-hero::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: -40% 45% auto -20%;
  height: 150%;
  background: radial-gradient(ellipse at 30% 40%,
              rgb(10 180 239 / 0.10) 0%, transparent 62%);
  pointer-events: none;
}

.article-hero > .container,
.cmp-hero > .container,
.cmp-hero__inner,
.page-hero > .container {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
  /* no padding-inline — the parent .container already supplies the gutter */
}

.article-hero__eyebrow,
.cmp-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--track-caps);
  color: var(--text-brand);
  margin-bottom: var(--space-5);
}
.article-hero__eyebrow::before,
.cmp-hero__eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--brand-500);
}

.article-hero__meta,
.cmp-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: var(--space-5);
}
.article-hero__meta-sep { color: var(--ground-500); }

.article-hero h1,
.cmp-hero__title,
.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-hero);
  color: var(--text);
  margin-bottom: var(--space-6);
  text-wrap: balance;
}

.article-hero__lede,
.cmp-hero__subtitle,
.page-hero__lede {
  font-size: var(--text-xl);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  max-width: 62ch;
}

/* byline */
.article-hero__byline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--hairline-color);
}
.article-hero__byline-avatar {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: var(--brand-gradient);
  color: var(--ground-950);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}
.article-hero__byline-text { display: flex; flex-direction: column; gap: 2px; }
.article-hero__byline-author {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
}
.article-hero__byline-meta {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* compound hero data list */
.cmp-hero__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 5px 11px;
  margin: 0 var(--space-2) var(--space-2) 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
}
.cmp-hero__tag--cyan {
  color: var(--brand-300);
  border-color: rgb(10 180 239 / 0.4);
  background: rgb(10 180 239 / 0.08);
}
.cmp-hero__data {
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.cmp-hero__data-title {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: var(--space-4);
}
.cmp-hero__data-list { display: grid; gap: var(--space-3); }
.cmp-hero__data-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}
.cmp-hero__data-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cmp-hero__data-list strong {
  color: var(--text);
  font-weight: var(--fw-medium);
  text-align: left;
  flex: 0 0 auto;
}
/* The value is the right-aligned half of the row, not the label. */
.cmp-hero__data-list span {
  min-width: 0;
  text-align: right;
}

/* Two columns don't fit on a phone — stack label over value, both flush left,
   instead of letting the label wrap into a ragged right-aligned block. */
@media (max-width: 560px) {
  .cmp-hero__data-list li { flex-direction: column; gap: var(--space-1); }
  .cmp-hero__data-list span { text-align: left; }
}

/* =========================================================
   LAYOUT — sticky TOC + body
   ========================================================= */
.article-layout,
.cmp-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
  padding-block: var(--section-y);
}

@media (max-width: 1000px) {
  .article-layout,
  .cmp-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
}

/* Hub pages reuse the layout wrapper without a TOC — don't reserve the rail. */
.article-layout:not(:has(.article-toc)),
.cmp-layout:not(:has(.cmp-toc)) { grid-template-columns: minmax(0, 1fr); }

/* Above the sidebar breakpoint, sit the hero on the same grid as the article
   layout so hero copy shares a left edge with the body column instead of
   landing ~25px off it. */
@media (min-width: 1001px) {
  /* Only on pages that actually render the sidebar layout — hub pages with no
     TOC keep their full-width container. */
  body:has(.article-layout .article-toc) .article-hero > .container,
  body:has(.cmp-layout .cmp-toc) .cmp-hero > .container,
  body:has(.article-layout .article-toc) .page-hero > .container {
    max-width: var(--container-max);
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: clamp(2rem, 1rem + 4vw, 5rem);
  }
  body:has(.article-layout .article-toc) .article-hero > .container > *,
  body:has(.cmp-layout .cmp-toc) .cmp-hero > .container > *,
  body:has(.article-layout .article-toc) .page-hero > .container > * {
    grid-column: 2;
    max-width: var(--container-text);
    margin-inline: 0;
  }
}

/* Grid children must be allowed to shrink below their min-content width,
   otherwise a wide table forces the whole column past the viewport. */
.article-layout > *,
.cmp-layout > *,
.article-body,
.cmp-article,
.article-toc,
.cmp-toc { min-width: 0; }

.article-body,
.cmp-article { overflow-wrap: break-word; }

.article-toc,
.cmp-toc {
  position: sticky;
  top: calc(var(--space-16) + var(--space-4));
  align-self: start;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: var(--space-3);
}
@media (max-width: 1000px) {
  .article-toc,
  .cmp-toc {
    position: static;
    max-height: none;
    padding: var(--space-5) var(--space-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
}

.article-toc__label,
.cmp-toc__title {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--hairline-color);
}

.article-toc ol,
.article-toc ul,
.cmp-toc__list {
  list-style: none;
  counter-reset: toc;
  display: grid;
  gap: 2px;
}
.article-toc li,
.cmp-toc__list li { counter-increment: toc; }

.article-toc a,
.cmp-toc__list a {
  display: block;
  position: relative;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--text-subtle);
  padding: 7px 0 7px var(--space-5);
  transition: color var(--dur-fast) var(--ease-out);
}
.article-toc a::before,
.cmp-toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0; top: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--ground-500);
  transition: color var(--dur-fast) var(--ease-out);
}
.article-toc a:hover,
.cmp-toc__list a:hover { color: var(--brand-300); }
.article-toc a:hover::before,
.cmp-toc__list a:hover::before { color: var(--brand-500); }
.article-toc a.is-active,
.cmp-toc__list a.is-active { color: var(--text); }

/* =========================================================
   ARTICLE BODY — prose
   ========================================================= */
.article-body,
.cmp-article {
  max-width: 72ch;
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--ground-100);
}

.article-body > section,
.cmp-section { scroll-margin-top: 6rem; }
.article-body > section + section,
.cmp-section + .cmp-section { margin-top: var(--space-16); }

.article-body h2,
.cmp-section > h2,
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--track-tight);
  color: var(--text);
  margin: var(--space-16) 0 var(--space-5);
  padding-top: var(--space-8);
  border-top: 1px solid var(--hairline-color);
  scroll-margin-top: 6rem;
  text-wrap: balance;
}
.article-body > section > h2:first-child,
.cmp-section > h2:first-child { margin-top: 0; }

.article-body h3,
.cmp-section h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-tight);
  color: var(--text);
  margin: var(--space-10) 0 var(--space-4);
  scroll-margin-top: 6rem;
}

.article-body p,
.cmp-article p,
.cmp-section > p { margin-bottom: var(--space-6); }

.article-body strong,
.cmp-article strong,
.cmp-section strong {
  color: var(--text);
  font-weight: var(--fw-semibold);
}
.article-body em, .cmp-article em { font-style: italic; color: var(--ground-50); }

/* links in prose */
.article-body a:not(.btn):not(.cmp-cite):not(.related-guide):not(.cmp-related__card):not(.cmp-hub-card):not(.region-card),
.cmp-article a:not(.btn):not(.cmp-cite):not(.related-guide):not(.cmp-related__card):not(.cmp-hub-card):not(.region-card),
.cmp-section a:not(.btn):not(.cmp-cite):not(.related-guide):not(.cmp-related__card):not(.cmp-hub-card):not(.region-card) {
  color: var(--brand-300);
  text-decoration: underline;
  text-decoration-color: rgb(10 180 239 / 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all var(--dur-fast) var(--ease-out);
}
.article-body a:not(.btn):not(.cmp-cite):not(.related-guide):not(.cmp-related__card):not(.cmp-hub-card):not(.region-card):hover,
.cmp-article a:not(.btn):not(.cmp-cite):not(.related-guide):not(.cmp-related__card):not(.cmp-hub-card):not(.region-card):hover,
.cmp-section a:not(.btn):not(.cmp-cite):not(.related-guide):not(.cmp-related__card):not(.cmp-hub-card):not(.region-card):hover {
  color: var(--brand-200);
  text-decoration-color: var(--brand-400);
}

/* lists — base.css resets list-style, restore it here */
.article-body ul,
.cmp-section ul,
.cmp-article ul { list-style: none; margin: 0 0 var(--space-6); padding: 0; }

.article-body ul > li,
.cmp-section ul > li,
.cmp-article ul > li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-3);
}
.article-body ul > li::before,
.cmp-section ul > li::before,
.cmp-article ul > li::before {
  content: '';
  position: absolute;
  left: 2px; top: 0.72em;
  width: 6px; height: 1px;
  background: var(--brand-500);
}

.article-body ol,
.cmp-section ol,
.cmp-article ol,
.ordered-list {
  list-style: none;
  counter-reset: li;
  margin: 0 0 var(--space-6);
  padding: 0;
}
.article-body ol > li,
.cmp-section ol > li,
.cmp-article ol > li,
.ordered-list > li {
  position: relative;
  counter-increment: li;
  padding-left: var(--space-8);
  margin-bottom: var(--space-4);
}
.article-body ol > li::before,
.cmp-section ol > li::before,
.cmp-article ol > li::before,
.ordered-list > li::before {
  content: counter(li);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--brand-400);
  width: 22px;
  text-align: right;
}

/* nested lists */
.article-body li ul, .article-body li ol { margin-top: var(--space-3); margin-bottom: 0; }

/* superscript citation markers */
.cmp-cite,
.article-body sup a {
  font-family: var(--font-mono);
  font-size: 0.65em;
  font-weight: var(--fw-medium);
  vertical-align: super;
  line-height: 0;
  color: var(--brand-400);
  text-decoration: none;
  padding: 0 1px;
  transition: color var(--dur-fast) var(--ease-out);
}
.cmp-cite:hover, .article-body sup a:hover { color: var(--brand-200); }

/* inline keyword / mono token */
.kw {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--brand-200);
  background: rgb(10 180 239 / 0.08);
  border: 1px solid rgb(10 180 239 / 0.18);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}

/* =========================================================
   TLDR / CALLOUT
   ========================================================= */
.tldr,
.callout,
.cmp-evidence,
.cmp-safety,
.wl-disclaimer {
  position: relative;
  margin: var(--space-8) 0;
  padding: var(--space-6) var(--space-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--brand-500);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
}
.tldr p:last-child,
.callout p:last-child,
.cmp-evidence p:last-child,
.cmp-safety p:last-child,
.wl-disclaimer p:last-child { margin-bottom: 0; }

.tldr__label,
.callout__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: var(--space-3);
}

.callout--note { border-left-color: var(--brand-500); }
.callout--warn {
  border-left-color: var(--warning);
  background: color-mix(in oklab, var(--warning) 6%, var(--surface));
}
.callout--warn .callout__label { color: var(--warning); }

.cmp-safety { border-left-color: var(--warning); }
.wl-disclaimer {
  font-size: var(--text-xs);
  color: var(--text-subtle);
  border-left-color: var(--ground-500);
}

/* =========================================================
   STATS STRIP
   ========================================================= */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  margin: var(--space-10) 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-cell {
  padding: var(--space-6);
  background: var(--surface);
}
.stat-cell__num,
.stat-cell__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-hero);
  line-height: 1;
  color: var(--brand-300);
  font-variant-numeric: tabular-nums lining-nums;
  margin-bottom: var(--space-3);
}
.stat-cell__value { font-size: var(--text-2xl); color: var(--text); }
.stat-cell__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--text-subtle);
}

/* =========================================================
   TABLES
   ========================================================= */
.cmp-table-wrap {
  margin: var(--space-10) 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.cmp-table,
.cmp-datatable {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 520px;
}
.cmp-table thead th,
.cmp-datatable thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
  background: var(--surface-sunk);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.cmp-table td,
.cmp-table tbody th,
.cmp-datatable td,
.cmp-datatable tbody th {
  /* shared cell treatment */
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  line-height: 1.55;
  vertical-align: top;
  text-align: left;
}
.cmp-table tbody th,
.cmp-datatable tbody th { color: var(--text); font-weight: var(--fw-medium); }
.cmp-table tbody tr:last-child td,
.cmp-table tbody tr:last-child th,
.cmp-datatable tbody tr:last-child td,
.cmp-datatable tbody tr:last-child th { border-bottom: 0; }
.cmp-table tbody tr:hover td,
.cmp-datatable tbody tr:hover td { background: rgb(255 255 255 / 0.015); }
.cmp-table strong,
.cmp-datatable strong { color: var(--text); font-weight: var(--fw-medium); }
.cmp-table td,
.cmp-datatable td { font-variant-numeric: tabular-nums lining-nums; }

.cmp-table .yes,
.cmp-table td.yes { color: var(--brand-300); }
.cmp-table .no,
.cmp-table td.no { color: var(--text-subtle); }
.cmp-table .accent { color: var(--brand-300); font-weight: var(--fw-medium); }
.cmp-table .is-highlight,
.cmp-table td.is-highlight {
  background: rgb(10 180 239 / 0.06);
  color: var(--text);
  font-weight: var(--fw-medium);
  box-shadow: inset 2px 0 0 var(--brand-500);
}

/* =========================================================
   FAQ — details / summary
   ========================================================= */
.article-faq,
.cmp-faq { margin-top: var(--space-6); }

.article-faq details,
.cmp-faq details,
.article-body details {
  border-top: 1px solid var(--hairline-color);
}
.article-faq details:last-of-type,
.cmp-faq details:last-of-type { border-bottom: 1px solid var(--hairline-color); }

.article-faq summary,
.cmp-faq summary,
.article-body details > summary {
  position: relative;
  display: block;
  cursor: pointer;
  list-style: none;
  padding: var(--space-5) var(--space-10) var(--space-5) 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-medium);
  letter-spacing: var(--track-tight);
  color: var(--text);
  transition: color var(--dur-fast) var(--ease-out);
}
.article-faq summary::-webkit-details-marker,
.cmp-faq summary::-webkit-details-marker,
.article-body details > summary::-webkit-details-marker { display: none; }

.article-faq summary::after,
.cmp-faq summary::after,
.article-body details > summary::after {
  content: '';
  position: absolute;
  right: var(--space-2);
  top: 50%;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--brand-400);
  border-bottom: 1.5px solid var(--brand-400);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.article-faq details[open] summary::after,
.cmp-faq details[open] summary::after,
.article-body details[open] > summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.article-faq summary:hover,
.cmp-faq summary:hover,
.article-body details > summary:hover { color: var(--brand-300); }

.article-faq details > div,
.cmp-faq details > div,
.article-body details > div {
  padding-bottom: var(--space-6);
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  max-width: 66ch;
}
.article-faq details > div > p:last-child,
.cmp-faq details > div > p:last-child { margin-bottom: 0; }

/* =========================================================
   PULLQUOTE
   ========================================================= */
.pullquote,
.article-body blockquote {
  margin: var(--space-12) 0;
  padding-left: var(--space-8);
  border-left: 2px solid var(--brand-500);
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.pullquote p, .article-body blockquote p { margin-bottom: var(--space-4); }
.pullquote__cite,
.article-body blockquote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-style: normal;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* =========================================================
   STEPS LIST
   ========================================================= */
.steps-list-wrap { margin: var(--space-10) 0; }
.steps-list { list-style: none; counter-reset: step; display: grid; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; padding: 0; }
.steps-list > li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  padding: var(--space-6) var(--space-6) var(--space-6) var(--space-16);
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.steps-list > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: var(--space-6); top: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--brand-400);
}
.steps-list > li strong { display: block; color: var(--text); margin-bottom: var(--space-2); }

/* =========================================================
   REGION GRID
   ========================================================= */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
  margin: var(--space-10) 0;
  list-style: none;
  padding: 0;
}
.region-card {
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0;
}
.region-card::before { display: none !important; }
.region-card__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--text);
  margin-bottom: var(--space-2);
}
.region-card__cities {
  display: block;
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--text-subtle);
}

/* =========================================================
   RELATED GUIDES / COMPOUND CARDS
   ========================================================= */
.related-guides,
.cmp-related { margin-top: var(--space-16); padding-top: var(--space-10);
  border-top: 1px solid var(--hairline-color); }

.cmp-related__title,
.related-guides > h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-tight);
  color: var(--text);
  margin-bottom: var(--space-6);
  border-top: 0;
  padding-top: 0;
}

.cmp-related__grid,
.related-guides__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}

/* Card-shaped links must not inherit prose underlines from .article-body /
   .cmp-article — the whole card is the target, not a run of text. */
a.related-guide,
a.related-guide *,
a.cmp-related__card,
a.cmp-related__card *,
a.cmp-hub-card,
a.cmp-hub-card *,
a.region-card,
a.region-card * { text-decoration: none; }

/* Placeholder cards (no href) should not look clickable. */
.cmp-hub-card:not([href]) {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.related-guide,
.cmp-related__card,
.cmp-hub-card {
  display: block;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.related-guide { margin-bottom: var(--space-4); }
.related-guide:hover,
.cmp-related__card:hover,
.cmp-hub-card[href]:hover {
  border-color: rgb(10 180 239 / 0.35);
  background: var(--surface-elev);
  transform: translateY(-2px);
}

.related-guide__eyebrow,
.cmp-related__card-eyebrow,
.cmp-hub-card__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: var(--space-3);
}
.related-guide__title,
.cmp-related__card-name,
.cmp-hub-card__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  letter-spacing: var(--track-tight);
  color: var(--text);
  margin-bottom: var(--space-2);
  text-wrap: balance;
}
.related-guide__desc,
.cmp-hub-card__body {
  display: block;
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
}
.related-guide__meta {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* compound hub sections */
.cmp-hub-section { margin-bottom: var(--space-16); }
.cmp-hub-section__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-tight);
  margin-bottom: var(--space-3);
}
.cmp-hub-section__lede {
  font-size: var(--text-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  max-width: 62ch;
  margin-bottom: var(--space-8);
}
.cmp-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}

/* =========================================================
   GUIDE CTA
   ========================================================= */
.guide-cta,
.cmp-cta {
  position: relative;
  margin: var(--space-16) 0 0;
  padding: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.guide-cta::before,
.cmp-cta::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand-gradient);
}
.guide-cta__eyebrow,
.cmp-cta__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: var(--space-4);
}
.guide-cta h2,
.guide-cta h3,
.cmp-cta__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-tight);
  color: var(--text);
  margin: 0 0 var(--space-4);
  padding-top: 0;
  border-top: 0;
  text-wrap: balance;
}
.guide-cta__body,
.cmp-cta__body {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-8);
}
.guide-cta__body p:last-child, .cmp-cta__body p:last-child { margin-bottom: 0; }
.guide-cta__actions,
.cmp-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.btn--ghost-on-dark {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost-on-dark:hover {
  border-color: var(--brand-400);
  color: var(--brand-300);
}

/* =========================================================
   SOURCES / REFERENCES
   ========================================================= */
.article-sources,
.cmp-refs {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--hairline-color);
}
.article-sources__label,
.cmp-refs__updated {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: var(--space-5);
}
.article-sources ol, .cmp-refs ol { counter-reset: src; }
.article-sources li, .cmp-refs li {
  font-size: var(--text-xs);
  line-height: 1.65;
  color: var(--text-subtle);
  margin-bottom: var(--space-3);
  padding-left: var(--space-7);
}
.article-sources li::before, .cmp-refs li::before { color: var(--ground-500); }
.article-sources a, .cmp-refs a { color: var(--text-muted); word-break: break-word; }
.article-sources a:hover, .cmp-refs a:hover { color: var(--brand-300); }

.cmp-refs__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  margin-right: var(--space-2);
}

/* =========================================================
   NEWS / INDEX PAGES
   ========================================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
}
/* The news listing's wrapping <section> carries no .section class, so the last
   card's 1px border landed flush against the footer's top edge (measured gap: 0).
   Match the standard section rhythm on the bottom edge only, leaving the
   spacing above the filter chips untouched. */
.news-grid--last { margin-bottom: var(--section-y); }
.news-card {
  display: block;
  padding: var(--space-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.news-card:hover { border-color: rgb(10 180 239 / 0.35); transform: translateY(-2px); }
.news-card__eyebrow,
.news-featured__visual-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: var(--space-3);
}
.news-card__title,
.news-featured__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--track-tight);
  color: var(--text);
  margin-bottom: var(--space-3);
  text-wrap: balance;
}
.news-card__excerpt,
.news-featured__excerpt {
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.news-card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
}
.news-card__meta-sep { color: var(--ground-500); }
.news-card__meta-author { color: var(--text-muted); }

.news-filter { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-10); }
.news-filter__chip {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  transition: all var(--dur-fast) var(--ease-out);
}
.news-filter__chip:hover,
.news-filter__chip.is-active {
  color: var(--ground-950);
  background: var(--brand-500);
  border-color: var(--brand-500);
}
/* Narrow phones: the four chips total ~384px with default padding, which
   overflows a 350px content column and orphans the last chip onto its own row.
   Tightening the horizontal padding and gap brings the row to ~346px so all
   four sit on one line, and the extra block padding lifts the tap target from
   34px to the 44px minimum. */
@media (max-width: 429px) {
  .news-filter { gap: 6px; }
  .news-filter__chip { padding: 12px 7px; letter-spacing: .05em; }
}

.news-featured {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8);
  margin-bottom: var(--space-12);
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
@media (max-width: 760px) { .news-featured { grid-template-columns: 1fr; } }
.news-featured__visual {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at 50% 40%, rgb(10 180 239 / 0.16), transparent 70%), var(--surface-sunk);
  border: 1px solid var(--border);
}
.news-featured__glyph {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: var(--fw-bold);
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================================
   MISC
   ========================================================= */
.dot { color: var(--ground-500); margin-inline: var(--space-2); }
.eyebrow { margin-bottom: var(--space-5); }

@media (max-width: 640px) {
  .article-hero h1, .cmp-hero__title { font-size: var(--text-4xl); }
  .article-hero__lede, .cmp-hero__subtitle { font-size: var(--text-lg); }
  .article-body, .cmp-article { font-size: var(--text-base); }
  .article-body h2, .cmp-section > h2 { font-size: var(--text-2xl); margin-top: var(--space-12); }
  .guide-cta__actions .btn, .cmp-cta__buttons .btn { width: 100%; }
}

@media print {
  .site-nav, .mobile-drawer, .article-toc, .cmp-toc,
  .guide-cta, .cmp-cta, .site-footer { display: none !important; }
  .article-layout, .cmp-layout { grid-template-columns: 1fr; }
}
