/* ════════════════════════════════════════════════════════════════════════
   M-Office Portal Academy — brand stylesheet
   Palette & tokens reused from the M-Office design system for consistency.
   ════════════════════════════════════════════════════════════════════════ */

:root {
    /* Brand */
    --green:        #20A941;
    --green-deep:   #0F5021;
    --green-deeper: #0a3817;
    --green-tint:   #80DB99;
    --green-wash:   #eaf7ee;
    --red:          #E22929;
    --red-deep:     #AE1F29;
    --olive:        #564C31;
    --cream:        #FAF8EB;
    --ink:          #1C1C1A;
    --ink-soft:     #4b4b46;
    --muted:        #6b6b63;
    --line:         #e4e2d4;
    --card:         #ffffff;
    --bg:           #f6f5ec;
    --gold:         #c9a227;

    /* Typography */
    --font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

    /* Radius / shadow / motion */
    --radius:    12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(28,28,26,.06), 0 1px 3px rgba(28,28,26,.08);
    --shadow:    0 4px 12px rgba(28,28,26,.08), 0 2px 4px rgba(28,28,26,.05);
    --shadow-lg: 0 18px 40px rgba(15,80,33,.14), 0 6px 14px rgba(28,28,26,.08);
    --ring:      0 0 0 3px rgba(32,169,65,.40);
    --t-fast: 120ms ease;
    --t:      200ms ease;

    --maxw: 1180px;
}

