:root {
    --bg: #f4f7f7;
    --surface: #ffffff;
    --surface-soft: #edf4f3;
    --ink: #18323a;
    --muted: #667b81;
    --brand: #176b67;
    --brand-dark: #0f4f4d;
    --accent: #ff7657;
    --accent-soft: #fff0eb;
    --border: #dce7e5;
    --success: #22875a;
    --warning: #b06a13;
    --danger: #b43d3d;
    --shadow: 0 18px 45px rgba(21, 63, 70, .09);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
    background: rgba(244, 247, 247, .94);
    border-bottom: 1px solid rgba(220, 231, 229, .85);
    backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; }
.brand-mark {
    width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; font-size: .78rem;
}
.topnav { display: flex; align-items: center; gap: 24px; font-size: .94rem; font-weight: 650; }
.topnav a:not(.btn):hover { color: var(--brand); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border: 1px solid var(--brand); border-radius: 13px;
    background: var(--brand); color: #fff; font-weight: 750; cursor: pointer; transition: .18s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--brand-dark); box-shadow: 0 8px 20px rgba(23, 107, 103, .18); }
.btn-ghost { background: transparent; color: var(--brand-dark); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-soft); color: var(--brand-dark); box-shadow: none; }
.btn-large { min-height: 52px; padding: 0 26px; border-radius: 15px; }
.btn-small { min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: .87rem; }
.full { width: 100%; }

.hero {
    min-height: 650px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
    align-items: center; gap: 7vw; padding: 72px 7vw 86px;
    background:
        radial-gradient(circle at 84% 16%, rgba(255, 118, 87, .13), transparent 25%),
        radial-gradient(circle at 20% 10%, rgba(23, 107, 103, .11), transparent 28%);
}
.hero h1, .page-header h1, .course-hero h1 {
    margin: 12px 0 20px; font-size: clamp(2.5rem, 5vw, 5.1rem); line-height: .98; letter-spacing: -.055em;
}
.hero p { max-width: 720px; color: var(--muted); font-size: 1.12rem; }
.eyebrow { color: var(--accent); font-size: .76rem; letter-spacing: .16em; font-weight: 900; }
.hero-actions { display: flex; gap: 12px; margin: 30px 0 24px; flex-wrap: wrap; }
.hero-proof { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }

.hero-panel { display: flex; justify-content: center; }
.mock-shell {
    width: min(100%, 510px); background: #112f37; color: #fff; border-radius: 28px; padding: 22px;
    box-shadow: 0 38px 70px rgba(17, 47, 55, .25); transform: rotate(1.2deg);
}
.mock-head { display: flex; align-items: center; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.mock-head strong { margin-left: auto; font-size: .9rem; }
.dot { width: 8px; height: 8px; background: rgba(255,255,255,.25); border-radius: 50%; }
.mock-score { padding: 28px 0; }
.mock-score strong { display: block; font-size: 2.7rem; margin: 4px 0 10px; }
.progress { width: 100%; height: 9px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.mock-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.mock-grid div, .mock-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: 17px; padding: 17px; }
.mock-grid b, .mock-grid small { display: block; }
.mock-grid b { font-size: 1.3rem; }
.mock-grid small { opacity: .68; margin-top: 3px; }
.mock-card { margin-top: 10px; display: flex; justify-content: space-between; }

.section { padding: 80px 7vw; }
.no-pad-x { padding-left: 0; padding-right: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section h2, .section-heading h2 { margin: 8px 0 0; font-size: clamp(1.8rem, 3vw, 3rem); letter-spacing: -.04em; line-height: 1.04; }
.text-link { color: var(--brand); font-weight: 800; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.course-card, .empty-card {
    padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.course-card h3 { margin: 13px 0 6px; font-size: 1.35rem; letter-spacing: -.025em; }
.course-card p { color: var(--muted); }
.course-card .btn { margin-top: 10px; }
.course-card.locked { opacity: .78; }
.course-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lock-state { color: var(--muted); font-size: .83rem; }
.pill {
    display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px;
    border-radius: 999px; background: var(--surface-soft); color: var(--brand-dark); font-size: .7rem; font-weight: 900; letter-spacing: .08em;
}
.pill-premium { background: var(--accent-soft); color: #b64f35; }

.split-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; background: #153941; color: #fff; }
.split-section p { color: rgba(255,255,255,.7); }
.steps { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.steps div { padding: 24px; border-radius: 18px; background: rgba(255,255,255,.07); }
.steps b { color: var(--accent); margin-right: 12px; }

.page-shell { width: min(1180px, 90vw); margin: 0 auto; padding: 64px 0 90px; }
.page-shell.wide { width: min(1450px, 94vw); }
.page-header { margin-bottom: 32px; }
.page-header.center { text-align: center; }
.page-header.center p { max-width: 760px; margin: 0 auto; }
.page-header h1 { font-size: clamp(2.2rem, 4vw, 4.2rem); max-width: 970px; }
.muted { color: var(--muted); }
.center { text-align: center; }

.auth-shell { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 52px 20px; }
.auth-card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 38px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 8px 0 10px; font-size: 2.2rem; letter-spacing: -.04em; }
.form-stack { display: grid; gap: 17px; margin-top: 25px; }
.form-stack label { display: grid; gap: 7px; font-size: .9rem; font-weight: 800; }
input[type="text"], input[type="email"], input[type="password"] {
    width: 100%; min-height: 49px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: #fbfdfd; color: var(--ink); outline: none;
}
input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,107,103,.1); }
.auth-footer { text-align: center; margin: 22px 0 0; color: var(--muted); }
.auth-footer a { color: var(--brand); font-weight: 800; }

.flash-wrap { width: min(1180px, 90vw); margin: 16px auto 0; }
.flash { padding: 13px 16px; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--border); margin: 8px 0; }
.flash-success { color: var(--success); background: #eaf8f1; }
.flash-warning { color: var(--warning); background: #fff5e7; }
.flash-error { color: var(--danger); background: #fff0f0; }

.pricing-grid { max-width: 520px; margin: 0 auto 30px; }
.price-card { padding: 32px; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.price-card.featured { border-color: rgba(23,107,103,.45); }
.price-card h2 { font-size: 2rem; margin: 12px 0 5px; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 22px 0; }
.price strong { font-size: 2.5rem; letter-spacing: -.05em; }
.price.compact strong { font-size: 1.8rem; }
.price span { color: var(--muted); }
.feature-list { padding-left: 20px; color: var(--muted); margin: 22px 0 28px; }

.success-icon { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: #e9f8f1; color: var(--success); font-size: 2rem; font-weight: 900; }

.portal-shell { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 245px 1fr; }
.sidebar { padding: 35px 22px; background: #153941; color: #fff; display: flex; flex-direction: column; gap: 6px; }
.sidebar-title { opacity: .55; font-size: .74rem; letter-spacing: .12em; font-weight: 900; margin: 0 12px 12px; }
.sidebar a { padding: 12px; border-radius: 11px; color: rgba(255,255,255,.8); font-weight: 700; }
.sidebar a:hover, .sidebar a.active { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-divider { border-top: 1px solid rgba(255,255,255,.11); margin: 12px 0; }
.portal-content { padding: 48px 4vw 80px; }
.portal-content .page-header h1 { font-size: 2.8rem; }

.course-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 38px;
    border-radius: 26px; background: linear-gradient(135deg, #153941, #1d6967); color: #fff; box-shadow: var(--shadow);
}
.course-hero h1 { font-size: clamp(2rem, 4vw, 3.8rem); margin-bottom: 10px; }
.course-hero p { max-width: 700px; color: rgba(255,255,255,.72); }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--muted); font-weight: 750; }
.subject-list { display: grid; gap: 12px; }
.subject-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 17px; }
.subject-row h3 { margin: 0 0 2px; }

.quiz-shell { width: min(950px, 92vw); margin: 0 auto; padding: 50px 0 90px; }
.quiz-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 25px; }
.quiz-head h1 { margin: 4px 0 0; font-size: 2.2rem; }
.quiz-count { color: var(--muted); font-weight: 750; }
.quiz-form, .review-list { display: grid; gap: 16px; }
.question-card { padding: 27px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 9px 25px rgba(21,63,70,.05); }
.question-card h2 { font-size: 1.15rem; margin: 6px 0 20px; line-height: 1.45; }
.question-number { color: var(--accent); font-size: .76rem; font-weight: 900; }
.answers { display: grid; gap: 9px; }
.answer-option { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: .15s; }
.answer-option:hover { border-color: var(--brand); background: var(--surface-soft); }
.answer-option input { accent-color: var(--brand); }
.answer-key { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-soft); font-size: .8rem; font-weight: 900; }
.result-hero { padding: 36px; border-radius: 24px; background: #153941; color: #fff; margin-bottom: 24px; text-align: center; }
.result-hero h1 { font-size: 4rem; margin: 6px 0; }
.review-card.correct { border-left: 5px solid var(--success); }
.review-card.wrong { border-left: 5px solid var(--accent); }
.review-status { font-size: .78rem; font-weight: 900; color: var(--muted); }
.explanation { margin-top: 18px; padding: 17px; border-radius: 13px; background: var(--surface-soft); }
.explanation p { margin: 5px 0; }
.explanation small { color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 25px; }
.stats-grid div { padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.stats-grid b, .stats-grid span { display: block; }
.stats-grid b { font-size: 2rem; }
.stats-grid span { color: var(--muted); }
.admin-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.admin-card { padding: 25px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.admin-card b, .admin-card span { display: block; }
.admin-card span { margin-top: 5px; color: var(--muted); }
.admin-card:not(.disabled):hover { border-color: var(--brand); }
.admin-card.disabled { opacity: .55; }

.inline-create { display: grid; grid-template-columns: 1fr 1fr 2fr auto; gap: 10px; margin-bottom: 18px; }
.table-card { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
.question-cell { min-width: 320px; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 8px; background: var(--surface-soft); font-size: .7rem; font-weight: 900; }
.status-approved { color: var(--success); }
.status-review { color: var(--warning); }

.footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 5vw; border-top: 1px solid var(--border); background: var(--surface); font-size: .86rem; }

@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; padding-top: 50px; }
    .hero-panel { justify-content: flex-start; }
    .card-grid { grid-template-columns: repeat(2,1fr); }
    .split-section { grid-template-columns: 1fr; }
    .portal-shell { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .stats-grid { grid-template-columns: repeat(2,1fr); }
    .inline-create { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .topbar { padding: 0 18px; }
    .topnav { gap: 10px; }
    .topnav > a:not(.btn):not(:last-of-type) { display: none; }
    .hero { padding: 44px 22px 60px; min-height: auto; }
    .hero h1 { font-size: 2.8rem; }
    .section { padding: 55px 22px; }
    .card-grid, .steps, .stats-grid, .admin-actions { grid-template-columns: 1fr; }
    .section-heading, .course-hero, .subject-row, .footer { align-items: flex-start; flex-direction: column; }
    .page-shell { width: calc(100% - 36px); padding-top: 40px; }
    .portal-content { padding: 35px 18px 60px; }
    .auth-card { padding: 28px 22px; }
    .mock-shell { transform: none; }
}


/* GM Prep 0.3 — student experience, profile and gamification */
.student-layout {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
}
.student-sidebar {
    align-self: stretch;
    padding: 34px 18px;
    background: #153941;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.student-sidebar-title {
    margin: 0 12px 12px;
    color: rgba(255,255,255,.48);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.student-sidebar a {
    padding: 12px 13px;
    border-radius: 11px;
    color: rgba(255,255,255,.76);
    font-size: .88rem;
    font-weight: 750;
}
.student-sidebar a:hover,
.student-sidebar a.active {
    color: #fff;
    background: rgba(255,255,255,.1);
}
.student-sidebar-divider {
    border-top: 1px solid rgba(255,255,255,.12);
    margin: 12px 0;
}
.student-content {
    min-width: 0;
    padding: 48px clamp(22px, 4vw, 68px) 84px;
}
.student-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) 260px;
    align-items: stretch;
    gap: 18px;
    margin-bottom: 18px;
}
.student-hero > div:first-child {
    min-height: 215px;
    padding: 34px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 90% 15%, rgba(255,118,87,.16), transparent 28%),
        linear-gradient(135deg, #153941, #1d6967);
    color: #fff;
}
.student-hero h1 {
    margin: 8px 0 9px;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: .98;
    letter-spacing: -.055em;
}
.student-hero p {
    max-width: 730px;
    margin: 0;
    color: rgba(255,255,255,.74);
}
.wallet-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
    border: 1px solid #dce7e5;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}
.wallet-card > span {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.wallet-card strong {
    margin: 5px 0;
    color: var(--brand-dark);
    font-size: 2.7rem;
    line-height: 1;
    letter-spacing: -.05em;
}
.wallet-card small { color: var(--muted); line-height: 1.35; }

.student-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    margin-bottom: 34px;
}
.student-kpi {
    min-height: 105px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: #fff;
}
.student-kpi span {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 750;
}
.student-kpi strong {
    display: block;
    margin-top: 5px;
    font-size: 1.8rem;
    line-height: 1;
    letter-spacing: -.04em;
}

.student-section { margin-top: 34px; }
.student-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}
.student-section-head h2 {
    margin: 4px 0 0;
    font-size: clamp(1.55rem, 2.4vw, 2.35rem);
    letter-spacing: -.04em;
}
.student-course-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
}
.student-course-card {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(21,63,70,.06);
}
.student-course-card.locked { opacity: .72; }
.student-course-card h3 {
    margin: 15px 0 4px;
    font-size: 1.35rem;
    letter-spacing: -.03em;
}
.student-course-card > p { margin: 2px 0 13px; }
.course-stat-strip {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 7px;
    margin: 16px 0 20px;
}
.course-stat-strip span {
    padding: 10px;
    border-radius: 12px;
    background: var(--surface-soft);
}
.course-stat-strip b,
.course-stat-strip small { display: block; }
.course-stat-strip b { font-size: 1.05rem; }
.course-stat-strip small { margin-top: 2px; color: var(--muted); font-size: .66rem; }
.course-start-copy { color: var(--muted); }
.course-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.recent-activity-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}
.recent-activity-list > a {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 18px;
    border-bottom: 1px solid #e7efed;
}
.recent-activity-list > a:last-child { border-bottom: 0; }
.recent-activity-list > a:hover { background: #f8fbfa; }
.recent-activity-list span:first-child { display: grid; }
.recent-activity-list small { color: var(--muted); }
.activity-score {
    min-width: 60px;
    padding: 7px 10px;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--brand-dark);
    text-align: center;
    font-weight: 900;
}

.student-page {
    width: min(1240px, 92vw);
    min-height: calc(100vh - 150px);
    margin: 0 auto;
    padding: 48px 0 84px;
}
.student-page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}
.student-page-head h1 {
    margin: 6px 0 4px;
    font-size: clamp(2.1rem, 4vw, 3.8rem);
    letter-spacing: -.05em;
}
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
}
.student-panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
}
.student-panel.span-full { grid-column: 1 / -1; }
.student-panel-head { margin-bottom: 17px; }
.student-panel-head h2 { margin: 3px 0 0; font-size: 1.3rem; }
.student-panel-kicker {
    color: var(--accent);
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .12em;
}
.profile-data { margin: 0; display: grid; gap: 11px; }
.profile-data > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e7efed;
}
.profile-data > div:last-child { border-bottom: 0; padding-bottom: 0; }
.profile-data dt { color: var(--muted); }
.profile-data dd { margin: 0; font-weight: 800; text-align: right; }
.subscription-card { display: grid; gap: 6px; }
.subscription-card .pill { justify-self: start; }
.wallet-inline {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding: 13px;
    border-radius: 12px;
    background: var(--surface-soft);
}
.compact-list { display: grid; }
.compact-list > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid #e7efed;
}
.compact-list > div:last-child { border-bottom: 0; }
.compact-list span { display: grid; }
.compact-list small { color: var(--muted); }
.compact-list b { color: var(--success); }
.profile-password-form {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr)) auto;
    align-items: end;
    gap: 10px;
}
.profile-password-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.course-hero-student { margin-bottom: 30px; }
.course-hero-actions { display: flex; flex-direction: column; gap: 9px; min-width: 200px; }
.btn-on-dark {
    border-color: rgba(255,255,255,.28);
    color: #fff;
    background: rgba(255,255,255,.08);
}
.btn-on-dark:hover { color: #fff; background: rgba(255,255,255,.16); }
.hero-course-stats { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.hero-course-stats span { color: rgba(255,255,255,.72); font-size: .84rem; }
.hero-course-stats b { color: #fff; }

.reward-result {
    width: min(520px,100%);
    display: grid;
    gap: 3px;
    margin: 18px auto;
    padding: 14px 17px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 15px;
    background: rgba(255,255,255,.08);
}
.reward-result strong { color: #fff; }
.reward-result small { color: rgba(255,255,255,.7); }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }

.student-notice {
    margin-bottom: 14px;
    padding: 13px 16px;
    border: 1px solid #f0d7a9;
    border-radius: 13px;
    background: #fff8e9;
    color: #8b641b;
}
.leaderboard-panel { padding: 0; overflow: hidden; }
.leaderboard-head,
.leaderboard-row {
    display: grid;
    grid-template-columns: 55px minmax(180px,1fr) 90px 110px 120px;
    align-items: center;
    gap: 12px;
}
.leaderboard-head {
    padding: 13px 18px;
    background: #edf4f3;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.leaderboard-row {
    min-height: 66px;
    padding: 11px 18px;
    border-top: 1px solid #e5edeb;
}
.leaderboard-row.is-me { background: #f3faf8; box-shadow: inset 3px 0 0 var(--brand); }
.rank-badge {
    width: 33px; height: 33px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--surface-soft);
    font-weight: 900;
}
.leader-name { display: grid; }
.leader-name small { color: var(--brand); font-size: .68rem; }
.leaderboard-note { color: var(--muted); font-size: .78rem; }
.student-empty { padding: 24px; color: var(--muted); text-align: center; }

.mobile-student-nav { display: none; }

@media (max-width: 1000px) {
    .student-layout { grid-template-columns: 205px minmax(0,1fr); }
    .student-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .student-course-grid { grid-template-columns: 1fr; }
    .profile-password-form { grid-template-columns: 1fr 1fr; }
    .profile-password-form .btn { align-self: end; }
}

@media (max-width: 760px) {
    .topbar { min-height: 62px; padding: 0 16px; }
    .topbar .topnav { display: none; }
    .student-layout { display: block; }
    .student-sidebar { display: none; }
    .student-content { padding: 24px 15px 92px; }
    .student-hero { grid-template-columns: 1fr; }
    .student-hero > div:first-child { min-height: 0; padding: 25px 21px; }
    .wallet-card { padding: 20px; }
    .student-kpi-grid { gap: 8px; }
    .student-kpi { min-height: 92px; padding: 14px; }
    .student-kpi strong { font-size: 1.5rem; }
    .student-course-card { min-height: 0; padding: 19px; }
    .course-stat-strip { grid-template-columns: repeat(3,1fr); }
    .student-page { width: calc(100% - 30px); padding: 25px 0 92px; }
    .student-page-head { align-items: flex-start; flex-direction: column; }
    .profile-grid { grid-template-columns: 1fr; }
    .student-panel.span-full { grid-column: auto; }
    .profile-password-form { grid-template-columns: 1fr; }
    .course-hero-student { align-items: flex-start; flex-direction: column; padding: 25px 21px; }
    .course-hero-actions { width: 100%; min-width: 0; }
    .course-hero-actions .btn { width: 100%; }
    .subject-row { align-items: flex-start; flex-direction: column; }
    .subject-row .btn { width: 100%; }
    .quiz-shell { width: calc(100% - 24px); padding: 25px 0 92px; }
    .question-card { padding: 20px 16px; }
    .answer-option { align-items: flex-start; padding: 13px 11px; }
    .leaderboard-panel { overflow-x: auto; }
    .leaderboard-head,
    .leaderboard-row { min-width: 650px; }
    .mobile-student-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(4,1fr);
        min-height: 62px;
        padding: 5px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: rgba(255,255,255,.96);
        box-shadow: 0 12px 32px rgba(17,47,55,.18);
        backdrop-filter: blur(14px);
    }
    .mobile-student-nav a {
        display: grid;
        place-items: center;
        align-content: center;
        gap: 1px;
        border-radius: 13px;
        color: var(--muted);
    }
    .mobile-student-nav a:active { background: var(--surface-soft); color: var(--brand-dark); }
    .mobile-student-nav span { font-size: 1rem; font-weight: 900; }
    .mobile-student-nav small { font-size: .61rem; font-weight: 800; }
    body.has-mobile-student-nav > .footer { padding-bottom: 86px; }
}


/* Account and subscription */
.auth-name-grid,
.profile-name-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}
.field-help {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.4;
}
.profile-data-form {
    display: grid;
    gap: 14px;
}
.profile-data-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}
.profile-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    border-top: 1px solid #e7efed;
    border-bottom: 1px solid #e7efed;
}
.profile-meta-row span { color: var(--muted); }
.subscription-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.subscription-status {
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .66rem;
    font-weight: 900;
}
.subscription-status.status-active,
.subscription-status.status-trialing { color: var(--success); background: #eaf8f1; }
.subscription-status.status-past_due,
.subscription-status.status-incomplete { color: var(--warning); background: #fff5e7; }
.subscription-status.status-canceled,
.subscription-status.status-unpaid,
.subscription-status.status-incomplete_expired { color: var(--danger); background: #fff0f0; }
.subscription-details {
    display: grid;
    gap: 0;
    margin: 12px 0;
}
.subscription-details > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 0;
    border-bottom: 1px solid #e7efed;
}
.subscription-details > div:last-child { border-bottom: 0; }
.subscription-details span { color: var(--muted); }
.subscription-details strong { text-align: right; }
.subscription-warning {
    margin: 10px 0 14px;
    padding: 11px 12px;
    border: 1px solid #f0d7a9;
    border-radius: 11px;
    background: #fff8e9;
    color: #8b641b;
    font-size: .8rem;
}
.subscription-empty { display: grid; gap: 8px; }

@media (max-width: 620px) {
    .auth-name-grid,
    .profile-name-grid { grid-template-columns: 1fr; }
}


/* Registration verification */
.recaptcha-wrap {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    overflow: hidden;
}
.recaptcha-wrap .g-recaptcha {
    min-height: 78px;
}
@media (max-width: 360px) {
    .recaptcha-wrap .g-recaptcha {
        transform: scale(.9);
        transform-origin: left top;
        margin-bottom: -8px;
    }
}
