/* articles.css — extracted from site.css (css-cleanup Step 4d).
   Loads on /articles (listing) + /articles/{slug} (reader) via @section Styles.
   Depends on core site.css only. Holds the article listing/cards + the modern
   long-form reader, incl. the ArticleHtmlEnhancer-emitted body classes
   (callout/comparison-table/cite/quote/byline/.article-figure).
   Mis-filed site-wide rules were LEFT in core site.css: .section[id]/.specimen[id]
   anchor scroll-margin, and the mobile .hero.u-hero-pad-tight / .u-mt-40 / .u-mt-60-sep
   utility overrides. NOTE: .article-figure is exercised by no live article, so the
   pixel gate does not render it (equally untested where it sat in core before). */


/* =========================================================================
   Articles — listing + reader
   ========================================================================= */

.articles-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}
.articles-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color 0.2s ease;
}
.articles-search:focus-within {
    border-color: var(--teal-40);
}
.articles-search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--ink-3);
    pointer-events: none;
}
.articles-search input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    padding: 14px 14px 14px 44px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.4;
    width: 100%;
    min-height: 48px;
}
.articles-search input::placeholder {
    color: var(--ink-3);
}
.articles-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.articles-tags::-webkit-scrollbar { height: 6px; }
.articles-tags::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 3px; }
.articles-tags .chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--ink-2);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    white-space: nowrap;
}
.articles-tags .chip:hover {
    color: var(--ink);
    border-color: var(--teal-40);
}
.articles-tags .chip.is-active {
    color: var(--teal);
    border-color: var(--teal-40);
    background: var(--teal-tint);
}
@media (min-width: 820px) {
    .articles-controls {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        margin-bottom: 24px;
    }
    .articles-search {
        flex: 0 0 360px;
    }
    .articles-tags {
        flex: 1 1 auto;
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
@media (max-width: 600px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
.articles-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.articles-card-banner {
    position: relative;
    margin: -24px -24px 6px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}
.articles-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.articles-card:hover .articles-card-banner img {
    transform: scale(1.03);
}
.articles-card-initial {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 9vw, 5.5rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
}
.articles-card-banner-0 { background: linear-gradient(135deg, #00BFFF 0%, #4D94FF 100%); }
.articles-card-banner-1 { background: linear-gradient(135deg, #4D94FF 0%, #2A3554 100%); }
.articles-card-banner-2 { background: linear-gradient(135deg, #33CCFF 0%, #00BFFF 60%, #2A3554 100%); }
.articles-card-banner-3 { background: linear-gradient(135deg, #2A3554 0%, #00BFFF 100%); }
.articles-card-banner-4 { background: linear-gradient(135deg, #151B33 0%, #4D94FF 100%); }
.articles-card-banner-5 { background: linear-gradient(135deg, #00BFFF 0%, #151B33 100%); }
.articles-card:hover {
    border-color: var(--teal-40);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -20px var(--teal-20);
}
.articles-card[hidden] {
    display: none;
}
.articles-card-category {
    align-self: flex-start;
    padding: 2px 7px;
    border: 1px solid color-mix(in srgb, var(--ink-2) 45%, transparent);
    border-radius: 4px;
    background: transparent;
    color: var(--ink-2);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}
.articles-result-count {
    margin: 0 0 16px;
    color: var(--ink-2);
    font-size: 0.85rem;
}
.articles-tags .chip:focus-visible,
.articles-card:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}
.articles-card-title {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    transition: color 0.15s ease;
}
.articles-card:hover .articles-card-title {
    color: var(--teal);
}
.articles-card-desc {
    margin: 0;
    color: var(--ink-2);
    font-size: 0.95rem;
    line-height: 1.55;
}
.articles-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
    color: var(--ink-3);
    font-family: var(--font-body);
    font-size: 0.78rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
}
.articles-card-author {
    color: var(--ink-2);
    font-weight: 500;
}
.articles-card-stamp {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
@media (min-width: 600px) {
    .articles-card-title { font-size: 1.5rem; }
}

.articles-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--ink-2);
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--r-md);
}
.articles-empty p {
    margin: 0;
    font-size: 0.95rem;
}
.articles-empty-results {
    margin-top: 24px;
}

/* Long-form article body */
.article-body {
    max-width: 760px;
    margin: 0 auto;
    color: var(--ink-2);
    font-size: 1.0625rem;
    line-height: 1.75;
    /* As a grid item, default min-width:auto lets any wide child (the 540px
       comparison table, a long code line, an unbroken URL) stretch the column
       past its track and overflow the whole .article-layout — clipping the
       hero H1/breadcrumb and giving the page a horizontal scroll on mobile.
       min-width:0 confines that overflow to the child's own scroll container. */
    min-width: 0;
    overflow-wrap: break-word;
}
.article-body h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0 0 16px;
    color: var(--ink);
    font-weight: 600;
}
.article-body h2 {
    font-size: 1.65rem;
    margin: 56px 0 16px;
    color: var(--ink);
    font-weight: 600;
}
.article-body h3 {
    font-size: 1.25rem;
    margin: 36px 0 12px;
    color: var(--ink);
    font-weight: 600;
}
.article-body p { margin: 0 0 18px; color: var(--ink-2); }
.article-body strong { color: var(--ink); }
/* Match homepage prose links; buttons retain their component styling. */
.article-body a:not(.btn) {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--teal-40);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color var(--dur-quick) ease-out, text-decoration-color var(--dur-quick) ease-out;
}
.article-body a:not(.btn):hover,
.article-body a:not(.btn):focus-visible {
    color: var(--teal);
    text-decoration-color: var(--teal);
}
.article-body a:not(.btn):focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
    border-radius: 2px;
}
.article-body ul, .article-body ol { margin: 0 0 22px 22px; color: var(--ink-2); }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
    margin: 28px 0;
    padding: 18px 22px;
    border-left: 3px solid var(--teal);
    background: var(--surface);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--ink);
    font-style: normal;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--surface);
    color: var(--teal);
}
.article-body pre {
    margin: 22px 0;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.article-body pre code { background: transparent; color: var(--ink); }
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    margin: 22px 0;
}
.article-body hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}
/* Horizontal-only dividers — lighter than a full grid, matches the card
   primitives. Vertical rules dropped; the scroll wrapper supplies the frame. */
.article-body th, .article-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.article-body thead th {
    background: var(--bg-50);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.article-body td { color: var(--ink-2); vertical-align: top; }
/* Row-header cell (first column, scope="row") — label weight, no header tint. */
.article-body tbody th {
    color: var(--ink);
    font-weight: 600;
    vertical-align: top;
}
.article-body tbody tr:last-child td,
.article-body tbody tr:last-child th { border-bottom: none; }

/* =========================================================================
   Article reader — modern long-form layout
   3-col on desktop (gutter ToC | body | side col), single col on mobile
   ========================================================================= */

.article-byline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--ink-3);
}
.article-byline a { color: var(--teal); }
.byline-text { color: var(--ink-2); font-size: 0.95rem; }
.article-byline .byline-title { color: var(--ink-3); font-weight: 400; }
/* Byline publish-date is mobile-only; desktop keeps the date in the body meta-row. */
.byline-date { display: none; }

/* Article hero — H1 + breadcrumb + byline anchored to the body column,
   using the same .article-layout grid as the body so columns align. */
.hero-article .article-hero-body { min-width: 0; }
.hero-article .hero-title { font-size: clamp(2rem, 4.4vw, 3.25rem); margin-bottom: 18px; }
.hero-article .hero-sub { max-width: none; margin-bottom: 20px; }

/* Desktop: hero text + image left-align to the brand wordmark / ToC edge and span
   the full ToC+body width — one wide hero with the image sitting on top. */
@media (min-width: 1101px) {
    .hero-article .article-hero-body { grid-column: 1 / 3; }
    .hero-article .hero-sub { max-width: 760px; }
    .hero-article .article-hero-image { margin: 24px 0 0; }
    /* Bottom padding lets the masked image fade complete into the dark hero
       before the lighter body panel begins. */
    .hero-article.u-hero-pad-tight { padding-bottom: 32px; }
}

.article-breadcrumb {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink-3);
    margin-bottom: 14px;
    max-width: 100%;
    min-width: 0;
}
.article-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
/* Ancestor crumbs never shrink; only the current-page leaf truncates. */
.article-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.article-breadcrumb a {
    color: var(--ink-3);
    border: none;
    transition: color 120ms ease;
}
.article-breadcrumb a:hover { color: var(--teal); }
.article-breadcrumb .crumb-sep { color: var(--ink-3); opacity: 0.6; }
.article-breadcrumb .crumb-current {
    display: block;
    color: var(--ink-2);
    flex: 0 1 auto;
    min-width: 0;
    max-width: 60ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Primary category, shown as a label above the H1 (it used to be the breadcrumb leaf). */
.hero-article .article-kicker { display: flex; margin-bottom: 12px; }

/* Meta row at top of article body: reading-time eyebrow ←→ published date + share. */
.article-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.article-published { font-size: 0.78rem; color: var(--ink-3); }
.article-reading-eyebrow {
    color: var(--ice);
    gap: 7px;
    margin: 0;
}
.article-reading-eyebrow .reading-icon { color: var(--ice); flex-shrink: 0; }

/* Sticky reading-progress bar — sits at top of viewport when article scrolls. */
.article-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--teal), var(--ice));
    z-index: 60;
    transition: width 80ms linear;
    pointer-events: none;
}