[data-theme="dark"] {
    --green:        #34c759;
    --green-deep:   #2aa84a;
    --green-tint:   #1d6b34;
    --green-wash:   #15271b;
    --cream:        #15170f;
    --ink:          #ECEADC;
    --ink-soft:     #c6c4b6;
    --muted:        #9a9a8e;
    --line:         #2c2f25;
    --card:         #1c1f17;
    --bg:           #121309;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.18; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
a { color: var(--green-deep); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--green); }
img { max-width: 100%; height: auto; }
small { font-size: .8rem; }
code, kbd { font-family: var(--font-mono); font-size: .9em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

/* ── Skip link / a11y ─────────────────────────────────────────────────── */
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 1000;
    background: var(--green-deep); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

/* ── Header / nav ─────────────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--ink); letter-spacing: -.02em; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px; flex: none;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.15rem;
    box-shadow: var(--shadow-sm);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.brand small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brand-logo { height: 46px; width: auto; max-width: 240px; object-fit: contain; display: block; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a { padding: 8px 11px; border-radius: 8px; color: var(--ink-soft); font-weight: 600; font-size: .9rem; white-space: nowrap; }
@media (max-width: 1180px) and (min-width: 881px) { .nav-links a { padding: 8px 9px; font-size: .86rem; } }
.nav-links a:hover, .nav-links a.active { background: var(--green-wash); color: var(--green-deep); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--ink); }

@media (max-width: 880px) {
    .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
        align-items: stretch; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px; gap: 2px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: inline-grid; place-items: center; margin-left: auto; }
    .nav-actions .btn-text { display: none; }
    /* Tighten the bar so the logo + auth actions fit the smallest phones. */
    .nav { gap: 12px; }
    .brand-logo { height: 38px; }
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-weight: 700; font-size: .95rem; line-height: 1;
    padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
    cursor: pointer; transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
    white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { color: #fff; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--green-deep); border-color: var(--green); }
.btn-outline:hover { background: var(--green-wash); color: var(--green-deep); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--green-wash); color: var(--green-deep); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-deep); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.card-pad { padding: 22px; }
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: color-mix(in srgb, var(--green) 30%, var(--line)); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── Badges / pills ───────────────────────────────────────────────────── */
.pill {
    display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
    background: var(--green-wash); color: var(--green-deep);
}
.pill-red { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red-deep); }
.pill-olive { background: color-mix(in srgb, var(--olive) 16%, transparent); color: var(--olive); }
.pill-gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: #8a6d12; }
.pill-ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.badge-audience { font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.badge-expert { background: #eef4ff; color: #2952cc; }
.badge-affiliate { background: #fff3e6; color: #b5630a; }
.badge-system_user { background: var(--green-wash); color: var(--green-deep); }

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.input, .select, .textarea {
    width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
    background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: var(--ring); outline: none; }
.textarea { min-height: 120px; resize: vertical; }
.field-error { color: var(--red-deep); font-size: .82rem; margin-top: 5px; }
.input.has-error, .select.has-error { border-color: var(--red); }
.hint { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; }
.checkbox-row input { margin-top: 3px; }

/* ── Alerts ───────────────────────────────────────────────────────────── */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .93rem; border: 1px solid transparent; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--green-wash); border-color: color-mix(in srgb, var(--green) 35%, transparent); color: var(--green-deep); }
.alert-error { background: #fdecec; border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--red-deep); }
.alert-info { background: #eef4ff; border-color: #cdddff; color: #2952cc; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* ── Callouts (lessons) ───────────────────────────────────────────────── */
.callout { border-left: 4px solid var(--green); background: var(--green-wash); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 18px 0; }
.callout-title { font-weight: 700; margin-bottom: 4px; }
.callout.warn { border-color: var(--red); background: #fdecec; }
.callout.note { border-color: var(--olive); background: color-mix(in srgb, var(--olive) 8%, transparent); }
.callout.verify { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { background: var(--green-deeper); color: #d7e6da; margin-top: 70px; padding: 56px 0 28px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer a { color: #b9d4be; display: block; padding: 4px 0; font-size: .9rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: .82rem; color: #9fbaa4; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-legal { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a { color: #b9d4be; }
.footer-legal a:hover { color: #fff; }

/* ── Utilities ────────────────────────────────────────────────────────── */
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 12px; } .gap-3 { gap: 20px; }
.wrap { flex-wrap: wrap; }
.section { padding: 64px 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 28px 0; }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 9px; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; color: var(--ink); transition: background var(--t-fast); }
.theme-toggle:hover { background: var(--green-wash); }

/* progress bar */
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-deep)); border-radius: 999px; transition: width var(--t); }

/* ════════════════════════════════════════════════════════════════════════
   Rich lesson content — premium teaching components
   ════════════════════════════════════════════════════════════════════════ */
.lesson-block { margin: 0 0 22px; }
.prose { font-size: 1.05rem; line-height: 1.72; color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose code { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green-deep); padding: .12em .4em; border-radius: 5px; font-size: .88em; }

/* Callouts — icon + tinted, one per intent */
.callout { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; border-left: 4px solid var(--green);
    background: var(--green-wash); padding: 16px 18px; border-radius: 0 12px 12px 0; margin: 22px 0; }
.callout-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem;
    letter-spacing: .01em; color: var(--green-deep); margin: 0; }
.callout-ico { font-size: 1rem; line-height: 1; }
.callout-body { grid-column: 1 / -1; color: var(--ink-soft); }
.callout-body p:last-child { margin-bottom: 0; }
.callout.tip { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--card)); }
.callout.tip .callout-title { color: #8a6d12; }
.callout.warn, .callout-warn { border-color: var(--red); background: #fdecec; }
.callout.warn .callout-title, .callout-warn .callout-title { color: var(--red-deep); }
.callout.verify { border-color: var(--green); background: var(--green-wash); }
.callout.pitfall { border-color: var(--red-deep); background: color-mix(in srgb, var(--red) 7%, var(--card)); }
.callout.pitfall .callout-title { color: var(--red-deep); }
.callout.note { border-color: var(--olive); background: color-mix(in srgb, var(--olive) 7%, var(--card)); }
.callout.note .callout-title { color: var(--olive); }

/* Data tables — field references, GL postings */
.lesson-table-wrap { margin: 24px 0; }
.lesson-table-cap { font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.lesson-table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.lesson-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--card); }
.lesson-table th { text-align: left; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--green-deep); background: var(--green-wash); padding: 11px 14px; border-bottom: 2px solid color-mix(in srgb, var(--green) 30%, var(--line)); white-space: nowrap; }
.lesson-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
.lesson-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--green) 3%, transparent); }
.lesson-table tbody tr:last-child td { border-bottom: 0; }
.lesson-table tbody tr:hover { background: var(--green-wash); }
.lesson-table tfoot td { font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--green) 6%, var(--card)); border-top: 2px solid var(--line); }
.lesson-table code { font-size: .85em; color: var(--green-deep); }

