/**
 * Blog index + single post.
 * Loaded only on the WordPress posts page (home.php) and on single
 * `post` post-type pages (single-post.php).
 */

/* ──────────────────────────────────────────────
   Shared atoms used by both index and single
   ────────────────────────────────────────────── */

.cwAvatar {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C7CDFF 0%, #FED7AA 100%);
    border: 1.5px solid #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
    font-size: 9.5px;
    font-weight: 800;
    color: var(--clrInk);
    flex: none;
    font-feature-settings: "tnum";
}
.cwAvatarSm { width: 22px; height: 22px; font-size: 9px; }
.cwAvatarLg {
    width: 28px;
    height: 28px;
    font-size: 11px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.cwAvatarXl { width: 40px; height: 40px; font-size: 13px; border-width: 2px; }
.cwAvatarXxl { width: 64px; height: 64px; font-size: 20px; border-width: 2px; box-shadow: var(--shadowCard); }

.cwMetaDot,
.cwMetaSep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--clrInk40);
    flex: none;
}

/* ──────────────────────────────────────────────
   Index - page head
   ────────────────────────────────────────────── */

.cwBlogHead {
    text-align: center;
    padding-top: clamp(3rem, 6vw, 5rem) !important;
    padding-bottom: clamp(2rem, 4vw, 3rem) !important;
}
.cwBlogHead .sectionLabel {
    margin-inline: auto;
    margin-bottom: 1.5rem;
}
.cwBlogHead h1 {
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.0;
    margin: 0 auto 1.4rem;
    max-width: 22ch;
}
.cwBlogLead {
    margin: 0 auto;
    max-width: 64ch;
    color: var(--clrInk70);
    font-size: clamp(1.05rem, 1.4vw, 1.18rem);
    line-height: 1.6;
}

/* Category chip row */
.cwCatRow {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}
.cwCatChip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1rem;
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: 999px;
    text-decoration: none;
    color: var(--clrInk70);
    font-size: 0.82rem;
    font-weight: 500;
    transition: border-color 180ms var(--ease), color 180ms var(--ease), background 180ms var(--ease);
}
.cwCatChip:hover {
    border-color: var(--clrBorderStrong);
    color: var(--clrInk);
}
.cwCatChipActive {
    background: var(--clrInk);
    color: #fff;
    border-color: var(--clrInk);
}
.cwCatChipActive:hover {
    color: #fff;
}
.cwCatChipCount {
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
    font-weight: 500;
}

/* ──────────────────────────────────────────────
   Featured hero card
   ────────────────────────────────────────────── */

.cwBlogFeatured {
    padding-top: 1.5rem !important;
    padding-bottom: clamp(2.5rem, 5vw, 4rem) !important;
}
.cwFeaturedCard {
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: var(--radiusXl);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    transition: transform 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease);
    text-decoration: none;
    color: var(--clrInk);
    box-shadow: var(--shadowCard);
}
.cwFeaturedCard:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadowLift);
    border-color: var(--clrBorderStrong);
}
.cwFeaturedCard:hover .cwFtBtn { gap: 12px; }
@media (max-width: 900px) {
    .cwFeaturedCard { grid-template-columns: 1fr; }
}
.cwFtCover {
    position: relative;
    min-height: 380px;
    background: var(--clrInk);
    overflow: hidden;
    isolation: isolate;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.cwFtCover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 70% at 100% 0%, rgba(249, 115, 22, 0.32), transparent 55%),
        radial-gradient(ellipse 70% 80% at 0% 100%, rgba(79, 70, 229, 0.45), transparent 55%);
}
.cwFtCover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse at center, black, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 75%);
}
.cwFeatTag {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0.875rem;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.cwFeatPulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--clrAccent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22);
}
.cwFtMini {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 500;
    flex-wrap: wrap;
}
.cwFtMini strong {
    color: #fff;
    font-weight: 600;
}
.cwFtBody {
    padding: 2.75rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 700px) {
    .cwFtBody { padding: 2rem 1.5rem; }
    .cwFtCover { min-height: 280px; padding: 1.5rem; }
}
.cwFtCat {
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clrPrimary);
    margin-bottom: 1.125rem;
}
.cwFtTitle {
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 1.125rem;
    color: var(--clrInk);
}
.cwFtExcerpt {
    font-size: 1.05rem;
    color: var(--clrInk70);
    line-height: 1.55;
    margin: 0 0 1.4rem;
}
.cwFtMeta {
    display: flex;
    gap: 0.875rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--clrMuted);
    margin-bottom: 1.4rem;
}
.cwFtBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--clrInk);
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 200ms var(--ease);
    align-self: flex-start;
}
.cwFtBtn::after { content: "→"; }