.article-section { position: relative; }
.article-layout {
    display: grid;
    /* Right gutter is flexible (1fr) not a fixed 220px: the toc-col stays
       edge-aligned to .container (nav alignment) while the body holds its
       ~760px reading width down to the 1100px breakpoint instead of being
       squeezed by a symmetric fixed gutter the container is too narrow for. */
    grid-template-columns: 220px minmax(0, 760px) 1fr;
    gap: 56px;
    justify-content: start;
}

/* Override the global .article-body centering — the grid column handles it now. */
.article-section .article-body { max-width: none; margin: 0; }
.article-section .article-body h2,
.article-section .article-body h3 { scroll-margin-top: 96px; }

/* First paragraph after the H1/hero — slightly larger lead line. */
.article-body > p:first-of-type { font-size: 1.125rem; color: var(--ink); }


/* Hero image */
.article-hero-image {
    margin: 0 0 36px;
    border-radius: var(--r-md);
    overflow: hidden;
    /* Crop to a viewport-bounded band so the article content (ToC headline + first
       body lines) stays above the fold on a standard desktop, and so heroes that
       weren't pre-cropped at source still render as a clean banner. Height scales
       with the window (vh) and is capped, guaranteeing the fold on any screen.
       object-fit: cover (on the img) center-crops top+bottom of the 1.91:1 master. */
    height: clamp(200px, 42vh, 420px);
    /* Soft-fade the bottom edge so the image dissolves into the page instead of
       butting against the body section panel with a hard framed edge. The mask
       fades to transparent (no background-colour assumption) — universal across
       every article hero. Tune the 80% stop to change how much fades. */
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}
.article-hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; border: none; border-radius: 0; margin: 0; }

