/* =====================================================================
   USCIS Civics Test — stylesheet
   Aesthetic: editorial / civic.  Warm parchment, deep navy, brick red,
   distinctive serif display.  Restrained, readable, serious.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    /* ----- palette ----- */
    --paper:        #fbf7ee;     /* warm cream parchment */
    --paper-deep:   #f3ecd8;     /* slightly deeper for cards */
    --ink:          #1a1a1a;
    --ink-soft:     #3a3a3a;
    --ink-muted:    #6b6b6b;
    --rule:         #d8cdb0;     /* parchment-toned border */
    --navy:         #14213d;
    --navy-soft:    #2a3a5a;
    --brick:        #9b2c2c;     /* muted brick red */
    --brick-deep:   #7a2222;
    --gold:         #b8923c;
    --green:        #2f6e3b;     /* for "correct" indicators */
    --green-soft:   #e1eedf;
    --red-soft:     #f4dada;

    /* ----- type ----- */
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans:  'Manrope', system-ui, sans-serif;

    /* ----- structure ----- */
    --measure: 64ch;
    --shadow-card: 0 1px 0 rgba(20,33,61,.04), 0 12px 40px -16px rgba(20,33,61,.18);
    --shadow-soft: 0 1px 2px rgba(20,33,61,.06);
    --radius: 4px;          /* deliberately small — civic, not playful */
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* Subtle paper texture via layered gradients (no images required) */
body {
    background-image:
        radial-gradient(at 12% 8%, rgba(184, 146, 60, .06) 0, transparent 40%),
        radial-gradient(at 88% 92%, rgba(20, 33, 61, .04) 0, transparent 45%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* =====================================================================
   Page frame
   ===================================================================== */

.frame {
    max-width: 880px;
    margin: 0 auto;
    padding: 48px 28px 72px;
}

.masthead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--rule);
    gap: 24px;
    flex-wrap: wrap;
}

.masthead .seal {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: -0.01em;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

.masthead .seal::before {
    content: '★ ★ ★ ★';
    color: var(--brick);
    font-size: 11px;
    letter-spacing: 4px;
    transform: translateY(-3px);
    margin-right: 6px;
}

.masthead .meta {
    font-size: 12px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
}

/* =====================================================================
   Hero / title
   ===================================================================== */

.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 700;
    color: var(--brick);
    margin-bottom: 20px;
}

h1.headline {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin: 0 0 20px;
    max-width: 14ch;
}

h1.headline em {
    font-style: italic;
    font-variation-settings: 'opsz' 144;
    color: var(--brick);
}

.subhead {
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: var(--measure);
    margin: 0 0 36px;
    font-weight: 400;
}

/* =====================================================================
   Cards
   ===================================================================== */

.card {
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 32px 36px;
    box-shadow: var(--shadow-card);
}

.card + .card {
    margin-top: 22px;
}

.card-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--navy);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.card-lede {
    color: var(--ink-soft);
    margin: 0 0 22px;
    max-width: var(--measure);
}

/* =====================================================================
   Forms
   ===================================================================== */

label.field {
    display: block;
    margin-bottom: 18px;
}

label.field > .label-text {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

select, input[type="text"] {
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-family: var(--sans);
    font-size: 16px;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}

select:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(20, 33, 61, .12);
}

/* =====================================================================
   Mode picker (radio cards)
   ===================================================================== */

.mode-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.mode-picker input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-picker label {
    display: block;
    cursor: pointer;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: border-color .15s, background .15s, transform .15s;
}

.mode-picker label:hover {
    border-color: var(--navy-soft);
    transform: translateY(-1px);
}

.mode-picker input[type="radio"]:checked + label {
    border-color: var(--navy);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20, 33, 61, .08), var(--shadow-soft);
}

.mode-picker .mode-name {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--navy);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.mode-picker .mode-desc {
    font-size: 13px;
    color: var(--ink-muted);
    line-height: 1.45;
}

@media (max-width: 600px) {
    .mode-picker { grid-template-columns: 1fr; }
}

