@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;600;700&family=Literata:wght@600;700&display=swap');

:root {
    --bg: #fbf9f5;
    --surface: #ffffff;
    --surface-soft: #efeeea;
    --surface-warm: #f5f3ef;
    --text: #1b1c1a;
    --muted: #62534f;
    --primary: #9a4028;
    --primary-strong: #7e2b16;
    --sage: #53643a;
    --sage-soft: #d6eab5;
    --outline: #dcc0ba;
    --shadow: 0 18px 50px rgba(93, 64, 55, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: "Hanken Grotesk", Arial, sans-serif;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(251, 249, 245, .9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(220, 192, 186, .55);
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Literata", serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.brand img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; }
.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #075a5c;
    color: white;
    font-family: "Literata", serif;
}
.nav-links { display: flex; align-items: center; gap: 28px; font-weight: 700; color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.menu-btn { display: none; border: 0; background: var(--surface-soft); padding: 10px 12px; border-radius: 8px; font-weight: 700; }

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 10px 24px rgba(154, 64, 40, .22); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-1px); }
.btn-soft { background: var(--surface-soft); color: var(--primary); border-color: var(--outline); }

.hero {
    min-height: calc(100vh - 76px);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 54px;
    padding: 54px 0 70px;
}
.eyebrow { color: var(--primary); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 {
    font-family: "Literata", serif;
    line-height: 1.15;
    margin: 0;
    overflow-wrap: anywhere;
}
h1 { font-size: clamp(42px, 6vw, 72px); max-width: 780px; }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: 24px; }
.lead { font-size: 19px; color: var(--muted); max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow); }
.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 28px;
}
.stat { background: var(--surface); padding: 18px; border-radius: 12px; box-shadow: 0 10px 28px rgba(93,64,55,.07); }
.stat strong { display: block; font-family: "Literata", serif; font-size: 28px; }
.section { padding: 88px 0; }
.section-soft { background: linear-gradient(180deg, #efeeea 0%, #f6f3ed 100%); }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 34px;
}
.section-head > *,
.grid > *,
.teacher-intro > * { min-width: 0; }
.grid { display: grid; gap: 22px; }
.courses-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}
.card {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 14px 34px rgba(93,64,55,.08);
}
.course-card {
    min-width: 0;
    min-height: 310px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
    position: relative;
    overflow: hidden;
}
.course-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 18px;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: var(--primary);
    opacity: .12;
}
.course-card.featured {
    grid-column: span 2;
    background: #fff7f3;
}
.course-card p {
    color: var(--muted);
    margin: 12px 0 0;
    overflow-wrap: anywhere;
}
.chip {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--sage-soft);
    color: #31401c;
    font-weight: 700;
    font-size: 13px;
}
.price { color: var(--primary); font-size: 22px; font-weight: 700; }
.about-grid { grid-template-columns: .85fr 1.15fr; align-items: center; }
.about-img { border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }
.features { grid-template-columns: repeat(2, 1fr); margin-top: 22px; }
.feature { display: flex; gap: 12px; }
.icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--sage-soft);
    color: var(--sage);
    flex: 0 0 auto;
}
.contact {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 28px;
    align-items: start;
}
form { display: grid; gap: 14px; }
label { font-weight: 700; color: var(--muted); }
input, textarea, select {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--surface-warm);
    padding: 13px 14px;
    font: inherit;
    color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(154,64,40,.25); border-color: var(--primary); }