/* Numbered step procedures */
.lesson-steps { margin: 24px 0; }
.lesson-steps-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 14px; color: var(--ink); }
.steps-list { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps-list > li { position: relative; counter-increment: step; padding: 0 0 22px 52px; }
.steps-list > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px;
    border-radius: 50%; background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: .95rem; box-shadow: var(--shadow-sm); }
.steps-list > li::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 4px; width: 2px; background: var(--line); }
.steps-list > li:last-child { padding-bottom: 0; }
.steps-list > li:last-child::after { display: none; }
.step-body { padding-top: 4px; color: var(--ink-soft); }
.step-body strong { color: var(--ink); }

/* Key takeaways summary card */
.keytakeaways { margin: 26px 0; background: linear-gradient(135deg, var(--green-wash), color-mix(in srgb, var(--gold) 8%, var(--green-wash)));
    border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line)); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow-sm); }
.kt-title { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--green-deep); margin-bottom: 12px; }
.kt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kt-list li { position: relative; padding-left: 30px; color: var(--ink); font-weight: 500; }
.kt-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
    background: var(--green); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }

/* Inline knowledge check (self-test) */
.knowledge-check { margin: 26px 0; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; background: var(--card);
    box-shadow: var(--shadow-sm); border-top: 3px solid var(--gold); }
.kc-tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #8a6d12; margin-bottom: 8px; }
.kc-q { font-weight: 700; color: var(--ink); margin: 0 0 12px; }
.kc-options { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.kc-options li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); transition: border-color var(--t-fast), background var(--t-fast); }
.kc-options li:hover { border-color: var(--green); background: var(--green-wash); cursor: default; }
.kc-reveal summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--green-deep); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.kc-reveal summary::-webkit-details-marker { display: none; }
.kc-reveal summary::before { content: "▸"; transition: transform var(--t-fast); }
.kc-reveal[open] summary::before { transform: rotate(90deg); }
.kc-answer { margin-top: 12px; padding: 14px 16px; background: var(--green-wash); border-radius: 10px; }
.kc-correct { font-weight: 700; color: var(--green-deep); margin: 0 0 6px; }
.kc-explain { color: var(--ink-soft); font-size: .92rem; margin: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   Learner engagement — streaks, activity heatmap, practice mode, flashcards
   ════════════════════════════════════════════════════════════════════════════ */

/* Streak + resume strip */
.engage-strip { display: grid; grid-template-columns: minmax(160px,auto) 1fr; gap: 14px; }
@media (max-width: 640px) { .engage-strip { grid-template-columns: 1fr; } }
.streak-card { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.streak-flame { font-size: 2rem; filter: grayscale(1) opacity(.5); transition: filter var(--t); }
.streak-flame.lit { filter: none; animation: flamePulse 2.4s ease-in-out infinite; }
@keyframes flamePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.streak-n { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--ink); }
.streak-n span { font-size: .9rem; font-weight: 600; color: var(--muted); }
.streak-l { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.resume-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--green));
    border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.resume-title { font-weight: 700; color: var(--ink); margin-top: 2px; }

/* Per-course study-tool links on dashboard cards */
.study-tools { display: flex; gap: 14px; }
.study-tools a { font-size: .82rem; font-weight: 600; color: var(--green-deep); }
.study-tools a:hover { text-decoration: underline; }
[data-theme="dark"] .study-tools a { color: var(--green-tint); }