/* =====================================================================
   Buttons
   ===================================================================== */

.btn {
    display: inline-block;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 26px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .12s ease, background .15s, border-color .15s, color .15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--navy);
    color: var(--paper);
    border-color: var(--navy);
}
.btn-primary:hover { background: #0d1729; border-color: #0d1729; }

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--navy); background: #fff; }

.btn-success { background: var(--green); border-color: var(--green); color: white; }
.btn-success:hover { background: #245a2e; }

.btn-danger { background: var(--brick); border-color: var(--brick); color: white; }
.btn-danger:hover { background: var(--brick-deep); }

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* =====================================================================
   Test progress bar
   ===================================================================== */

.progress {
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    gap: 18px;
    flex-wrap: wrap;
}

.progress .markers {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 200px;
}

.progress .marker {
    flex: 1;
    height: 6px;
    background: var(--rule);
    border-radius: 1px;
    transition: background .25s;
}
.progress .marker.correct { background: var(--green); }
.progress .marker.wrong   { background: var(--brick); }
.progress .marker.current { background: var(--navy); }

/* =====================================================================
   Question card
   ===================================================================== */

.q-number {
    font-family: var(--serif);
    font-style: italic;
    color: var(--brick);
    font-size: 14px;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.q-text {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    font-weight: 500;
    line-height: 1.3;
    color: var(--navy);
    margin: 0 0 28px;
    letter-spacing: -0.01em;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.choice {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    font: inherit;
    color: var(--ink);
    width: 100%;
    transition: border-color .15s, background .15s, transform .12s;
}

.choice:hover {
    border-color: var(--navy-soft);
    background: #fff;
    transform: translateX(2px);
}

.choice .marker-letter {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 600;
    color: var(--brick);
    font-size: 18px;
    flex-shrink: 0;
    width: 22px;
}

.choice.correct {
    border-color: var(--green);
    background: var(--green-soft);
}
.choice.correct .marker-letter { color: var(--green); }

.choice.wrong {
    border-color: var(--brick);
    background: var(--red-soft);
}

.choice[disabled] {
    cursor: default;
}
.choice[disabled]:hover { transform: none; }

/* =====================================================================
   Self-grade text input
   ===================================================================== */

.self-grade-help {
    background: var(--paper);
    border-left: 3px solid var(--gold);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.5;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.reveal-box {
    margin-top: 18px;
    padding: 20px 22px;
    background: var(--paper);
    border: 1px dashed var(--rule);
    border-radius: var(--radius);
}

.reveal-box .reveal-label {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--brick);
    margin-bottom: 6px;
}

.reveal-box .reveal-answer {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--navy);
    font-weight: 500;
}

/* =====================================================================
   Feedback (after answering)
   ===================================================================== */

.feedback {
    margin-top: 22px;
    padding: 18px 22px;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 15px;
    line-height: 1.55;
}

.feedback.correct {
    border-color: var(--green);
    background: var(--green-soft);
    color: #1f4a26;
}

.feedback.wrong {
    border-color: var(--brick);
    background: var(--red-soft);
    color: var(--brick-deep);
}

.feedback strong {
    font-family: var(--serif);
    font-weight: 600;
}

.feedback .accepted {
    margin-top: 10px;
    font-size: 13px;
    color: var(--ink-soft);
}
.feedback .accepted ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

/* =====================================================================
   Results page
   ===================================================================== */

.verdict {
    text-align: center;
    padding: 48px 24px 36px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper-deep);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.verdict::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--brick), var(--gold), var(--navy));
}

.verdict.pass::before { background: linear-gradient(90deg, var(--green), var(--gold), var(--navy)); }

.verdict-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 700;
    color: var(--ink-muted);
    margin-bottom: 14px;
}