textarea { min-height: 120px; resize: vertical; }
.alert { padding: 12px 14px; border-radius: 8px; background: var(--sage-soft); color: #25330f; font-weight: 700; }
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface-warm); padding: 28px; border-right: 1px solid var(--outline); }
.sidebar nav { display: grid; gap: 8px; margin-top: 28px; }
.sidebar a { padding: 11px 12px; border-radius: 8px; font-weight: 700; color: var(--muted); }
.sidebar a.active, .sidebar a:hover { background: var(--primary); color: white; }
.admin-main { padding: 34px; }
.metric-grid { grid-template-columns: repeat(3, 1fr); margin: 26px 0; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 26px rgba(93,64,55,.07); }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--surface-soft); text-align: left; }
th { background: var(--surface-warm); color: var(--muted); }
.admin-main { min-width: 0; }
.admin-main h1 { font-size: clamp(38px, 5vw, 60px); }
.admin-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}
.admin-user {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid var(--outline);
    border-radius: 8px;
    background: white;
    color: var(--muted);
    font-weight: 700;
}
.admin-alert {
    margin: 24px 0;
    padding: 14px 16px;
    border-left: 4px solid var(--sage);
    background: var(--sage-soft);
    color: #25330f;
    font-weight: 700;
}
.admin-alert.error { border-color: var(--primary); background: #fff0eb; color: var(--primary-strong); }
.admin-section {
    padding: 46px 0;
    border-top: 1px solid var(--outline);
    scroll-margin-top: 20px;
}
.admin-section-head { margin-bottom: 22px; }
.admin-section-head .eyebrow { margin-bottom: 6px; }
.admin-section-head h2 { font-size: 34px; }
.admin-form {
    gap: 18px;
    margin-bottom: 26px;
    padding: 24px;
    border: 1px solid var(--outline);
    border-radius: 8px;
    background: white;
}
.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
.admin-form-grid > div,
.admin-form-inline > div { min-width: 0; }
.admin-form .field-wide { grid-column: span 2; }
.admin-form label { display: block; margin-bottom: 6px; }
.admin-form textarea { min-height: 96px; }
.admin-form-inline {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    align-items: end;
}
.admin-form-inline .btn { margin-bottom: 0; }
.video-form-grid { grid-template-columns: 1fr 1fr 120px; }
.table-wrap { max-width: 100%; overflow-x: auto; border-radius: 8px; }
.table-wrap table { min-width: 720px; border-radius: 0; box-shadow: none; }
.table-wrap td { vertical-align: top; }
.table-wrap td small { display: block; max-width: 420px; margin-top: 4px; color: var(--muted); }
.table-link { color: var(--primary); font-weight: 700; }
.admin-manage-btn { min-height: 38px; padding: 8px 13px; white-space: nowrap; }

/* Admin course manager */
.course-manager-page {
    --manager-bg: #fbfaf7;
    --manager-paper: #fffdf9;
    --manager-line: #e9ddd4;
    --manager-ink: #3a241d;
    --manager-red: #aa3e24;
    --manager-green: #536d35;
    background: var(--manager-bg);
    color: var(--manager-ink);
}
.course-manager-layout { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.course-manager-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 30px 18px;
    border-right: 1px solid var(--manager-line);
    background: #faf8f4;
}
.course-manager-sidebar .brand { padding: 0 12px; }
.course-manager-sidebar nav { display: grid; gap: 8px; margin-top: 54px; }
.course-manager-sidebar nav a { padding: 15px 18px; border-radius: 7px; font-weight: 700; }
.course-manager-sidebar nav a:hover,
.course-manager-sidebar nav a.active { background: var(--manager-red); color: white; box-shadow: 0 8px 18px rgba(170,62,36,.2); }
.course-manager-account { display: grid; gap: 2px; margin-top: auto; padding: 20px 12px 0; border-top: 1px solid var(--manager-line); }
.course-manager-account span { color: var(--muted); font-size: 13px; }
.course-manager-account a { margin-top: 9px; color: var(--manager-red); font-weight: 700; }
.course-manager-shell { min-width: 0; }
.course-manager-topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 0 34px;
    border-bottom: 1px solid #eee7e1;
    background: rgba(255,253,249,.94);
    font-weight: 700;
}
.course-manager-topbar .course-manager-back { margin-left: auto; color: var(--manager-red); }
.course-manager-main { width: min(1220px, calc(100% - 64px)); margin: 0 auto; padding: 48px 0 70px; }
.course-manager-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 42px; }
.course-manager-hero > div { min-width: 0; }
.course-manager-hero h1 { max-width: 680px; color: var(--manager-red); font-size: clamp(38px, 5vw, 60px); }
.course-manager-hero p { display: flex; flex-wrap: wrap; gap: 9px; color: #5f4b43; font-size: 17px; }
.course-manager-level { display: inline-flex; margin-bottom: 12px; padding: 7px 13px; border-radius: 999px; background: #9c786c; color: white; font-weight: 700; }
.course-edit-panel { position: relative; flex: 0 0 auto; }
.course-edit-panel > summary,
.add-video-panel > summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 20px;
    border-radius: 7px;
    background: var(--manager-red);
    color: white;
    font-weight: 700;
    box-shadow: 0 7px 14px rgba(170,62,36,.16);
}
.course-edit-panel > summary::-webkit-details-marker,
.add-video-panel > summary::-webkit-details-marker { display: none; }
.course-edit-panel > form,
.add-video-panel > form {
    position: absolute;
    z-index: 10;
    right: 0;
    top: calc(100% + 10px);
    width: min(620px, 80vw);
    padding: 22px;
    border: 1px solid var(--manager-line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 18px 44px rgba(58,36,29,.16);
}
.course-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.course-edit-grid .wide { grid-column: 1 / -1; }
.course-edit-grid textarea { min-height: 90px; }
.course-manager-grid { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(0, 1.6fr); gap: 28px; align-items: start; }
.course-roster-column { min-width: 0; display: grid; gap: 24px; }
.manager-panel { min-width: 0; padding: 24px; border-radius: 8px; background: #f7f3ee; box-shadow: 0 5px 16px rgba(58,36,29,.05); }
.manager-panel h2 { font-size: 27px; }
.enroll-panel { background: linear-gradient(135deg, #f8f5ee, #edf3e4); }
.enroll-panel > form { margin-top: 18px; }
.student-search div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.student-search button { padding: 0 13px; border: 0; border-radius: 7px; background: #745449; color: white; cursor: pointer; font-weight: 700; }
.manager-green-btn { min-height: 46px; border: 0; border-radius: 7px; background: var(--manager-green); color: white; cursor: pointer; font: inherit; font-weight: 700; }
.manager-green-btn:disabled { cursor: not-allowed; opacity: .5; }
.manager-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.manager-panel-title > strong { color: var(--manager-red); }
.roster-list { display: grid; gap: 10px; }
.roster-list article { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 7px; background: white; box-shadow: 0 3px 9px rgba(58,36,29,.05); }
.roster-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #d9edb4; color: #50642e; font-family: "Literata", serif; font-size: 20px; }
.roster-list article strong,
.roster-list article small { display: block; overflow: hidden; text-overflow: ellipsis; }
.roster-list article small { color: var(--muted); }
.roster-list article form { display: block; }
.manager-icon-btn { width: 32px; height: 32px; border: 1px solid #e1cec4; border-radius: 50%; background: white; color: var(--manager-red); cursor: pointer; font-size: 20px; }
.manager-empty { margin: 0; padding: 28px 10px; color: var(--muted); text-align: center; }
.curriculum-panel { padding: 28px; }
.curriculum-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 30px; }
.curriculum-heading p { margin: 4px 0 0; color: var(--muted); }
.add-video-panel { position: relative; flex: 0 0 auto; }
.add-video-panel > form { width: min(430px, 80vw); }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.module-card,
.module-add-card { min-width: 0; min-height: 245px; padding: 25px; border-radius: 8px; background: var(--manager-paper); }
.module-card { position: relative; display: flex; flex-direction: column; border-top: 8px solid #795548; box-shadow: 0 4px 12px rgba(58,36,29,.06); }
.module-card > span { color: #76544a; font-weight: 700; }
.module-card h3 { margin-top: 25px; font-size: 27px; overflow-wrap: anywhere; }
.module-card > a { display: block; max-width: 100%; margin-top: auto; overflow: hidden; color: #6d544c; text-overflow: ellipsis; white-space: nowrap; }
.module-card form { display: block; margin-top: 14px; }
.module-card form button { border: 0; background: transparent; color: var(--manager-red); cursor: pointer; font-weight: 700; }
.module-add-card { display: grid; place-items: center; align-content: center; gap: 10px; border: 1px dashed #cdbdb4; background: #e9e6e2; color: #654b42; cursor: pointer; font: inherit; }
.module-add-card strong { width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-size: 28px; }
.module-add-card span { font-weight: 700; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.login-card { width: min(440px, 100%); }
.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 24px;
    align-items: stretch;
}
.login-visual {
    min-height: 560px;
    border-radius: 18px;
    padding: 34px;
    color: white;
    background:
        linear-gradient(180deg, rgba(27,28,26,.18), rgba(27,28,26,.72)),
        url('../../professional_headshot_of_a_friendly_female_english_teacher_warm_lighting_cozy/screen.png') center / cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
}
.login-visual .brand { color: white; }
.login-visual h1 { font-size: clamp(36px, 5vw, 58px); }
.login-visual p { max-width: 440px; font-size: 19px; }
.student-login-page .login-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.student-hero {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 24px;
    align-items: center;
    overflow: hidden;
    background: #fff7f3;
}
.student-hero img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 14px;
}
.lesson-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.student-course-card {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 24px;
}
.student-course-card h3 { margin-top: 16px; }
.student-course-card p { color: var(--muted); }
.student-course-card small { color: var(--primary); font-weight: 700; }
.student-video-list {
    display: grid;
    align-content: start;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--outline);
}
.student-video-list > a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--surface-soft);
    color: var(--primary);
    font-weight: 700;
}
.student-video-list > a span:first-child { color: var(--text); }
.student-empty { grid-column: 1 / -1; text-align: center; }
.progress-track {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-soft);
}
.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--sage);
}
.footer { padding: 34px 0; border-top: 1px solid var(--outline); color: var(--muted); }

/* Homepage campaign layout */
.campaign-hero {
    padding: 24px 0 0;
    background: #edf4f2;
}
.campaign-hero img {
    width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 16px 42px rgba(25, 68, 68, .12);
}
.quick-actions {
    background: #075a5c;
    color: white;
}
.quick-actions-inner {
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-top: 20px;
    padding-bottom: 20px;
}
.quick-actions-inner strong,
.quick-actions-inner span { display: block; }
.quick-actions-inner strong { font-family: "Literata", serif; font-size: 24px; }
.quick-actions-inner span { color: rgba(255, 255, 255, .76); }
.quick-actions .hero-actions { margin: 0; flex: 0 0 auto; }
.quick-actions .btn-primary { background: #f0b541; color: #173737; box-shadow: none; }
.quick-actions .btn-soft { background: transparent; color: white; border-color: rgba(255, 255, 255, .42); }
.text-link { color: var(--primary); font-weight: 700; }
.course-meta { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.course-meta span { color: var(--muted); }
.teacher-section { background: white; }
.teacher-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr);
    gap: 18px 48px;
    align-items: end;
    margin-bottom: 32px;
}
.teacher-intro .eyebrow { grid-column: 1 / -1; margin-bottom: -8px; }
.teacher-intro h2 { max-width: 760px; }
.teacher-intro .lead { margin: 0; }
.service-list { display: grid; gap: 16px; margin: 30px 0; }
.service-list div { padding-left: 18px; border-left: 3px solid #7daea2; }
.service-list strong,
.service-list span { display: block; }
.service-list span { color: var(--muted); }
.teacher-banner { margin: 0; }
.teacher-banner img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 32px 0 24px; }
.teacher-action { display: flex; justify-content: center; }
.activity-head > p { max-width: 460px; margin: 0; color: var(--muted); }
.activity-grid {
    display: grid;
    grid-template-columns: 1.125fr 1fr;
    align-items: start;
    gap: 28px;
    max-width: 900px;
    margin: 0 auto;
}
.poster-card {
    overflow: hidden;
    background: white;
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(39, 63, 63, .1);
}
.poster-card > img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.poster-info {
    min-height: 108px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px;
}
.poster-info span { color: var(--muted); font-size: 14px; }
.poster-info h3 { margin-top: 3px; font-size: 20px; }
.poster-info .btn { flex: 0 0 auto; }
.contact-section { background: #f9f7f2; }
.contact-copy { position: sticky; top: 112px; }
.contact-direct { margin-top: 30px; }
.contact-direct span { display: block; color: var(--muted); }
.contact-direct a { color: #075a5c; font-family: "Literata", serif; font-size: 30px; font-weight: 700; }
.form-card { border-top: 4px solid #7daea2; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }

/* Student dashboard */
.student-dashboard-page {
    --student-ink: #33231d;
    --student-brown: #914a31;
    --student-caramel: #d09b5d;
    --student-paper: #fffdf9;
    --student-line: #eadbc9;
    background: #f4f7f8;
    color: var(--student-ink);
}
.student-dashboard-container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.student-topbar { background: rgba(244, 247, 248, .94); border-bottom: 1px solid #e3e8e8; }
.student-nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.student-nav nav { display: flex; align-items: center; gap: 24px; font-weight: 700; color: #665651; }
.student-nav nav a.active,
.student-nav nav a:hover { color: var(--student-brown); }
.student-dashboard { padding: 28px 0 70px; }
.student-welcome {
    min-height: 250px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 34px;
    border-radius: 8px;
    background: var(--student-ink);
    color: white;
    box-shadow: 0 14px 26px rgba(51, 35, 29, .15);
}
.student-welcome > div { width: 100%; min-width: 0; position: relative; z-index: 1; max-width: 760px; }
.student-kicker {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 6px;
    background: var(--student-caramel);
    color: #39251b;
    font-size: 12px;
    font-weight: 700;
}
.student-welcome h1 { margin-top: 14px; font-size: clamp(30px, 4vw, 50px); }
.student-welcome h1 em { color: #e7b674; font-style: normal; }
.student-welcome p { margin: 10px 0 22px; color: #e7ddd6; }
.student-primary-action {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 17px;
    border-radius: 7px;
    background: #ae5a3b;
    color: white;
    font-weight: 700;
}
.student-primary-action:hover { background: #93442d; }
.student-level {
    position: absolute;
    right: 38px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 360px;
    color: rgba(255,255,255,.055);
    font-family: "Literata", serif;
    font-size: clamp(58px, 10vw, 126px);
    line-height: .85;
    overflow-wrap: anywhere;
}
.student-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 28px 0; }
.student-stats article {
    min-width: 0;
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px 20px;
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: var(--student-paper);
    box-shadow: 0 4px 12px rgba(51,35,29,.04);
}
.student-stat-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f5e9d9;
    color: var(--student-brown);
    font-size: 18px;
}
.student-stat-green .student-stat-icon { background: #e3eee2; color: #4b7354; }
.student-stats small { display: block; color: #7c6e67; }
.student-stats strong { display: block; margin-top: 2px; font-size: 26px; }
.student-stats strong small { display: inline; font-size: 12px; font-weight: 400; }
.student-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 28px; align-items: start; }
.student-main-column,
.student-side-column { min-width: 0; display: grid; gap: 28px; }
.student-next-class {
    min-height: 200px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border-radius: 8px;
    background: #493329;
    color: white;
    box-shadow: 0 10px 20px rgba(51,35,29,.12);
}
.student-next-class > div { min-width: 0; }
.student-next-class h2 { margin: 16px 0 8px; font-size: 26px; }
.student-next-class p { margin: 0 0 20px; color: #e4d8d1; }
.student-next-time { flex: 0 0 auto; color: #e7b674; font-weight: 700; }
.student-panel {
    overflow: hidden;
    border: 1px solid var(--student-line);
    border-radius: 8px;
    background: var(--student-paper);
    box-shadow: 0 4px 12px rgba(51,35,29,.04);
}
.student-panel-head {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--student-line);
}
.student-panel-head h2 { padding-left: 12px; border-left: 5px solid var(--student-brown); font-size: 20px; }
.student-panel-head > span { color: var(--student-brown); font-size: 13px; font-weight: 700; }
.student-course-list { display: grid; gap: 16px; padding: 20px; }
.student-course-row { min-width: 0; overflow: hidden; padding: 18px; border: 1px solid var(--student-line); border-radius: 7px; background: #fffefa; }
.student-course-topline,
.student-course-topline > div,
.student-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.student-course-topline > div { justify-content: flex-start; }
.student-course-code { padding: 4px 9px; border-radius: 5px; background: #e8b873; font-size: 11px; font-weight: 700; }
.student-course-topline small { color: #887970; }
.student-course-topline > a { padding: 7px 14px; border-radius: 6px; background: var(--student-brown); color: white; font-weight: 700; }
.student-course-row h3 { margin-top: 12px; font-size: 21px; }
.student-course-row > p { margin: 6px 0 14px; color: #786a64; }
.student-progress-meta { margin-bottom: 6px; color: #8b7770; font-size: 12px; }
.student-progress-meta strong { color: var(--student-brown); }
.student-progress { height: 8px; overflow: hidden; border-radius: 6px; background: #eee6dc; }
.student-progress span { display: block; height: 100%; border-radius: inherit; background: var(--student-brown); }
.student-video-details { margin-top: 14px; border-top: 1px solid var(--student-line); }
.student-video-details summary { padding: 12px 0 6px; color: var(--student-brown); cursor: pointer; font-weight: 700; }
.student-video-details > a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #f1e8df; }
.student-video-details > a span { color: var(--student-brown); }
.student-empty-state { padding: 52px 24px; text-align: center; }
.student-empty-state strong { font-family: "Literata", serif; font-size: 22px; }
.student-empty-state p { color: #786a64; }
.journey-panel .student-panel-head h2 { border-left: 0; padding-left: 0; }
.student-journey { list-style: none; display: grid; gap: 0; margin: 0; padding: 22px 24px; }
.student-journey li { position: relative; padding: 0 0 24px 28px; color: #a49a94; }
.student-journey li:last-child { padding-bottom: 0; }
.student-journey li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: #d9d5d1; }
.student-journey li::after { content: ""; position: absolute; left: 7px; top: 15px; bottom: 0; width: 1px; background: #ddd5ce; }
.student-journey li:last-child::after { display: none; }
.student-journey li.done,
.student-journey li.current { color: var(--student-ink); }
.student-journey li.done::before { background: #46745b; }
.student-journey li.current::before { background: var(--student-brown); }
.student-journey strong,
.student-journey span { display: block; }
.student-journey span { margin-top: 2px; font-size: 12px; color: #968a84; }
.student-note { padding: 24px; border: 1px solid #dfc6ad; border-radius: 8px; background: #f8ebdd; }
.student-note > span { font-weight: 700; }
.student-note blockquote { margin: 18px 0; color: #6c5549; font-family: "Literata", serif; }
.student-note > strong { color: var(--student-brown); }

/* Course classroom */
.learn-page {
    --learn-ink: #34231d;
    --learn-brown: #934b32;
    --learn-gold: #d89c58;
    --learn-paper: #fffdf9;
    --learn-line: #ead9c7;
    background: #f3f7f8;
    color: var(--learn-ink);
}
.learn-container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.learn-topbar { background: var(--learn-ink); color: white; }
.learn-nav { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.learn-nav .brand { color: white; }
.learn-nav nav { display: flex; gap: 22px; font-weight: 700; }
.learn-nav nav a { color: #e9ddd7; }
.learn-main { padding: 28px 0 60px; }
.learn-course-bar {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid var(--learn-line);
    border-radius: 8px;
    background: var(--learn-paper);
    box-shadow: 0 4px 10px rgba(52,35,29,.04);
}
.learn-course-bar > div { min-width: 0; }
.learn-course-bar h1 { margin-top: 8px; font-size: 27px; }
.learn-code { padding: 5px 9px; border-radius: 5px; background: var(--learn-gold); font-size: 12px; font-weight: 700; }
.learn-course-bar label { flex: 0 1 420px; display: flex; align-items: center; gap: 14px; }
.learn-course-bar label > span { flex: 0 0 auto; color: #76665e; font-size: 13px; font-weight: 700; }
.learn-course-bar select { background: #fbf7f1; border-color: var(--learn-line); }
.learn-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr); gap: 24px; align-items: start; }
.learn-content { min-width: 0; display: grid; gap: 24px; }
.video-stage {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #17110f;
    box-shadow: 0 12px 24px rgba(37,25,20,.16);
}
.video-stage iframe,
.video-stage video { width: 100%; height: 100%; border: 0; object-fit: contain; }
.external-video { max-width: 520px; padding: 30px; color: white; text-align: center; }
.external-video strong { display: block; font-family: "Literata", serif; font-size: 25px; }
.external-video p { color: #cfc3bd; }
.lesson-summary {
    padding: 24px;
    border: 1px solid var(--learn-line);
    border-radius: 8px;
    background: var(--learn-paper);
    box-shadow: 0 4px 10px rgba(52,35,29,.04);
}
.lesson-meta { color: var(--learn-brown); font-size: 13px; font-weight: 700; }
.lesson-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 10px 0 20px; }
.lesson-title-row > div { min-width: 0; }
.lesson-title-row h2 { font-size: 28px; }
.lesson-title-row p { margin: 8px 0 0; color: #786961; }
.lesson-next { flex: 0 0 auto; padding: 10px 15px; border-radius: 7px; background: var(--learn-brown); color: white; font-weight: 700; }
.lesson-teacher { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--learn-line); }
.teacher-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #0a6465; color: white; font-family: "Literata", serif; font-weight: 700; }
.lesson-teacher strong,
.lesson-teacher small { display: block; }
.lesson-teacher small { color: #887971; }
.lesson-sidebar {
    overflow: hidden;
    border: 1px solid var(--learn-line);
    border-radius: 8px;
    background: var(--learn-paper);
    box-shadow: 0 4px 10px rgba(52,35,29,.04);
}
.lesson-tabs { padding: 15px 20px; background: #f3e8dc; }
.lesson-tabs strong { display: block; padding: 9px 14px; border-radius: 7px; background: var(--learn-brown); color: white; text-align: center; }
.lesson-progress-label { display: flex; justify-content: space-between; gap: 10px; padding: 16px 18px 8px; font-size: 12px; }
.lesson-progress-label strong { color: var(--learn-brown); }
.lesson-sidebar > .student-progress { margin: 0 18px 14px; }
.lesson-list { display: grid; gap: 8px; max-height: 610px; overflow-y: auto; padding: 0 12px 16px; }
.lesson-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 14px 12px;
    border: 1px solid #eadfd4;
    border-radius: 7px;
    background: #fffefa;
}
.lesson-item:hover { border-color: #c58c70; }
.lesson-item.active { border-color: var(--learn-brown); background: #fbefe7; }
.lesson-item.completed .lesson-state { border-color: #47745a; color: #47745a; }
.lesson-state { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #b7aca5; border-radius: 50%; color: var(--learn-brown); font-size: 11px; font-weight: 700; }
.lesson-item small,
.lesson-item strong { display: block; }
.lesson-item small { color: #9a8c85; font-size: 10px; }
.lesson-item strong { margin-top: 3px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; }
.lesson-empty { padding: 50px 20px; color: #887971; text-align: center; }

@media (max-width: 860px) {
    .menu-btn { display: inline-flex; }
    .nav-links { display: none; position: absolute; left: 20px; right: 20px; top: 76px; padding: 14px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
    .nav-links.open { display: flex; }
    .hero, .about-grid, .contact, .admin-layout, .login-shell, .student-hero { grid-template-columns: 1fr; }
    .courses-grid, .features, .metric-grid { grid-template-columns: 1fr; }
    .course-card.featured { grid-column: auto; }
    .section-head { align-items: start; flex-direction: column; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--outline); }
    .admin-main { padding: 22px; }
    .admin-heading { flex-direction: column; }
    .admin-form-grid,
    .video-form-grid,
    .admin-form-inline { grid-template-columns: 1fr; }
    .admin-form .field-wide { grid-column: auto; }
    .student-dashboard-grid { grid-template-columns: 1fr; }
    .student-side-column { grid-template-columns: 1fr 1fr; }
    .student-level { font-size: 76px; }
    .learn-layout { grid-template-columns: 1fr; }
    .lesson-sidebar { grid-row: auto; }
    .lesson-list { max-height: none; }
    .course-manager-layout { grid-template-columns: 1fr; }
    .course-manager-sidebar { position: static; height: auto; padding: 18px 20px; border-right: 0; border-bottom: 1px solid var(--manager-line); }
    .course-manager-sidebar nav { display: flex; overflow-x: auto; margin-top: 18px; }
    .course-manager-sidebar nav a { white-space: nowrap; }
    .course-manager-account { display: none; }
    .course-manager-main { width: min(100% - 32px, 1220px); padding-top: 30px; }
    .course-manager-grid { grid-template-columns: 1fr; }
    .course-roster-column { grid-template-columns: 1fr 1fr; }
    .stat-strip { grid-template-columns: 1fr; }
    .login-visual { min-height: 360px; }
    .quick-actions-inner,
    .footer-inner { align-items: flex-start; flex-direction: column; }
    .activity-grid { grid-template-columns: 1fr; }
    .teacher-intro,
    .service-grid { grid-template-columns: 1fr; }
    .teacher-intro { align-items: start; }
    .teacher-intro .eyebrow { grid-column: auto; }
    .contact-copy { position: static; }
    .poster-info { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
    .container { width: min(100% - 28px, 1180px); }
    .campaign-hero { padding-top: 14px; }
    .campaign-hero .container { width: 100%; }
    .campaign-hero img { border-radius: 0; }
    .quick-actions-inner strong { font-size: 20px; }
    .quick-actions .hero-actions,
    .quick-actions .btn { width: 100%; }
    .section { padding: 64px 0; }
    h1, h2, h3,
    .lead,
    .course-card p {
        max-width: 100%;
        word-break: break-all;
        line-break: anywhere;
        white-space: normal;
    }
    h2 { font-size: 30px; }
    .form-row { grid-template-columns: 1fr; }
    .course-meta { align-items: flex-start; flex-direction: column; }
    .student-dashboard-container { width: min(100% - 24px, 1180px); }
    .student-nav { min-height: 64px; }
    .student-nav nav { gap: 14px; font-size: 13px; }
    .student-nav nav a:not(:last-child) { display: none; }
    .student-dashboard { padding-top: 14px; }
    .student-welcome { min-height: 270px; align-items: flex-end; padding: 24px 20px; }
    .student-welcome h1 { font-size: 30px; }
    .student-welcome h1,
    .student-next-class h2,
    .student-course-row h3,
    .student-course-row p {
        width: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: normal;
    }
    .student-level { top: 28px; right: 16px; transform: none; font-size: 54px; }
    .student-stats { grid-template-columns: 1fr; gap: 12px; margin: 18px 0; }
    .student-stats article { min-height: 76px; }
    .student-next-class { min-height: 250px; flex-direction: column-reverse; padding: 22px 20px; }
    .student-next-class h2 { font-size: 23px; }
    .student-side-column { grid-template-columns: 1fr; }
    .student-panel-head { align-items: flex-start; }
    .student-course-list { padding: 12px; }
    .student-course-topline { align-items: flex-start; flex-direction: column; }
    .student-course-topline > a { flex: 0 0 auto; align-self: flex-start; }
    .learn-container { width: min(100% - 24px, 1180px); }
    .learn-nav { min-height: 62px; }
    .learn-nav .brand span:last-child { font-size: 17px; }
    .learn-nav nav a:first-child { display: none; }
    .learn-course-bar { align-items: stretch; flex-direction: column; gap: 18px; padding: 18px; }
    .learn-course-bar h1 { font-size: 23px; }
    .learn-course-bar label { flex: none; align-items: stretch; flex-direction: column; gap: 6px; }
    .learn-layout { gap: 16px; }
    .video-stage { border-radius: 6px; }
    .lesson-summary { padding: 18px; }
    .lesson-title-row { flex-direction: column; }
    .lesson-title-row h2 { font-size: 23px; }
    .lesson-next { align-self: flex-start; }
    .course-manager-topbar { min-height: 62px; gap: 16px; padding: 0 16px; font-size: 13px; }
    .course-manager-topbar a:nth-child(2) { display: none; }
    .course-manager-hero { flex-direction: column; margin-bottom: 28px; }
    .course-manager-hero h1 { font-size: 34px; }
    .course-edit-panel { width: 100%; }
    .course-edit-panel > summary { text-align: center; }
    .course-edit-panel > form,
    .add-video-panel > form { position: static; width: 100%; margin-top: 10px; }
    .course-edit-grid,
    .course-roster-column,
    .module-grid { grid-template-columns: 1fr; }
    .curriculum-heading { flex-direction: column; }
    .add-video-panel { width: 100%; }
    .add-video-panel > summary { text-align: center; }
    .module-card,
    .module-add-card { min-height: 210px; }
}
