/* ============================================================
   BLOG — Lumichess
   Blog listing + article pages
   ============================================================ */

/* ── Blog Layout ─────────────────────────────────────────── */

.blog-main {
    max-width: 752px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 60px 32px 104px;
}

/* the index listing is a single-column list of compact rows */
.blog-main--index {
    max-width: 820px;
}

/* ── Blog Header ─────────────────────────────────────────── */

.blog-header {
    margin: 4px 0 36px;
}

.blog-header__kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--lumi-accent);
    background: rgba(212,164,75,0.10);
    border: 1px solid rgba(212,164,75,0.24);
    padding: 5px 13px 5px 10px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.blog-header__title {
    font-size: 36px;
    font-weight: 800;
    color: var(--lumi-text-primary);
    margin: 0 0 12px;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.blog-header__accent {
    color: var(--lumi-accent);
}

.blog-header__sub {
    max-width: 520px;
    margin: 0;
    font-size: 16.5px;
    color: var(--lumi-text-muted);
    line-height: 1.55;
}

/* ── Blog Card (listing page) ────────────────────────────── */

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.blog-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 20px;
    background: var(--lumi-bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212,164,75,0.3);
    box-shadow: 0 12px 30px rgba(0,0,0,0.30);
}

.blog-card:hover .blog-card__title {
    color: var(--lumi-accent);
}