.verdict-headline {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    color: var(--navy);
    line-height: 1.05;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.verdict.pass .verdict-headline { color: var(--green); }
.verdict.fail .verdict-headline { color: var(--brick); }

.verdict-score {
    font-family: var(--serif);
    font-size: 1.4rem;
    color: var(--ink-soft);
    margin: 0 0 6px;
}

.verdict-score strong {
    font-weight: 600;
    font-size: 2.4rem;
    color: var(--navy);
}

.verdict-meta {
    color: var(--ink-muted);
    font-size: 14px;
    margin-top: 12px;
}

/* =====================================================================
   Review list
   ===================================================================== */

.review-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--navy);
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule);
}

.review-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}
.review-item:last-child { border-bottom: none; }

.review-item .rq {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.review-item .pip {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}

.review-item .pip.correct { background: var(--green); color: white; }
.review-item .pip.wrong   { background: var(--brick); color: white; }
.review-item .pip.skipped { background: var(--ink-muted); color: white; }

.review-item .rq-text {
    font-family: var(--serif);
    color: var(--navy);
    font-size: 1.05rem;
    line-height: 1.4;
}

.review-item .ra {
    margin-left: 34px;
    font-size: 14px;
    color: var(--ink-soft);
}

.review-item .ra .answer-row {
    margin: 4px 0;
}
.review-item .ra .answer-label {
    color: var(--ink-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-right: 8px;
}

/* =====================================================================
   Notes / footnotes
   ===================================================================== */

.note {
    margin-top: 30px;
    padding: 14px 18px;
    background: rgba(184, 146, 60, .08);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.note strong { color: var(--ink); }

footer.colophon {
    margin-top: 64px;
    padding-top: 22px;
    border-top: 1px solid var(--rule);
    font-size: 12px;
    color: var(--ink-muted);
    line-height: 1.6;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

footer.colophon a {
    color: var(--navy);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
}
footer.colophon a:hover { border-bottom-color: var(--navy); }

/* =====================================================================
   Utility
   ===================================================================== */

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex-shrink: 0; }
.spacer { flex: 1; }
.muted { color: var(--ink-muted); }
.serif { font-family: var(--serif); }
.center { text-align: center; }

@media (max-width: 600px) {
    .frame { padding: 28px 18px 56px; }
    .card { padding: 24px 22px; }
    .masthead { margin-bottom: 24px; }
}

/* =====================================================================
   v2 — accounts, dashboard, study area
   ===================================================================== */

/* ---- masthead nav ---- */
.masthead {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
}
.masthead__brand .seal {
    text-decoration: none;
    color: inherit;
}
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    align-items: center;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.nav__link {
    color: var(--ink-soft);
    text-decoration: none;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color .15s, color .15s;
}
.nav__link:hover { color: var(--navy); }
.nav__link--active {
    color: var(--navy);
    border-bottom-color: var(--gold);
}
.nav__link--cta {
    background: var(--navy);
    color: var(--paper);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    border-bottom-color: transparent !important;
}
.nav__link--cta:hover { background: var(--navy-soft); color: var(--paper); }
.nav__link--secondary { color: var(--ink-muted); }

/* ---- hero variants ---- */
.hero {
    margin: 1.5rem 0 2.5rem;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1.5rem;
}
.hero h1 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.1;
    margin: 0.4rem 0 0.75rem;
    color: var(--navy);
    letter-spacing: -0.01em;
}
.hero .lede {
    color: var(--ink-soft);
    font-size: 1.05rem;
    max-width: 60ch;
    margin: 0 0 0.75rem;
}
.hero .eyebrow {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brick);
    margin: 0;
}
.hero--dashboard h1, .hero--login h1, .hero--register h1, .hero--study h1 { color: var(--navy); }

/* ---- generic buttons (BEM-aligned with existing .btn-primary etc.) ---- */
.btn--primary, .btn--ghost {
    display: inline-block;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 15px;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    letter-spacing: 0.01em;
}
.btn--primary { background: var(--navy); color: var(--paper); }
.btn--primary:hover { background: var(--navy-soft); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--paper); }