/* Activity heatmap */
.heatmap { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.hm-week { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.hm-cell { width: 13px; height: 13px; border-radius: 3px; background: var(--line); display: inline-block; }
.hm-empty { background: transparent; }
.hm-l0 { background: color-mix(in srgb, var(--line) 80%, var(--card)); }
.hm-l1 { background: color-mix(in srgb, var(--green) 30%, var(--card)); }
.hm-l2 { background: color-mix(in srgb, var(--green) 55%, var(--card)); }
.hm-l3 { background: color-mix(in srgb, var(--green) 78%, transparent); }
.hm-l4 { background: var(--green-deep); }
.hm-legend { display: flex; align-items: center; gap: 4px; font-size: .75rem; }
.hm-legend .hm-cell { width: 12px; height: 12px; }

/* Practice mode */
.practice-bar { display: flex; flex-direction: column; gap: 6px; }
.pq-stem { font-weight: 700; font-size: 1.08rem; color: var(--ink); line-height: 1.45; }
.pq-options { display: grid; gap: 10px; }
.pq-opt { text-align: left; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card);
    color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.pq-opt:hover:not(:disabled) { border-color: var(--green); background: var(--green-wash); }
.pq-opt:disabled { cursor: default; }
.pq-opt.sel { border-color: var(--green); background: var(--green-wash); }
.pq-opt.is-correct { border-color: var(--green); background: var(--green-wash); font-weight: 600; }
.pq-opt.is-correct::after { content: " ✓"; color: var(--green-deep); font-weight: 800; }
.pq-opt.is-wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--card)); }
.pq-opt.is-wrong::after { content: " ✗"; color: var(--red-deep); font-weight: 800; }
.pq-feedback { margin-top: 14px; padding: 12px 16px; border-radius: 10px; font-size: .92rem; }
.pq-feedback.good { background: var(--green-wash); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); }
.pq-feedback.bad { background: color-mix(in srgb, var(--red) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
.pq-explain { margin-top: 6px; color: var(--ink-soft); }
.pq-actions { display: flex; gap: 10px; }
.practice-result .pr-score { font-size: 3rem; font-weight: 800; color: var(--green-deep); line-height: 1; }
.practice-result.low .pr-score { color: var(--red-deep); }
.practice-result.ok .pr-score { color: var(--gold); }
.pr-line { font-size: 1.05rem; margin-top: 8px; }

/* Flashcards */
.fc-stage { max-width: 560px; margin-inline: auto; }
.fc-progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.fc-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-deep)); transition: width var(--t); }
.flashcard { perspective: 1400px; height: 300px; cursor: pointer; outline: none; }
.flashcard:focus-visible .fc-inner { box-shadow: var(--ring); border-radius: var(--radius-lg); }
.fc-inner { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d; }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--card); }
.fc-front { border-top: 4px solid var(--green); }
.fc-back { border-top: 4px solid var(--gold); transform: rotateY(180deg); }
.fc-tag { position: absolute; top: 14px; left: 16px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fc-text { font-size: 1.05rem; font-weight: 600; color: var(--ink); line-height: 1.5; max-height: 100%; overflow-y: auto; }
.fc-back .fc-text { font-weight: 500; }
.fc-hint { position: absolute; bottom: 14px; font-size: .74rem; color: var(--muted); }
.fc-actions { display: flex; gap: 10px; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
    .fc-inner { transition: none; }
    .streak-flame.lit { animation: none; }
}

/* ── Instructor analytics ──────────────────────────────────────────────────── */
.table-analytics th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.table-analytics td { vertical-align: middle; }
.pbar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: 999px; transition: width var(--t); }

.dist { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 6px; }
.dist-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.dist-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.dist-bar { width: 100%; border-radius: 6px 6px 0 0; min-height: 2px; transition: height var(--t); }
.dist-bar.pass { background: linear-gradient(180deg, var(--green), var(--green-deep)); }
.dist-bar.fail { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 80%, var(--card)), var(--red-deep)); }
.dist-n { font-weight: 700; font-size: .85rem; color: var(--ink); }
.dist-l { font-size: .7rem; color: var(--muted); white-space: nowrap; }

