/* ==========================================================================
   Blog article body (plan12 PR A)
   Mobile-first: base rules are for phones; min-width queries scale up.
   Scoped to .blog-article-page / .article-body so the theme's global resets
   (e.g. ul { list-style: none }) still apply everywhere else.
   Spacing follows the brand scale: 4 8 12 16 20 24 28 40 48 56 88.
   ========================================================================== */

.blog-article-page,
.blog-list-page,
.blog-list-header {
    --ab-navy: #0B1A3A;
    --ab-body: #33405F;
    --ab-muted: #4A5578;
    --ab-violet: #5B3DF5;
    --ab-violet-deep: #3420A8;
    --ab-link: #4B32D9;
    --ab-border: #E4E7F2;
    --ab-page: #F5F6FB;
    --ab-chip: #EEF0FA;
    --ab-tint: #E9E4FF;
    --ab-success-fg: #0B5D46;
    --ab-success-bg: #E9FBF5;
    --ab-warning-fg: #9A5B00;
    --ab-warning-bg: #FFF1D6;
    --ab-heading: 'Sora', 'Inter', system-ui, sans-serif;
    --ab-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ab-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Article header (replaces the generic page banner) ---------- */
.article-header {
    background: linear-gradient(135deg, #0B1A3A 0%, #16295A 60%, #2A1F7A 100%);
    color: #FFFFFF;
    padding: 24px 0 32px;
}
.article-header.has-hero { padding-bottom: 72px; }
.article-header-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    max-width: 880px;
}
.article-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 1.4;
}
.article-crumbs li { display: inline-flex; align-items: center; gap: 8px; color: #C9D2EC; }
.article-crumbs li + li::before { content: '\203A'; color: #5EEAD4; font-size: 15px; }
.article-crumbs a { color: #E4E9F7; text-decoration: none; }
.article-crumbs a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.article-crumbs a:focus-visible,
.article-chip:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; border-radius: 4px; }
.article-chip {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #16295A;
    border: 1px solid #2A3F78;
    color: #5EEAD4;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}
.article-chip:hover { color: #FFFFFF; border-color: #5EEAD4; }
.article-header .article-title {
    margin: 0;
    color: #FFFFFF;
    font-family: 'Sora', 'Inter', system-ui, sans-serif;
    font-size: clamp(26px, 6.6vw, 34px);
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    text-wrap: balance;
    overflow-wrap: break-word;
}
.article-dek {
    margin: 0;
    max-width: 720px;
    color: #C9D2EC;
    font-size: 16px;
    line-height: 1.6;
}
.article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #E4E9F7;
}
.article-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #5B3DF5;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 14px;
}
.article-author { font-weight: 600; color: #FFFFFF; }
.article-by-who { display: inline-flex; align-items: center; gap: 10px; }
/* Phones: author on its own line, then date / read time (no orphan dot) */
.article-by-who { flex-basis: 100%; }
.article-by-who + .article-byline-item::before { display: none; }

/* The theme capitalises Every Word in headings; keep the author's casing */
.article-header .article-title,
.article-body h1, .article-body h2, .article-body h3,
.article-body h4, .article-body h5, .article-body h6,
.article-body summary,
.blog-article-page .widget-title h3,
.blog-article-page .related-posts h3,
.blog-article-page .related-posts h4,
.blog-article-page .mhq-comments-heading h2,
.blog-article-page .comment-form-wrap h2 { text-transform: none; }
.article-byline-item { display: inline-flex; align-items: center; gap: 4px; }
.article-byline > * + .article-byline-item::before {
    content: '\00B7';
    color: #5EEAD4;
    margin-right: 8px;
    font-weight: 700;
}

/* Brand gutter: 16px each side on phones (Bootstrap default is 12px) */
.article-header > .container,
.blog-article-page > .container { padding-left: 16px; padding-right: 16px; }

/* Page body spacing (replaces the theme's very tall section padding) */
.blog-article-page { padding: 32px 0 56px; }
.blog-article-page.has-hero { padding-top: 0; }
.blog-article-page.has-hero .article-hero {
    position: relative;
    z-index: 2;
    margin-top: -48px;
}

/* ---------- Hero image -------------------------------------------------- */
.blog-article-page .article-hero {
    margin: 0 0 24px;
}
.blog-article-page .article-hero img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    background: var(--ab-chip);
}

/* ---------- Meta row ---------------------------------------------------- */
.blog-article-page .article-meta {
    gap: 8px 16px;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--ab-muted);
}

/* ---------- Article body ------------------------------------------------ */
.article-body {
    font-family: var(--ab-text);
    font-size: 17px;
    line-height: 1.75;
    color: var(--ab-body);
    overflow-wrap: break-word;
    max-width: 720px;
}
.article-body > *:first-child { margin-top: 0; }
.article-body > *:last-child { margin-bottom: 0; }

.article-body p { margin: 0 0 20px; }
.article-body strong, .article-body b { color: var(--ab-navy); font-weight: 600; }

.article-body a {
    color: var(--ab-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.article-body a:hover { color: var(--ab-violet-deep); }
.article-body a:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; border-radius: 2px; }

/* Headings: anchor jumps clear the sticky header */
.article-body h2,
.article-body h3,
.article-body h4 {
    font-family: var(--ab-heading);
    color: var(--ab-navy);
    letter-spacing: -0.01em;
    scroll-margin-top: 96px;
}
.article-body h2 { font-size: 24px; line-height: 1.3; font-weight: 700; margin: 40px 0 12px; }
.article-body h3 { font-size: 19px; line-height: 1.4; font-weight: 700; margin: 28px 0 8px; }
.article-body h4 { font-size: 17px; line-height: 1.45; font-weight: 600; margin: 24px 0 8px; }

/* Lists: undo the theme's global list reset inside articles only */
.article-body ul,
.article-body ol {
    margin: 0 0 20px;
    padding-left: 24px;
    list-style: revert;
}
.article-body ul { list-style-type: disc; }
.article-body ol { list-style-type: decimal; }
.article-body ul ul { list-style-type: circle; }
.article-body li { margin: 0 0 8px; padding-left: 4px; }
.article-body li > ul,
.article-body li > ol { margin: 8px 0 0; }
.article-body ul li::marker { color: var(--ab-violet); }
.article-body ol li::marker { color: var(--ab-violet); font-weight: 700; }

/* Lead paragraph (first paragraph or .lead) */
.article-body > p:first-of-type,
.article-body .lead {
    font-size: 19px;
    line-height: 1.65;
    color: var(--ab-navy);
}

/* In-article table of contents (<nav> pasted from Claude, or .toc) */
.article-body nav,
.article-body .toc {
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 14px;
    padding: 16px 20px;
    margin: 0 0 28px;
}
.article-body nav p:first-child,
.article-body .toc-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ab-link);
}
.article-body nav p:first-child strong { color: inherit; }
.article-body nav ul,
.article-body nav ol { margin: 0; padding-left: 20px; }
.article-body nav li { margin: 0 0 4px; }
.article-body nav a { color: var(--ab-navy); text-decoration: none; }
.article-body nav a:hover { color: var(--ab-link); text-decoration: underline; }

