/* ═══════════════════════════════════════════════════════════════
   CCA Foundations — Shared stylesheet
   ───────────────────────────────────────────────────────────────
   A dark, editorial aesthetic for the /cca-foundations/ section.
   Deliberately departs from the main Twisthand marketing site's
   light treatment, while reusing the navy/amber/teal brand palette
   translated to dark-mode values.
   
   ALL CCA PAGES LOAD THIS FILE FIRST, then their page-specific CSS.
   Page-specific CSS may extend but should not override these tokens.
═══════════════════════════════════════════════════════════════ */

/* ── Font: Fraunces (display serif, variable) ──
   Self-hosted: the site CSP only allows same-origin fonts, so the
   Google Fonts CDN is blocked. These are Google's own woff2 slices
   (v38) with the full wght/opsz/SOFT/WONK variable axes, served
   from /fonts/ with the same unicode-range splits. */

/* vietnamese */
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/fraunces-italic-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/fraunces-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/fraunces-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/fraunces-normal-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/fraunces-normal-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/fraunces-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════ */
:root {
    /* Dark Twisthand palette — navy base, amber accent, teal interactive */
    --cca-ink:          #0a0f1c;          /* near-black with a navy hint */
    --cca-ink-2:        #0f1624;          /* one step up from base */
    --cca-ink-3:        #1a2234;          /* card surfaces */
    --cca-ink-4:        #262f42;          /* raised elements */
    --cca-rule:         #2a3448;          /* borders, dividers */
    --cca-rule-soft:    #1f2738;          /* subtle borders */

    --cca-navy:         #1a2b4a;          /* Twisthand primary — used for deeper contrast */
    --cca-navy-light:   #2a3d5e;          /* Twisthand primary lightened */

    /* Paper (warm cream) — used sparingly for "moments of reflection" like quiz cards */
    --cca-paper:        #f5f1e8;
    --cca-paper-warm:   #ebe5d4;
    --cca-paper-edge:   #d9d1b8;

    /* Text on dark */
    --cca-text:         #e8e6e0;          /* primary body text */
    --cca-text-2:       #b5b1a5;          /* secondary */
    --cca-text-3:       #7a7770;          /* tertiary, captions */
    --cca-text-4:       #4d4a44;          /* faintest, disabled */

    /* Amber accent (Twisthand gold, warmed for dark-mode contrast) */
    --cca-amber:        #d4a24c;          /* primary accent */
    --cca-amber-soft:   #e5b865;          /* hover/highlight */
    --cca-amber-deep:   #8a6320;          /* on cream paper */
    --cca-amber-dim:    #5a3f12;          /* subtle amber fills */

    /* Teal (Twisthand blue, slightly desaturated for dark mode) */
    --cca-teal:         #2d9cca;
    --cca-teal-soft:    #5fb4db;
    --cca-teal-deep:    #1d7ba3;

    /* Semantic — correct, wrong, info */
    --cca-ok:           #7cc9a3;
    --cca-ok-tint:      rgba(124, 201, 163, 0.14);
    --cca-err:          #e06767;
    --cca-err-tint:     rgba(224, 103, 103, 0.14);
    --cca-info:         #7aa5d4;

    /* Typography families
       Serif: Fraunces (display, interactive-rich, variable opsz)
       Sans: Montserrat (shared with main site — structural continuity)
       Mono: JetBrains Mono (self-hosted, shared with main site) */
    --cca-serif:        "Fraunces", "Source Serif 4", Georgia, serif;
    --cca-sans:         "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
    --cca-mono:         "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

    /* Layout */
    --cca-header-height: 52px;
    --cca-container:     1280px;
    --cca-narrow:        780px;
    --cca-gutter:        clamp(24px, 5vw, 48px);

    /* Motion */
    --cca-ease:          cubic-bezier(.2, .8, .2, 1);
    --cca-ease-out:      cubic-bezier(.34, 1.56, .64, 1);
}