/* Sticky ToC */
.article-toc-col { position: relative; }
.article-toc {
    position: sticky;
    top: 96px;
    border-left: 1px solid var(--border);
    padding-left: 18px;
    font-size: 0.85rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
/* Non-heading label: keeping it a <p> avoids an h1 -> h4 heading-order skip
   (the nav already carries aria-label="On this page" for AT). */
.article-toc .article-toc-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    /* Ice = brand secondary/decorative accent; Teal stays reserved for the
       interactive ToC links. Subtle on a small uppercase label. */
    color: var(--ice);
    margin: 0 0 12px;
}
.article-toc ol { list-style: none; margin: 0; padding: 0; }
.article-toc li { margin: 0; }
.article-toc li.toc-l3 { padding-left: 14px; font-size: 0.8rem; }
.article-toc a {
    display: block;
    padding: 6px 10px 6px 12px;
    margin-left: -19px;
    color: var(--ink-2);
    border-left: 2px solid transparent;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
    line-height: 1.35;
}
.article-toc a:hover { color: var(--teal); }
.article-toc a.active {
    color: var(--ink);
    border-left-color: var(--teal);
    background: rgba(0,191,255,0.08);
}
.article-toc a.active:hover { color: var(--ink); }

/* Mobile-only ToC variant rendered inside hero; flipped on at <=1100px below. */
.article-toc-mobile { display: none; }

/* "Show all" toggle for the truncated mobile ToC (only visible when CSS caps the list). */
.article-toc-show-all {
    display: none;
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    min-height: 44px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--r-sm);
    color: var(--teal);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