/* ──────────────────────────────────────────────
   Recent posts grid
   ────────────────────────────────────────────── */

.cwBlogRecent {
    padding-top: 0 !important;
    padding-bottom: clamp(3rem, 6vw, 5rem) !important;
}
.cwRecentHead {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.125rem;
    border-bottom: 1px solid var(--clrBorder);
}
.cwRecentHead h2 {
    font-size: 1.5rem;
    margin: 0;
    letter-spacing: -0.022em;
    font-weight: 800;
}
.cwRecentMeta {
    font-size: 0.82rem;
    color: var(--clrMuted);
}
.cwBlogEmpty {
    text-align: center;
    color: var(--clrMuted);
    padding: 3rem 1rem;
}

.cwPostGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1000px) { .cwPostGrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .cwPostGrid { grid-template-columns: 1fr; } }

.cwPostCard {
    display: flex;
    flex-direction: column;
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: var(--radiusLg);
    overflow: hidden;
    text-decoration: none;
    color: var(--clrInk);
    transition: transform 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease);
}
.cwPostCard:hover {
    transform: translateY(-4px);
    border-color: var(--clrBorderStrong);
    box-shadow: var(--shadowCard);
}
.cwPcCover {
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.cwPcCover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle at 1px 1px, rgba(15, 23, 42, 0.06) 1px, transparent 0);
    background-size: 18px 18px;
}
.cwPcCover-t1 { background: linear-gradient(135deg, #EEF0FF 0%, #DDE0FF 100%); }
.cwPcCover-t2 { background: linear-gradient(135deg, #FFEDD5 0%, #FED7AA 100%); }
.cwPcCover-t3 { background: linear-gradient(135deg, #ECEAF6 0%, #D8D4F0 100%); }
.cwPcCover-t4 { background: linear-gradient(135deg, #ECFDF5 0%, #CCFBE5 100%); }
.cwPcCover-t5 { background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%); }
.cwPcCover-t6 { background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%); color: #fff; }
.cwPcCover-t6::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 70% at 100% 0%, rgba(249, 115, 22, 0.32), transparent 55%),
        radial-gradient(ellipse 70% 80% at 0% 100%, rgba(79, 70, 229, 0.45), transparent 55%);
}
.cwPcGlyph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.038em;
    color: rgba(15, 23, 42, 0.55);
    text-align: center;
    padding: 0 1.25rem;
    line-height: 1.05;
}
.cwPcCover-t6 .cwPcGlyph { color: rgba(255, 255, 255, 0.88); }
.cwPcGlyph mark {
    color: var(--clrAccent);
    background: none;
}
.cwPcGlyph mark::after { display: none; }
.cwPcCover-t6 .cwPcGlyph mark { color: var(--clrAccent); }
.cwPcCat {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--clrInk);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.3rem 0.625rem;
    border-radius: 999px;
    border: 1px solid var(--clrBorder);
    z-index: 1;
}
.cwPcCover-t6 .cwPcCat {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}
.cwPcBody {
    padding: 1.4rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cwPcTitle {
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 0.625rem;
    color: var(--clrInk);
}
.cwPcExcerpt {
    font-size: 0.91rem;
    color: var(--clrInk70);
    line-height: 1.55;
    margin: 0 0 1.125rem;
    flex: 1;
}
.cwPcMeta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: var(--clrMuted);
}
.cwPcMeta strong {
    color: var(--clrInk);
    font-weight: 600;
}

/* ──────────────────────────────────────────────
   Newsletter strip
   ────────────────────────────────────────────── */

.cwNewsletter {
    padding-top: clamp(2rem, 5vw, 4rem) !important;
    padding-bottom: clamp(3rem, 6vw, 5rem) !important;
}
.cwNlBox {
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: var(--radiusXl);
    padding: clamp(2rem, 4vw, 3.2rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
@media (max-width: 800px) {
    .cwNlBox { grid-template-columns: 1fr; gap: 1.5rem; }
}
.cwNlLabel {
    margin-bottom: 0.875rem;
    display: inline-flex;
}
.cwNlBox h2 {
    font-size: 1.8rem;
    margin: 0 0 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--clrInk);
}
.cwNlBox p {
    font-size: 1rem;
    color: var(--clrInk70);
    margin: 0;
    line-height: 1.55;
}
.cwNlForm {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cwNlForm input {
    flex: 1 1 200px;
    font: inherit;
    font-size: 0.94rem;
    padding: 0.875rem 1.125rem;
    border-radius: var(--radiusPill);
    border: 1px solid var(--clrBorder);
    background: var(--clrPaper);
    color: var(--clrInk);
    transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.cwNlForm input:focus {
    outline: none;
    border-color: var(--clrPrimary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}
.cwNlForm input::placeholder { color: var(--clrInk40); }
.cwNlNote {
    font-size: 0.75rem;
    color: var(--clrMuted);
    margin-top: 0.75rem;
}

/* ──────────────────────────────────────────────
   Single post (single-post.php)
   ────────────────────────────────────────────── */

/* Reading-progress bar */
.cwReadProgress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 100;
    background: transparent;
    pointer-events: none;
}
.cwReadProgressBar {
    height: 100%;
    background: var(--clrPrimary);
    width: 0;
    transition: width 80ms linear;
    box-shadow: 0 0 12px rgba(79, 70, 229, 0.55);
}

.cwSingleContainer {
    max-width: var(--container);
    margin-inline: auto;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
}

/* Breadcrumbs (same recipe as glossary, kept local so the blog can ship
   independently of glossary.css being loaded) */
.cwCrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0 1rem;
    font-size: 0.82rem;
    color: var(--clrMuted);
}
.cwCrumbs a { color: var(--clrInk70); text-decoration: none; }
.cwCrumbs a:hover {
    color: var(--clrInk);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cwCrumbsSep { color: var(--clrInk40); }
.cwCrumbsHere {
    color: var(--clrInk);
    font-weight: 600;
}

/* Post hero */
.cwPostHero {
    padding: 1rem 0 2.5rem;
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}
.cwPostHeroCat {
    display: inline-block;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clrPrimary);
    padding: 0.45rem 0.875rem;
    background: var(--clrPrimarySoft);
    border-radius: 999px;
    margin-bottom: 1.75rem;
    text-decoration: none;
}
.cwPostHeroCat:hover { background: rgba(79, 70, 229, 0.14); }
.cwBlogSingle .cwPostTitle {
    font-size: clamp(2.2rem, 5.5vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0 0 1.5rem;
}
.cwPostDeck {
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
    color: var(--clrInk70);
    line-height: 1.55;
    margin: 0 auto;
    max-width: 56ch;
}

/* Byline pill */
.cwByline {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.4rem;
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: 999px;
    box-shadow: var(--shadowCard);
    margin-top: 2.25rem;
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.cwBylineInfo { text-align: left; line-height: 1.3; }
.cwBylineName { font-weight: 700; color: var(--clrInk); font-size: 0.875rem; }
.cwBylineRole { color: var(--clrMuted); font-size: 0.75rem; }
.cwBylineSep {
    width: 1px;
    height: 28px;
    background: var(--clrBorder);
}
.cwBylineMeta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}
.cwBylineMetaLabel {
    font-size: 0.72rem;
    color: var(--clrMuted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}
.cwBylineMetaValue {
    font-weight: 600;
    color: var(--clrInk);
    font-size: 0.84rem;
}

/* Hero cover art */
.cwHeroCover {
    max-width: 1080px;
    margin: 1rem auto 0;
    aspect-ratio: 16 / 8;
    border-radius: var(--radiusXl);
    overflow: hidden;
    position: relative;
    isolation: isolate;
    background: var(--clrInk);
    display: grid;
    place-items: center;
    padding: 3rem;
}
.cwHeroCover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 50% 70% at 100% 0%, rgba(249, 115, 22, 0.32), transparent 55%),
        radial-gradient(ellipse 70% 80% at 0% 100%, rgba(79, 70, 229, 0.45), transparent 55%);
}
.cwHeroCover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse at center, black, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 75%);
}
.cwHeroGlyph {
    color: #fff;
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.038em;
    line-height: 1;
    text-align: center;
    max-width: 16ch;
}
.cwHeroGlyph mark {
    color: var(--clrAccent);
    background: none;
}
.cwHeroGlyph mark::after { display: none; }

/* Two-column body */
.cwPostBody {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 240px;
    gap: 3rem;
    padding: 3rem 0 4rem;
    align-items: start;
}
@media (max-width: 1100px) {
    .cwPostBody {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 2rem;
    }
    .cwShareCol { display: none; }
}
@media (max-width: 800px) {
    .cwPostBody { grid-template-columns: 1fr; }
    .cwTocCol { display: none; }
}

/* TOC sidebar */
.cwTocCol {
    position: sticky;
    top: 96px;
}
.cwTocCol h4 {
    font-size: 0.69rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clrMuted);
    font-weight: 600;
    margin: 0 0 1rem;
    padding-left: 0.875rem;
}
.cwToc {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 1px solid var(--clrBorder);
}
.cwToc li a {
    display: block;
    padding: 0.5rem 0.875rem;
    font-size: 0.84rem;
    color: var(--clrInk70);
    text-decoration: none;
    line-height: 1.4;
    border-left: 2px solid transparent;
    margin-left: -1px;
    transition: color 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
}
.cwToc li a:hover { color: var(--clrInk); }
.cwToc li a.cwTocActive {
    color: var(--clrPrimary);
    border-left-color: var(--clrPrimary);
    font-weight: 600;
    background: rgba(79, 70, 229, 0.04);
}

/* Share rail */
.cwShareCol {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.cwShareCol h4 {
    font-size: 0.69rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clrMuted);
    font-weight: 600;
    margin: 0 0 0.5rem;
}
.cwShareBtn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: 12px;
    color: var(--clrInk70);
    cursor: pointer;
    transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
    text-decoration: none;
    padding: 0;
}
.cwShareBtn:hover {
    background: var(--clrInk);
    color: #fff;
    border-color: var(--clrInk);
    transform: translateY(-2px);
}
.cwShareBtn svg { width: 16px; height: 16px; }
.cwShareCopied {
    background: var(--clrPrimary) !important;
    border-color: var(--clrPrimary) !important;
    color: #fff !important;
}

/* Prose */
.cwProse {
    max-width: 64ch;
}
.cwProse > h2:first-child,
.cwProse > h3:first-child,
.cwProse > p:first-child,
.cwProse > ul:first-child,
.cwProse > ol:first-child {
    margin-top: 0;
}
.cwProse h2 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 2.8rem 0 1rem;
    scroll-margin-top: 7rem;
    color: var(--clrInk);
}
.cwProse h3 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 2rem 0 0.6rem;
    color: var(--clrInk);
}
.cwProse p {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--clrInk);
    margin: 0 0 1.2rem;
}
.cwProse .lead,
.cwProse > p:first-of-type {
    font-size: 1.3rem;
    line-height: 1.55;
    color: var(--clrInk);
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}
.cwProse ul,
.cwProse ol {
    margin: 0 0 1.2rem;
    padding-left: 1.4rem;
    list-style: revert;
}
.cwProse li {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin: 0 0 0.55rem;
}
.cwProse strong { font-weight: 700; }
.cwProse a {
    color: var(--clrPrimary);
    text-decoration: underline;
    text-decoration-color: rgba(79, 70, 229, 0.3);
    text-underline-offset: 3px;
}
.cwProse a:hover { text-decoration-color: var(--clrPrimary); }
.cwProse blockquote {
    border-left: 3px solid var(--clrAccent);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2rem 0;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--clrInk);
    font-weight: 600;
    letter-spacing: -0.018em;
}
.cwProse blockquote::before,
.cwProse blockquote::after { content: ""; }
.cwProse blockquote cite {
    display: block;
    font-style: normal;
    font-weight: 500;
    font-size: 0.84rem;
    color: var(--clrMuted);
    margin-top: 0.75rem;
    letter-spacing: 0;
}
.cwProse code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--clrPaperDeep);
    padding: 2px 6px;
    border-radius: 5px;
}
.cwProse hr {
    border: 0;
    border-top: 1px solid var(--clrBorder);
    margin: 2.5rem 0;
}