.flag { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.flag-easy { background: color-mix(in srgb, var(--gold) 20%, var(--card)); color: #8a6d12; }
.flag-hard { background: color-mix(in srgb, var(--red) 14%, var(--card)); color: var(--red-deep); }
.flag-warn { background: color-mix(in srgb, var(--gold) 16%, var(--card)); color: #8a6d12; }
.flag-bad  { background: var(--red-deep); color: #fff; }
.flag-muted { background: var(--line); color: var(--muted); }

/* ════════════════════════════════════════════════════════════════════════════
   Super-Admin Command Center
   ════════════════════════════════════════════════════════════════════════════ */
.cc-hero { display: grid; grid-template-columns: minmax(220px, 1fr) 2.4fr; gap: 16px; }
@media (max-width: 760px) { .cc-hero { grid-template-columns: 1fr; } }
.cc-hero-main { background: linear-gradient(135deg, var(--green-deep), var(--green-deeper)); color: #fff;
    border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; justify-content: center; }
.cc-hero-label { font-size: .8rem; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }
.cc-hero-value { font-size: 2.6rem; font-weight: 800; line-height: 1.05; margin: 6px 0 4px; }
.cc-hero-sub { font-size: .85rem; opacity: .9; }
.cc-hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 1100px) { .cc-hero-stats { grid-template-columns: repeat(4, 1fr); } }
.cc-mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.cc-mini .l { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cc-mini .v { font-size: 1.5rem; font-weight: 800; color: var(--ink); margin: 2px 0 4px; }
.cc-delta { font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; display: inline-block; }
.cc-delta.up { background: var(--green-wash); color: var(--green-deep); }
.cc-delta.down { background: color-mix(in srgb, var(--red) 12%, var(--card)); color: var(--red-deep); }
.cc-delta.neutral { background: var(--line); color: var(--muted); }
.cc-upside { background: linear-gradient(135deg, var(--gold), #b8901f); color: #1c1606; font-weight: 800; font-size: .85rem; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }

/* Insight cards */
.cc-insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.cc-insight { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.cc-insight.sev-opp  { border-left-color: var(--green); }
.cc-insight.sev-grow { border-left-color: var(--gold); }
.cc-insight.sev-risk { border-left-color: var(--red); }
.cc-insight.sev-watch{ border-left-color: var(--olive); }
.cc-insight-top { display: flex; align-items: flex-start; gap: 10px; }
.cc-insight-icon { font-size: 1.4rem; line-height: 1; }
.cc-insight-head { flex: 1; min-width: 0; }
.cc-insight-head h3 { margin: 0; font-size: 1rem; }
.cc-insight-metric { font-size: .82rem; font-weight: 700; color: var(--green-deep); }
[data-theme="dark"] .cc-insight-metric { color: var(--green-tint); }
.cc-sev { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.cc-sev.sev-opp  { background: var(--green-wash); color: var(--green-deep); }
.cc-sev.sev-grow { background: color-mix(in srgb, var(--gold) 18%, var(--card)); color: #8a6d12; }
.cc-sev.sev-risk { background: color-mix(in srgb, var(--red) 12%, var(--card)); color: var(--red-deep); }
.cc-sev.sev-watch{ background: var(--line); color: var(--olive); }
.cc-insight-detail { font-size: .87rem; color: var(--ink-soft); line-height: 1.5; margin: 10px 0 12px; flex: 1; }
.cc-insight-foot { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.cc-impact { font-weight: 800; color: var(--green-deep); font-size: .92rem; }
[data-theme="dark"] .cc-impact { color: var(--green-tint); }
.cc-action { font-size: .82rem; color: var(--ink-soft); }

/* Trend bars */
.cc-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 6px; }
.cc-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.cc-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.cc-bar { width: 100%; border-radius: 5px 5px 0 0; min-height: 2px; background: linear-gradient(180deg, var(--green), var(--green-deep)); transition: height var(--t); }
.cc-bar-l { font-size: .68rem; color: var(--muted); }

/* Funnel */
.cc-funnel { display: flex; flex-direction: column; gap: 8px; }
.cc-funnel-row { position: relative; background: var(--bg); border-radius: 8px; overflow: hidden; min-height: 38px; display: flex; align-items: center; border: 1px solid var(--line); }
.cc-funnel-bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--green) 38%, var(--card)), var(--green-wash)); }
.cc-funnel-text { position: relative; display: flex; justify-content: space-between; width: 100%; padding: 0 14px; font-size: .86rem; }

/* Homepage live social-proof band */
.trust-band { background: var(--green-deep); color: #fff; padding: 22px 0; }
[data-theme="dark"] .trust-band { background: var(--green-deeper); }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; text-align: center; }
@media (min-width: 720px) { .trust-grid { grid-template-columns: repeat(5, 1fr); } }
.trust-item strong { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; }
.trust-item span { font-size: .78rem; opacity: .85; }

/* ════════════════════════════════════════════════════════════════════════════
   CRO surfaces — course landing, pricing, testimonials, FAQ
   ════════════════════════════════════════════════════════════════════════════ */
.course-hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }
.course-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
@media (max-width: 880px) { .course-layout { grid-template-columns: 1fr; } .course-aside { order: -1; } }
.course-aside { position: sticky; top: 90px; }

/* Value-prop grid */
.gain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 12px; }
@media (max-width: 560px) { .gain-grid { grid-template-columns: 1fr; } }
.gain { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.gain > span { font-size: 1.5rem; line-height: 1; }
.gain strong { display: block; font-size: .98rem; }
.gain p { margin: 4px 0 0; font-size: .85rem; color: var(--ink-soft); }

/* Curriculum accordion */
.curriculum-mod summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; list-style: none; }
.curriculum-mod summary::-webkit-details-marker { display: none; }
.curriculum-mod summary::after { content: "＋"; color: var(--muted); font-weight: 700; }
.curriculum-mod[open] summary::after { content: "－"; }

/* Enrol card */
.enrol-includes { list-style: none; padding: 0; margin: 16px 0 0; font-size: .88rem; border-top: 1px solid var(--line); padding-top: 14px; }
.enrol-includes li { padding: 4px 0; color: var(--ink-soft); }

/* Reviews (course page) + testimonials (home) */
.review-list, .testi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 12px; }
.review, .testi { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.review-stars, .testi-stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 8px; }
.review blockquote, .testi blockquote { margin: 0 0 12px; font-size: .92rem; line-height: 1.55; color: var(--ink); }
.review figcaption { font-size: .85rem; color: var(--muted); }
.testi figcaption strong { display: block; font-size: .9rem; }
.testi figcaption span { font-size: .78rem; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "▾"; transition: transform var(--t-fast); color: var(--muted); }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p { margin: 12px 0 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }

/* Pricing teams band + related cards */
.teams-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border-left: 4px solid var(--gold); }
.teams-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.related-card { display: block; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.related-card strong { color: var(--ink); }

/* ══ Gamification: levels, XP, achievements, proficiency ════════════════════ */
.level-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.level-badge { width: 72px; height: 72px; border-radius: 18px; flex: none; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; position: relative; box-shadow: var(--shadow-sm); }
.level-badge.sm { width: 48px; height: 48px; border-radius: 12px; }
.level-badge .level-icon { font-size: 1.7rem; line-height: 1; }
.level-badge.sm .level-icon { font-size: 1.2rem; }
.level-badge .level-no { position: absolute; bottom: -8px; background: var(--ink); color: var(--cream);
    font-size: .64rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; letter-spacing: .03em; }
.xp-bar { background: var(--line); border-radius: 999px; height: 9px; overflow: hidden; }
.xp-fill { display: block; height: 9px; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--green-deep)); transition: width .4s ease; }