.article-toc-show-all:hover {
    color: var(--teal-hover);
    border-color: var(--teal-30);
    background: var(--teal-05);
}

/* Right gutter — empty placeholder, just preserves grid centering of body. */
.article-side-col { position: relative; }

/* Sidebar sticky column — ToC + share scroll-follow the page together. The
   wrapper carries the stickiness; the inner ToC is static inside it (its own
   max-height/overflow handles long lists, trimmed to leave room for share). */
.article-side-sticky { position: sticky; top: 96px; }
.article-side-sticky .article-toc-sidebar {
    position: static;
    top: auto;
    max-height: calc(100vh - 220px);
}
.article-side-share {
    margin-top: 18px;
    padding-left: 18px;
    border-left: 1px solid var(--border);
}
.article-side-share-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    /* Ice = brand decorative accent, matching the ToC "On this page" label. */
    color: var(--ice);
    margin: 0 0 10px;
}

/* Inline horizontal share strip — icon row under the sidebar ToC (and after the
   ToC in the mobile stacked column). */
.article-share-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
.article-share-inline .share-btn-sm {
    width: 24px; height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ink-3);
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
    padding: 0;
}
.article-share-inline .share-btn-sm:hover {
    color: var(--teal);
    border-color: var(--teal-40);
    background: var(--teal-dim);
}
.article-share-inline .share-toast {
    font-size: 0.65rem;
    color: var(--teal);
    background: var(--teal-dim);
    border: 1px solid var(--teal-30);
    padding: 3px 8px;
    border-radius: var(--r-xs);
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
    margin-left: 4px;
}
.article-share-inline .share-toast.is-visible { opacity: 1; transform: translateY(0); }

/* Bottom author card — sits at end of article body, before "All articles" link. */
.article-author-bottom {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 56px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
}
/* When the author card follows the "Filed under" row, tighten the gap so it
   echoes the filed-under block's own top inset (separator→label) instead of the
   full 56px standalone margin. */
.article-filed + .article-author-bottom { margin-top: 28px; }
.article-author-bottom .author-meta { display: flex; flex-direction: column; gap: 2px; }
.article-author-bottom .author-name { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.article-author-bottom .author-name a { color: var(--ink); }
.article-author-bottom .author-name a:hover { color: var(--teal); }
.article-author-bottom .author-role { color: var(--ink-3); font-size: 0.78rem; }
.article-author-bottom .author-bio { color: var(--ink-2); font-size: 0.85rem; line-height: 1.5; margin: 6px 0 0; }

.article-freshness {
    margin-top: 24px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 0.85rem;
}
.article-freshness .freshness-line { color: var(--ink-2); }
.article-freshness .freshness-changelog { margin-top: 10px; }
.article-freshness .freshness-changelog summary {
    cursor: pointer;
    color: var(--teal);
    font-weight: 500;
    font-size: 0.82rem;
    user-select: none;
}
.article-freshness .freshness-changelog summary:hover { color: var(--teal-hover); }
.article-freshness .freshness-changelog ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--ink-3);
    font-size: 0.82rem;
    line-height: 1.55;
}
.article-freshness .freshness-changelog li { margin: 4px 0; }
.article-freshness .freshness-changelog strong { color: var(--ink-2); font-weight: 600; }

/* Key Takeaways + generic callouts */
.article-callout {
    margin: 32px 0;
    padding: 22px 26px;
    border: 1px solid var(--teal-20);
    background: var(--teal-dim);
    border-radius: var(--r-md);
}
.article-callout .callout-heading {
    margin: 0 0 14px;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--teal);
    font-weight: 700;
}
.article-callout ul { margin: 0 0 0 20px; color: var(--ink); }
.article-callout li { margin-bottom: 8px; }
.article-callout li:last-child { margin-bottom: 0; }
.callout-warn { border-color: var(--orange); background: var(--orange-dim); border-left-color: var(--orange); }
.callout-warn .callout-heading { color: var(--orange); }
.callout-tip  { border-color: var(--green); background: var(--green-dim); border-left-color: var(--green); }
.callout-tip  .callout-heading { color: var(--green); }

/* CTA panel — emitted from `:::cta` custom container. Headline + button.
   Anchor, not <button> — crawlable for SEO + counts in internal link graph. */