/* ═══════════════════════════════════════════════════════════════
   BASE / RESET — scoped via body.cca-body so we don't affect
   the rest of the main site if this CSS ever gets loaded elsewhere.
═══════════════════════════════════════════════════════════════ */
body.cca-body {
    margin: 0;
    padding: 0;
    background: var(--cca-ink);
    color: var(--cca-text);
    font-family: var(--cca-sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body.cca-body *,
body.cca-body *::before,
body.cca-body *::after {
    box-sizing: border-box;
}

/* Noise texture — subtle, gives the dark background warmth */
body.cca-body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.95' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.75 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Everything above noise */
body.cca-body > * {
    position: relative;
    z-index: 2;
}

/* Custom scrollbar for the CCA section */
body.cca-body ::-webkit-scrollbar { width: 10px; height: 10px; }
body.cca-body ::-webkit-scrollbar-track { background: var(--cca-ink); }
body.cca-body ::-webkit-scrollbar-thumb {
    background: var(--cca-ink-4);
    border: 2px solid var(--cca-ink);
    border-radius: 10px;
}
body.cca-body ::-webkit-scrollbar-thumb:hover { background: var(--cca-amber-deep); }

/* Text selection */
body.cca-body ::selection {
    background: var(--cca-amber);
    color: var(--cca-ink);
}

/* Skip link — inherits main site pattern but styled for dark */
body.cca-body .skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.75rem 1.5rem;
    background: var(--cca-amber);
    color: var(--cca-ink);
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    font-family: var(--cca-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
body.cca-body .skip-link:focus { top: 0; }

/* ═══════════════════════════════════════════════════════════════
   TOP BAR (cca-header) + BOTTOM BAR (cca-footer)
═══════════════════════════════════════════════════════════════ */
.cca-bar {
    position: relative;
    z-index: 50;
    border-bottom: 1px solid var(--cca-rule);
    background: rgba(10, 15, 28, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.cca-bar--top {
    position: sticky;
    top: 0;
    z-index: 100;
}

.cca-bar--bottom {
    border-bottom: 0;
    border-top: 1px solid var(--cca-rule);
    background: var(--cca-ink);
    margin-top: 96px;
}

.cca-bar__inner {
    max-width: var(--cca-container);
    margin: 0 auto;
    padding: 0 var(--cca-gutter);
    height: var(--cca-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cca-bar--bottom .cca-bar__inner {
    height: 64px;
}

/* Mark (top-left) */
.cca-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--cca-text);
    font-family: var(--cca-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.2s;
}
.cca-mark:hover { color: var(--cca-amber); }
.cca-mark__dot {
    width: 8px;
    height: 8px;
    background: var(--cca-amber);
    box-shadow: 0 0 12px rgba(212, 162, 76, 0.5);
    animation: cca-pulse 3s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes cca-pulse {
    0%, 100% { opacity: 0.9; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.9); }
}
.cca-mark__text { white-space: nowrap; }

/* Inline nav (centre) */
.cca-nav {
    display: flex;
    gap: 28px;
}
.cca-nav a {
    font-family: var(--cca-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--cca-text-3);
    text-decoration: none;
    transition: color 0.2s;
}
.cca-nav a:hover,
.cca-nav a[aria-current="page"] { color: var(--cca-amber); }

/* Back link (top-right) */
.cca-back {
    font-family: var(--cca-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--cca-text-3);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}
.cca-back:hover { color: var(--cca-text); }

/* Footer specifics */
.cca-foot-left,
.cca-foot-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--cca-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--cca-text-4);
}
.cca-foot-tagline { color: var(--cca-text-3); }
.cca-foot-tagline a {
    color: var(--cca-amber);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 162, 76, 0.3);
    transition: border-color 0.2s;
}
.cca-foot-tagline a:hover { border-color: var(--cca-amber); }
.cca-foot-right a {
    color: var(--cca-text-3);
    text-decoration: none;
    transition: color 0.2s;
}
.cca-foot-right a:hover { color: var(--cca-amber); }

/* Responsive: stack nav below breakpoint */
@media (max-width: 820px) {
    .cca-bar--top .cca-nav { display: none; }
    .cca-bar--bottom .cca-bar__inner {
        flex-direction: column;
        height: auto;
        padding-top: 16px;
        padding-bottom: 16px;
        gap: 10px;
    }
}

/* Reading progress bar (site-wide) */
.cca-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--cca-amber);
    z-index: 101;
    width: 0;
    transition: width 0.1s linear;
    will-change: width;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ─────────────────────────────────────────────────────────────
   Tag-level resets are wrapped in :where() so they carry specificity
   (0, 0, 0). This lets single-class rules such as .cca-quiz-q,
   .cca-lede, .cca-pullquote cleanly override them without needing
   to be artificially scoped.
═══════════════════════════════════════════════════════════════ */
:where(body.cca-body) :where(h1, h2, h3, h4) {
    font-family: var(--cca-serif);
    font-weight: 300;
    color: var(--cca-text);
    letter-spacing: -0.025em;
    text-wrap: balance;
    margin: 0;
    font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0;
}

:where(body.cca-body) :where(h1) {
    font-size: clamp(48px, 8vw, 112px);
    line-height: 0.95;
    font-weight: 300;
}
:where(body.cca-body) :where(h1 em) {
    font-style: italic;
    color: var(--cca-amber);
    font-weight: 400;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

:where(body.cca-body) :where(h2) {
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.02;
    margin-bottom: 24px;
    font-weight: 400;
}
:where(body.cca-body) :where(h2 em) {
    font-style: italic;
    color: var(--cca-amber);
    font-variation-settings: "opsz" 72, "SOFT" 100;
}

:where(body.cca-body) :where(h3) {
    font-size: clamp(22px, 2.6vw, 32px);
    line-height: 1.15;
    font-weight: 500;
}
:where(body.cca-body) :where(h3 em) {
    font-style: italic;
    color: var(--cca-amber);
}

:where(body.cca-body) :where(h4) {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: -0.01em;
}

:where(body.cca-body) :where(p) {
    color: var(--cca-text-2);
    font-size: 17px;
    line-height: 1.7;
    max-width: 68ch;
    font-weight: 300;
    margin: 0;
}
:where(body.cca-body) :where(p + p) { margin-top: 18px; }
:where(body.cca-body) :where(p strong) {
    color: var(--cca-text);
    font-weight: 500;
}
:where(body.cca-body) :where(p em) {
    font-style: italic;
    color: var(--cca-amber-soft);
    font-weight: 400;
}

/* Lede — opening paragraph after the h1 */
.cca-lede {
    font-family: var(--cca-serif);
    font-weight: 300;
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.45;
    color: var(--cca-text);
    max-width: 42ch;
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 60, "SOFT" 40;
    margin: 0;
}
.cca-lede em {
    font-style: italic;
    color: var(--cca-amber);
    font-variation-settings: "opsz" 60, "SOFT" 100;
}

/* Eyebrow — small label above headings */
.cca-eyebrow {
    font-family: var(--cca-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cca-amber);
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0;
}
.cca-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--cca-amber);
}

.cca-caption {
    font-family: var(--cca-mono);
    font-size: 12px;
    color: var(--cca-text-3);
    letter-spacing: 0.04em;
    margin: 0;
}

:where(body.cca-body) :where(code, .cca-mono) {
    font-family: var(--cca-mono);
    font-size: 0.86em;
    font-weight: 500;
    background: var(--cca-ink-3);
    padding: 2px 7px;
    border-radius: 3px;
    color: var(--cca-amber-soft);
    border: 1px solid var(--cca-rule);
}

/* Pull quote — for thesis moments */
.cca-pullquote {
    font-family: var(--cca-serif);
    font-weight: 300;
    font-size: clamp(24px, 3.2vw, 36px);
    line-height: 1.3;
    color: var(--cca-text);
    margin: 56px 0;
    padding: 0 0 0 36px;
    border-left: 3px solid var(--cca-amber);
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 72, "SOFT" 60;
}
.cca-pullquote em {
    font-style: italic;
    color: var(--cca-amber);
    font-variation-settings: "opsz" 72, "SOFT" 100;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
═══════════════════════════════════════════════════════════════ */
.cca-section {
    padding: 120px var(--cca-gutter);
    position: relative;
}
.cca-section--tight { padding-top: 72px; padding-bottom: 72px; }
.cca-section--loose { padding-top: 160px; padding-bottom: 160px; }

.cca-container {
    max-width: var(--cca-container);
    margin: 0 auto;
}

.cca-narrow {
    max-width: var(--cca-narrow);
    margin: 0 auto;
}

.cca-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.9s var(--cca-ease), transform 0.9s var(--cca-ease);
}
.cca-reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   REUSABLE COMPONENTS — Quiz cards
   These are used on every scenario page, so they live in cca.css
═══════════════════════════════════════════════════════════════ */

.cca-quiz-header {
    margin-bottom: 64px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
}

.cca-quiz-progress {
    font-family: var(--cca-mono);
    font-size: 11px;
    color: var(--cca-text-3);
    letter-spacing: 0.12em;
    display: flex;
    align-items: center;
    gap: 16px;
}
.cca-quiz-progress-dots {
    display: flex;
    gap: 6px;
}
.cca-quiz-progress-dots .d {
    width: 8px;
    height: 8px;
    border: 1px solid var(--cca-text-4);
    border-radius: 50%;
}
.cca-quiz-progress-dots .d.correct {
    background: var(--cca-ok);
    border-color: var(--cca-ok);
}
.cca-quiz-progress-dots .d.wrong {
    background: var(--cca-err);
    border-color: var(--cca-err);
}

.cca-key-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--cca-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--cca-text-4);
}
.cca-key-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    background: var(--cca-ink-3);
    border: 1px solid var(--cca-rule);
    border-radius: 3px;
    font-family: inherit;
    font-size: inherit;
    color: var(--cca-text-2);
}