/* Quotes */
.article-body blockquote {
    margin: 28px 0;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 14px;
    font-family: var(--ab-heading);
    font-size: 18px;
    line-height: 1.5;
    color: var(--ab-navy);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body blockquote cite,
.article-body blockquote footer {
    display: block;
    margin-top: 12px;
    font-family: var(--ab-text);
    font-size: 14px;
    font-style: normal;
    color: var(--ab-muted);
}

/* Code */
.article-body code {
    font-family: var(--ab-mono);
    font-size: 0.9em;
    background: var(--ab-chip);
    color: var(--ab-navy);
    padding: 2px 6px;
    border-radius: 6px;
}
.article-body pre {
    margin: 0 0 20px;
    padding: 16px;
    background: #0D1530;
    color: #E4E9F7;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}
.article-body pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* Images, figures, embeds */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}
.article-body figure { margin: 28px 0; }
.article-body figcaption {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ab-muted);
    text-align: center;
}
.article-body .article-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 28px 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--ab-navy);
}
.article-body .article-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Tables: scroll sideways inside their own box on phones */
.article-body .article-table-wrap {
    margin: 0 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--ab-border);
    border-radius: 14px;
    background: #FFFFFF;
}
.article-body table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.55;
}
.article-body th {
    background: var(--ab-navy);
    color: #FFFFFF;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    white-space: nowrap;
}
.article-body td {
    padding: 12px 16px;
    border-top: 1px solid var(--ab-border);
    vertical-align: top;
}
.article-body tbody tr:nth-child(even) td { background: var(--ab-page); }