/* small supporting thumbnail on the right, text leads */
.blog-card__img {
    order: 2;
    flex-shrink: 0;
    width: 132px;
    height: 92px;
    border-radius: 11px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.07);
    background:
        radial-gradient(80% 90% at 76% 88%, rgba(255,247,231,0.20), transparent 58%),
        var(--grad, linear-gradient(150deg, #2b2823 0%, #201d16 100%));
}

/* lit chess-piece silhouette, sized to the small thumbnail */
.blog-card__img::after {
    content: "";
    position: absolute;
    right: -4px;
    bottom: -14px;
    width: 86px;
    height: 104px;
    background: linear-gradient(180deg, rgba(255,255,255,0.34) 0%, rgba(255,255,255,0.13) 56%, rgba(255,255,255,0.03) 100%);
    -webkit-mask: var(--piece) no-repeat center / contain;
    mask: var(--piece) no-repeat center / contain;
    filter: drop-shadow(0 4px 9px rgba(0,0,0,0.28));
    pointer-events: none;
}

.blog-card__img--c1 { --grad: linear-gradient(135deg, #CB9C50 0%, #574019 100%); --piece: url(/assets/pieces/cburnett/wN.svg); }
.blog-card__img--c2 { --grad: linear-gradient(135deg, #8E72B4 0%, #392c51 100%); --piece: url(/assets/pieces/cburnett/wQ.svg); }
.blog-card__img--c3 { --grad: linear-gradient(135deg, #5F9D74 0%, #284733 100%); --piece: url(/assets/pieces/cburnett/wR.svg); }
.blog-card__img--c4 { --grad: linear-gradient(135deg, #5C89B4 0%, #27415d 100%); --piece: url(/assets/pieces/cburnett/wK.svg); }
.blog-card__img--c5 { --grad: linear-gradient(135deg, #4F968E 0%, #224340 100%); --piece: url(/assets/pieces/cburnett/wP.svg); }
.blog-card__img--c6 { --grad: linear-gradient(135deg, #B4685C 0%, #54281F 100%); --piece: url(/assets/pieces/cburnett/wB.svg); }

.blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.35s ease;
}

.blog-card:hover .blog-card__img img {
    transform: scale(1.035);
}

.blog-card__body {
    order: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: var(--lumi-text-muted);
    margin-bottom: 12px;
}

.blog-card__meta span + span::before {
    content: "\00b7";
    margin-right: 9px;
    color: var(--lumi-text-muted);
}

.blog-card__tag {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lumi-accent);
}

.blog-card__title {
    font-size: 20px;
    font-weight: 800;
    color: var(--lumi-text-primary);
    line-height: 1.28;
    letter-spacing: -0.02em;
    margin: 0 0 7px;
    transition: color 0.15s;
}

.blog-card__excerpt {
    font-size: 15px;
    color: var(--lumi-text-muted);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__read {
    display: none;
}

/* ── Article Page ────────────────────────────────────────── */

.article {
    max-width: 100%;
    margin: 0;
}

.article__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--lumi-text-secondary);
    text-decoration: none;
    vertical-align: middle;
    padding: 0 15px 0 11px;
    height: 32px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 999px;
    margin-bottom: 24px;
    margin-right: 8px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.article__back svg {
    transition: transform 0.15s ease;
}

.article__back:hover {
    color: var(--lumi-accent);
    background: rgba(212,164,75,0.10);
    border-color: rgba(212,164,75,0.32);
}

.article__back:hover svg {
    transform: translateX(-3px);
}

.article__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lumi-accent);
    background: rgba(212,164,75,0.10);
    border: 1px solid rgba(212,164,75,0.22);
    vertical-align: middle;
    padding: 0 13px;
    height: 32px;
    border-radius: 999px;
    margin-bottom: 24px;
}

.article__tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lumi-accent);
    flex-shrink: 0;
}

.article__title {
    font-size: 47px;
    font-weight: 800;
    color: var(--lumi-text-primary);
    margin: 0 0 22px;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.article__meta {
    font-size: 15px;
    color: var(--lumi-text-muted);
    margin: 0 0 52px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.article__deck {
    font-size: 21px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--lumi-text-muted);
    letter-spacing: -0.012em;
    margin: 0 0 28px;
}

.article__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E0B35A, #A47A4A);
    color: #211c14;
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
    margin-right: 2px;
}

.article__avatar + span,
.article__meta span:first-child:not(.article__avatar) {
    color: var(--lumi-text-secondary);
    font-weight: 600;
}

.article__meta-dot {
    width: 3px;
    height: 3px;
    background: var(--lumi-text-muted);
    border-radius: 50%;
}

/* ── Article Content ─────────────────────────────────────── */

.article__content {
    font-size: 19px;
    color: var(--lumi-text-secondary);
    line-height: 1.8;
    letter-spacing: -0.002em;
}

.article__content > p:first-of-type::first-letter {
    float: left;
    font-size: 3.1em;
    line-height: 0.82;
    font-weight: 800;
    color: var(--lumi-accent);
    margin: 8px 12px 0 0;
}

.article__content h2 {
    font-size: 29px;
    font-weight: 800;
    color: var(--lumi-text-primary);
    margin: 60px 0 18px;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.article__content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--lumi-text-primary);
    margin: 38px 0 12px;
    letter-spacing: -0.01em;
}

.article__content p {
    margin: 0 0 26px;
}

.article__content strong {
    color: var(--lumi-text-primary);
    font-weight: 700;
}

.article__content a {
    color: var(--lumi-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(212,164,75,0.3);
    transition: border-color 0.15s;
}

.article__content a:hover {
    border-color: var(--lumi-accent);
}

/* Related reading — card links at the end of an article (keeps cross-links
   out of the prose, the way Chess.com / Chessigma blogs do it). */
.article__related {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0 8px;
}
.article__content a.related-card {
    display: block;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--lumi-bg-card, #3F3D3A);
    border: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}
.article__content a.related-card:hover {
    border-color: var(--lumi-accent);
    transform: translateY(-2px);
}
.related-card__kicker {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lumi-accent, #D4A44B);
    margin-bottom: 6px;
}
.related-card__title {
    display: block;
    font-size: 15.5px;
    color: var(--lumi-text-secondary, #E8E4E0);
    line-height: 1.4;
}
@media (max-width: 600px) {
    .article__related { grid-template-columns: 1fr; }
}

.article__content ul,
.article__content ol {
    padding-left: 26px;
    margin: 0 0 26px;
}

.article__content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article__content li::marker {
    color: var(--lumi-accent);
}

.article__content blockquote {
    margin: 42px 0;
    padding: 0;
    border-left: 0;
    font-size: 21px;
    line-height: 1.5;
    font-weight: 500;
    font-style: normal;
    color: var(--lumi-text-primary);
    letter-spacing: -0.01em;
}

.article__content blockquote p {
    margin: 0;
}

.article__content img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 600px;
    border-radius: 14px;
    margin: 40px auto 12px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 44px rgba(0,0,0,0.38);
}

.article__caption {
    font-size: 14.5px;
    color: var(--lumi-text-muted);
    line-height: 1.55;
    margin: 0 auto 40px;
    max-width: 92%;
    text-align: center;
    font-style: normal;
}

.article__content code {
    font-family: var(--lumi-font-mono);
    font-size: 14px;
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--lumi-accent);
}

/* Feature list in articles */
.article__feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px 0 28px;
}

.article__feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}

.article__feature-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212,164,75,0.1);
    border-radius: 8px;
    color: var(--lumi-accent);
    font-size: 16px;
}

.article__feature-text {
    flex: 1;
    min-width: 0;
}

.article__feature-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--lumi-text-primary);
    margin-bottom: 2px;
}