.cca-quiz-cards {
    max-width: 860px;
    margin: 0 auto;
}

.cca-quiz-card {
    background: var(--cca-paper);
    color: #1a1a1a;
    padding: 48px 56px;
    margin-bottom: 24px;
    position: relative;
    font-family: var(--cca-sans);
}
@media (max-width: 600px) {
    .cca-quiz-card { padding: 32px 28px; }
}

.cca-quiz-card-label {
    font-family: var(--cca-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cca-amber-deep);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.cca-quiz-card-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cca-amber-deep);
}

.cca-quiz-q {
    font-family: var(--cca-serif);
    font-size: 24px;
    line-height: 1.35;
    color: #1a1a1a;
    margin: 0 0 32px;
    font-weight: 400;
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 36;
}
.cca-quiz-q em {
    font-style: italic;
    color: var(--cca-amber-deep);
    font-variation-settings: "opsz" 36, "SOFT" 100;
}
.cca-quiz-q strong {
    font-weight: 500;
    color: #1a1a1a;
}
.cca-quiz-q code {
    background: rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--cca-amber-deep);
    padding: 1px 6px;
    border-radius: 3px;
    font-family: var(--cca-mono);
    font-size: 0.86em;
}

.cca-quiz-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.cca-quiz-opt {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    line-height: 1.5;
    color: #2c2c30;
    text-align: left;
    width: 100%;
    font-family: var(--cca-sans);
}
.cca-quiz-opt:hover {
    background: rgba(212, 162, 76, 0.1);
    border-color: var(--cca-amber-deep);
}
.cca-quiz-opt .kbd {
    font-family: var(--cca-mono);
    font-size: 11px;
    font-weight: 600;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--cca-amber-deep);
    flex-shrink: 0;
    transition: all 0.2s;
}
.cca-quiz-opt:hover .kbd {
    background: var(--cca-amber);
    border-color: var(--cca-amber);
    color: #fff;
}
.cca-quiz-opt.correct {
    background: rgba(124, 201, 163, 0.18);
    border-color: #4a9d6f;
}
.cca-quiz-opt.correct .kbd {
    background: #4a9d6f;
    border-color: #4a9d6f;
    color: #fff;
}
.cca-quiz-opt.wrong {
    background: rgba(224, 103, 103, 0.15);
    border-color: #b04848;
}
.cca-quiz-opt.wrong .kbd {
    background: #b04848;
    border-color: #b04848;
    color: #fff;
}
.cca-quiz-opt.reveal {
    background: rgba(124, 201, 163, 0.18);
    border-color: #4a9d6f;
}
.cca-quiz-opt.reveal .kbd {
    background: #4a9d6f;
    border-color: #4a9d6f;
    color: #fff;
}
.cca-quiz-opt code {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--cca-amber-deep);
    padding: 1px 5px;
    border-radius: 2px;
    font-family: var(--cca-mono);
    font-size: 0.82em;
}
.cca-quiz-card[data-answered] .cca-quiz-opt {
    cursor: default;
}
.cca-quiz-card[data-answered] .cca-quiz-opt:hover {
    background: rgba(0, 0, 0, 0.025);
    border-color: transparent;
}
.cca-quiz-card[data-answered] .cca-quiz-opt.correct:hover,
.cca-quiz-card[data-answered] .cca-quiz-opt.wrong:hover,
.cca-quiz-card[data-answered] .cca-quiz-opt.reveal:hover {
    background: inherit;
    border-color: inherit;
}

