:root {
    color-scheme: light;
    --bg: #fbf7ef;
    --surface: #fffdf8;
    --surface-2: #fff8ec;
    --ink: #17202a;
    --muted: #6d6f70;
    --line: #eadfce;
    --blue: #0b5488;
    --brand: #0b5488;
    --graphite: #0a3557;
    --gold: #f6b744;
    --gold-deep: #d98e22;
    --green: #14796f;
    --amber: #c77817;
    --red: #b33b35;
    --shadow: 0 20px 60px rgba(52, 42, 28, .1);
    --radius: 22px;
    --radius-sm: 14px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #071421;
    --surface: #0d1c2b;
    --surface-2: #12263a;
    --ink: #f4f8fb;
    --muted: #aeb9c5;
    --line: rgba(214, 229, 239, .16);
    --blue: #8ed0ff;
    --brand: #8ed0ff;
    --graphite: #dff2ff;
    --gold: #f6b744;
    --gold-deep: #f19a2b;
    --green: #62d6c3;
    --amber: #f2b45f;
    --red: #ff8d85;
    --shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    overflow-wrap: break-word;
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(20, 72, 104, .38), transparent 34rem),
        linear-gradient(180deg, #071421 0%, #091827 58%, #06101b 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 64px;
    min-height: 64px;
    padding: 8px clamp(20px, 4vw, 56px);
    background: rgba(255, 253, 248, .94);
    border-bottom: 1px solid rgba(234, 223, 206, .78);
    backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .site-header {
    background: rgba(7, 20, 33, .9);
    border-bottom-color: rgba(214, 229, 239, .14);
}

.brand,
.site-nav,
.hero-actions,
.meta-row,
.card-actions,
.inline-form,
.footer-links {
    display: flex;
    align-items: center;
}

.brand {
    flex: 0 0 auto;
    gap: 8px;
    width: auto;
    height: 42px;
    max-height: 42px;
    overflow: hidden;
    color: #07548a;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 30px;
    height: 34px;
    max-width: 30px;
    max-height: 34px;
    object-fit: contain;
    flex: 0 0 30px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    line-height: 1;
}

.brand-name,
.brand-slogan {
    display: block;
    white-space: nowrap;
    color: #07548a;
}

:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .brand-name,
:root[data-theme="dark"] .brand-slogan {
    color: #dff2ff;
}

.brand-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-slogan {
    font-size: 10px;
    font-weight: 600;
}

.site-nav {
    gap: 22px;
    margin-left: auto;
    font-size: 14px;
    color: var(--muted);
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.nav-badge,
.unread-pill {
    display: inline-grid;
    min-width: 21px;
    height: 21px;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--graphite);
    font-size: 11px;
    font-weight: 800;
}

.site-nav a.active,
.site-nav a:hover {
    color: var(--ink);
}

@media (min-width: 721px) {
    .site-nav > a.active::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: -23px;
        left: 0;
        height: 3px;
        border-radius: 999px;
        background: #1f8a87;
    }
}

.nav-form {
    margin: 0;
}

.nav-account {
    position: relative;
    color: var(--ink);
}

.nav-account summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 3px 8px 3px 4px;
    border: 1px solid rgba(7, 84, 138, .42);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 10px 26px rgba(11, 84, 136, .08);
    list-style: none;
    cursor: pointer;
}

:root[data-theme="dark"] .nav-account summary {
    background: rgba(13, 28, 43, .92);
    border-color: rgba(142, 208, 255, .34);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
}

.nav-account summary::-webkit-details-marker {
    display: none;
}