.game-gadget { transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); }
.game-gadget:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--green); }
.game-next { display: flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid var(--line); }

/* Proficiency rows */
.prof-row { display: grid; grid-template-columns: 130px 1fr 58px; align-items: center; gap: 10px; margin: 8px 0; }
.prof-name { font-size: .88rem; font-weight: 600; }
.prof-bar { background: var(--line); border-radius: 999px; height: 12px; overflow: hidden; }
.prof-fill { display: block; height: 12px; border-radius: 999px; transition: width .4s ease; }
.prof-val { text-align: right; font-weight: 700; font-size: .82rem; }

/* Achievement grid */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; }
.ach.earned { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.ach.locked { opacity: .62; filter: grayscale(.4); }
.ach-icon { font-size: 2rem; line-height: 1; }
.ach-name { font-weight: 700; font-size: .92rem; }
.ach-desc { font-size: .76rem; color: var(--muted); }
.ach-date { font-size: .7rem; color: var(--green-deep); font-weight: 700; margin-top: 2px; }
.ach-date.locked-points { color: var(--muted); }
.ach-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--green-wash); color: var(--green-deep);
    border: 1px solid var(--green-tint); border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 600; }

/* Leaderboard */
.lb-table .lb-rank { font-size: 1.1rem; font-weight: 800; text-align: center; }
.lb-table .lb-me { background: var(--green-wash); }

