/* ================================================================
   CofC QEP AI Literacy Assessment - Warm Guide theme
   Maroon #7D2236 · Gold #C9A030 · Warm white #faf8f5
   ================================================================ */

:root {
    --maroon: #7D2236;
    --maroon-dark: #5C1525;
    --maroon-hover: #6A1B2A;
    --maroon-light: #9a3d52;
    --gold: #C9A030;
    --gold-light: #D4B870;
    --gold-pale: #FBF6E6;
    --warm-white: #faf8f5;
    --cream: #f5f1ea;
    --white: #ffffff;
    --ink: #1c1c1c;
    --muted: #6b6b6b;
    --subtle: #9a9a9a;
    --gray-50: #f4f4f3;
    --gray-100: #f4f4f3;
    --gray-200: #e2e2e2;
    --gray-300: #d9d9d6;
    --gray-400: #9a9a9a;
    --gray-600: #6b6b6b;
    --gray-700: #4a4a4a;
    --gray-800: #1c1c1c;
    --gray-900: #111827;
    --success: #059669;
    --success-light: #d1fae5;
    --error: #dc2626;
    --error-light: #fee2e2;
    --info: #2563eb;
    --info-light: #dbeafe;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --radius-pill: 40px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --transition: .25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--warm-white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--maroon);
    line-height: 1.3;
}

.hidden { display: none !important; }

/* ── Header (Warm Guide) ─────────────────────────────────────────── */

header {
    background: var(--white);
    color: var(--ink);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(201, 160, 48, .12);
}

.progress-container {
    position: relative;
    height: 4px;
    background: var(--gray-200);
    flex-shrink: 0;
}

.progress-bar {
    height: 100%;
    background: var(--gold);
    transition: width .5s ease;
    border-radius: 0 2px 2px 0;
}

.progress-text {
    display: none;
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(201, 160, 48, .18);
}

.header-brand {
    justify-self: start;
}

.cofc-mark {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cofc-mark-line1 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
}

.cofc-mark-line2 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .06em;
    color: var(--maroon);
}

.header-center {
    justify-self: center;
    font-size: 11px;
    color: var(--subtle);
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 500;
    text-align: center;
}

.header-meta {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.breadcrumb-row {
    max-width: 1080px;
    margin: 0 auto;
    padding: .5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--maroon);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: .3rem .7rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition);
}

.back-btn:hover {
    background: var(--gold-pale);
    border-color: var(--maroon);
}

.breadcrumb-text {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--maroon);
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-badge,
.timer-badge {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
}