/* Pull quote (editor uses class="pull" or wraps in <p class="pull">) */
.cwProse .pull {
    font-size: clamp(1.4rem, 2.6vw, 1.85rem) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.025em !important;
    color: var(--clrInk) !important;
    padding: 2rem 0 !important;
    margin: 1.5rem 0 !important;
    border-top: 1px solid var(--clrBorder);
    border-bottom: 1px solid var(--clrBorder);
    text-align: center;
}

/* Inline change-card example, inserted by editors via raw HTML block */
.cwProse .changeEx {
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: var(--radiusMd);
    padding: 1.4rem 1.5rem;
    margin: 1.8rem 0;
    box-shadow: var(--shadowCard);
}
.cwProse .changeEx .lbl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: var(--clrAccentSoft);
    color: #C2410C;
    margin-bottom: 0.75rem;
}
.cwProse .changeEx .lbl .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--clrAccent);
}
.cwProse .changeEx h4 {
    font-size: 1.1rem;
    margin: 0 0 0.875rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--clrInk);
}
.cwProse .changeEx .insight {
    border-left: 3px solid var(--clrPrimary);
    padding: 0.625rem 1rem;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 0 8px 8px 0;
}
.cwProse .changeEx .insight .il {
    font-size: 0.66rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: var(--clrPrimary) !important;
    margin: 0 0 0.375rem !important;
}
.cwProse .changeEx .insight p {
    font-size: 0.875rem !important;
    margin: 0 !important;
    line-height: 1.55 !important;
    color: var(--clrInk) !important;
}