.article-cta {
    margin: 48px 0;
    padding: 40px 32px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--surface), var(--card));
    border: 1px solid var(--teal-25);
    box-shadow: 0 16px 40px var(--shadow-deep);
    text-align: center;
}
/* Authored as `**Lead.**` + line break + supporting sentence: the bold lead is the
   CTA's heading line, the supporting sentence stays at body weight. Scoped under
   .article-cta so it outranks `.article-body p`. */
.article-cta .article-cta-headline {
    margin: 0 0 24px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ink-2);
}
.article-cta .article-cta-headline strong {
    font-size: 1.35rem;
    line-height: 1.4;
    color: var(--ink);
}
.article-cta .article-cta-btn {
    /* min tap target meets Apple HIG 44 / Material 48 */
    min-height: 48px;
    padding: 14px 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--bg);
}
.article-cta .article-cta-btn:hover {
    color: var(--bg);
}
@media (max-width: 640px) {
    .article-cta { padding: 28px 20px; margin: 36px 0; }
    .article-cta .article-cta-headline { font-size: 0.95rem; margin-bottom: 20px; }
    .article-cta .article-cta-headline strong { font-size: 1.1rem; }
    .article-cta-btn { width: 100%; }
}

/* Trust microcopy line that follows a closing CTA (e.g. "Read-only access · …
   · EU-hosted."). Ice + a step smaller than body so it reads as a quiet
   reassurance caption under the CTA. Harmless where no such line exists. The
   `em` selector is required: the line is markdown italic, and the global
   `em { color: var(--teal) }` would otherwise paint the text teal. */
.article-body .article-cta + p,
.article-body .article-cta + p em {
    color: var(--ice);
}
.article-body .article-cta + p { font-size: 0.85rem; }

/* "Filed under" tag row — subtle neutral chips that wrap cleanly on any width,
   replacing the old uppercase-teal eyebrow + " · "-joined string that broke on
   mobile. Label muted; chips are quiet ink-3 pills on the surface tone. */
.article-filed {
    /* Own the separator + spacing locally (no shared u-mt-60-sep) so the block
       sits ~56px below the FAQ/body above and ~56px above the author card below
       — harmonized both ways. Label stacks over the chips, flush-left, so the
       chips align to the body-column edge on every width. */
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}
.article-filed-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.article-filed-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.article-filed-tag {
    font-size: 0.72rem;
    color: var(--ink-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 11px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Pull-quote — emitted from `:::quote` (experience) and `:::cite` (data source).
   Semantic <blockquote> + <footer> + <cite> for native quotation microformat. */
.article-pullquote {
    margin: 36px 0;
    padding: 6px 0 6px 24px;
    border-left: 3px solid var(--teal);
    background: none;
    color: var(--ink);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.55;
}
.article-pullquote p {
    margin: 0 0 10px;
    color: var(--ink);
}
.article-pullquote p:last-of-type { margin-bottom: 12px; }
.article-pullquote footer {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--ink-3);
    margin-top: 6px;
}
.article-pullquote cite {
    font-style: normal;
    font-weight: 600;
    color: var(--ink-2);
}
@media (max-width: 640px) {
    .article-pullquote { font-size: 1.02rem; padding-left: 18px; margin: 28px 0; }
}

/* Figures (standalone images promoted to <figure> with caption) */
.article-figure {
    margin: 28px 0;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}
.article-figure img {
    width: 100%;
    display: block;
    border: none;
    border-radius: 0;
    margin: 0;
}
.article-figure figcaption {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--ink-3);
    background: var(--surface);
    border-top: 1px solid var(--border);
    text-align: center;
}

/* Tables — contained card wrap that scrolls horizontally only when the table
   is genuinely wide (comparison, 3+ cols). Simple 2-col tables fit and never
   force a side-scroll. CSS-only edge shadows cue scrollability without JS:
   the `local`-attached cover gradients sit flush at the ends and reveal the
   `scroll`-attached shadow gradients only when there's content off-screen. */
.article-table-scroll {
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background:
        linear-gradient(to right, var(--surface) 30%, transparent) left center / 32px 100% no-repeat local,
        linear-gradient(to left, var(--surface) 30%, transparent) right center / 32px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.45), transparent) left center / 16px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.45), transparent) right center / 16px 100% no-repeat scroll;
    background-color: var(--surface);
    -webkit-overflow-scrolling: touch;
}
.article-table-scroll table { margin: 0; min-width: 0; background: transparent; }
.article-table-scroll table.comparison-table { min-width: 560px; }