.student-badge {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timer-badge {
    font-weight: 600;
    color: var(--maroon);
}

.cofc-crest,
.header-text {
    display: none;
}

/* ── Main content ────────────────────────────────────────────────── */

main {
    flex: 1;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ── Cards ────────────────────────────────────────────────────────── */

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border: 1px solid rgba(0, 0, 0, .05);
    padding: 2rem;
    margin-bottom: 1.5rem;
    animation: fadeUp .4s ease;
}

.card-hero {
    text-align: center;
    padding: 3rem 2rem;
}

.card-hero h2 {
    font-size: 1.8rem;
    margin-bottom: .5rem;
}

.card-hero .subtitle {
    color: var(--gray-600);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Welcome screen ──────────────────────────────────────────────── */

.welcome-page {
    max-width: 640px;
    margin: 2rem auto 0;
}

.welcome-page .coach-bubble-wrap {
    margin-bottom: 1.5rem;
}

.welcome-container {
    text-align: center;
    padding: 2.5rem 2rem;
    max-width: 100%;
    margin: 0 auto;
}

.welcome-crest {
    display: none;
}

.welcome-page .cofc-mark {
    align-items: center;
    margin-bottom: 1.25rem;
}

.welcome-page .cofc-mark-line1 { font-size: 11px; }
.welcome-page .cofc-mark-line2 { font-size: 15px; }

.welcome-container h2 {
    font-size: 2rem;
    margin-bottom: .3rem;
}

.welcome-container .subtitle {
    font-size: 1.15rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.welcome-container p.welcome-desc {
    color: var(--gray-600);
    font-size: .92rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.welcome-note {
    margin-top: 1.5rem;
    padding: .85rem 1rem;
    background: var(--gold-pale);
    border: 1px solid rgba(201, 160, 48, .35);
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    font-size: .82rem;
    line-height: 1.6;
    text-align: left;
}

.resume-where {
    margin: 0 0 1.25rem;
    padding: .6rem .9rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    font-size: .88rem;
}

.resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

.restart-btn {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: .25rem .6rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.restart-btn:hover {
    background: var(--gold-pale);
    border-color: var(--maroon);
    color: var(--maroon);
}

/* ── Forms ────────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: .88rem;
    color: var(--muted);
    margin-bottom: .35rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px rgba(125, 34, 54, .12);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group .hint {
    font-size: .78rem;
    color: var(--gray-400);
    margin-top: .3rem;
}

.word-counter {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--gray-400);
    margin-top: .2rem;
}

.word-counter.met {
    color: var(--success);
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.6rem;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--maroon);
    color: var(--white);
    box-shadow: 0 4px 18px rgba(125, 34, 54, .22);
}

.btn-primary:hover:not(:disabled) {
    background: var(--maroon-hover);
    box-shadow: 0 6px 22px rgba(125, 34, 54, .28);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gold);
    color: var(--maroon-dark);
}

.btn-secondary:hover:not(:disabled) {
    background: #b89840;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--maroon);
    border: 2px solid var(--maroon);
}

.btn-outline:hover:not(:disabled) {
    background: var(--maroon);
    color: var(--white);
}

.btn-lg {
    padding: 14px 44px;
    font-size: 15px;
    border-radius: var(--radius-pill);
}

.btn-block {
    width: 100%;
}

/* ── Module headers ──────────────────────────────────────────────── */

.module-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold-light);
}

.module-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gold);
    background: var(--maroon);
    padding: .25rem .75rem;
    border-radius: 20px;
    margin-bottom: .6rem;
}

.module-header h2 {
    font-size: 1.5rem;
    margin-bottom: .3rem;
}

.module-header p {
    color: var(--gray-600);
    font-size: .92rem;
}

/* ── Activity headers ────────────────────────────────────────────── */

.activity-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--maroon);
    background: var(--gold-pale);
    padding: .2rem .6rem;
    border-radius: 4px;
    margin-bottom: .5rem;
}

/* ── MC options ──────────────────────────────────────────────────── */

.mc-options {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin: 1rem 0;
}

.mc-option {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    background: var(--white);
    text-align: left;
    font-family: inherit;
    font-size: .93rem;
    width: 100%;
}

.mc-option:hover:not(.disabled) {
    border-color: var(--maroon);
    background: var(--gold-pale);
}

.mc-option.selected {
    border-color: var(--maroon);
    background: var(--gold-pale);
    font-weight: 500;
}

.mc-option.correct {
    border-color: var(--success);
    background: var(--success-light);
}

.mc-option.incorrect {
    border-color: var(--error);
    background: var(--error-light);
}

.mc-option.disabled {
    cursor: default;
    opacity: .85;
}

.mc-option .mc-letter {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    color: var(--gray-600);
    transition: all var(--transition);
}

.mc-option.selected .mc-letter {
    background: var(--maroon);
    color: var(--white);
}

.mc-option.correct .mc-letter {
    background: var(--success);
    color: var(--white);
}

.mc-option.incorrect .mc-letter {
    background: var(--error);
    color: var(--white);
}

/* ── Sentence display (token prediction) ─────────────────────────── */

.sentence-display {
    background: var(--gray-50);
    border-left: 4px solid var(--gold);
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--gray-800);
    margin: 1rem 0;
    line-height: 1.6;
}

.sentence-display .blank {
    display: inline-block;
    min-width: 100px;
    border-bottom: 3px solid var(--maroon);
    color: var(--maroon);
    font-weight: 700;
    font-style: normal;
}