/* Celebration banner + confetti */
.celebrate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px;
    background: linear-gradient(135deg, var(--green-wash), var(--card)); border: 1px solid var(--green-tint);
    border-radius: var(--radius); padding: 12px 16px; animation: celebrate-pop .5s ease; }
@keyframes celebrate-pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; border-radius: 2px; z-index: 9999;
    pointer-events: none; opacity: .9; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .celebrate { animation: none; } }

/* Gamification depth: daily goals, achievement progress + rarity */
.goal-row { display: grid; grid-template-columns: 26px 1fr 70px 44px; align-items: center; gap: 10px; padding: 7px 0; }
.goal-row + .goal-row { border-top: 1px solid var(--line); }
.goal-icon { font-size: 1.1rem; text-align: center; }
.goal-label { font-size: .88rem; }
.goal-row.done .goal-label { color: var(--muted); text-decoration: line-through; }
.goal-prog { background: var(--line); border-radius: 999px; height: 8px; overflow: hidden; }
.goal-prog > span { display: block; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--green-deep)); }
.goal-val { text-align: right; font-size: .8rem; font-weight: 700; color: var(--muted); }
.goal-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line);
    border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.goal-chip.done { background: var(--green-wash); border-color: var(--green-tint); color: var(--green-deep); font-weight: 600; }