.article-body hr {
    border: 0;
    border-top: 1px solid var(--ab-border);
    margin: 40px 0;
    opacity: 1;
}

/* FAQ / accordions */
.article-body details {
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 14px;
    margin: 0 0 12px;
}
.article-body summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 48px 16px 20px;
    position: relative;
    font-family: var(--ab-heading);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.45;
    color: var(--ab-navy);
    min-height: 44px;
}
.article-body summary::-webkit-details-marker { display: none; }
.article-body summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 400;
    color: var(--ab-violet);
}
.article-body details[open] summary::after { content: '\2212'; }
.article-body details > *:not(summary) { padding: 0 20px; }
.article-body details > *:last-child { padding-bottom: 16px; margin-bottom: 0; }

/* ---------- Content blocks (documented for the Claude prompt) ---------- */
.article-body .callout {
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--ab-tint);
    color: var(--ab-violet-deep);
}
.article-body .callout > *:last-child { margin-bottom: 0; }
.article-body .callout strong { color: inherit; }
.article-body .callout-tip { background: var(--ab-success-bg); color: var(--ab-success-fg); }
.article-body .callout-warning { background: var(--ab-warning-bg); color: var(--ab-warning-fg); }

.article-body .key-takeaways {
    margin: 28px 0;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 16px;
}
.article-body .key-takeaways > *:last-child { margin-bottom: 0; }

.article-body .cta-box {
    margin: 40px 0;
    padding: 24px 20px;
    border-radius: 20px;
    background: var(--ab-navy);
    color: #E4E9F7;
}
.article-body .cta-box h2,
.article-body .cta-box h3,
.article-body .cta-box strong { color: #FFFFFF; margin-top: 0; }
.article-body .cta-box a { color: #5EEAD4; }
.article-body .cta-box > *:last-child { margin-bottom: 0; }

/* ---------- Sidebar: Courses for you ----------------------------------- */
.blog-article-page .sidebar-courses-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.blog-article-page .sidebar-courses-all {
    font-size: 14px;
    font-weight: 600;
    color: var(--ab-link);
    white-space: nowrap;
}
.blog-article-page .sidebar-course-list { display: flex; flex-direction: column; gap: 12px; }
.blog-article-page .sidebar-course {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin: 0 -8px;
    border-radius: 12px;
    color: var(--ab-navy);
    text-decoration: none;
    min-height: 44px;
}
.blog-article-page .sidebar-course:hover { background: var(--ab-page); }
.blog-article-page .sidebar-course:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.blog-article-page .sidebar-course-thumb {
    flex: 0 0 112px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ab-tint);
}
.blog-article-page .sidebar-course-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-article-page .sidebar-course-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.blog-article-page .sidebar-course-cat {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ab-link);
}
.blog-article-page .sidebar-course-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-article-page .main-sideber .recent-thumb img { height: auto; aspect-ratio: 1 / 1; object-fit: cover; }

/* ==========================================================================
   PR B: article layout, sidebar, and the blocks around the body.
   Mobile-first; brand spacing 4 8 12 16 20 24 28 40 48 56 88.
   ========================================================================== */
.article-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* Layout: one column on phones; main + 340px sidebar on desktop */
.article-layout { display: flex; flex-direction: column; gap: 48px; }
.article-main { min-width: 0; width: 100%; }
.article-main > * + * { margin-top: 48px; }

/* Full-width layout: one centred reading column */
.blog-article-page.layout-full .article-main { max-width: 880px; margin-left: auto; margin-right: auto; }
.blog-article-page.layout-full .article-body { max-width: none; }

