/*
 * Satta King Results – public site.
 * Modern CSS: cascade layers, native nesting, container queries, :has(), color-mix(), logical properties.
 * Light pastel theme: white surfaces, one tone per game, soft gradients.
 */
@layer reset, tokens, base, layout, components, charts, content, archive, utilities;

/* ===================================================================== reset */
@layer reset {
    *, *::before, *::after { box-sizing: border-box; }
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
    body, h1, h2, h3, p, dl, dd, figure { margin: 0; }
    img, svg { display: block; max-inline-size: 100%; }
    button, input, select, textarea { font: inherit; color: inherit; }
    table { border-collapse: collapse; }
    @media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
        *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    }
}

/* ===================================================================== tokens */
@layer tokens {
    :root {
        color-scheme: light;

        /* brand */
        --blue: #1a73e8;
        --red: #ea4335;
        --yellow: #fbbc04;
        --green: #34a853;

        /* game tones */
        --sky: #0284c7;    --sky-soft: #e0f2fe;    --sky-tint: #f0f9ff;
        --coral: #e11d48;  --coral-soft: #ffe4e6;  --coral-tint: #fff1f2;
        --amber: #d97706;  --amber-soft: #fef3c7;  --amber-tint: #fffbeb;
        --mint: #059669;   --mint-soft: #d1fae5;   --mint-tint: #ecfdf5;
        --violet: #7c3aed; --violet-soft: #ede9fe; --violet-tint: #f5f3ff;
        --rose: #db2777;   --rose-soft: #fce7f3;   --rose-tint: #fdf2f8;

        /* text + surfaces */
        --ink: #1e1b3a;
        --ink-2: #4d5156;
        --muted: #6b6787;
        --heading: #2b2370;
        --accent-ink: #4c3d91;
        --accent-ink-2: #5b3fc4;
        --link: #1a0dab;
        --bg: #fbfbfe;
        --surface: #ffffff;
        --surface-2: #f8f9fa;
        --line: #eceaf6;
        --line-2: #e6e1fb;

        --grad-main: linear-gradient(135deg, #4f8df7 0%, #7c5cf5 55%, #c056e0 100%);
        --grad-soft: linear-gradient(135deg, #eef4ff 0%, #f4efff 50%, #fff0f7 100%);
        --grad-head: linear-gradient(180deg, #f3efff, #eef4ff);

        --radius: 8px;
        --radius-lg: 16px;
        --pill: 999px;
        --shadow-soft: 0 1px 2px rgb(76 61 145 / .06), 0 8px 24px rgb(76 61 145 / .08);
        --shadow-lift: 0 10px 28px rgb(76 61 145 / .14);
        --shadow-btn: 0 4px 14px rgb(124 92 245 / .28);

        --font: Roboto, "Noto Sans Devanagari", Arial, system-ui, sans-serif;
        --max: 1120px;
        --gutter: 16px;
    }
}

/* ===================================================================== base */
@layer base {
    body {
        min-block-size: 100dvh;
        color: var(--ink);
        font: 400 16px/1.6 var(--font);
        background:
            radial-gradient(900px 420px at 0% 0%, #eef4ff 0%, transparent 60%),
            radial-gradient(800px 380px at 100% 8%, #fdf0f7 0%, transparent 60%),
            radial-gradient(900px 500px at 50% 100%, #effcf6 0%, transparent 60%),
            var(--bg);
        background-attachment: fixed;
        -webkit-font-smoothing: antialiased;
    }
    a { color: var(--link); text-decoration: none; text-underline-offset: 2px; }
    a:hover { text-decoration: underline; }
    :focus-visible { outline: 3px solid color-mix(in srgb, var(--violet) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
    h1 { font-size: clamp(1.35rem, 3.6vw, 1.9rem); line-height: 1.3; font-weight: 500; margin-block: 22px 6px; text-wrap: balance; }
    h2 { font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.35; font-weight: 500; text-wrap: balance; }
    p { text-wrap: pretty; }
    code { font-size: .9em; background: var(--violet-tint); padding: 1px 6px; border-radius: 4px; }
    ::selection { background: var(--violet-soft); }

    /* Both languages are in the HTML; html[data-lang] shows one. */
    html[data-lang="en"] .lang-hi, html[data-lang="hi"] .lang-en { display: none !important; }
}

/* ===================================================================== layout */
@layer layout {
    .wrap { max-inline-size: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
    .narrow { max-inline-size: 680px; margin-inline: auto; }

    .skip {
        position: absolute; inset-inline-start: 8px; inset-block-start: -60px; z-index: 100;
        background: var(--surface); padding: 8px 14px; border-radius: var(--radius); box-shadow: var(--shadow-soft);
        &:focus { inset-block-start: 8px; }
    }

    /* ---- header */
    .site-header {
        background: rgb(255 255 255 / .86);
        backdrop-filter: saturate(1.4) blur(10px);
        border-block-end: 1px solid var(--line);
    }
    .head-row {
        display: flex; align-items: center; gap: 20px;
        max-inline-size: var(--max); margin-inline: auto; padding: 16px var(--gutter);
    }
    .logo {
        display: inline-flex; align-items: center; gap: 8px; flex: none;
        font-size: clamp(1.35rem, 4vw, 1.7rem); font-weight: 500; letter-spacing: -.5px; line-height: 1; white-space: nowrap;
        text-decoration: none !important;
        & img { inline-size: 34px; block-size: 34px; flex: none; }
        & .c1, & .c4 { color: #4285f4; }
        & .c2, & .c6 { color: var(--red); }
        & .c3 { color: var(--yellow); }
        & .c5 { color: var(--green); }
    }
    .logo-tail { color: #5f6368; }
    .logo-tld {
        display: inline-flex; align-items: center; gap: 5px;
        font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
        color: #c5221f; background: #fce8e6; border-radius: var(--pill); padding: 4px 9px;
        & i { inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.6s ease-in-out infinite; }
    }

    .search {
        flex: 1; display: flex; align-items: center; gap: 8px; max-inline-size: 640px; block-size: 46px;
        padding-inline: 16px 6px; border: 1px solid #e2e0f0; border-radius: 24px; background: var(--surface);
        transition: box-shadow .15s, border-color .15s;
        &:hover, &:focus-within { box-shadow: 0 1px 6px rgb(32 33 36 / .18); border-color: transparent; }
        & svg { inline-size: 20px; block-size: 20px; flex: none; color: var(--muted); }
        & input { flex: 1; min-inline-size: 0; border: 0; outline: 0; font-size: 16px; background: transparent; }
        & button {
            border: 0; border-radius: 20px; block-size: 34px; padding-inline: 16px; cursor: pointer;
            background: var(--grad-main); color: #fff; font-weight: 500; font-size: .9rem; box-shadow: 0 4px 12px rgb(124 92 245 / .3);
            &:hover { filter: brightness(1.06); }
        }
    }

    .lang-switch {
        display: inline-flex; flex: none; margin-inline-start: auto; overflow: hidden;
        border: 1px solid #e2e0f0; border-radius: var(--pill); background: var(--surface);
        & button {
            border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
            font: 500 .85rem/1 var(--font); padding: 8px 12px;
            &[aria-pressed="true"] { background: var(--grad-main); color: #fff; }
        }
    }

    /* ---- sticky game nav */
    .nav-bar {
        position: sticky; inset-block-start: 0; z-index: 10;
        background: rgb(255 255 255 / .9); backdrop-filter: blur(10px);
        border-block-end: 1px solid var(--line);
    }
    .main-nav {
        display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain;
        max-inline-size: var(--max); margin-inline: auto; padding: 6px var(--gutter);
        &::-webkit-scrollbar { display: none; }
        & a {
            color: var(--ink-2); font-size: .9rem; white-space: nowrap; padding: 7px 14px; border-radius: var(--pill);
            &:hover { background: var(--violet-tint); color: var(--violet); text-decoration: none; }
            &[aria-current="page"] { background: var(--grad-main); color: #fff; font-weight: 500; box-shadow: 0 3px 10px rgb(124 92 245 / .28); }
        }
    }

    .notice {
        background: linear-gradient(90deg, var(--sky-tint), var(--violet-tint) 50%, var(--rose-tint));
        border-block-end: 1px solid var(--line); color: #5b5875; font-size: .82rem;
        & p { max-inline-size: var(--max); margin-inline: auto; padding: 7px var(--gutter); }
    }

    .crumbs {
        list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 14px 0 0;
        font-size: .84rem; color: var(--muted);
        & a { color: var(--ink-2); }
        & li + li::before { content: "›"; margin-inline-end: 4px; }
    }

    /* ---- footer */
    .site-footer {
        background: linear-gradient(180deg, #f3f0ff, #eef2ff); border-block-start: 1px solid #e3dcfb;
        color: var(--muted); padding-block-end: 18px; font-size: .86rem;
        & a { color: var(--accent-ink); }
        & .foot-top { max-inline-size: var(--max); margin: 0 auto 14px; padding: 14px var(--gutter); border-block-end: 1px solid #e3dcfb; }
        & nav { display: flex; flex-wrap: wrap; gap: 6px 22px; max-inline-size: var(--max); margin: 0 auto 12px; padding-inline: var(--gutter); }
        & .disclaimer, & .copy { max-inline-size: var(--max); margin: 0 auto 8px; padding-inline: var(--gutter); }
    }

    @media (width <= 720px) {
        .head-row { flex-wrap: wrap; gap: 12px; }
        .search { order: 3; flex-basis: 100%; max-inline-size: none; }
    }
    @media (width <= 520px) {
        .logo img { inline-size: 28px; block-size: 28px; }
        .logo-tld { display: none; }
    }
}

/* ===================================================================== components */
@layer components {
    .page-meta {
        display: inline-block; margin-block-end: 18px; padding: 4px 14px;
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--pill);
        font-size: .86rem; color: var(--muted);
    }
    .h1-sub { margin-block-end: 6px; color: #6b5fa8; }
    .counter:empty { display: none; }

    .btn {
        display: inline-block; padding: 9px 20px; border: 0; border-radius: var(--pill); cursor: pointer;
        background: var(--grad-main); color: #fff; font-weight: 500; font-size: .9rem; box-shadow: var(--shadow-btn);
        text-decoration: none !important; transition: filter .15s, transform .15s;
        &:hover { filter: brightness(1.06); }
        &:active { transform: translateY(1px); }
    }

    /* ---- latest declared result spotlight */
    .headline-result {
        position: relative; overflow: hidden;
        display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px;
        margin-block-end: 18px; padding: 16px 20px;
        background: var(--grad-soft); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
        &::after {
            content: ""; position: absolute; inset-inline-end: -60px; inset-block-start: -60px; inline-size: 200px; aspect-ratio: 1;
            border-radius: 50%; background: radial-gradient(circle, rgb(192 86 224 / .16), transparent 70%); pointer-events: none;
        }
    }
    .hl-label { inline-size: 100%; font-size: .8rem; font-weight: 500; letter-spacing: .02em; color: #7c6fb8; }
    .hl-game { font-size: 1.3rem; font-weight: 500; }
    .hl-num {
        font-size: clamp(2.4rem, 8vw, 3rem); font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums;
        background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .hl-date {
        position: relative; z-index: 1; margin-inline-start: auto; padding: 4px 12px;
        background: var(--surface); border: 1px solid #ebe6fb; border-radius: var(--pill); font-size: .9rem; color: var(--ink-2);
    }

    /* ---- result board: one pastel tone per game */
    .board { margin-block: 14px 22px; container: board / inline-size; }
    .board-title {
        display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block-end: 12px; font-size: 1.15rem; font-weight: 500;
        & .dot { inline-size: 9px; block-size: 9px; flex: none; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #fce8e6; animation: pulse 1.6s ease-in-out infinite; }
    }
    .board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
    @container board (width < 420px) {
        .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
        .game-box { padding: 12px; }
        .game-nums { font-size: 1.4rem; }
    }
    .game-box {
        --tone: var(--sky); --soft: var(--sky-soft); --tint: var(--sky-tint);
        position: relative; overflow: hidden; display: grid; gap: 4px; padding: 14px 16px;
        background: linear-gradient(180deg, var(--tint), var(--surface) 70%);
        border: 1px solid var(--soft); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
        color: var(--ink); text-decoration: none !important; transition: transform .15s, box-shadow .15s;
        &::before { content: ""; position: absolute; inset: 0 0 auto; block-size: 5px; background: var(--tone); }
        &:nth-child(6n+2) { --tone: var(--coral);  --soft: var(--coral-soft);  --tint: var(--coral-tint); }
        &:nth-child(6n+3) { --tone: var(--amber);  --soft: var(--amber-soft);  --tint: var(--amber-tint); }
        &:nth-child(6n+4) { --tone: var(--mint);   --soft: var(--mint-soft);   --tint: var(--mint-tint); }
        &:nth-child(6n+5) { --tone: var(--violet); --soft: var(--violet-soft); --tint: var(--violet-tint); }
        &:nth-child(6n+6) { --tone: var(--rose);   --soft: var(--rose-soft);   --tint: var(--rose-tint); }
        &:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
        /* A game still waiting gets a softer card so declared results stand out. */
        &:has(.is-wait) { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 60%, white), var(--surface) 70%); }
    }
    .game-name { font-weight: 500; font-size: 1.05rem; color: var(--tone); }
    .game-hi { font-size: .82rem; color: var(--muted); }
    .game-time { justify-self: start; padding: 1px 9px; border-radius: var(--pill); background: var(--soft); color: var(--tone); font-size: .76rem; font-weight: 500; }
    .game-nums {
        display: flex; align-items: baseline; gap: 10px; margin-block-start: 4px; font-size: 1.7rem; font-variant-numeric: tabular-nums;
        & .old { color: var(--muted); font-size: 1.15rem; }
        & .arrow { font-size: .85rem; color: #d6d3e6; }
        & .new { color: var(--tone); font-weight: 500; }
        & .new.is-wait {
            display: inline-flex; align-items: center; gap: 6px; align-self: center; padding: 3px 10px;
            border-radius: var(--pill); background: var(--amber-soft); color: #b45309; font-size: .8rem;
            &::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--amber); animation: pulse 1.4s ease-in-out infinite; }
        }
    }

    /* ---- WhatsApp banner */
    .wa-cta {
        display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-block: 14px; padding: 14px 18px;
        background: linear-gradient(120deg, var(--mint-tint), var(--surface) 60%);
        border: 1px solid var(--mint-soft); border-inline-start: 4px solid var(--mint); border-radius: var(--radius); box-shadow: var(--shadow-soft);
        & > div { flex: 1; min-inline-size: 220px; }
    }
    .wa-cta-title { font-size: 1.05rem; font-weight: 500; }
    .wa-cta-sub { color: var(--ink-2); font-size: .9rem; }
    .wa-btn {
        display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--pill);
        background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 14px rgb(5 150 105 / .3);
        color: #fff !important; font-weight: 500; font-size: .92rem; text-decoration: none !important;
        &:hover { background: linear-gradient(135deg, #0ea371, #047857); }
        & svg { inline-size: 20px; block-size: 20px; flex: none; }
    }

    .intro {
        margin-block-end: 6px; padding: 6px 20px;
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
        color: var(--ink-2);
        & p { margin-block: 8px; }
    }
    .page-text { max-inline-size: 760px; padding-block: 8px; margin-block-end: 24px; & p { margin-block: 10px; } }
}

/* ===================================================================== charts */
@layer charts {
    .table-title {
        display: flex; align-items: center; gap: 10px; margin-block: 28px 10px; font-size: 1.15rem; font-weight: 500;
        &::before { content: ""; inline-size: 6px; block-size: 1.1em; flex: none; border-radius: 3px; background: var(--grad-main); }
    }
    .table-scroll {
        overflow-x: auto; overscroll-behavior-inline: contain;
        background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
    }
    table.chart {
        inline-size: 100%; text-align: center; font-variant-numeric: tabular-nums;
        & th, & td { padding: 9px 8px; white-space: nowrap; border-block-end: 1px solid #ecedef; }
        & thead th {
            position: sticky; inset-block-start: 0; background: var(--grad-head); color: var(--accent-ink);
            font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; border-block-end-color: #e3dcfb;
            & a { color: var(--accent-ink); }
        }
        & tbody {
            & th { color: var(--ink-2); font-weight: 400; font-size: .88rem; }
            & td { font-weight: 500; font-size: 1.02rem; }
            & tr:nth-child(even) :is(td, th) { background: #fbfaff; }
            & tr:hover :is(td, th) { background: var(--violet-tint); }
            & tr.today :is(td, th) { background: var(--amber-tint); }
            & tr.today th { color: #b45309; font-weight: 500; }
            & tr:last-child :is(td, th) { border-block-end: 0; }
        }
        & td.big { font-size: 1.3rem; color: var(--blue); }
        &.year td { min-inline-size: 46px; }
        &.year :is(td + td, th + td) { border-inline-start: 1px solid #ecedef; }
    }
    .wait { color: #b45309; font-size: .75rem; font-weight: 500; letter-spacing: .04em; }
    .na { color: #bdc1c6; font-weight: 400; }
    .pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-block: 12px; }

    @media (width <= 520px) {
        table.chart :is(th, td) { padding: 7px 5px; }
    }
}

/* ===================================================================== article / SEO content */
@layer content {
    .seo-content { display: grid; gap: 14px; margin-block: 30px; }
    .card {
        --edge: var(--sky);
        padding: 16px 22px 18px; background: var(--surface);
        border: 1px solid var(--line); border-inline-start: 4px solid var(--edge); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
        &:nth-child(6n+2) { --edge: var(--violet); }
        &:nth-child(6n+3) { --edge: var(--mint); }
        &:nth-child(6n+4) { --edge: var(--amber); }
        &:nth-child(6n+5) { --edge: var(--rose); }
        &:nth-child(6n+6) { --edge: var(--coral); }
        & h2 { color: var(--heading); font-size: 1.25rem; margin-block-end: 6px; }
        & h3 { font-size: 1.02rem; font-weight: 500; margin-block: 16px 4px; }
        & p { color: var(--ink-2); margin-block: 8px; }
        & .note { font-size: .86rem; color: var(--muted); background: var(--surface-2); padding: 8px 12px; border-radius: var(--radius); }
        & ul {
            list-style: none; padding: 0; margin-block: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px;
            & li { padding: 9px 12px; background: #fbfaff; border: 1px solid #ece8fb; border-radius: var(--radius); color: var(--ink-2); font-size: .94rem; }
            & li a { font-weight: 500; }
            &.related li { padding: 0; &:hover { background: var(--violet-tint); } & a { display: block; padding: 9px 12px; } }
        }
    }
    .chips {
        display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px;
        & a {
            padding: 6px 14px; border-radius: var(--pill); font-size: .88rem;
            background: var(--violet-tint); border: 1px solid var(--violet-soft); color: var(--accent-ink-2);
            &:nth-child(4n+2) { background: var(--sky-tint); border-color: var(--sky-soft); color: #0369a1; }
            &:nth-child(4n+3) { background: var(--mint-tint); border-color: var(--mint-soft); color: #047857; }
            &:nth-child(4n+4) { background: var(--rose-tint); border-color: var(--rose-soft); color: #be185d; }
            &:hover { filter: brightness(.97); text-decoration: none; }
        }
    }
    .table-wrap { overflow-x: auto; }
    .time-table {
        inline-size: 100%; max-inline-size: 620px; margin-block: 12px; border-collapse: separate; border-spacing: 0;
        border: 1px solid #ece8fb; border-radius: var(--radius); overflow: hidden; font-size: .94rem;
        & :is(th, td) { padding: 8px 12px; text-align: start; border-block-end: 1px solid #ecedef; }
        & tr:last-child td { border-block-end: 0; }
        & th { background: var(--grad-head); color: var(--accent-ink); font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
        & a { font-weight: 500; }
    }
    .glossary {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-block: 12px;
        & div { padding: 10px 12px; border: 1px solid #ece8fb; border-radius: var(--radius); background: linear-gradient(180deg, var(--violet-tint), var(--surface)); }
        & div:nth-child(3n+2) { background: linear-gradient(180deg, var(--sky-tint), var(--surface)); }
        & div:nth-child(3n+3) { background: linear-gradient(180deg, var(--mint-tint), var(--surface)); }
        & dt { font-weight: 500; }
        & dd { margin-block-start: 2px; color: var(--ink-2); font-size: .92rem; }
    }

    /* "People also ask" – exclusive accordion via <details name> */
    .faq {
        & details { border-block-end: 1px solid #ece8fb; }
        & details:first-of-type { border-block-start: 1px solid #ece8fb; }
        & summary {
            position: relative; cursor: pointer; list-style: none; padding: 14px 40px 14px 0; color: var(--ink);
            &::-webkit-details-marker { display: none; }
            &::after {
                content: ""; position: absolute; inset-inline-end: 10px; inset-block-start: 50%; inline-size: 8px; block-size: 8px;
                border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted);
                transform: translateY(-70%) rotate(45deg); transition: transform .15s;
            }
        }
        & details[open] summary { color: var(--accent-ink-2); &::after { transform: translateY(-30%) rotate(-135deg); } }
        & details p { margin: 0; padding-block-end: 16px; }
    }
}

/* ===================================================================== archive */
@layer archive {
    .archive {
        margin-block-start: 32px; padding-block: 32px 24px;
        background: linear-gradient(180deg, #f6f3ff, #f0f7ff); border-block-start: 1px solid var(--line-2);
        /* ~1,000 links below the fold: skip their layout work until scrolled near. */
        content-visibility: auto; contain-intrinsic-size: auto 900px;
    }
    .archive-head {
        margin-block-end: 16px;
        & h2 { margin-block-end: 4px; font-size: 1.3rem; }
        & p { color: var(--muted); font-size: .92rem; }
    }
    .arch-card {
        margin-block: 10px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
        &[open] { box-shadow: var(--shadow-soft); }
        & summary {
            display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px;
            cursor: pointer; list-style: none; font-weight: 500;
            &::-webkit-details-marker { display: none; }
            &::after {
                content: ""; inline-size: 7px; block-size: 7px; margin: 0 4px 4px 0;
                border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s;
            }
        }
        &[open] summary::after { transform: rotate(-135deg); margin: 4px 4px 0 0; }
    }
    .arch-title { flex: 1; color: var(--heading); }
    .arch-count { padding: 2px 10px; border-radius: var(--pill); background: var(--violet-tint); border: 1px solid var(--violet-soft); color: var(--accent-ink-2); font-size: .76rem; font-weight: 400; }
    .arch-body { padding: 4px 18px 16px; }
    .arch-main { display: inline-block; margin-block: 2px 10px; font-weight: 500; }
    .arch-year { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; padding-block: 6px; border-block-start: 1px solid #ecedef; }
    .yr-label {
        padding-block: 4px; border-radius: var(--pill); text-align: center; font-size: .85rem; font-weight: 500;
        background: var(--grad-main); color: #fff; text-decoration: none !important;
        &:is(a):hover { filter: brightness(1.08); }
    }
    .months {
        display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px;
        & a {
            padding-block: 4px; text-align: center; font-size: .8rem; color: var(--ink-2);
            background: var(--surface); border: 1px solid #ece8fb; border-radius: var(--pill); text-decoration: none !important;
            &:hover { background: var(--violet-soft); border-color: var(--violet-soft); color: var(--accent-ink-2); }
        }
    }
    @media (width <= 720px) { .months { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
    @media (width <= 520px) {
        .arch-year { grid-template-columns: 1fr; gap: 6px; }
        .yr-label { justify-self: start; padding: 3px 12px; }
    }
}

/* ===================================================================== utilities */
@layer utilities {
    .center { text-align: center; }
    @keyframes pulse { 50% { opacity: .3; } }

    /* Shown by guard.js in place of the page while DevTools is open. */
    .guard-lock {
        position: fixed; inset: 0; z-index: 2147483647; display: grid; place-content: center; gap: 8px; padding: 24px;
        background: var(--bg); color: var(--ink); text-align: center; font: 500 1.1rem/1.5 var(--font);
    }
}