/* Let long column titles wrap onto multiple lines instead of forcing the
   column wide (which skewed widths + forced a horizontal scroll on the
   narrow article-body tables). vertical-align keeps wrapped headers flush
   with single-line ones; line-height tightens the multi-line title block. */
.comparison-table thead th { white-space: normal; vertical-align: top; line-height: 1.3; }
.comparison-table tr:nth-child(even) td,
.comparison-table tr:nth-child(even) th { background: var(--bg-50); }
.comparison-table thead th:first-child { background: transparent; color: var(--ink-3); }
/* Tint last column teal ONLY when it actually represents Vornin
   (enhancer adds .has-vornin-col on those tables). Otherwise neutral —
   we don't want to visually endorse a competing offering. */
.comparison-table.has-vornin-col th:last-child {
    background: var(--teal-tint);
    color: var(--teal);
    border-bottom-color: var(--teal-30);
}
.comparison-table.has-vornin-col td:last-child {
    background: var(--teal-05);
    border-left: 1px solid var(--teal-30);
    color: var(--ink);
}
/* FAQ accordion (server-rendered <details>) */
.article-faq { margin-top: 24px; }
.article-faq-item {
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    margin-bottom: 12px;
    background: var(--surface);
    transition: border-color 150ms ease;
    scroll-margin-top: 96px;
}
.article-faq-item[open] { border-color: var(--teal-30); }
.article-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.article-faq-item summary::-webkit-details-marker { display: none; }
.article-faq-item summary::after {
    content: "+";
    font-size: 1.4rem;
    line-height: 1;
    color: var(--teal);
    flex-shrink: 0;
    transition: transform 200ms ease;
}
.article-faq-item[open] summary::after { content: "−"; }
.article-faq-item summary h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--ink);
    font-weight: 600;
}
.article-faq-item > div { padding: 0 20px 18px; color: var(--ink-2); }
.article-faq-item > div p:last-child { margin-bottom: 0; }

/* Related articles strip */
.article-related {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
}
/* Keep-reading cards reuse .articles-card; meta is a single author · date line
   (no reading time or author title); a single category badge follows. */
.article-related-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.article-related .articles-card-desc { font-size: 0.85rem; }

/* Tablet/mobile — collapse 3-col into single, swap sidebar ToC for hero-embedded one,
   show byline avatar. */
@media (max-width: 1100px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 760px;
        margin: 0 auto;
    }
    .article-toc-sidebar { display: none; }
    .article-toc-mobile {
        display: block;
        position: static;
        max-height: none;
        margin: 18px 0 24px;
        /* Flush-left with the body column; full column width. */
        padding-left: 0;
        border-left: none;
    }
    .article-side-col { display: none; }
    /* Stacked: ToC + share sit in the aside above the body content; the sticky
       wrapper goes inline, share aligns flush-left with the body text under the
       mobile ToC (hairline separator), with breathing room before the content. */
    .article-side-sticky { position: static; }
    .article-side-share {
        margin-bottom: 28px;
        padding: 16px 0 0 0;
        border-left: none;
        border-top: 1px solid var(--border);
    }
    .article-author-bottom { flex-wrap: wrap; }
    .article-related { grid-template-columns: 1fr; }
}

/* Phone — web.dev-style hero reshuffle, tighter rhythm, larger tap targets,
   truncated ToC with show-all toggle, anchor scroll offset for floating nav. */