/* Author card at end of article */
.cwAuthorCard {
    display: flex;
    gap: 1.4rem;
    align-items: center;
    padding: 1.75rem;
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: var(--radiusLg);
    margin-top: 3rem;
}
@media (max-width: 600px) {
    .cwAuthorCard { flex-direction: column; text-align: center; }
}
.cwAuthorName { font-weight: 700; font-size: 0.94rem; margin: 0 0 4px; }
.cwAuthorRole { font-size: 0.82rem; color: var(--clrMuted); margin: 0 0 6px; }
.cwAuthorBio  { font-size: 0.875rem; color: var(--clrInk70); line-height: 1.55; margin: 0; }

/* Related strip */
.cwRelated {
    padding-top: 0;
    padding-bottom: 0;
}
.cwRelatedHead {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding-bottom: 1.125rem;
    border-bottom: 1px solid var(--clrBorder);
}
.cwRelatedHead h2 {
    font-size: 1.6rem;
    margin: 0;
    letter-spacing: -0.022em;
    font-weight: 800;
}
.cwRelatedHead a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--clrPrimary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cwRelatedHead a:hover { text-decoration: underline; text-underline-offset: 3px; }

.cwRelGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 800px) { .cwRelGrid { grid-template-columns: 1fr; } }
.cwRelCard {
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: var(--radiusLg);
    padding: 1.75rem 1.65rem;
    text-decoration: none;
    color: var(--clrInk);
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.cwRelCard:hover {
    transform: translateY(-4px);
    border-color: var(--clrBorderStrong);
    box-shadow: var(--shadowCard);
}
.cwRelCardCat {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--clrPrimary);
}
.cwRelCard h3 {
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: -0.018em;
    line-height: 1.3;
    font-weight: 700;
    color: var(--clrInk);
}
.cwRelCard p {
    font-size: 0.875rem;
    color: var(--clrInk70);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}