/* Quiz reveal panel (dark, contrasts with cream card) */
.cca-quiz-reveal {
    display: none;
    margin-top: 32px;
    padding: 28px 32px;
    background: var(--cca-ink);
    color: var(--cca-text);
}
.cca-quiz-card[data-answered] .cca-quiz-reveal {
    display: block;
    animation: cca-reveal-in 0.6s var(--cca-ease);
}
@keyframes cca-reveal-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cca-quiz-reveal-label {
    font-family: var(--cca-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cca-amber);
    margin-bottom: 12px;
}
.cca-quiz-reveal h4 {
    color: var(--cca-text);
    margin: 0 0 14px;
    font-family: var(--cca-serif);
    font-size: 20px;
    font-weight: 400;
}
.cca-quiz-reveal-explain {
    color: var(--cca-text-2);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 20px;
}
.cca-quiz-reveal-explain code {
    background: var(--cca-ink-3);
    color: var(--cca-amber-soft);
    border-color: var(--cca-rule);
}
.cca-quiz-reveal-distractors {
    border-top: 1px solid var(--cca-rule);
    padding-top: 16px;
    margin-top: 16px;
}
.cca-quiz-reveal-distractors .d {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 12px;
    font-size: 13px;
    color: var(--cca-text-3);
    line-height: 1.55;
    margin: 8px 0;
}
.cca-quiz-reveal-distractors .d-l {
    font-family: var(--cca-mono);
    color: var(--cca-amber);
    font-weight: 600;
}