/* ── Feedback box ────────────────────────────────────────────────── */

.feedback-box {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    font-size: .9rem;
    line-height: 1.6;
    animation: fadeUp .3s ease;
}

.feedback-box.success {
    background: var(--success-light);
    border-left: 4px solid var(--success);
    color: #065f46;
}

.feedback-box.error {
    background: var(--error-light);
    border-left: 4px solid var(--error);
    color: #991b1b;
}

.feedback-box.info {
    background: var(--info-light);
    border-left: 4px solid var(--info);
    color: #1e40af;
}

.feedback-box.neutral {
    background: var(--gray-50);
    border-left: 4px solid var(--gray-300);
    color: var(--gray-700);
}

.feedback-box h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .35rem;
    color: inherit;
}

/* ── Top-5 tokens display ────────────────────────────────────────── */

.top5-display {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .75rem 0;
}

.top5-token {
    padding: .3rem .7rem;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
}

.top5-token:first-child {
    background: var(--gold);
    color: var(--maroon-dark);
}

.top5-token:not(:first-child) {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ── Comparison columns ──────────────────────────────────────────── */

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.comparison-col {
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.comparison-col.student {
    background: var(--gold-pale);
    border: 2px solid var(--gold-light);
}

.comparison-col.ai {
    background: var(--info-light);
    border: 2px solid #93c5fd;
}

.comparison-col h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .6rem;
}

.comparison-col.student h4 { color: var(--maroon); }
.comparison-col.ai h4 { color: var(--info); }

.word-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.word-tag {
    padding: .2rem .55rem;
    border-radius: 4px;
    font-size: .82rem;
    font-weight: 500;
}

.comparison-col.student .word-tag {
    background: var(--gold-light);
    color: var(--maroon-dark);
}

.comparison-col.ai .word-tag {
    background: #bfdbfe;
    color: #1e40af;
}

/* ── Prompt / AI response display ────────────────────────────────── */

.prompt-display {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: .75rem 0;
    font-size: .9rem;
}

.prompt-display .prompt-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-400);
    margin-bottom: .35rem;
}

.ai-response-box {
    background: var(--info-light);
    border: 1px solid #93c5fd;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: .75rem 0;
    font-size: .9rem;
    color: #1e3a5f;
    line-height: 1.65;
}

.ai-response-box .ai-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--info);
    margin-bottom: .35rem;
}

/* ── Score badge ─────────────────────────────────────────────────── */

.score-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .7rem;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
}

.score-badge.good   { background: var(--success-light); color: var(--success); }
.score-badge.mid    { background: var(--warning-light); color: var(--warning); }
.score-badge.low    { background: var(--error-light);   color: var(--error); }

/* ── Criteria pills (prompt comparison) ──────────────────────────── */

.criteria-list {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .5rem 0;
}

.criteria-pill {
    font-size: .75rem;
    padding: .2rem .55rem;
    border-radius: 4px;
    background: var(--success-light);
    color: var(--success);
    font-weight: 600;
}

/* ── Statements list (hallucination / citation) ──────────────────── */

.statement-card {
    padding: .85rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: .6rem;
    cursor: pointer;
    transition: all var(--transition);
    font-size: .92rem;
    line-height: 1.55;
}

.statement-card:hover:not(.disabled) {
    border-color: var(--maroon);
    background: var(--gold-pale);
}

.statement-card.selected { border-color: var(--maroon); background: var(--gold-pale); }
.statement-card.correct-pick   { border-color: var(--success); background: var(--success-light); }
.statement-card.incorrect-pick { border-color: var(--error);   background: var(--error-light); }
.statement-card.was-answer     { border-color: var(--success); background: var(--success-light); }
.statement-card.disabled { cursor: default; }

/* ── Round tracker ───────────────────────────────────────────────── */

.round-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.round-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-200);
    transition: all var(--transition);
}