.article__feature-desc {
    font-size: 12px;
    color: var(--lumi-text-secondary);
    line-height: 1.4;
}

/* CTA at bottom of article */
.article__cta {
    margin-top: 48px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(212,164,75,0.1) 0%, rgba(212,164,75,0.04) 100%);
    border: 1px solid rgba(212,164,75,0.2);
    border-radius: 14px;
    text-align: center;
}

.article__cta-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--lumi-text-primary);
    margin: 0 0 8px;
}

.article__cta-sub {
    font-size: 14px;
    color: var(--lumi-text-primary);
    margin: 0 0 20px;
}

.article__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--lumi-accent);
    color: var(--lumi-accent-text);
    font-family: var(--lumi-font);
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.article__cta-btn:hover {
    background: var(--lumi-accent-hover);
    box-shadow: var(--lumi-glow-btn);
}

/* Blog nav and footer removed — blog uses the app sidebar nav */

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 640px) {
    .blog-main {
        padding: 32px 16px 60px;
    }

    .blog-header__title {
        font-size: 34px;
    }

    .blog-card {
        gap: 16px;
        padding: 16px;
    }

    .blog-card__img {
        width: 96px;
        height: 72px;
    }

    .blog-card__excerpt {
        display: none;
    }

    .article__title {
        font-size: 32px;
        letter-spacing: -0.03em;
    }

    .article__content {
        font-size: 17px;
    }

    .article__content h2 {
        font-size: 24px;
        margin-top: 46px;
    }

    .article__content > p:first-of-type::first-letter {
        font-size: 2.6em;
    }

    .article__content blockquote {
        font-size: 18px;
    }

    .article__feature-grid {
        grid-template-columns: 1fr;
    }

    .article__cta {
        padding: 24px 20px;
    }
}

/* ── Editorial refresh ────────────────────────────────────── */

.blog-main {
    max-width: 920px;
    padding-top: 72px;
}

.blog-main--index {
    max-width: 1080px;
}