/* ---- alerts ---- */
.alert {
    border: 1px solid var(--rule);
    border-left: 3px solid var(--navy);
    background: var(--paper-deep);
    padding: 1rem 1.25rem;
    margin: 0 0 1.25rem;
    border-radius: var(--radius);
}
.alert p { margin: 0 0 0.5rem; }
.alert p:last-child { margin-bottom: 0; }
.alert--error { border-left-color: var(--brick); background: var(--red-soft); }
.alert--success { border-left-color: var(--green); background: var(--green-soft); }
.alert__meta { font-size: 13px; color: var(--ink-muted); }

/* ---- auth forms ---- */
.auth-panel {
    max-width: 540px;
    margin: 0 auto 3rem;
}
.auth-panel h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--navy);
    margin: 0 0 1rem;
}
.auth-panel--cta { text-align: center; padding-top: 1rem; }
.auth-form .field {
    display: block;
    margin-bottom: 1rem;
}
.auth-form .field__label {
    display: block;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.auth-form .field__label small {
    text-transform: none;
    font-weight: 400;
    color: var(--ink-muted);
    letter-spacing: 0;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form select {
    width: 100%;
    font-family: var(--sans);
    font-size: 15px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
}
.auth-form input:focus, .auth-form select:focus {
    outline: 2px solid var(--gold);
    outline-offset: -1px;
    border-color: var(--gold);
}
.auth-form button[type="submit"] { margin-top: 0.5rem; }
.auth-form__alt {
    margin-top: 1rem;
    color: var(--ink-muted);
    font-size: 14px;
}
.auth-form__alt a { color: var(--navy); }
.auth-form__resend {
    margin-top: 2rem;
    border-top: 1px dashed var(--rule);
    padding-top: 1rem;
}
.auth-form__resend summary {
    cursor: pointer;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--ink-muted);
    margin-bottom: 1rem;
}
.auth-form--inline { margin-top: 0.75rem; }

/* ---- benefits panel (registration page) ---- */
.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 0 0 2.5rem;
}
.benefit-card {
    border: 1px solid var(--rule);
    background: var(--paper);
    padding: 1.25rem 1.25rem 1.5rem;
    border-radius: var(--radius);
}
.benefit-icon {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.4rem;
}
.benefit-card h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    color: var(--navy);
}
.benefit-card p { color: var(--ink-soft); margin: 0; font-size: 14px; line-height: 1.5; }

/* ---- register CTA banner (used on landing, study index, results) ---- */
.register-cta {
    background: linear-gradient(135deg, var(--paper-deep), var(--paper));
    border: 1px solid var(--rule);
    border-left: 3px solid var(--gold);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    margin: 0 0 2rem;
}
.register-cta p { margin: 0 0 0.75rem; color: var(--ink-soft); }
.register-cta__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---- dashboard ---- */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
}
.stat-card__label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.stat-card__value {
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1;
    color: var(--navy);
    margin: 0.25rem 0;
}
.stat-card__meta {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink-soft);
}

/* ---- weak section recommend ---- */
.recommend {
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem 1.75rem;
    margin: 0 0 2.5rem;
    border-top: 3px solid var(--brick);
}
.recommend--positive { border-top-color: var(--green); }
.recommend h2 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--navy);
    margin: 0 0 0.5rem;
}
.recommend__intro { color: var(--ink-soft); margin: 0 0 1.5rem; max-width: 64ch; }
.recommend__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.recommend-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.recommend-card__theme {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brick);
    margin: 0;
}
.recommend-card h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--navy);
    margin: 0.25rem 0 0.5rem;
}
.recommend-card__stat {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0 0 0.75rem;
}
.recommend-card__stat strong { color: var(--brick-deep); font-weight: 700; font-size: 1.3rem; }
.recommend-card__blurb {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
    margin: 0 0 1rem;
}