@media (max-width: 768px) {
    .hero-article.u-hero-pad-tight { padding-top: 104px; }
    .article-section.u-pt-40 { padding-top: 20px; }
    .hero-article .hero-grid-bg { display: none; }
    .hero-article .hero-title { overflow-wrap: break-word; }

    /* Mobile header order is DOM-driven: the hero block holds breadcrumb → read-time
       → H1 → sub → byline → image; the stacked aside then holds ToC → share; content
       comes last. No flex reorder needed. */
    /* Top gap separates the image from the byline above (the kicker that used to
       supply this spacing is now hidden on mobile); bottom gap before content.
       Negative side margins let the image break ~14px past the text column into
       the container's 28px padding — slightly wider than the rest, still inset
       from the screen edge (not full-bleed), corners kept. */
    /* Drop the vh-band height on mobile: a narrow viewport makes that box near-square,
       so object-fit: cover crops the master's sides (wordmark edges). Let the box take
       the image's own 1.91:1 aspect instead — full banner, no side crop. */
    .article-hero-image { margin: 18px -14px 24px; height: auto; aspect-ratio: 1.91 / 1; }

    /* Byline becomes "Author · date" — drop the author title; name + date share one
       size, a step smaller, so they read as a single meta line. */
    .article-byline .byline-title { display: none; }
    .article-byline .byline-text { font-size: 0.85rem; }
    .byline-date { display: inline; }

    /* Meta-row is empty on mobile (read-time → kicker, date → byline,
       share → ToC column), so hide it entirely. */
    .article-meta-row { display: none; }

    /* Anchor offset for the floating nav pill. */
    .article-section .article-body h2,
    .article-section .article-body h3,
    .article-faq-item { scroll-margin-top: 72px; }

    /* Typography rhythm */
    .article-body h2 { font-size: 1.45rem; margin: 36px 0 12px; }
    .article-body h3 { font-size: 1.15rem; margin: 28px 0 10px; }
    .article-body table { font-size: 0.88rem; }
    .article-body th, .article-body td { padding: 10px 12px; }
    .article-body hr { margin: 28px 0; }
    .article-body blockquote { padding: 14px 18px; margin: 22px 0; }

    /* Callouts (Key Takeaways etc.) — on narrow screens the default list indent
       (card padding + ul margin + UA padding-inline-start) pushed bullet text
       ~86px in, collapsing it into a tall thin column. Trim the card padding and
       pull the bullets left so text reclaims the left side. */
    .article-callout { padding: 18px 16px; }
    .article-callout ul { margin-left: 0; padding-left: 18px; }

    /* Tap targets — share buttons */
    .article-share-inline { gap: 8px; }
    .article-share-inline .share-btn-sm { width: 40px; height: 40px; }
    .article-share-inline .share-btn-sm svg { width: 16px; height: 16px; }

    /* Tap targets — TOC + first-6 cap with show-all reveal. Zero left padding so
       link text aligns flush with the body column edge; full-width tap row. */
    .article-toc-mobile a {
        min-height: 44px;
        /* Reset the desktop sidebar's negative pull (base .article-toc a uses
           margin-left:-19px to overlap the bordered rail) — without this the
           flush-left mobile links sit ~19px off-screen and clip the first letters. */
        margin-left: 0;
        padding: 10px 0;
        display: flex;
        align-items: center;
    }
    .article-toc-mobile li:nth-child(n+7) { display: none; }
    .article-toc-mobile.is-expanded li:nth-child(n+7) { display: list-item; }
    .article-toc-show-all { display: block; }

    /* Hit areas via negative margin so visual position is unchanged. */
    .article-breadcrumb a {
        display: inline-block;
        padding: 6px 8px;
        margin: -6px -8px;
        border-radius: 4px;
    }
    .article-byline a {
        padding: 4px 6px;
        margin: -4px -6px;
        border-radius: 4px;
    }

    /* Footer density */
    .article-filed { margin-top: 32px; padding-top: 22px; }
    .article-author-bottom { margin-top: 32px; padding: 16px; }
    .article-filed + .article-author-bottom { margin-top: 24px; }
    .article-freshness { margin-top: 24px; }
}


/* =========================================================================
   Data components — emitted by ArticleDataComponents (:::keyfigs, :::matrix,
   :::formulas, :::note, :::bars, :::table, `chip:` / `tag:` tokens, marked
   table rows). Design-system rules: 1px --border edges only, no teal edge
   rules; a highlighted row steps up the ground instead of changing its edge.
   Semantic fills only where they state an outcome (matrix, tags, 1st chip).
   ========================================================================= */