.blog-header {
    margin: 0 0 34px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.blog-header__title {
    max-width: 720px;
    font-size: 48px;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.blog-header__sub {
    max-width: 620px;
    font-size: 18px;
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.blog-card,
.blog-card:first-child {
    min-height: 0;
    display: block;
    padding: 24px 0 26px;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.blog-card:first-child {
    padding-top: 0;
    border-top: 0;
}

.blog-card::before {
    display: none;
}

.blog-card:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255,255,255,0.08);
}

.blog-card__img,
.blog-card:first-child .blog-card__img {
    display: none;
}

.blog-card__meta {
    margin-bottom: 10px;
}

.blog-card__tag {
    color: #E0B35A;
}

.blog-card__title,
.blog-card:first-child .blog-card__title {
    max-width: 760px;
    font-size: 29px;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.blog-card:first-child .blog-card__title {
    font-size: 34px;
}

.blog-card__excerpt,
.blog-card:first-child .blog-card__excerpt {
    max-width: 720px;
    display: block;
    font-size: 16px;
    -webkit-line-clamp: unset;
}

.article {
    position: relative;
}

.article__back,
.article__tag {
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.10);
}

.article__title {
    max-width: 860px;
    font-size: 56px;
    line-height: 1;
    letter-spacing: -0.045em;
}

.article__deck {
    max-width: 740px;
    margin-bottom: 22px;
    font-size: 22px;
    color: rgba(245,239,227,0.78);
}

.article__meta {
    margin-bottom: 44px;
    padding-bottom: 34px;
}

.article__content {
    max-width: 760px;
}

.article__content > p:first-of-type::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    color: inherit;
}

.article__content h2 {
    padding-top: 8px;
}

.article__principles {
    list-style: none;
    padding: 0 !important;
    margin: 10px 0 34px !important;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.article__principles li {
    margin: 0;
    padding: 17px 0;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.article__clean-steps {
    list-style: none;
    padding: 0;
    margin: 4px 0 34px;
    counter-reset: clean-step;
}

.article__clean-steps li {
    counter-increment: clean-step;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 16px;
    margin: 0;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}

.article__clean-steps li::before {
    content: counter(clean-step, decimal-leading-zero);
    color: #D4A44B;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.article__clean-steps li::marker {
    content: "";
}

.article__clean-steps span {
    display: block;
}

.article__cta {
    max-width: 760px;
    text-align: left;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(212,164,75,0.15), rgba(255,255,255,0.04)),
        rgba(255,255,255,0.035);
}

@media (max-width: 900px) {
    .blog-card:first-child .blog-card__title,
    .blog-card__title {
        font-size: 26px;
    }
}

@media (max-width: 640px) {
    .blog-main {
        padding-top: 36px;
    }

    .blog-header__title {
        font-size: 38px;
    }

    .blog-grid {
        display: flex;
    }

    .blog-card,
    .blog-card:first-child {
        padding: 20px 0 22px;
    }

    .blog-card:first-child .blog-card__title,
    .blog-card__title {
        font-size: 20px;
        line-height: 1.18;
        letter-spacing: -0.02em;
    }

    .blog-card__excerpt,
    .blog-card:first-child .blog-card__excerpt {
        display: -webkit-box;
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .article__title {
        font-size: 31px;
        line-height: 1.08;
    }

    .article__deck {
        font-size: 16.5px;
        line-height: 1.55;
    }

    .article__content {
        font-size: 16.5px;
        line-height: 1.72;
    }

    .article__content p {
        margin-bottom: 20px;
    }

}

/* ── Native App Overrides ─────────────────────────────────── */

html.lumi-native body {
    background: #302e2b;
}

html.lumi-native .blog-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding:
        calc(52px + max(calc(env(safe-area-inset-top) - 12px), 0px) + 16px)
        14px
        calc(92px + env(safe-area-inset-bottom))
        14px !important;
    background: #302e2b;
}

html.lumi-native .blog-main--index {
    max-width: none;
}

html.lumi-native .blog-header {
    margin: 0 0 18px;
}

html.lumi-native .blog-header__kicker,
html.lumi-native .article__tag {
    height: auto;
    min-height: 28px;
    padding: 0 11px;
    margin-bottom: 12px;
    border-color: rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.055);
    color: rgba(245,239,227,0.86);
}

html.lumi-native .blog-header__title {
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 9px;
}

html.lumi-native .blog-header__sub {
    max-width: none;
    font-size: 14.5px;
    line-height: 1.48;
}

html.lumi-native .blog-grid {
    gap: 11px;
}

html.lumi-native .blog-card {
    gap: 12px;
    min-height: 104px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.085);
    box-shadow: none;
}

html.lumi-native .blog-card:active {
    background: rgba(255,255,255,0.08);
}

html.lumi-native .blog-card__img {
    width: 96px;
    height: 78px;
    border-radius: 14px;
}

html.lumi-native .blog-card__meta {
    gap: 7px;
    margin-bottom: 7px;
    font-size: 11px;
}

html.lumi-native .blog-card__tag {
    font-size: 10.5px;
    letter-spacing: 0.08em;
}

html.lumi-native .blog-card__title {
    font-size: 17px;
    line-height: 1.22;
    margin-bottom: 0;
}