.round-dot.active   { background: var(--maroon); transform: scale(1.3); }
.round-dot.complete { background: var(--gold); }

.round-connector {
    width: 30px;
    height: 2px;
    background: var(--gray-200);
}

/* ── Scorecard ───────────────────────────────────────────────────── */

.scorecard {
    text-align: center;
}

.scorecard-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.scorecard-brand .cofc-mark {
    align-items: center;
}

.scorecard-brand .cofc-mark-line1 { font-size: 11px; }
.scorecard-brand .cofc-mark-line2 { font-size: 15px; }

.scorecard-complete-badge {
    display: inline-block;
    background: var(--success, #16a34a);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .3rem .7rem;
    border-radius: 999px;
    margin-bottom: .6rem;
}

.scorecard-word {
    font-size: 2.6rem;
    font-weight: 700;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--maroon);
    line-height: 1.1;
    margin: .35rem 0 .25rem;
}

.scorecard-pct {
    font-size: .92rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.scorecard-bar {
    height: 12px;
    background: var(--gray-100);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.scorecard-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}

.scorecard-bar-fill.band-1 { background: linear-gradient(90deg, var(--success), #34d399); }
.scorecard-bar-fill.band-2 { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.scorecard-bar-fill.band-3 { background: linear-gradient(90deg, var(--maroon, #7D2236), #b0455c); }
.scorecard-bar-fill.band-4 { background: linear-gradient(90deg, var(--gold, #C9A030), #e0c56a); }
.scorecard-bar-fill.band-5 { background: linear-gradient(90deg, var(--gold, #C9A030), #d8b968); }

/* ── Completion banner (screenshot reminder) ─────────────────────── */

.completion-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #fff8e6, #fdeecb);
    border: 2px solid var(--gold, #C9A030);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin: 0 auto 1.25rem;
    max-width: 640px;
    box-shadow: 0 4px 14px rgba(201, 160, 48, .18);
}

.completion-banner-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.completion-banner-body h3 {
    margin: 0 0 .25rem;
    font-size: 1.05rem;
    color: var(--maroon, #7D2236);
}

.completion-banner-body p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--gray-800, #333);
}

/* ── Completion ID box ───────────────────────────────────────────── */

.completion-id-box {
    margin: 1.75rem auto 0;
    padding: 1.1rem 1rem;
    border: 2px dashed var(--maroon, #7D2236);
    border-radius: 12px;
    background: #fbf6f7;
    text-align: center;
}

.completion-id-label {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gray-600, #666);
    margin-bottom: .35rem;
}

.completion-id-value {
    display: block;
    font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--maroon, #7D2236);
    word-break: break-all;
}

.completion-id-note {
    margin: .6rem 0 0;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--gray-600, #666);
}

.module-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: .92rem;
}

.module-score-row:last-child { border-bottom: none; }

.module-score-name {
    font-weight: 600;
    color: var(--gray-800);
}

.module-score-value {
    font-weight: 700;
    color: var(--maroon);
}

.scorecard-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gold-light);
}

/* ── Suggestions list ────────────────────────────────────────────── */

.suggestions-list {
    list-style: none;
    margin: .5rem 0;
}

.suggestions-list li {
    padding: .35rem 0 .35rem 1.2rem;
    position: relative;
    font-size: .88rem;
    color: var(--gray-700);
}

.suggestions-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}

/* ── Intro: coach bubble + module cards (Warm Guide) ───────────────── */

.intro-page {
    width: 100%;
}

.llm-primer-box a {
    color: var(--maroon);
    font-weight: 600;
}

.llm-primer-box a:hover {
    text-decoration: underline;
}

.coach-bubble-wrap {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 2rem;
}

.coach-avatar-col {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.coach-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 20px rgba(125, 34, 54, .22);
}

.coach-avatar svg {
    display: block;
}

.coach-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--maroon);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.coach-bubble-text {
    background: var(--white);
    border-radius: 18px 18px 18px 4px;
    padding: 18px 24px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .07);
    max-width: 560px;
    border: 1px solid rgba(0, 0, 0, .05);
    font-size: 15px;
    color: var(--ink);
    line-height: 1.65;
}

.coach-bubble-text p + p {
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
}

.coach-bubble-text strong {
    color: var(--maroon);
}

.coach-bubble-text .guiding-questions {
    margin-top: .5rem;
}

.coach-bubble-text .guiding-questions li {
    color: var(--muted);
}

.module-cards {
    display: flex;
    gap: 20px;
    width: 100%;
    margin-bottom: 2rem;
}

.module-card {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 22px 20px;
    cursor: default;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    border: 1px solid rgba(0, 0, 0, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
    border-color: rgba(201, 160, 48, .35);
}

.module-card-icon {
    margin-bottom: 14px;
}

.module-card-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    background: var(--gold-pale);
    padding: 3px 8px;
    border-radius: 4px;
    float: right;
}

.module-card-num {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
    clear: both;
}

.module-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 10px;
    font-family: 'DM Sans', sans-serif;
}

.module-card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.module-card-dur {
    font-size: 12px;
    color: var(--subtle);
}

.intro-cta-row {
    display: flex;
    justify-content: center;
    margin-top: .5rem;
}

.features-grid,
.feature-card {
    display: none;
}

/* ── Prompt practice drills ───────────────────────────────────────── */

.drill-scenario {
    margin: .75rem 0 1rem;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.65;
}

.difficulty-tag {
    display: inline-block;
    margin-left: .5rem;
    padding: .1rem .5rem;
    border-radius: var(--radius-pill);
    background: var(--gold-pale);
    border: 1px solid var(--gold);
    color: var(--maroon-dark);
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    vertical-align: middle;
}

.prompt-drill-card.showdown-escalate {
    border-left: 4px solid var(--gold);
}

.drill-question {
    font-size: 1rem;
    margin: 1rem 0 .75rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
}

.drill-weak-prompt {
    margin-bottom: 1rem;
}

.prompt-compare-grid {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: 1rem 0;
}

.prompt-compare-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    text-align: left;
    width: 100%;
    padding: 1rem 1.1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.prompt-compare-card:hover:not(:disabled) {
    border-color: var(--gold);
    background: var(--gold-pale);
}

.prompt-compare-card.selected {
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px rgba(125, 34, 54, .1);
}

.prompt-compare-card.is-best {
    border-color: var(--success);
    background: var(--success-light);
}

.prompt-compare-card.is-weak {
    border-color: var(--error);
    background: var(--error-light);
}

.prompt-compare-card.disabled {
    cursor: default;
}

.prompt-compare-letter {
    font-size: .72rem;
    font-weight: 700;
    color: var(--maroon);
    letter-spacing: .06em;
}

.prompt-compare-text {
    font-size: .9rem;
    line-height: 1.55;
    color: var(--ink);
    font-style: italic;
}

.prompt-compare-hint {
    font-size: .78rem;
    color: var(--muted);
    font-style: normal;
}

.prompt-build-track {
    margin: 1rem 0;
}

.prompt-build-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--maroon);
    margin-bottom: .5rem;
}

.prompt-build-slots {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.prompt-build-slot {
    display: grid;
    grid-template-columns: 28px 72px 1fr;
    gap: .5rem;
    align-items: start;
    padding: .65rem .85rem;
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    font-size: .85rem;
    line-height: 1.45;
}

.prompt-build-slot.filled {
    border-style: solid;
    border-color: var(--gold);
    background: var(--gold-pale);
}

.prompt-build-slot .slot-num {
    font-weight: 700;
    color: var(--maroon);
}

.prompt-build-slot .slot-empty {
    color: var(--subtle);
}

.prompt-build-slot.drag-over {
    border-color: var(--maroon);
    background: var(--gold-pale);
}

.prompt-build-slot.removable {
    cursor: pointer;
}

.prompt-build-slot.removable:hover {
    border-color: var(--maroon);
}

.prompt-chip[draggable="true"] {
    cursor: grab;
}

.prompt-chip.dragging {
    opacity: .5;
}

.drill-ladder-hint {
    margin-top: .5rem;
    font-size: .85rem;
}

.attempt-note {
    margin-top: .5rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--gray-600);
}

.prompt-chip-pool {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    margin: 1rem 0;
}

.prompt-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
    padding: .75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all var(--transition);
}

.prompt-chip:hover {
    border-color: var(--maroon);
    background: var(--gold-pale);
}

.prompt-chip-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gold);
}

.prompt-chip-text {
    font-size: .82rem;
    color: var(--ink);
    line-height: 1.4;
}

.prompt-build-actions {
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    margin-top: .5rem;
}

/* ── Navigation buttons row ──────────────────────────────────────── */

.nav-buttons {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1.5rem;
}

/* Keep a primary submit visible on long activities so students don't have
   to scroll to find it. Sticky (not fixed) stays in normal flow, so it never
   overlaps the content above it. */
.nav-buttons.sticky-submit {
    position: sticky;
    bottom: 0;
    margin-top: 1rem;
    padding: .85rem 0 .35rem;
    background: linear-gradient(to top, var(--white) 72%, rgba(255, 255, 255, 0));
    z-index: 5;
}

/* ── Prompt round indicator ──────────────────────────────────────── */

.prompt-round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.prompt-round-header h3 {
    font-size: 1.1rem;
}

/* ── Loading ─────────────────────────────────────────────────────── */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 28, 28, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    background: var(--white);
    padding: 2rem 2.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 420px;
    width: calc(100% - 3rem);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--maroon);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 0 auto .75rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-spinner p {
    font-weight: 600;
    color: var(--maroon);
    font-size: .9rem;
}

.loading-fact {
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--gray-200);
    font-weight: 400 !important;
    color: var(--gray-600) !important;
    font-size: .84rem !important;
    line-height: 1.5;
    min-height: 2.6em;
}
.loading-fact-label {
    display: block;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .68rem;
    margin-bottom: .25rem;
}
.loading-fact.fade-in {
    animation: factFade .4s ease;
}
@keyframes factFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Footer ──────────────────────────────────────────────────────── */