/* Shared section title + buttons */
.blog-article-page .article-section-title {
    margin: 0 0 20px;
    font-family: var(--ab-heading);
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--ab-navy);
    text-transform: none;
}
.article-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    font-family: var(--ab-text);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.article-btn:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.article-btn-primary { background: var(--ab-violet); color: #FFFFFF; }
.article-btn-primary:hover { background: var(--ab-violet-deep); color: #FFFFFF; }
.article-btn-ghost { background: transparent; color: #FFFFFF; border-color: #5EEAD4; }
.article-btn-ghost:hover { background: #16295A; color: #FFFFFF; }

/* Inline contents (phones; desktop only in full-width layout) */
.article-toc-inline {
    margin: 0 0 28px;
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 14px;
}
.article-toc-inline summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 12px 20px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 15px;
    color: var(--ab-navy);
}
.article-toc-inline summary::-webkit-details-marker { display: none; }
.article-toc-count {
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ab-chip);
    color: var(--ab-violet-deep);
    font-size: 13px;
    text-align: center;
}
.article-toc-inline ol {
    margin: 0;
    padding: 0 20px 16px 40px;
    list-style: decimal;
    font-size: 15px;
    line-height: 1.6;
}
.article-toc-inline li { margin: 0 0 6px; }
.article-toc-inline li::marker { color: var(--ab-violet); font-weight: 700; }
.article-toc-inline a { color: var(--ab-navy); text-decoration: none; }
.article-toc-inline a:hover { color: var(--ab-link); text-decoration: underline; }

/* Start-learning box */
.article-cta {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    padding: 24px 20px;
    border-radius: 20px;
    background: var(--ab-navy);
    color: #E4E9F7;
}
.article-cta-text { display: flex; flex-direction: column; gap: 8px; }
.article-cta-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5EEAD4;
}
.blog-article-page .article-cta-title {
    margin: 0;
    font-family: var(--ab-heading);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: #FFFFFF;
}
.blog-article-page .article-cta-sub { margin: 0; font-size: 15px; line-height: 1.5; color: #C9D2EC; }
.article-cta-actions { display: flex; flex-direction: column; gap: 12px; }

/* Tags + share */
.article-share-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--ab-border);
    border-bottom: 1px solid var(--ab-border);
}
.article-row-label { font-size: 14px; font-weight: 600; color: var(--ab-navy); margin-right: 4px; }
.article-tags, .article-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.article-tags a {
    padding: 5px 11px;
    border-radius: 8px;
    background: var(--ab-chip);
    color: var(--ab-navy);
    font-size: 13px;
    text-decoration: none;
}
.article-tags a:hover { background: var(--ab-tint); color: var(--ab-violet-deep); }
.article-share a,
.article-share button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid #D5D9EA;
    background: #FFFFFF;
    color: var(--ab-navy);
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
}
.article-share a:hover,
.article-share button:hover { border-color: var(--ab-violet); color: var(--ab-violet); }
.article-share a:focus-visible,
.article-share button:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.article-copy-done {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--ab-navy);
    color: #FFFFFF;
    font-size: 12px;
    white-space: nowrap;
}

/* Author box */
.article-author-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 28px;
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 16px;
}
.article-author-avatar {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ab-violet);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 20px;
}
.article-author-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.article-author-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ab-link);
}
.article-author-name { font-family: var(--ab-heading); font-size: 18px; font-weight: 700; color: var(--ab-navy); }
.blog-article-page .article-author-bio { margin: 4px 0 0; font-size: 15px; line-height: 1.6; color: var(--ab-muted); }

/* Read next */
.article-related-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}
.article-related-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 16px;
    color: var(--ab-navy);
    text-decoration: none;
    transition: border-color .15s ease;
}
.article-related-card:hover { border-color: var(--ab-violet); color: var(--ab-navy); }
.article-related-card:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.article-related-thumb { aspect-ratio: 16 / 9; background: var(--ab-tint); overflow: hidden; }
.article-related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-related-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.article-related-meta { font-size: 13px; color: var(--ab-muted); }
.article-related-title {
    font-family: var(--ab-heading);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Explore the blog */
.article-explore { display: flex; flex-direction: column; gap: 16px; }
.article-search {
    display: flex;
    align-items: center;
    max-width: 520px;
    padding: 4px 4px 4px 18px;
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 999px;
}
.article-search:focus-within { border-color: var(--ab-violet); box-shadow: 0 0 0 4px rgba(91, 61, 245, .15); }
.article-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: var(--ab-navy);
}
.article-search button {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: var(--ab-violet);
    color: #FFFFFF;
    font-size: 18px;
    cursor: pointer;
}
.article-search button:hover { background: var(--ab-violet-deep); }
.article-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.article-cats a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #D5D9EA;
    border-radius: 999px;
    background: #FFFFFF;
    color: var(--ab-navy);
    font-size: 14px;
    text-decoration: none;
}
.article-cats a span { color: var(--ab-muted); font-size: 13px; }
.article-cats a:hover { border-color: var(--ab-violet); color: var(--ab-violet-deep); }