/* Quiz final score card */
.cca-quiz-final {
    display: none;
    margin-top: 64px;
    padding: 80px 48px;
    text-align: center;
    background: var(--cca-ink-2);
    border: 1px solid var(--cca-rule);
}
.cca-quiz-final.show {
    display: block;
    animation: cca-reveal-in 0.8s var(--cca-ease);
}
.cca-quiz-final h3 {
    font-family: var(--cca-mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cca-text-3);
    margin: 0 0 28px;
    font-weight: 500;
}
.cca-quiz-score-big {
    font-family: var(--cca-serif);
    font-size: clamp(80px, 12vw, 160px);
    line-height: 1;
    color: var(--cca-amber);
    letter-spacing: -0.05em;
    font-weight: 300;
    font-variation-settings: "opsz" 144, "SOFT" 30;
}
.cca-quiz-score-big .total {
    color: var(--cca-text-4);
    font-size: 0.5em;
}
.cca-quiz-final-msg {
    font-family: var(--cca-serif);
    font-size: 22px;
    line-height: 1.4;
    color: var(--cca-text);
    margin: 24px auto 0;
    max-width: 52ch;
    font-weight: 300;
    letter-spacing: -0.01em;
    font-variation-settings: "opsz" 36, "SOFT" 60;
}
.cca-quiz-final-msg em {
    font-style: italic;
    color: var(--cca-amber);
}

/* ═══════════════════════════════════════════════════════════════
   REUSABLE COMPONENTS — Insight callouts
   For "exam trap", "hard rule", "production note" style annotations.
═══════════════════════════════════════════════════════════════ */
.cca-callout {
    margin: 32px 0;
    padding: 20px 24px;
    background: var(--cca-ink-2);
    border-left: 3px solid var(--cca-amber);
    font-size: 15px;
    line-height: 1.65;
    color: var(--cca-text-2);
    position: relative;
}
.cca-callout[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--cca-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cca-amber);
    margin-bottom: 10px;
    font-weight: 600;
}
.cca-callout strong {
    color: var(--cca-text);
    font-weight: 500;
}
.cca-callout code {
    background: var(--cca-ink);
    border-color: var(--cca-ink-4);
}
.cca-callout--warn { border-color: var(--cca-err); }
.cca-callout--warn[data-label]::before { color: var(--cca-err); }
.cca-callout--ok { border-color: var(--cca-ok); }
.cca-callout--ok[data-label]::before { color: var(--cca-ok); }

/* Code block (for showing Agent SDK snippets, etc.) */
.cca-code {
    background: var(--cca-ink-2);
    border: 1px solid var(--cca-rule);
    padding: 20px 24px;
    font-family: var(--cca-mono);
    font-size: 13px;
    line-height: 1.7;
    color: var(--cca-text-2);
    overflow-x: auto;
    margin: 24px 0;
}
.cca-code .kw   { color: var(--cca-teal); }
.cca-code .fn   { color: var(--cca-amber-soft); }
.cca-code .str  { color: var(--cca-ok); }
.cca-code .num  { color: var(--cca-amber); }
.cca-code .cmt  { color: var(--cca-text-4); font-style: italic; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — content padding at small viewports
═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .cca-section {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 80px;
        padding-bottom: 80px;
    }
    .cca-bar__inner {
        padding-left: 20px;
        padding-right: 20px;
    }
}