html.lumi-native .blog-card__excerpt {
    display: none;
}

html.lumi-native .article {
    max-width: none;
}

html.lumi-native .article__back {
    height: 34px;
    margin: 0 6px 14px 0;
    padding: 0 12px 0 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.045);
}

html.lumi-native .article__title {
    font-size: 29px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

html.lumi-native .article__deck {
    font-size: 17px;
    line-height: 1.45;
}

html.lumi-native .article__meta {
    margin-bottom: 26px;
    padding-bottom: 20px;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 13px;
}

html.lumi-native .article__content {
    font-size: 16.5px;
    line-height: 1.68;
}

html.lumi-native .article__content > p:first-of-type::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    color: inherit;
}

html.lumi-native .article__content h2 {
    font-size: 23px;
    line-height: 1.18;
    margin: 36px 0 12px;
}

html.lumi-native .article__content h3 {
    font-size: 18px;
}

html.lumi-native .article__content p {
    margin-bottom: 19px;
}

html.lumi-native .article__content img {
    border-radius: 16px;
    margin: 26px auto 10px;
    box-shadow: none;
}

html.lumi-native .article__caption {
    font-size: 13px;
    margin-bottom: 28px;
}

html.lumi-native .article__related,
html.lumi-native .article__feature-grid {
    grid-template-columns: 1fr;
}

html.lumi-native .article__content a.related-card,
html.lumi-native .article__feature,
html.lumi-native .demo {
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.085);
}

html.lumi-native .article__cta {
    margin-top: 34px;
    padding: 20px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.085);
}

html.lumi-native .article__cta-btn {
    border-radius: 14px;
    background: rgba(255,255,255,0.13);
    color: #fff;
}

/* ============================================================
   INTERACTIVE DEMO COMPONENTS
   Used inside .article__content to show real product UI
   snippets — classification chips, stat tiles, mini radar,
   donut charts, comparison bars, sample sidebar tabs, etc.
   ============================================================ */

/* Shared frame for any embedded demo block */
.demo {
    background: linear-gradient(180deg, #1f1d1a 0%, #1a1816 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 22px;
    margin: 28px 0;
}
.demo__caption {
    font-size: 13px;
    color: var(--lumi-text-secondary);
    margin: 14px 0 0;
    line-height: 1.45;
    text-align: center;
}

/* ── Classification chip gallery (interactive hover) ── */
.demo-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}
.demo-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    transition: transform 0.18s, background 0.18s, border-color 0.18s;
    cursor: default;
}
.demo-chip:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(212,164,75,0.25);
    transform: translateY(-1px);
}
.demo-chip__badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.demo-chip__body {
    min-width: 0;
}
.demo-chip__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--lumi-text-primary);
    line-height: 1.2;
}
.demo-chip__desc {
    font-size: 12px;
    color: var(--lumi-text-secondary);
    margin-top: 3px;
    line-height: 1.35;
}