/* Comments */
.blog-article-page .article-comments-empty { margin: 0 0 24px; color: var(--ab-muted); }
.article-comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.article-comment {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid var(--ab-border);
}
.article-comment-avatar { flex: 0 0 auto; border-radius: 999px; background: var(--ab-chip); }
.article-comment-body { min-width: 0; flex: 1 1 auto; }
.blog-article-page .article-comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 0 0 6px;
}
.article-comment-name { font-weight: 700; color: var(--ab-navy); }
.article-comment-date { font-size: 13px; color: var(--ab-muted); }
.blog-article-page .article-comment-text { margin: 0; font-size: 16px; line-height: 1.65; color: var(--ab-body); overflow-wrap: anywhere; }
.article-comment-replies { margin: 12px 0 0; padding-left: 4px; }
.article-comment-replies .article-comment:last-child { border-bottom: 0; padding-bottom: 0; }

.article-comment-form {
    padding: 24px 20px;
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 16px;
}
.blog-article-page .article-comment-form-title {
    margin: 0 0 6px;
    font-family: var(--ab-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--ab-navy);
    text-transform: none;
}
.blog-article-page .article-comment-form-note { margin: 0 0 20px; font-size: 14px; color: var(--ab-muted); }
.article-form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.article-field { display: flex; flex-direction: column; gap: 6px; }
.article-field label { font-size: 14px; font-weight: 600; color: var(--ab-navy); }
.article-field input,
.article-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #D5D9EA;
    border-radius: 10px;
    background: #FFFFFF;
    font-size: 16px; /* 16px stops iOS zooming into the field */
    color: var(--ab-navy);
    font-family: var(--ab-text);
}
.article-field textarea { resize: vertical; min-height: 120px; }
.article-field input:focus,
.article-field textarea:focus {
    outline: 0;
    border-color: var(--ab-violet);
    box-shadow: 0 0 0 4px rgba(91, 61, 245, .15);
}