.nav-account summary::after {
    content: "⌄";
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.nav-account[open] summary::after {
    transform: rotate(180deg);
}

.nav-profile-icon {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 36%, #fff 0 17%, transparent 18%),
        radial-gradient(circle at 50% 88%, #fff 0 31%, transparent 32%),
        linear-gradient(145deg, #e8f5fb, #d7edf7 55%, #fff8ea);
    box-shadow: inset 0 0 0 1px rgba(7, 84, 138, .08);
}

:root[data-theme="dark"] .nav-profile-icon {
    border-color: rgba(255, 255, 255, .2);
    background:
        radial-gradient(circle at 50% 36%, #edf8ff 0 17%, transparent 18%),
        radial-gradient(circle at 50% 88%, #edf8ff 0 31%, transparent 32%),
        linear-gradient(145deg, #18334c, #275372 55%, #6c5525);
}

.nav-account-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 30;
    display: grid;
    gap: 12px;
    min-width: 230px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 253, 248, .98);
    box-shadow: var(--shadow);
    text-align: center;
}

:root[data-theme="dark"] .nav-account-menu {
    background: rgba(13, 28, 43, .98);
}

.nav-user-name {
    max-width: 100%;
    overflow: hidden;
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--graphite);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.nav-account-role {
    justify-self: center;
}

.nav-account .link-button {
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
}

.nav-menu-link {
    display: inline-flex;
    justify-content: center;
    color: var(--blue);
    font-size: 16px;
    font-weight: 900;
}

.language-picker {
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.nav-language {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 0;
    border-top: 0;
    color: var(--muted);
}

.language-picker select {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: #fff;
}

:root[data-theme="dark"] .language-picker select {
    background: var(--surface);
}

.nav-language select {
    min-height: 34px;
    max-width: 132px;
}

#google_translate_element,
.goog-te-banner-frame,
.goog-te-gadget,
.goog-te-balloon-frame,
.skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}

.link-button,
.nav-toggle {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.header-controls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
}

.nav-toggle {
    display: none;
    font-size: 18px;
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 62px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f2f4f7;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.theme-toggle::after {
    display: none;
}

.theme-toggle-thumb {
    position: absolute;
    left: 3px;
    top: 3px;
    z-index: 1;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .2);
    transform: translateX(28px);
    transition: transform .2s ease, background .2s ease;
}

.theme-toggle-moon,
.theme-toggle-sun {
    position: relative;
    z-index: 2;
    display: inline-block;
    width: 31px;
    height: 32px;
    pointer-events: none;
    opacity: .62;
}

.theme-toggle-moon::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 9px;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    box-shadow: -4px 0 0 0 #64748b;
}

.theme-toggle-sun::before,
.theme-toggle-sun::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.theme-toggle-sun::before {
    width: 13px;
    height: 13px;
    box-sizing: border-box;
    border: 2px solid #f59e0b;
    border-radius: 999px;
}

.theme-toggle-sun::after {
    width: 23px;
    height: 23px;
    border: 0;
    background:
        linear-gradient(#f59e0b, #f59e0b) 50% 0 / 2px 4px no-repeat,
        linear-gradient(#f59e0b, #f59e0b) 50% 100% / 2px 4px no-repeat,
        linear-gradient(90deg, #f59e0b, #f59e0b) 0 50% / 4px 2px no-repeat,
        linear-gradient(90deg, #f59e0b, #f59e0b) 100% 50% / 4px 2px no-repeat;
}

:root[data-theme="dark"] .theme-toggle {
    background: #1e293b;
    border-color: rgba(214, 229, 239, .2);
}

:root[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(0);
    background: #f8fafc;
}

:root[data-theme="dark"] .theme-toggle-moon::before {
    box-shadow: -4px 0 0 0 #cbd5e1;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-dark {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 12px 30px rgba(11, 84, 136, .2);
}

.button-light {
    background: #fffaf0;
    border-color: rgba(246, 183, 68, .42);
    color: var(--graphite);
}

:root[data-theme="dark"] .button-light {
    background: rgba(18, 38, 58, .84);
    border-color: var(--line);
}

.full {
    width: 100%;
}

.hero,
.section,
.page-hero,
.app-shell,
.directory-layout,
.profile-hero,
.profile-layout,
.site-footer {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: 1fr .92fr;
    gap: 44px;
    align-items: center;
    min-height: calc(100vh - 86px);
    padding: 56px 0 32px;
}

.home-hero {
    min-height: calc(100vh - 74px);
}

.hero-copy h1,
.page-hero h1,
.app-heading h1,
.profile-copy h1,
.section-heading h2,
.split-band h2,
.trust-band h2,
.auth-panel h1 {
    margin: 0;
    letter-spacing: 0;
    line-height: 1.02;
}

.hero-copy h1 {
    max-width: 720px;
    font-size: clamp(48px, 7vw, 88px);
}

.hero-copy p,
.page-hero p,
.lede {
    max-width: 650px;
    color: var(--muted);
    font-size: 20px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-actions,
.hero-proof,
.card-actions,
.meta-row {
    gap: 12px;
    flex-wrap: wrap;
}

.hero-proof {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 680px;
    margin-top: 34px;
}

.hero-proof div,
.stat-card,
.price-card,
.panel,
.teacher-card,
.class-card,
.review-card,
.empty-state {
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

:root[data-theme="dark"] .hero-proof div,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .price-card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .teacher-card,
:root[data-theme="dark"] .class-card,
:root[data-theme="dark"] .review-card,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .benefit-grid article,
:root[data-theme="dark"] .audience-band article,
:root[data-theme="dark"] .auth-panel,
:root[data-theme="dark"] .profile-copy,
:root[data-theme="dark"] .messages-shell,
:root[data-theme="dark"] .filters {
    background: rgba(13, 28, 43, .84);
}

.hero-proof div {
    padding: 18px;
}

.hero-proof strong,
.stat-card strong {
    display: block;
    font-size: 24px;
}

.stat-card {
    display: grid;
    align-content: center;
    min-height: 96px;
    padding: 22px 24px;
}

.stat-card strong {
    line-height: 1;
}

.hero-proof span,
.muted,
.toolbar span,
.list-row span,
.chat-list-item span,
.stat-card span,
.teacher-card p,
.class-card p,
.review-card span,
.price-card p {
    color: var(--muted);
}

.top-gap {
    margin-top: 14px;
}

.hero-media {
    position: relative;
}

.hero-media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 34px;
    box-shadow: 0 28px 80px rgba(21, 25, 29, .16);
}

.floating-card {
    position: absolute;
    right: 24px;
    bottom: 24px;
    width: min(290px, calc(100% - 48px));
    padding: 18px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 20px;
    backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .floating-card {
    background: rgba(13, 28, 43, .82);
    border-color: rgba(214, 229, 239, .18);
}

.floating-card span,
.floating-card small {
    display: block;
    color: var(--muted);
}

.home-intro {
    padding-top: 34px;
}

.section-heading.compact {
    max-width: 760px;
}

.benefit-grid,
.audience-band {
    display: grid;
    gap: 18px;
}

.benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.benefit-grid article,
.audience-band article {
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.benefit-grid article {
    padding: 24px;
}

.benefit-grid article > span {
    display: inline-grid;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 14px;
    background: rgba(246, 183, 68, .2);
    color: var(--graphite);
    font-size: 13px;
    font-weight: 900;
}

.benefit-grid h3,
.audience-band h2 {
    margin: 0 0 10px;
    color: var(--graphite);
}

.benefit-grid p,
.audience-band p,
.home-flow p {
    color: var(--muted);
}

.audience-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audience-band article {
    min-height: 330px;
    padding: 34px;
}

.audience-band article:first-child {
    background: linear-gradient(145deg, #fff, #eef7ff);
}

.audience-band article:last-child {
    background: linear-gradient(145deg, #fff, #fff4da);
}

:root[data-theme="dark"] .audience-band article:first-child {
    background: linear-gradient(145deg, rgba(13, 28, 43, .96), rgba(18, 46, 68, .92));
}

:root[data-theme="dark"] .audience-band article:last-child {
    background: linear-gradient(145deg, rgba(13, 28, 43, .96), rgba(70, 51, 20, .62));
}

.audience-band h2 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
}

.audience-band p {
    max-width: 560px;
    margin-bottom: 24px;
    font-size: 18px;
}

.home-flow {
    margin-top: -28px;
}

.section,
.page-hero,
.app-shell {
    padding: 72px 0;
}

.section {
    content-visibility: auto;
    contain-intrinsic-size: auto 760px;
}

.section-heading {
    margin-bottom: 26px;
}

.calendar-hero {
    position: relative;
    display: grid;
    min-height: clamp(360px, 46vw, 560px);
    overflow: hidden;
    background: #08273f;
    border-bottom: 1px solid rgba(234, 223, 206, .9);
    isolation: isolate;
}

.calendar-hero img,
.calendar-hero-shade,
.calendar-hero-content {
    grid-area: 1 / 1;
}

.calendar-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.calendar-hero-shade {
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(5, 20, 35, .06) 0%, rgba(5, 20, 35, .24) 34%, rgba(5, 20, 35, .72) 100%),
        linear-gradient(90deg, rgba(5, 20, 35, .36), transparent 34%, rgba(5, 20, 35, .28));
}

.calendar-hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0;
    text-align: left;
}

.calendar-hero h1 {
    max-width: 820px;
    color: #fff !important;
    font-size: clamp(44px, 7vw, 84px);
    font-weight: 900;
    letter-spacing: .01em;
    line-height: .97;
    text-shadow: 0 4px 26px rgba(0, 0, 0, .42);
}

.calendar-hero .eyebrow {
    margin-bottom: 18px;
    color: #fff !important;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .38);
}

.calendar-hero p {
    max-width: 680px;
    margin: 22px 0 0;
    color: #fff !important;
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 600;
    line-height: 1.38;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .42);
}

.calendar-shell {
    width: min(1180px, calc(100% - 40px));
    padding: 56px 0 18px;
    margin: 0 auto;
}

.calendar-shell-passed {
    padding-top: 40px;
    margin-top: 24px;
    border-top: 1px solid rgba(12, 47, 70, .12);
}

.calendar-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.calendar-list {
    display: grid;
    gap: 20px;
}

.calendar-day {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.calendar-date {
    position: sticky;
    top: 88px;
    padding: 18px 16px;
    background: linear-gradient(145deg, #fff, #eef9fb);
    border: 1px solid rgba(7, 84, 138, .14);
    border-radius: 22px;
    box-shadow: 0 18px 46px rgba(11, 84, 136, .08);
}

.calendar-date span,
.calendar-meta {
    color: var(--muted);
}

.calendar-date span {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.calendar-date strong {
    display: block;
    margin-top: 4px;
    color: #07365b;
    font-size: 25px;
    line-height: 1.1;
}

.calendar-classes {
    display: grid;
    gap: 12px;
}

.calendar-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 22px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(7, 84, 138, .11);
    border-radius: 26px;
    box-shadow: 0 20px 52px rgba(10, 55, 88, .09);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.calendar-card:hover {
    border-color: rgba(31, 138, 135, .28);
    box-shadow: 0 26px 62px rgba(10, 55, 88, .13);
    transform: translateY(-2px);
}

.calendar-class-main {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.calendar-teacher-photo {
    width: 74px;
    height: 74px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #edf5f8;
    box-shadow: 0 12px 24px rgba(9, 53, 86, .12);
    object-fit: cover;
}

.calendar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
}

.calendar-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f3f8fa;
    color: #315565;
}

.calendar-card h3 {
    margin: 10px 0 6px;
    color: var(--graphite);
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.08;
}

.calendar-card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.calendar-card.passed {
    background: rgba(248, 248, 246, .82);
    opacity: .8;
    box-shadow: none;
}

.calendar-card.passed .calendar-teacher-photo {
    filter: grayscale(.35);
}

.passed-pill,
.status.passed {
    background: #eef2f5;
    color: var(--muted);
}

.calendar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 210px;
}

.calendar-actions form {
    margin: 0;
}

.lessons-shell {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 22px;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto 72px;
    align-items: start;
}

.lessons-shell,
.lesson-sidebar,
.lesson-preview,
.lesson-image-frame {
    min-width: 0;
}

.lesson-sidebar,
.lesson-preview {
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

:root[data-theme="dark"] .lesson-sidebar,
:root[data-theme="dark"] .lesson-preview {
    background: rgba(13, 28, 43, .84);
}

.lesson-sidebar {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 18px;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    padding: 20px;
    scrollbar-gutter: stable;
}

.lesson-unit h2 {
    margin: 0 0 10px;
    color: var(--graphite);
    font-size: 15px;
}

.lesson-topic-list {
    display: grid;
    gap: 8px;
}

.lesson-topic-button {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(234, 223, 206, .92);
    border-radius: 14px;
    background: rgba(255, 250, 240, .72);
    color: var(--ink);
    cursor: pointer;
    font-weight: 750;
    text-align: left;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.lesson-topic-button:hover,
.lesson-topic-button.active {
    border-color: rgba(246, 183, 68, .75);
    background: #fff3d6;
    transform: translateY(-1px);
}

:root[data-theme="dark"] .lesson-topic-button {
    border-color: var(--line);
    background: rgba(18, 38, 58, .72);
}

:root[data-theme="dark"] .lesson-topic-button:hover,
:root[data-theme="dark"] .lesson-topic-button.active,
:root[data-theme="dark"] .lesson-nav-buttons button:hover {
    background: rgba(246, 183, 68, .18);
}

.lesson-preview {
    position: sticky;
    top: 88px;
    overflow: visible;
}

.lesson-preview-copy {
    padding: 24px 24px 16px;
}

.lesson-preview h2 {
    margin: 4px 0 0;
    color: var(--graphite);
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1;
}

.lesson-image-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 12px;
    align-items: stretch;
    padding: 0 14px 14px 0;
    border-top: 1px solid var(--line);
}

.lesson-image-frame {
    height: clamp(420px, calc(100vh - 360px), 760px);
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--surface-2);
    border-bottom-left-radius: var(--radius);
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.lesson-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    background: var(--surface-2);
    transition: opacity .18s ease;
}

.lesson-preview img.loading {
    opacity: .36;
}

.lesson-nav-buttons {
    display: grid;
    align-content: center;
    gap: 10px;
}

.lesson-nav-buttons button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(234, 223, 206, .88);
    border-radius: 999px;
    background: rgba(255, 253, 248, .94);
    color: var(--graphite);
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(52, 42, 28, .13);
}

:root[data-theme="dark"] .lesson-nav-buttons button {
    background: var(--surface);
}

.lesson-nav-buttons button:hover {
    background: #fff3d6;
}

.section-heading h2,
.split-band h2,
.trust-band h2,
.page-hero h1,
.app-heading h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.teacher-grid,
.class-grid,
.review-grid,
.pricing-grid,
.stats-grid {
    display: grid;
    gap: 18px;
}

.teacher-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teacher-grid.directory,
.pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-card {
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
}

.teacher-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 70px rgba(21, 25, 29, .12);
}

.teacher-photo img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
}

.teacher-card-body,
.class-card,
.review-card,
.price-card,
.panel,
.empty-state {
    padding: 22px;
}

.teacher-card-top,
.toolbar,
.list-row,
.approval-row,
.admin-row,
.chat-header,
.profile-title,
.profile-stats {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.teacher-card h3,
.class-card h3,
.panel h2,
.price-card h2 {
    margin: 0 0 8px;
}

.badge,
.status,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e9f3fb;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.tag-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.tag-row span {
    background: var(--surface-2);
    color: var(--graphite);
    border: 1px solid var(--line);
}

.split-band,
.trust-band {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 32px;
    align-items: start;
    padding: 44px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 30px;
}

.steps {
    display: grid;
    gap: 12px;
}

.steps div,
.trust-grid div {
    padding: 18px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.steps span {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 26px;
}

.official-trust .trust-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.auth-shell {
    display: grid;
    min-height: calc(100vh - 170px);
    place-items: center;
    padding: 56px 20px;
}

.auth-panel {
    width: min(460px, 100%);
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.auth-panel.wide {
    width: min(680px, 100%);
}

.auth-links {
    display: grid;
    gap: 12px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 17px;
    font-weight: 700;
}

.auth-links a {
    color: var(--brand);
    font-weight: 900;
}

.form-stack,
.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
    grid-column: span 2;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    padding: 13px 14px;
    outline: none;
    transition: border .2s ease, box-shadow .2s ease;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .captcha-tile {
    background: var(--surface);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(34, 104, 255, .5);
    box-shadow: 0 0 0 4px rgba(34, 104, 255, .1);
}

.role-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.role-picker label {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    cursor: pointer;
}

.role-picker input {
    width: auto;
}

.role-picker span {
    color: var(--ink);
    font-size: 16px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.captcha-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(17, 85, 132, .18);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 250, 239, .94), rgba(255, 255, 255, .92));
}

:root[data-theme="dark"] .captcha-card {
    background: linear-gradient(180deg, rgba(18, 38, 58, .92), rgba(13, 28, 43, .92));
}

.captcha-card p {
    margin: 4px 0 0;
    color: var(--ink);
    font-weight: 800;
}

.captcha-card small {
    color: var(--muted);
    line-height: 1.45;
}

.captcha-label {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.captcha-area {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 12px;
    align-items: stretch;
}

.captcha-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.captcha-tile {
    min-width: 92px;
    padding: 12px 14px;
    border: 1px solid rgba(17, 85, 132, .18);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: grab;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(15, 23, 42, .06);
}

.captcha-tile:active {
    cursor: grabbing;
}

.captcha-tile.selected {
    border-color: var(--gold);
    background: rgba(252, 185, 57, .18);
    color: var(--brand);
}

.captcha-drop {
    display: grid;
    min-height: 54px;
    place-items: center;
    border: 2px dashed rgba(17, 85, 132, .3);
    border-radius: 18px;
    background: rgba(17, 85, 132, .04);
    color: var(--muted);
    font-weight: 900;
    text-align: center;
}

.captcha-drop.filled {
    border-style: solid;
    border-color: var(--gold);
    background: rgba(252, 185, 57, .16);
    color: var(--brand);
}

.directory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
    padding-bottom: 72px;
}

.filters {
    position: sticky;
    top: 94px;
    padding: 18px;
    background: rgba(255, 255, 255, .76);
    border: 1px solid var(--line);
    border-radius: 22px;
}

.toolbar {
    align-items: center;
    margin-bottom: 16px;
}

.profile-hero {
    display: grid;
    grid-template-columns: .82fr 1fr;
    gap: 36px;
    align-items: end;
    padding: 54px 0 32px;
}

.profile-hero > img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 32px;
    box-shadow: var(--shadow);
}

.photo-preview img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.profile-copy {
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.settings-shell {
    padding-top: 54px;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(260px, .72fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: start;
}

.settings-summary {
    display: grid;
    gap: 14px;
}

.settings-summary div {
    padding: 14px;
    border: 1px solid rgba(234, 223, 206, .78);
    border-radius: 16px;
    background: rgba(255, 248, 236, .58);
}

:root[data-theme="dark"] .settings-summary div,
:root[data-theme="dark"] .admin-setting-row {
    background: rgba(18, 38, 58, .58);
    border-color: var(--line);
}

.settings-summary span,
.settings-summary strong {
    display: block;
}

.settings-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.settings-summary strong {
    margin-top: 4px;
    color: var(--ink);
}

.profile-copy h1 {
    font-size: clamp(42px, 6vw, 74px);
}

.profile-copy p {
    color: var(--muted);
    font-size: 19px;
}

.profile-stats {
    margin: 24px 0;
    justify-content: flex-start;
}

.profile-stats div {
    min-width: 110px;
    padding: 14px;
    background: var(--surface-2);
    border-radius: 18px;
}

.profile-stats strong,
.profile-stats span {
    display: block;
}

.profile-layout,
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 18px;
}

.panel.large {
    grid-column: span 1;
}

.class-grid,
.review-grid,
.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-heading {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 26px;
}

.app-heading h1 {
    max-width: 960px;
}

.app-heading .eyebrow {
    margin-top: .55em;
}

.list-row,
.approval-row,
.admin-row {
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.list-row:last-child,
.approval-row:last-child,
.admin-row:last-child {
    border-bottom: 0;
}

.list-row strong,
.list-row span,
.request-mini span {
    display: block;
}

.class-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.status.pending {
    background: #fff7e8;
    color: var(--amber);
}

:root[data-theme="dark"] .status.pending,
:root[data-theme="dark"] .status.approved,
:root[data-theme="dark"] .status.published,
:root[data-theme="dark"] .status.rejected,
:root[data-theme="dark"] .status.suspended {
    background: rgba(255, 255, 255, .08);
}

.status.approved,
.status.published {
    background: #eaf8f2;
    color: var(--green);
}

.status.rejected,
.status.suspended {
    background: #fff0ee;
    color: var(--red);
}

.progress {
    height: 10px;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: 999px;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--blue));
    border-radius: inherit;
}

.messages-shell {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 650px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.messages-shell.solo {
    grid-template-columns: 1fr;
    min-height: 300px;
}

.chat-list {
    padding: 16px;
    background: var(--surface-2);
    border-right: 1px solid var(--line);
}

.chat-list-item {
    display: block;
    padding: 14px;
    border-radius: 16px;
}

.chat-list-item:hover,
.chat-list-item.active {
    background: #fff;
}

:root[data-theme="dark"] .chat-list-item:hover,
:root[data-theme="dark"] .chat-list-item.active,
:root[data-theme="dark"] .quick-prompts button {
    background: var(--surface);
}

.chat-list-item strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chat-list-item > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.chat-panel {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-height: 650px;
}

.chat-header,
.quick-prompts,
.composer {
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.chat-header h1 {
    margin: 0;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-actions form {
    margin: 0;
}

.button-small {
    padding: 8px 12px;
    font-size: 13px;
}

.conversation-notice {
    padding: 12px 18px;
    background: #fff8ea;
    border-bottom: 1px solid var(--line);
    color: var(--amber);
    font-size: 14px;
    font-weight: 700;
}

:root[data-theme="dark"] .conversation-notice {
    background: rgba(246, 183, 68, .12);
}

.quick-prompts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-prompts button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 8px 12px;
    cursor: pointer;
}

:root[data-theme="dark"] .bubble.mine {
    color: #06101b;
}

.message-stream {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    overflow: auto;
}

.bubble {
    max-width: min(560px, 82%);
    align-self: flex-start;
    padding: 14px 16px;
    background: var(--surface-2);
    border-radius: 18px 18px 18px 6px;
}

.bubble.mine {
    align-self: flex-end;
    background: var(--blue);
    color: #fff;
    border-radius: 18px 18px 6px 18px;
}

.bubble p {
    margin: 0;
}

.bubble span {
    display: block;
    margin-top: 6px;
    color: inherit;
    opacity: .68;
    font-size: 12px;
}

.message-action-form {
    margin: 8px 0 0;
}

.message-action-form button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    opacity: .72;
    padding: 0;
}

.message-action-form button:hover {
    opacity: 1;
}

.composer {
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.composer-disabled {
    color: var(--muted);
    font-weight: 700;
}

.composer input {
    border-radius: 999px;
}

.admin-row {
    grid-template-columns: 1fr auto 170px auto;
}

.admin-message-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
}

.admin-setting-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(17, 85, 132, .14);
    border-radius: 20px;
    background: rgba(17, 85, 132, .04);
}

.admin-setting-row strong,
.admin-setting-row span {
    display: block;
}

.admin-setting-row span {
    margin-top: 4px;
    color: var(--muted);
}

.admin-collapsible {
    margin-top: 18px;
}

.admin-collapsible > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    list-style: none;
    cursor: pointer;
    color: var(--graphite);
    font-size: 24px;
    font-weight: 850;
}

.admin-collapsible > summary::-webkit-details-marker {
    display: none;
}

.admin-collapsible > summary::after {
    content: "⌄";
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 18px;
    transition: transform .18s ease;
}

.admin-collapsible[open] > summary {
    margin-bottom: 18px;
}

.admin-collapsible[open] > summary::after {
    transform: rotate(180deg);
}

.admin-lesson-form {
    margin-bottom: 24px;
}

.upload-status {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(7, 84, 138, .16);
    border-radius: 18px;
    background: linear-gradient(145deg, #fff, #f5fbff);
}

.upload-status[hidden] {
    display: none;
}

.upload-status strong,
.upload-status span {
    display: block;
}

.upload-status strong {
    color: var(--graphite);
}

.upload-status span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.upload-meter {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf1;
}

.upload-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), #1f8a87);
    transition: width .18s ease;
}

.upload-status[data-state="complete"] {
    border-color: rgba(31, 138, 135, .24);
    background: linear-gradient(145deg, #fff, #effbf8);
}

.upload-status[data-state="error"] {
    border-color: rgba(204, 73, 73, .28);
    background: linear-gradient(145deg, #fff, #fff3f2);
}

.upload-status[data-state="error"] .upload-meter span {
    background: var(--red);
}

.admin-lesson-list {
    display: grid;
    gap: 12px;
}

.admin-teacher-photo-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.admin-teacher-photo-row {
    display: grid;
    grid-template-columns: 74px minmax(160px, .9fr) minmax(180px, 1.4fr) minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.admin-teacher-photo-row img {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    object-fit: cover;
    background: var(--surface-2);
}

.admin-teacher-photo-row strong,
.admin-teacher-photo-row span {
    display: block;
}

.admin-teacher-photo-row span {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.admin-lesson-row {
    display: grid;
    grid-template-columns: 74px 1fr 1fr 90px 1.3fr 1fr auto;
    gap: 10px;
    align-items: end;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.admin-lesson-row img {
    width: 74px;
    height: 74px;
    border-radius: 14px;
    object-fit: cover;
}

.admin-lesson-delete {
    margin: -4px 0 8px 84px;
}

.danger {
    color: var(--red);
}

.check {
    display: flex;
    grid-auto-flow: column;
    align-items: center;
}

.check input {
    width: auto;
}

.legal-check {
    align-items: start;
    grid-auto-flow: column;
    justify-content: start;
    padding: 14px;
    border: 1px solid rgba(17, 85, 132, .14);
    border-radius: 16px;
    background: rgba(255, 253, 248, .78);
    color: var(--ink);
    line-height: 1.4;
}

:root[data-theme="dark"] .calendar-shell,
:root[data-theme="dark"] .legal-check {
    background: rgba(13, 28, 43, .78);
}

.legal-check a {
    color: var(--blue);
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.flash {
    position: fixed;
    left: 50%;
    top: 82px;
    z-index: 50;
    transform: translateX(-50%);
    padding: 12px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-weight: 700;
}

:root[data-theme="dark"] .flash {
    background: var(--surface);
}

.flash.success {
    color: var(--green);
}

.flash.error {
    color: var(--red);
}

.center {
    text-align: center;
}

.narrow {
    width: min(780px, calc(100% - 40px));
}

.empty-state {
    padding: 34px;
    text-align: center;
}

.empty-state.small {
    padding: 16px;
    box-shadow: none;
}

.setup-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0;
    text-align: left;
}

.setup-details div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-2);
}

.setup-details span,
.setup-details strong {
    display: block;
}

.setup-details span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.setup-details strong {
    margin-top: 4px;
    color: var(--graphite);
    overflow-wrap: anywhere;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0 46px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-footer strong,
.site-footer span {
    display: block;
}

.footer-links {
    gap: 16px;
}

.footer-contact {
    text-align: right;
}

.footer-contact a {
    color: var(--blue);
    font-weight: 800;
}

.footer-policy-links {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 10px;
}

.policy-page h1 {
    margin: 0;
    color: var(--graphite);
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1;
}

.policy-list {
    display: grid;
    gap: 16px;
    margin-top: 30px;
}

.policy-list article {
    padding: 22px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.policy-list h2 {
    margin: 0 0 8px;
    color: var(--graphite);
}

.policy-list p {
    margin: 0;
    color: var(--muted);
}

.policy-list a {
    color: var(--blue);
    font-weight: 800;
}

@media (max-width: 980px) {
    .hero,
    .profile-hero,
    .profile-layout,
    .directory-layout,
    .dashboard-grid,
    .settings-grid,
    .split-band {
        grid-template-columns: 1fr;
    }

    .teacher-grid,
    .teacher-grid.directory,
    .class-grid,
    .review-grid,
    .pricing-grid,
    .stats-grid,
    .benefit-grid,
    .audience-band,
    .trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-day,
    .calendar-card {
        grid-template-columns: 1fr;
    }

    .calendar-date {
        position: static;
    }

    .calendar-actions {
        justify-content: flex-start;
        min-width: 0;
    }

    .lessons-shell {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .lesson-sidebar,
    .lesson-preview {
        position: static;
    }

    .lesson-sidebar {
        max-height: 340px;
    }

    .lesson-image-frame {
        height: min(680px, 72vh);
    }

    .filters {
        position: static;
    }

    .messages-shell {
        grid-template-columns: 1fr;
    }

    .chat-list {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 720px) {
    .site-header {
        align-items: center;
        height: 56px;
        min-height: 56px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .nav-toggle {
        display: block;
    }

    .brand,
    .brand-logo {
        max-height: 34px;
    }

    .brand {
        gap: 6px;
    }

    .brand-logo {
        width: 24px;
        height: 27px;
        max-width: 24px;
        flex-basis: 24px;
    }

    .brand-name {
        font-size: 16px;
    }

    .brand-slogan {
        font-size: 9px;
    }

    .site-nav {
        position: absolute;
        inset: 64px 20px auto 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        max-height: calc(100vh - 84px);
        overflow-y: auto;
        padding: 18px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }

    :root[data-theme="dark"] .site-nav {
        background: rgba(13, 28, 43, .98);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav > a.active::after {
        display: none;
    }

    .nav-account-menu {
        position: static;
        margin-top: 12px;
        width: 100%;
        box-shadow: none;
    }

    .hero {
        min-height: auto;
    }

    .hero-copy h1 {
        font-size: 46px;
    }

    .hero-proof,
    .teacher-grid,
    .teacher-grid.directory,
    .class-grid,
    .review-grid,
    .pricing-grid,
    .stats-grid,
    .benefit-grid,
    .audience-band,
    .trust-grid,
    .role-picker,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .captcha-area {
        grid-template-columns: 1fr;
    }

    .calendar-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .setup-details {
        grid-template-columns: 1fr;
    }

    .calendar-hero {
        min-height: 330px;
    }

    .calendar-hero-content {
        width: min(100% - 40px, 1180px);
        padding: 42px 0;
    }

    .calendar-hero h1 {
        font-size: 42px;
    }

    .calendar-hero p {
        font-size: 18px;
    }

    .calendar-class-main {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .calendar-teacher-photo {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .lesson-preview h2 {
        font-size: 34px;
    }

    .lesson-image-wrap {
        grid-template-columns: 1fr;
        padding-right: 0;
    }

    .lesson-image-frame {
        height: min(620px, 68vh);
        border-bottom-left-radius: 0;
    }

    .lesson-nav-buttons {
        position: sticky;
        bottom: 0;
        display: flex;
        justify-content: center;
        padding: 10px 12px 12px;
        background: linear-gradient(180deg, rgba(255, 253, 248, .7), rgba(255, 253, 248, .96));
        border-top: 1px solid var(--line);
    }

    .span-2 {
        grid-column: span 1;
    }

    .app-heading {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .app-heading .eyebrow {
        margin-top: 0;
    }

    .teacher-card-top,
    .profile-title,
    .list-row,
    .approval-row,
    .admin-row,
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .class-row-actions {
        justify-content: flex-start;
    }

    .footer-contact {
        text-align: left;
    }

    .footer-policy-links {
        justify-content: flex-start;
    }

    .admin-row {
        display: flex;
    }

    .admin-setting-row {
        grid-template-columns: 1fr;
    }

    .admin-lesson-row {
        grid-template-columns: 1fr;
    }

    .admin-teacher-photo-row {
        grid-template-columns: 1fr;
    }

    .admin-lesson-row img,
    .admin-teacher-photo-row img {
        width: 100%;
        height: auto;
        max-height: 220px;
        border-radius: 18px;
    }

    .admin-lesson-delete {
        margin-left: 0;
    }

    .composer {
        flex-direction: column;
    }
}