.ach { position: relative; }
.ach-prog { display: block; width: 80%; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 2px 0; }
.ach-prog > span { display: block; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--green-deep)); }
.ach-rarity { position: absolute; top: 8px; right: 8px; font-size: .6rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .04em; padding: 2px 6px; border-radius: 999px; }
.ach-rarity.tier-common    { background: var(--line); color: var(--muted); }
.ach-rarity.tier-uncommon  { background: #e6f0fb; color: #2f6db5; }
.ach-rarity.tier-rare      { background: #efe6fb; color: #7a4fc0; }
.ach-rarity.tier-legendary { background: #fbf0d8; color: #b8860b; }
[data-theme="dark"] .ach-rarity.tier-uncommon  { background: #16263a; color: #6fa8e0; }
[data-theme="dark"] .ach-rarity.tier-rare      { background: #281a3a; color: #b794e8; }
[data-theme="dark"] .ach-rarity.tier-legendary { background: #2e2613; color: #d9b65a; }

/* ══ Rewards Store + cosmetics ══════════════════════════════════════════════ */
.coin-balance { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.coin-amt { font-size: 1.8rem; font-weight: 800; color: var(--gold); letter-spacing: .01em; }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.reward-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px;
    transition: transform var(--t-fast), box-shadow var(--t-fast); }
.reward-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.reward-card.reward-locked { opacity: .7; }
.reward-icon { font-size: 2rem; line-height: 1; }
.reward-name { font-weight: 700; font-size: .95rem; }
.reward-desc { font-size: .78rem; color: var(--muted); min-height: 2.4em; }
.reward-cost { font-weight: 800; color: var(--gold); }

/* Avatar / level-badge cosmetic frames (earned in the store) */
.frame-bronze { box-shadow: 0 0 0 3px #cd7f32, 0 0 0 5px var(--card); }
.frame-silver { box-shadow: 0 0 0 3px #b8c0c8, 0 0 0 5px var(--card); }
.frame-gold   { box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px var(--card); }
.frame-royal  { box-shadow: 0 0 0 3px #7a4fc0, 0 0 0 6px var(--card); position: relative; }
.frame-royal::after { content: "👑"; position: absolute; top: -14px; right: -8px; font-size: .9rem;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.level-badge.frame-bronze, .level-badge.frame-silver, .level-badge.frame-gold, .level-badge.frame-royal { overflow: visible; }

/* ══ Mastery meta-credential ════════════════════════════════════════════════ */
.mastery-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: linear-gradient(135deg, #6a4e0e, var(--gold)); color: #fff;
    border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-sm); }
.mastery-banner strong { font-size: 1.05rem; }
.mastery-crown { font-size: 2rem; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }

.mastery-cert { text-align: center; background: var(--card); border: 2px solid var(--gold);
    border-radius: var(--radius-lg); padding: 40px 28px; box-shadow: var(--shadow);
    background-image: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 60%); }
.mastery-cert-void { border-color: var(--red); filter: grayscale(.4); }
.mastery-cert-crown { font-size: 3.4rem; line-height: 1; }
.mastery-cert-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; color: var(--muted); margin: 8px 0 4px; }
.mastery-cert-name { font-size: 2rem; margin: 4px 0; }
.mastery-cert-line { color: var(--muted); margin: 6px 0; }
.mastery-cert-program { font-size: 1.5rem; margin: 4px 0; color: var(--green-deep); }
.mastery-cert-title { font-style: italic; color: var(--ink-soft); margin: 6px 0 14px; }
.mastery-cert-meta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.mastery-verify { margin: 18px auto 0; max-width: 460px; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: .9rem; }
.mastery-verify.ok { background: var(--green-wash); color: var(--green-deep); border: 1px solid var(--green-tint); }
.mastery-verify.bad { background: #fdecec; color: var(--red-deep); border: 1px solid #f3b9b9; }
[data-theme="dark"] .mastery-verify.bad { background: #2a1414; border-color: #5a2626; }

/* Mastery tiers: roadmap markers + tier-coloured banners/certs */
.prof-block { margin: 12px 0; }
.prof-bar { position: relative; }
.tier-tick { position: absolute; top: 0; width: 2px; height: 100%; background: rgba(0,0,0,.28); transform: translateX(-1px); }
.tier-tick.reached { background: #fff; }
[data-theme="dark"] .tier-tick { background: rgba(0,0,0,.5); }
.prof-tier-line { display: flex; align-items: center; gap: 10px; margin: 5px 0 0; font-size: .8rem; flex-wrap: wrap; }

.mastery-banner.tier-1 { background: linear-gradient(135deg, #8a5a20, #cd7f32); }
.mastery-banner.tier-2 { background: linear-gradient(135deg, #6b7178, #9aa5ad); }
.mastery-banner.tier-3 { background: linear-gradient(135deg, #6a4e0e, #c9a227); }
.mastery-banner.tier-4 { background: linear-gradient(135deg, #4a2d82, #7a4fc0); }
.mastery-cert.tier-1 { border-color: #cd7f32; }
.mastery-cert.tier-2 { border-color: #9aa5ad; }
.mastery-cert.tier-3 { border-color: #c9a227; }
.mastery-cert.tier-4 { border-color: #7a4fc0; }

/* Mastery credential: footer, legend, print */
.mastery-cert-foot { margin: 14px 0 0; font-size: .74rem; color: var(--muted); word-break: break-word; }
.tier-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.tier-legend span { display: inline-flex; align-items: center; gap: 4px; }
@media print {
    .site-header, .site-footer, .skip-link, .no-print, .dash-side { display: none !important; }
    body { background: #fff; }
    .section { padding: 0; }
    .mastery-cert { box-shadow: none; margin: 0 auto; }
}

/* ── Social sign-in buttons (login / register) ──────────────────────────── */
.social-auth { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 4px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
  font-weight: 600; text-decoration: none; transition: border-color .12s, box-shadow .12s, transform .12s; }
.social-btn:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.07); transform: translateY(-1px); }
.social-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.social-glyph { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; flex: none; }
.social-glyph svg { display: block; }
.social-label { font-size: .95rem; }
.social-divider { position: relative; text-align: center; margin: 16px 0 2px; }
.social-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.social-divider span { position: relative; background: var(--card); padding: 0 12px; color: var(--muted); font-size: .8rem; }

/* ── Team seat volume-discount chips ────────────────────────────────────── */
.seat-tiers { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px; }
.seat-tier { font-size: .8rem; color: var(--ink-soft); background: var(--green-wash);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.seat-tier strong { color: var(--green-deep); }