footer {
    text-align: center;
    padding: 1.25rem;
    font-size: .78rem;
    color: var(--subtle);
    border-top: 1px solid rgba(201, 160, 48, .12);
    background: var(--warm-white);
}

/* ── Probability bars (token prediction) ─────────────────────────── */

.prob-bars {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: 1rem 0;
}

.prob-row {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.prob-word {
    min-width: 90px;
    font-weight: 600;
    font-size: .88rem;
    text-align: right;
    color: var(--gray-700);
}

.prob-bar-track {
    flex: 1;
    height: 26px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.prob-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .8s cubic-bezier(.4,0,.2,1);
    display: flex;
    align-items: center;
    padding-left: .5rem;
}

.prob-bar-fill.rank-0 { background: linear-gradient(90deg, var(--maroon), var(--maroon-light)); }
.prob-bar-fill.rank-1 { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.prob-bar-fill.rank-2 { background: var(--gray-300); }
.prob-bar-fill.rank-3 { background: var(--gray-200); }

.prob-pct {
    font-size: .75rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
}

.prob-bar-fill.rank-2 .prob-pct,
.prob-bar-fill.rank-3 .prob-pct { color: var(--gray-600); }

.prob-row.picked .prob-word { color: var(--maroon); }
.prob-row.picked .prob-word::after {
    content: " ← you";
    font-size: .68rem;
    font-weight: 400;
    color: var(--gray-400);
}

/* ── Concept callout ─────────────────────────────────────────────── */

.concept-box {
    background: var(--gold-pale);
    border: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    margin: .75rem 0;
    font-size: .88rem;
    font-weight: 500;
    color: var(--maroon-dark);
}

.concept-box strong {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gold);
    margin-bottom: .2rem;
}

/* ── Chat bubbles (sycophancy lab) ───────────────────────────────── */

.chat-bubbles {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.chat-bubble {
    max-width: 85%;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    line-height: 1.55;
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--maroon);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
    align-self: flex-start;
    background: var(--gray-100);
    color: var(--gray-800);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--gray-200);
}