/* ---- sections overview tiles ---- */
.sections-overview { margin: 0 0 2.5rem; }
.sections-overview h2 {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--navy);
    margin: 0 0 1rem;
}
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}
.section-tile {
    display: block;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.section-tile:hover { border-color: var(--navy); box-shadow: var(--shadow-soft); }
.section-tile--weak { border-left: 3px solid var(--brick); }
.section-tile--cold { background: var(--paper-deep); }
.section-tile__theme {
    font-family: var(--sans);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0;
}
.section-tile h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1rem;
    color: var(--navy);
    margin: 0.2rem 0 0.5rem;
}
.section-tile__stat {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink-soft);
    margin: 0 0 0.5rem;
}
.bar {
    height: 4px;
    background: var(--rule);
    border-radius: 2px;
    overflow: hidden;
}
.bar__fill {
    height: 100%;
    background: var(--green);
    transition: width .3s;
}
.section-tile--weak .bar__fill { background: var(--brick); }

/* ---- recent attempts table ---- */
.recent-attempts { margin: 0 0 2rem; }
.recent-attempts__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.recent-attempts h2 {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--navy);
    margin: 0;
}
.link {
    color: var(--navy);
    font-family: var(--sans);
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--gold);
}
.link:hover { color: var(--brick); }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--sans);
    font-size: 14px;
    background: var(--paper);
    border: 1px solid var(--rule);
}
.data-table th, .data-table td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--rule);
}
.data-table th {
    background: var(--paper-deep);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.data-table tr:last-child td { border-bottom: none; }

/* ---- pills ---- */
.pill {
    display: inline-block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--paper-deep);
    color: var(--ink-soft);
    letter-spacing: 0.04em;
}
.pill--pass    { background: var(--green-soft); color: var(--green); }
.pill--fail    { background: var(--red-soft);   color: var(--brick-deep); }
.pill--pending { background: #efe6c9; color: #6e5a1e; }

/* ---- study area ---- */
.study-theme { margin: 0 0 2.5rem; }
.study-theme h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--navy);
    margin: 0 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--rule);
}
.study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.study-card {
    display: block;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, transform .15s;
}
.study-card:hover { border-color: var(--navy); transform: translateY(-1px); }
.study-card--weak { border-left: 3px solid var(--brick); }
.study-card h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--navy);
    margin: 0 0 0.35rem;
}
.study-card__count {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--brick);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.65rem;
}
.study-card__blurb {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}
.study-card__stat {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--rule);
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink-muted);
}

/* ---- single-section study ---- */
.study-stat-banner {
    display: inline-block;
    background: var(--paper-deep);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--green);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 14px;
    margin: 0.5rem 0 1rem;
}
.study-stat-banner--weak { border-left-color: var(--brick); background: var(--red-soft); }
.qa-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: qa;
}
.qa {
    border-bottom: 1px solid var(--rule);
    padding: 1.5rem 0;
}
.qa--miss {
    background: linear-gradient(90deg, transparent, transparent 4px, rgba(155, 44, 44, 0.04) 4px);
    margin-left: -4px;
    padding-left: 4px;
    border-left: 3px solid var(--brick);
}
.qa__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    font-family: var(--sans);
    font-size: 12px;
}
.qa__id {
    font-weight: 600;
    color: var(--ink-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.qa__star { color: var(--gold); font-size: 14px; }
.qa__miss-tag {
    background: var(--red-soft);
    color: var(--brick-deep);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}
.qa__q {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--navy);
    line-height: 1.4;
    margin: 0 0 0.75rem;
}
.qa__a {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    padding: 0.85rem 1.1rem;
}
.qa__a-label {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    margin: 0 0 0.4rem;
}
.qa__a ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--ink);
}
.qa__a ul li { margin-bottom: 0.2rem; }
.qa__note {
    font-size: 13px;
    color: var(--ink-muted);
    font-style: italic;
    margin: 0.5rem 0 0;
}

/* ---- mobile ---- */
@media (max-width: 640px) {
    .masthead { flex-direction: column; align-items: flex-start; }
    .nav { width: 100%; }
    .hero h1 { font-size: 1.7rem; }
    .data-table { font-size: 13px; }
    .data-table th, .data-table td { padding: 0.55rem 0.5rem; }
}