/* Badge colour variants */
.demo-chip__badge--brilliant { background: #34D399; }
.demo-chip__badge--great { background: #67D584; }
.demo-chip__badge--best { background: #5DB67D; }
.demo-chip__badge--excellent { background: #6FA774; }
.demo-chip__badge--good { background: #809A5C; }
.demo-chip__badge--book { background: #A47A4A; }
.demo-chip__badge--inaccuracy { background: #E8C06A; color: #1a1816; }
.demo-chip__badge--mistake { background: #E0913A; }
.demo-chip__badge--blunder { background: #CF6E6E; }
.demo-chip__badge--missed { background: #B07ECF; }

/* ── Mini eval graph ── */
.demo-evalgraph {
    height: 130px;
    width: 100%;
}
.demo-evalgraph svg { display: block; width: 100%; height: 100%; }

/* ── Stat tile (matches Profile Report tile look) ── */
.demo-tiles {
    display: grid;
    gap: 12px;
}
.demo-tiles--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.demo-tiles--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 640px) {
    .demo-tiles--3, .demo-tiles--4 { grid-template-columns: 1fr; }
}
.demo-tile {
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 14px 16px;
    border-top: 3px solid #D4A44B;
}
.demo-tile--green { border-top-color: #5DB67D; }
.demo-tile--blue { border-top-color: #6B9FD4; }
.demo-tile--red { border-top-color: #CF6E6E; }
.demo-tile--amber { border-top-color: #D4A44B; }
.demo-tile__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.demo-tile__label {
    font-size: 14px;
    font-weight: 700;
    color: inherit;
}
.demo-tile__label--green { color: #5DB67D; }
.demo-tile__label--blue { color: #6B9FD4; }
.demo-tile__label--red { color: #CF6E6E; }
.demo-tile__label--amber { color: #D4A44B; }
.demo-tile__count {
    font-size: 11px;
    color: var(--lumi-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.demo-tile__big {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}
.demo-tile__num {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
}
.demo-tile__unit {
    font-size: 13px;
    color: var(--lumi-text-primary);
    font-weight: 500;
}
.demo-tile__foot {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* ── Move quality bars ── */
.demo-mq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.demo-mq__row {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    align-items: center;
    gap: 12px;
}
.demo-mq__label {
    font-size: 13px;
    font-weight: 600;
}
.demo-mq__track {
    height: 22px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.demo-mq__fill {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.demo-mq__count {
    font-size: 12px;
    color: var(--lumi-text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ── You vs Opponents comparison ── */
.demo-vs {
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 16px 18px;
    border-top: 3px solid #CF6E6E;
}
.demo-vs__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}
.demo-vs__title { font-size: 15px; font-weight: 700; color: #fff; }
.demo-vs__delta {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(207,110,110,0.12);
    color: #CF6E6E;
}
.demo-vs__big { font-size: 28px; font-weight: 800; color: #CF6E6E; line-height: 1; margin-bottom: 14px; }
.demo-vs__big span { font-size: 13px; color: var(--lumi-text-primary); font-weight: 500; margin-left: 6px; }
.demo-vs__row { margin-bottom: 8px; }
.demo-vs__row:last-child { margin-bottom: 0; }
.demo-vs__head2 {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--lumi-text-secondary);
    margin-bottom: 4px;
    font-weight: 600;
}
.demo-vs__bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.demo-vs__bar > div { height: 100%; border-radius: 3px; }

/* ── Mini radar (SVG) ── */
.demo-radar {
    display: flex;
    justify-content: center;
    align-items: center;
}
.demo-radar svg { width: min(360px, 100%); height: auto; }

/* ── Donut chart preview ── */
.demo-donut-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 640px) {
    .demo-donut-row { grid-template-columns: 1fr; }
}
.demo-donut {
    text-align: center;
}
.demo-donut__title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}
.demo-donut__title--green { color: #5DB67D; }
.demo-donut__title--red { color: #CF6E6E; }
.demo-donut svg { width: 100%; max-width: 220px; height: auto; }
.demo-donut__legend {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 12px;
    color: var(--lumi-text-primary);
}
.demo-donut__legend span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 5px;
    vertical-align: middle;
    background: var(--c, #6B9FD4);
}

/* ── Sample sidebar with tab switching ── */
.demo-sidebar {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
}
.demo-sidebar__tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.demo-sidebar__tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--lumi-text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}
.demo-sidebar__tab:hover { color: var(--lumi-text-primary); }
.demo-sidebar__tab.is-active {
    color: #D4A44B;
    background: rgba(212,164,75,0.08);
    box-shadow: inset 0 -2px 0 #D4A44B;
}
.demo-sidebar__pane {
    display: none;
    padding: 16px;
}
.demo-sidebar__pane.is-active { display: block; }

.demo-moverow {
    display: grid;
    grid-template-columns: 36px 60px 1fr 50px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.15s;
}
.demo-moverow:hover { background: rgba(255,255,255,0.04); }
.demo-moverow__num { font-size: 12px; color: var(--lumi-text-muted); font-weight: 600; }
.demo-moverow__san { font-size: 14px; font-weight: 600; color: var(--lumi-text-primary); }
.demo-moverow__badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
}
.demo-moverow__acc { font-size: 12px; color: var(--lumi-text-secondary); text-align: right; font-variant-numeric: tabular-nums; }

.demo-focuscard {
    background: rgba(207,110,110,0.06);
    border-left: 3px solid #CF6E6E;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.demo-focuscard:last-child { margin-bottom: 0; }
.demo-focuscard__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.demo-focuscard__title { font-size: 14px; font-weight: 700; color: var(--lumi-text-primary); }
.demo-focuscard__tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(207,110,110,0.18);
    color: #E3A8A8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.demo-focuscard__line { font-size: 12px; color: var(--lumi-text-primary); margin: 0 0 4px; line-height: 1.45; }
.demo-focuscard__line strong { color: #fff; }
.demo-focuscard__cta {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #D4A44B;
    font-weight: 700;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid rgba(212,164,75,0.3);
    border-radius: 6px;
    transition: background 0.15s;
    cursor: pointer;
}
.demo-focuscard__cta:hover { background: rgba(212,164,75,0.12); }

/* ── Coach commentary card ── */
.demo-coach {
    background: rgba(212,164,75,0.06);
    border-left: 3px solid #D4A44B;
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.demo-coach__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(212,164,75,0.18);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #D4A44B;
    font-weight: 800;
    font-size: 16px;
}
.demo-coach__body { min-width: 0; }
.demo-coach__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #D4A44B;
    font-weight: 700;
    margin-bottom: 4px;
}
.demo-coach__text { font-size: 14px; color: var(--lumi-text-primary); margin: 0; line-height: 1.5; }
.demo-coach__text em { color: #D4A44B; font-style: normal; font-weight: 600; }

/* ── Callout box ── */
.demo-callout {
    background: rgba(107,159,212,0.08);
    border-left: 3px solid #6B9FD4;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 24px 0;
}
.demo-callout--amber {
    background: rgba(212,164,75,0.08);
    border-left-color: #D4A44B;
}
.demo-callout__title {
    font-size: 13px;
    font-weight: 700;
    color: #6B9FD4;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 6px;
}
.demo-callout--amber .demo-callout__title { color: #D4A44B; }
.demo-callout__body {
    font-size: 14px;
    color: var(--lumi-text-primary);
    margin: 0;
    line-height: 1.55;
}

/* ── Anatomy diagram ── */
.demo-anatomy {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 14px;
}
@media (max-width: 640px) {
    .demo-anatomy { grid-template-columns: 1fr; }
}
.demo-anatomy__board {
    aspect-ratio: 1;
    background:
        linear-gradient(45deg, #A67B4B 25%, transparent 25%),
        linear-gradient(-45deg, #A67B4B 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #A67B4B 75%),
        linear-gradient(-45deg, transparent 75%, #A67B4B 75%);
    background-color: #F5E6C8;
    background-size: 25% 25%;
    background-position: 0 0, 0 12.5%, 12.5% -12.5%, -12.5% 0;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.demo-anatomy__badge {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #5DB67D;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    top: 18%;
    left: 56%;
}
.demo-anatomy__arrow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.demo-anatomy__sidepanel {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    color: var(--lumi-text-secondary);
}

/* ── Workflow steps ── */
.demo-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.demo-steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 14px;
    align-items: start;
    padding-left: 0 !important;
}
.demo-steps li::before {
    content: counter(step);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(212,164,75,0.12);
    border: 1px solid rgba(212,164,75,0.3);
    color: #D4A44B;
    font-weight: 800;
    font-size: 14px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.article__content .demo-steps li::before { margin-top: 2px; }

/* ── Conversion bucket cards ── */
.demo-buckets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (max-width: 640px) { .demo-buckets { grid-template-columns: 1fr 1fr; } }
.demo-bucket {
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 12px;
    border-top: 3px solid #D4A44B;
    text-align: center;
}
.demo-bucket__label {
    font-size: 12px;
    color: var(--lumi-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 6px;
}
.demo-bucket__num {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.demo-bucket--good { border-top-color: #5DB67D; }
.demo-bucket--mid { border-top-color: #D4A44B; }
.demo-bucket--bad { border-top-color: #CF6E6E; }