.chat-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .25rem;
    opacity: .7;
}

/* ── Side-by-side prompt comparison ──────────────────────────────── */

.side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.side-by-side > div {
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-size: .88rem;
    line-height: 1.6;
}

.side-bad {
    background: var(--error-light);
    border: 1px solid #fca5a5;
}

.side-good {
    background: var(--success-light);
    border: 1px solid #6ee7b7;
}

.side-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .35rem;
}

.side-bad .side-label { color: var(--error); }
.side-good .side-label { color: var(--success); }

/* ── Rendered Markdown (AI responses) ────────────────────────────── */

.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .6rem; }
.md p.md-h { margin: .7rem 0 .35rem; }
.md ul, .md ol { margin: .3rem 0 .6rem; padding-left: 1.25rem; }
.md li { margin: .15rem 0; }
.md code {
    background: rgba(0, 0, 0, .06);
    padding: .05rem .3rem;
    border-radius: 4px;
    font-size: .85em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.md-pre {
    background: rgba(0, 0, 0, .05);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: .6rem .75rem;
    margin: .5rem 0 .7rem;
    overflow-x: auto;
}
.md-pre code {
    background: none;
    padding: 0;
    font-size: .82em;
    white-space: pre;
}
.md-table-wrap {
    overflow-x: auto;
    margin: .5rem 0 .7rem;
}
.md-table {
    border-collapse: collapse;
    width: 100%;
    font-size: .85em;
}
.md-table th,
.md-table td {
    border: 1px solid var(--gray-200);
    padding: .4rem .6rem;
    text-align: left;
    vertical-align: top;
}
.md-table thead th {
    background: var(--gray-50);
    font-weight: 700;
}
.md-table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, .02);
}