/* Sidebar */
.article-sidebar { min-width: 0; }
.article-sidebar-sticky { display: flex; flex-direction: column; gap: 20px; }
.article-toc-side { display: none; }
.article-side-card,
.article-toc-side {
    padding: 20px;
    background: #FFFFFF;
    border: 1px solid var(--ab-border);
    border-radius: 16px;
}
.blog-article-page .article-toc-side-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ab-link);
}
.article-toc-side ol { list-style: none; margin: 0; padding: 0; }
.article-toc-side a {
    display: block;
    padding: 7px 12px;
    border-left: 2px solid var(--ab-border);
    color: var(--ab-muted);
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
}
.article-toc-side a:hover { color: var(--ab-navy); }
.article-toc-side a.is-active {
    border-left-color: var(--ab-violet);
    background: #F1EEFF;
    color: var(--ab-violet-deep);
    font-weight: 600;
}
.article-progress { margin-top: 14px; height: 6px; border-radius: 999px; background: var(--ab-chip); overflow: hidden; }
.article-progress span { display: block; width: 0; height: 100%; background: var(--ab-violet); transition: width .1s linear; }
.blog-article-page .sidebar-courses h3 {
    margin: 0;
    font-family: var(--ab-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--ab-navy);
}
.blog-article-page .sidebar-courses-head { margin-bottom: 12px; }
.article-side-app {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--ab-navy);
    color: #FFFFFF;
    text-decoration: none;
}
.article-side-app:hover { background: #16295A; color: #FFFFFF; }
.article-side-app:focus-visible { outline: 3px solid #22D3EE; outline-offset: 2px; }
.article-side-app > i:first-child { font-size: 26px; color: #5EEAD4; }
.article-side-app span { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; font-size: 13px; color: #C9D2EC; }
.article-side-app strong { font-size: 15px; color: #FFFFFF; }

/* Headings in the page chrome keep their casing (theme capitalises h1-h6) */
.blog-article-page h2,
.blog-article-page h3,
.blog-article-page h4 { text-transform: none; }

/* Phones: Read next as compact rows (thumb left) */
@media (max-width: 575.98px) {
    /* "Tags" / "Share" labels on their own line so 6 buttons fit one row */
    .article-row-label { flex-basis: 100%; margin: 0 0 2px; }
    .article-related-card { flex-direction: row; align-items: stretch; }
    .article-related-thumb { flex: 0 0 120px; aspect-ratio: auto; min-height: 88px; }
    .article-related-body { padding: 12px 14px; justify-content: center; }
    .article-related-title { font-size: 15px; }
}

@media (min-width: 576px) {
    .article-cta { padding: 32px; }
    .article-cta-actions { flex-direction: row; flex-wrap: wrap; }
    .article-share-row { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
    .article-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-field-full { grid-column: 1 / -1; }
    .article-comment-form { padding: 28px; }
    .article-comment { gap: 16px; }
}

@media (min-width: 768px) {
    .blog-article-page .article-section-title { font-size: 24px; }
    .article-cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 28px; padding: 36px 40px; }
    .article-cta-actions { flex: 0 0 auto; }
    .blog-article-page .article-cta-title { font-size: 26px; }
}

@media (min-width: 992px) {
    .article-layout.has-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 56px;
        align-items: stretch;
    }
    /* Text fills the main column so there is no empty gap before the sidebar */
    .article-layout.has-sidebar .article-body { max-width: none; }
    .article-layout.has-sidebar .article-toc-inline { display: none; }
    .article-toc-side { display: block; }
    .article-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Desktop: the sidebar block stays in view. On short screens (laptops)
   it scrolls inside itself instead of being cut off. */
@media (min-width: 992px) {
    .article-sidebar-sticky {
        position: sticky;
        top: 108px;
        max-height: calc(100vh - 124px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: #D5D9EA transparent;
        padding-bottom: 4px;
    }
    .article-sidebar-sticky::-webkit-scrollbar { width: 6px; }
    .article-sidebar-sticky::-webkit-scrollbar-thumb { background: #D5D9EA; border-radius: 999px; }
}

/* ---------- Comment form ------------------------------------------------ */
.blog-article-page .comment-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.blog-article-page .comment-note {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--ab-muted);
}

/* ---------- Scale up ---------------------------------------------------- */
@media (min-width: 576px) {
    .article-header .article-title { font-size: clamp(30px, 5.4vw, 40px); }
    .article-dek { font-size: 17px; }
    .blog-article-page .article-hero img { aspect-ratio: 16 / 8; border-radius: 18px; }
    .article-body nav, .article-body .toc { padding: 20px 24px; }
    .article-body blockquote { padding: 24px 28px; }
    .article-body .cta-box { padding: 32px; }
}

@media (min-width: 768px) {
    .article-header { padding: 40px 0 48px; }
    .article-header.has-hero { padding-bottom: 120px; }
    .article-header-inner { gap: 16px; }
    .blog-article-page.has-hero .article-hero { margin-top: -88px; }
    .article-byline { font-size: 15px; }
    .article-by-who { flex-basis: auto; }
    .article-by-who + .article-byline-item::before { display: inline; }
    .article-avatar { width: 40px; height: 40px; font-size: 16px; }
    .article-body { font-size: 18px; }
    .article-body h2 { font-size: 28px; margin: 48px 0 16px; }
    .article-body h3 { font-size: 21px; margin: 32px 0 10px; }
    .article-body > p:first-of-type,
    .article-body .lead { font-size: 20px; }
    .article-body blockquote { font-size: 20px; }
    .article-body table { font-size: 16px; }
}

@media (min-width: 992px) {
    .article-header { padding: 56px 0 64px; }
    .article-header.has-hero { padding-bottom: 152px; }
    .article-header-inner { max-width: none; }
    .article-header .article-title { font-size: clamp(40px, 3.6vw, 52px); line-height: 1.12; max-width: 1180px; }
    .article-dek { max-width: 820px; }
    .article-dek { font-size: 19px; }
    .blog-article-page { padding-bottom: 88px; }
    .blog-article-page.has-hero .article-hero { margin-top: -120px; }
    .blog-article-page .article-hero { margin-bottom: 40px; }
    .blog-article-page .article-hero img { aspect-ratio: 16 / 7; border-radius: 20px; }
    .article-body h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .article-body * { scroll-behavior: auto; }
}