.cwRelCardMeta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: var(--clrMuted);
    margin-top: 0.5rem;
}
.cwRelCardMeta strong {
    color: var(--clrInk);
    font-weight: 600;
}

/* ──────────────────────────────────────────────
   Archive (category / tag / author / date)
   ────────────────────────────────────────────── */

.cwArchiveHead {
    text-align: center;
    padding-top: clamp(3rem, 6vw, 5rem) !important;
    padding-bottom: clamp(2.5rem, 5vw, 4rem) !important;
}
.cwArchiveHead .sectionLabel {
    margin-inline: auto;
    margin-bottom: 1.25rem;
    color: var(--clrPrimary);
}
.cwArchiveHead .sectionLabel::before {
    background: var(--clrPrimary);
}
.cwArchiveHead h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.038em;
    line-height: 1.0;
    margin: 0 auto 1.4rem;
    max-width: 22ch;
}
.cwArchiveHead .cwBlogLead {
    margin: 0 auto;
    max-width: 60ch;
}

.cwArchiveBody {
    padding-top: 0 !important;
    padding-bottom: clamp(3rem, 6vw, 5rem) !important;
}
.cwBlogArchive .cwRecentHead {
    margin-top: 0;
}

/* WordPress core's the_posts_pagination output, restyled */
.cwBlogArchive .navigation.pagination {
    margin-top: clamp(2rem, 4vw, 3.5rem);
}
.cwBlogArchive .navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.cwBlogArchive .navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.875rem;
    background: var(--clrSurface);
    border: 1px solid var(--clrBorder);
    border-radius: var(--radiusPill);
    color: var(--clrInk70);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
    font-variant-numeric: tabular-nums;
}
.cwBlogArchive .navigation.pagination .page-numbers:hover {
    border-color: var(--clrBorderStrong);
    color: var(--clrInk);
}
.cwBlogArchive .navigation.pagination .page-numbers.current {
    background: var(--clrInk);
    color: #fff;
    border-color: var(--clrInk);
}
.cwBlogArchive .navigation.pagination .page-numbers.dots {
    background: transparent;
    border: 0;
    color: var(--clrInk40);
}