/* ── Guiding questions ───────────────────────────────────────────── */

.guiding-questions {
    list-style: none;
    margin: .6rem 0;
}

.guiding-questions li {
    padding: .4rem 0 .4rem 1.5rem;
    position: relative;
    font-size: .88rem;
    color: var(--gray-700);
    font-style: italic;
}

.guiding-questions li::before {
    content: "?";
    position: absolute;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-pale);
    color: var(--gold);
    font-weight: 700;
    font-style: normal;
    font-size: .72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    top: .45rem;
}

/* ── Print styles ────────────────────────────────────────────────── */

@media print {
    header, footer, .btn, .loading-overlay { display: none !important; }
    main { max-width: 100%; padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
}

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

@media (max-width: 640px) {
    .header-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .header-brand, .header-center, .header-meta { justify-self: center; }
    .module-cards { flex-direction: column; }
    .coach-bubble-wrap { flex-direction: column; align-items: flex-start; }
    .comparison-grid { grid-template-columns: 1fr; }
    .side-by-side { grid-template-columns: 1fr; }
    main { padding: 1rem 1rem 3rem; }
    .card { padding: 1.25rem; }
    .welcome-container { padding: 1.5rem 1rem; margin-top: 2rem; }
    .nav-buttons { flex-direction: column; }
    .nav-buttons .btn { width: 100%; }
    .prompt-chip-pool { grid-template-columns: 1fr; }
}

/* ── Mode toggle pill (shared by knowledge + ethics) ── */
.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.mode-pill.live {
    background: rgba(5,150,105,.1);
    border-color: rgba(5,150,105,.35);
    color: #065f46;
}
.mode-pill.live:hover { background: rgba(5,150,105,.18); }
.mode-pill.static {
    background: #fdf6e3;
    border-color: #C9A030;
    color: #7a5f00;
}
.mode-pill.static:hover { background: #f0e8c8; }
.mode-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mode-pill.live .mode-dot { background: #059669; }
.mode-pill.static .mode-dot { background: #C9A030; }