.bm-keyfigs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    margin: 28px 0;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    overflow: hidden;
}
.bm-keyfig { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); }
.bm-keyfig-v {
    font: 700 1.7rem/1.1 var(--font-display);
    letter-spacing: -0.02em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.bm-keyfig-k { font: 0.72rem/1.45 var(--font-mono); color: var(--ink-3); }

.bm-matrix { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; max-width: 660px; margin: 24px 0; }
.bm-matrix-col, .bm-matrix-row { display: flex; align-items: center; font-size: 0.76rem; font-weight: 600; color: var(--ink-3); }
.bm-matrix-col { justify-content: center; }
.bm-matrix-row { max-width: 118px; line-height: 1.35; }
.bm-cell { display: flex; flex-direction: column; gap: 4px; padding: 14px 15px; border: 1px solid var(--border); border-radius: var(--r-sm); }
.bm-cell-abbr { font: 700 1.2rem/1.2 var(--font-display); }
.bm-cell-name { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.bm-cell-desc { font-size: 0.8rem; line-height: 1.45; }
.bm-tp, .bm-tn { background: var(--green-dim); }
.bm-tp .bm-cell-abbr, .bm-tn .bm-cell-abbr { color: var(--green); }
.bm-fp { background: var(--orange-dim); }
.bm-fp .bm-cell-abbr { color: var(--orange); }
.bm-fn { background: var(--red-dim); }
.bm-fn .bm-cell-abbr { color: var(--red); }

.bm-formulas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.bm-fcard, .bm-note, .bm-bars { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); }
.bm-fcard { display: flex; flex-direction: column; gap: 7px; padding: 15px 16px; }
.bm-fcard-name { font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.bm-fcard-alias { font-size: 0.76rem; color: var(--ink-3); }
.bm-fcard-eq { padding: 7px 9px; border-radius: var(--r-xs); background: var(--bg-50); font: 0.8rem/1.4 var(--font-mono); color: var(--ink-soft); }
.bm-fcard-desc { font-size: 0.84rem; line-height: 1.5; }

.bm-note { margin: 24px 0; padding: 16px 18px; }
.article-body .bm-note .bm-note-title { margin: 0 0 8px; font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.article-body .bm-note p { font-size: 0.93rem; margin: 0 0 10px; }
.article-body .bm-note p:last-child { margin-bottom: 0; }

.bm-bars { display: flex; flex-direction: column; gap: 13px; margin: 24px 0; padding: 19px; }
.bm-bars-title { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.bm-bars-rows { display: flex; flex-direction: column; gap: 9px; }
.bm-bar-row { display: grid; grid-template-columns: minmax(104px, 170px) 1fr auto; align-items: center; gap: 12px; font-size: 0.82rem; }
.bm-bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-bar-track { height: 15px; border-radius: var(--r-xs); background: var(--bg-50); }
.bm-bar-fill { display: block; height: 100%; border-radius: 0 var(--r-xs) var(--r-xs) 0; background: var(--card-hi); }
.bm-bar-val { min-width: 54px; text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.bm-bar-row.is-me .bm-bar-name { font-weight: 700; color: var(--ink); }
.article-body .bm-bar-row.is-me .bm-bar-fill { background: var(--teal); }
.article-body .bm-bars-note { margin: 0; font-size: 0.78rem; color: var(--ink-3); }

.bm-chip, .bm-tag { display: inline-block; font-weight: 600; white-space: nowrap; }
.bm-chip { padding: 3px 9px; border-radius: 999px; background: var(--card); font-size: 0.72rem; color: var(--ink-2); }
.bm-chip-first { background: var(--green-dim); color: var(--green); }
.bm-tag { padding: 2px 7px; border-radius: var(--r-xs); font-size: 0.68rem; }
.bm-tag-ext { background: var(--green-dim); color: var(--green); }
.bm-tag-auth { background: var(--orange-dim); color: var(--orange); }
.bm-tag-no { background: var(--red-dim); color: var(--red); }

.article-body caption { padding: 12px 16px 10px; text-align: left; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--border-soft); }
.article-body td { font-variant-numeric: tabular-nums; }
.article-body .article-table-scroll tr.is-me > * { background: var(--card); color: var(--ink); font-weight: 600; }
.article-body .article-table-scroll tr.is-total > * { background: var(--bg-50); color: var(--ink); font-weight: 700; }
.article-body tr.is-sub th { padding-left: 28px; color: var(--ink-3); font-weight: 400; }

@media (max-width: 620px) {
    .bm-matrix, .bm-formulas { grid-template-columns: 1fr; }
    .bm-matrix-col, .bm-matrix-corner { display: none; }
    .bm-matrix-row { max-width: none; padding-top: 6px; }
    .bm-bar-row { grid-template-columns: 1fr auto; }
    .bm-bar-track { grid-column: 1 / -1; grid-row: 2; }
}
