:root {
    --accent: #534AB7;
    --accent-dark: #3C3489;
    --accent-light: #EEEDFE;
    --accent-mid: #7B6FD4;
    --bg-page: #F5F5F7;
    --bg-card: #FFFFFF;
    --bg-surface: #F0F0F2;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);
    --green-bg: #EAF3DE;
    --green-text: #3B6D11;
    --green-icon: #639922;
    --amber-bg: #FFF4E5;
    --amber-text: #854F0B;
    --amber-icon: #EF9F27;
    --red-bg: #FCEBEB;
    --red-text: #A32D2D;
    --blue-bg: #E6F1FB;
    --blue-text: #185FA5;
}

/* Maria Lemba: editorial landing and parent workspace */
:root {
    --lemba-wine: #7f1d2d;
    --lemba-wine-dark: #4b101c;
    --lemba-rose: #c95f6f;
    --lemba-cream: #f8f1e7;
    --lemba-paper: #fffdf8;
    --lemba-ink: #211b1c;
    --lemba-muted: #75686a;
    --lemba-line: #decfc4;
}

.lemba-landing-body { margin: 0; overflow-x: hidden; color: var(--lemba-ink); background: var(--lemba-paper); }
.lemba-landing { overflow: hidden; font-family: Inter, "Segoe UI", sans-serif; }
.lemba-header { background: rgba(255, 253, 248, .94); border-bottom: 1px solid rgba(127, 29, 45, .12); }
.landing-header .lemba-nav { position: static; width: min(1240px, calc(100% - 48px)); height: auto; min-height: 80px; margin: 0 auto; padding: 0; display: flex; flex-direction: row; grid-template-columns: none; align-items: center; justify-content: space-between; gap: 28px; border: 0; background: transparent; box-shadow: none; }
.lemba-logo { display: flex; align-items: center; gap: 12px; color: var(--lemba-ink); text-decoration: none; }
.lemba-logo span, .lemba-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: white; background: var(--lemba-wine); font: 700 15px Georgia, serif; }
.lemba-logo strong { font: 700 20px Georgia, serif; }
.lemba-menu { display: flex; align-items: center; gap: 26px; }
.lemba-menu a { color: var(--lemba-ink); font-size: 14px; text-decoration: none; }
.lemba-menu a:hover { color: var(--lemba-wine); }
.lemba-header-actions { display: flex; align-items: center; gap: 9px; }
.lemba-header-login { padding: 10px 13px; border-radius: 999px; color: var(--lemba-wine); background: #f6e5e5; font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.lemba-header-login:hover { color: white; background: var(--lemba-wine); }
.lemba-outline-button { padding: 11px 19px; border: 1px solid var(--lemba-wine); border-radius: 999px; color: var(--lemba-wine); background: transparent; cursor: pointer; }

.lemba-hero { width: min(1240px, calc(100% - 48px)); min-height: 720px; margin: 0 auto; padding: 74px 0 54px; display: grid; grid-template-columns: 1.05fr .82fr; align-items: center; gap: 76px; }
.lemba-hero-copy { min-width: 0; }
.lemba-kicker, .lemba-section-heading > span, .lemba-cta > div > span { color: var(--lemba-wine); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lemba-hero h1 { margin: 18px 0 24px; font: 500 clamp(52px, 6vw, 86px)/.96 Georgia, serif; letter-spacing: -.045em; }
.lemba-hero h1 em { color: var(--lemba-wine); font-weight: 500; }
.lemba-hero-copy > p { max-width: 610px; margin: 0; color: var(--lemba-muted); font-size: 20px; line-height: 1.65; }
.lemba-hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 34px; }
.lemba-primary-button, .lemba-cta > button { border: 0; border-radius: 999px; padding: 16px 24px; color: white; background: var(--lemba-wine); font-weight: 700; cursor: pointer; box-shadow: 0 15px 35px rgba(127, 29, 45, .2); }
.lemba-primary-button:hover, .lemba-cta > button:hover { background: var(--lemba-wine-dark); transform: translateY(-1px); }
.lemba-text-link { color: var(--lemba-ink); font-weight: 700; text-underline-offset: 5px; }
.lemba-login-choice { margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--lemba-line); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lemba-login-choice span { width: 100%; color: var(--lemba-muted); font-size: 13px; }
.lemba-login-choice a { padding: 10px 14px; border-radius: 10px; color: var(--lemba-wine); background: #f6e5e5; font-weight: 750; text-decoration: none; }
.lemba-portrait-wrap { position: relative; justify-self: end; width: min(100%, 470px); }
.lemba-photo-frame { position: absolute; z-index: 2; inset: 0; box-sizing: border-box; border: 1px solid var(--lemba-rose); border-radius: 240px 240px 34px 34px; pointer-events: none; }
.lemba-portrait-wrap img { position: relative; display: block; width: 100%; height: 610px; border-radius: 240px 240px 34px 34px; object-fit: cover; object-position: 50% 25%; box-shadow: 0 35px 80px rgba(57, 32, 34, .18); }
.lemba-photo-note { position: absolute; right: 18px; bottom: 38px; display: flex; flex-direction: column; padding: 18px 22px; border-radius: 16px; color: white; background: var(--lemba-wine); box-shadow: 0 14px 36px rgba(75, 16, 28, .3); }
.lemba-photo-note strong { font: 700 25px Georgia, serif; }
.lemba-photo-note span { font-size: 12px; }

.lemba-trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--lemba-line); border-bottom: 1px solid var(--lemba-line); background: var(--lemba-cream); }
.lemba-trust-strip div { min-height: 130px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-right: 1px solid var(--lemba-line); }
.lemba-trust-strip div:last-child { border-right: 0; }
.lemba-trust-strip strong { color: var(--lemba-wine); font: 700 27px Georgia, serif; }
.lemba-trust-strip span { margin-top: 6px; color: var(--lemba-muted); font-size: 13px; }

.lemba-section { padding: 110px max(24px, calc((100vw - 1240px) / 2)); }
.lemba-section-heading { max-width: 800px; }
.lemba-section-heading.centered { margin-inline: auto; text-align: center; }
.lemba-section-heading h2 { margin: 14px 0 0; font: 500 clamp(38px, 4.5vw, 62px)/1.05 Georgia, serif; letter-spacing: -.035em; }
.lemba-about-grid { margin-top: 58px; display: grid; grid-template-columns: .8fr 1fr; gap: 100px; }
.lemba-lead { margin: 0; font: 400 25px/1.55 Georgia, serif; }
.lemba-check-list { margin: 0; padding: 0; display: grid; gap: 0; list-style: none; }
.lemba-check-list li { padding: 18px 0 18px 34px; position: relative; border-bottom: 1px solid var(--lemba-line); font-weight: 650; }
.lemba-check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--lemba-wine); }
.lemba-method { color: white; background: var(--lemba-wine-dark); }
.lemba-section-heading.light > span { color: #eaa6af; }
.lemba-method-grid { margin-top: 58px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lemba-method-grid article { min-height: 260px; padding: 28px; border: 1px solid rgba(255,255,255,.15); border-radius: 20px; background: rgba(255,255,255,.05); }
.lemba-method-grid b { color: #eaa6af; font: 500 30px Georgia, serif; }
.lemba-method-grid h3 { margin: 50px 0 10px; font: 600 24px Georgia, serif; }
.lemba-method-grid p { margin: 0; color: rgba(255,255,255,.7); line-height: 1.6; }

.lemba-platform { background: var(--lemba-cream); }
.lemba-platform-grid { margin-top: 58px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lemba-platform-grid article { min-height: 420px; padding: 42px; border-radius: 28px; display: flex; flex-direction: column; }
.lemba-platform-grid .student-card { background: white; border: 1px solid var(--lemba-line); }
.lemba-platform-grid .parent-card { color: white; background: var(--lemba-wine); }
.lemba-platform-grid article > span { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .72; }
.lemba-platform-grid h3 { max-width: 430px; margin: 18px 0 25px; font: 600 35px/1.1 Georgia, serif; }
.lemba-platform-grid ul { margin: 0; padding-left: 20px; display: grid; gap: 12px; font-size: 16px; line-height: 1.5; }
.lemba-platform-grid a { margin-top: auto; width: fit-content; padding: 13px 18px; border-radius: 999px; color: white; background: var(--lemba-wine); font-weight: 750; text-decoration: none; }
.lemba-platform-grid .parent-card a { color: var(--lemba-wine); background: white; }
.lemba-price-grid { max-width: 900px; margin: 52px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lemba-price-grid article { padding: 40px; border: 1px solid var(--lemba-line); border-radius: 26px; display: flex; flex-direction: column; background: white; }
.lemba-price-grid article.featured { border-color: var(--lemba-wine); box-shadow: 0 25px 60px rgba(127,29,45,.13); }
.lemba-price-grid strong { margin: 18px 0 4px; color: var(--lemba-wine); font: 700 42px Georgia, serif; }
.lemba-price-grid small { color: var(--lemba-muted); }
.lemba-price-grid button { margin-top: 34px; padding: 13px; border: 0; border-radius: 999px; color: white; background: var(--lemba-wine); font-weight: 700; cursor: pointer; }
.lemba-cta { margin: 0 max(24px, calc((100vw - 1240px) / 2)) 80px; padding: 56px; border-radius: 30px; color: white; background: var(--lemba-ink); display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.lemba-cta h2 { margin: 10px 0; font: 500 42px Georgia, serif; }
.lemba-cta p { margin: 0; color: rgba(255,255,255,.65); }
.lemba-footer { min-height: 110px; padding: 24px max(24px, calc((100vw - 1240px) / 2)); display: flex; align-items: center; gap: 24px; color: white; background: var(--lemba-wine-dark); }
.lemba-footer span { color: rgba(255,255,255,.6); }
.lemba-footer-links { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.lemba-footer-links a { color: white; text-decoration: underline; text-underline-offset: 4px; }

.role-badge.parent { color: var(--lemba-wine); background: #f7e5e7; }
.parent-shell { background: #f6f0eb; }
.parent-dashboard, .management-page { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 70px; }
.parent-hero { padding: 34px 38px; border-radius: 26px; color: white; background: linear-gradient(125deg, var(--lemba-wine-dark), var(--lemba-wine)); display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.parent-hero h1 { margin: 8px 0; font: 600 38px Georgia, serif; }
.parent-hero p { margin: 0; color: rgba(255,255,255,.72); }
.parent-hero > div > span { font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.student-switcher label { display: grid; gap: 7px; font-size: 12px; }
.student-switcher select { min-width: 220px; padding: 11px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; color: white; background: rgba(255,255,255,.1); }
.student-switcher option { color: var(--lemba-ink); }
.parent-summary-grid { margin: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.parent-summary-grid article { padding: 24px; border: 1px solid #eadfd7; border-radius: 18px; background: white; }
.parent-summary-grid span { display: block; color: var(--lemba-muted); font-size: 13px; }
.parent-summary-grid strong { display: block; margin-top: 10px; color: var(--lemba-wine); font: 700 32px Georgia, serif; }
.parent-panel, .list-panel, .management-grid > .form-panel { margin-top: 20px; padding: 28px; border: 1px solid #eadfd7; border-radius: 22px; background: white; }
.parent-panel-head h2, .list-panel h2, .management-grid h2 { margin: 5px 0 20px; font: 600 27px Georgia, serif; }
.parent-panel-head span { color: var(--lemba-wine); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.lesson-list, .parent-essay-list { display: grid; }
.lesson-row, .lesson-admin-row { padding: 17px 0; display: grid; grid-template-columns: 90px minmax(180px, 1fr) 190px auto; align-items: center; gap: 20px; border-top: 1px solid #eee3dc; }
.lesson-row time, .lesson-admin-row time, .lesson-main, .lesson-price, .lesson-admin-row > div { display: flex; flex-direction: column; gap: 4px; }
.lesson-row time span, .lesson-main span, .lesson-admin-row span, .lesson-admin-row small { color: var(--lemba-muted); font-size: 12px; }
.payment-pill { width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 11px !important; font-weight: 750; }
.payment-unpaid { color: #a13d27 !important; background: #fff0e8; }
.payment-reported { color: #8a5a00 !important; background: #fff4cf; }
.payment-paid { color: #276749 !important; background: #e7f6ed; }
.parent-homework-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.parent-homework-grid article { min-height: 165px; padding: 20px; border: 1px solid #e9ddd5; border-radius: 16px; display: flex; flex-direction: column; }
.parent-homework-grid article > span { color: var(--lemba-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.parent-homework-grid article.completed > span { color: #27704d; }
.parent-homework-grid h3 { margin: 12px 0; font-size: 17px; }
.parent-homework-grid article > div { margin-top: auto; display: flex; justify-content: space-between; align-items: end; }
.parent-homework-grid article > div strong { color: var(--lemba-wine); font-size: 25px; }
.parent-homework-grid small { color: var(--lemba-muted); }
.parent-teacher-comment { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid #eadfd7; color: var(--lemba-muted); font-size: 13px; line-height: 1.45; }
.parent-essay-list article { padding: 14px 0; border-top: 1px solid #eee3dc; display: flex; justify-content: space-between; }
.parent-essay-list article > div { display: flex; flex-direction: column; }
.parent-essay-list span, .parent-empty { color: var(--lemba-muted); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-heading h1, .form-page h1 { margin: 6px 0; font: 600 38px Georgia, serif; }
.page-heading p, .form-page p { margin: 0; color: var(--lemba-muted); }
.management-grid { display: grid; grid-template-columns: minmax(320px, .75fr) 1.25fr; gap: 20px; align-items: start; }
.management-grid > .form-panel { margin: 0; }
.management-grid > .list-panel { margin: 0; }
.student-check-list { padding: 14px; border: 1px solid #ddd1ca; border-radius: 12px; display: grid; gap: 10px; }
.student-check-list label { display: flex; align-items: center; gap: 9px; }
.student-check-list.has-error { border-color: var(--red-text); box-shadow: 0 0 0 3px rgba(163, 45, 45, .1); }
.student-check-list legend b, .stack-form .field > span b, .required-fields-note span { color: var(--red-text); }
.required-fields-note { margin: -2px 0 2px; color: var(--text-secondary); font-size: 12px; }
.student-check-list .field-hint { margin: 0 0 2px; color: var(--text-secondary); font-size: 12px; line-height: 1.4; }
.parent-form-summary { margin: 0; font-weight: 650; }
.stack-form button[disabled] { cursor: wait; opacity: .72; transform: none; }
.parent-admin-row { padding: 15px 0; border-top: 1px solid #eee3dc; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; }
.parent-admin-row > div { display: flex; flex-direction: column; gap: 3px; }
.parent-admin-row small, .parent-admin-row span { color: var(--lemba-muted); }
.lesson-admin-row { grid-template-columns: 110px minmax(180px, 1fr) 190px minmax(240px, auto); }
.row-actions { display: flex !important; flex-direction: row !important; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { margin: 0; }

@media (max-width: 980px) {
    .lemba-menu { display: none; }
    .lemba-outline-button { display: none; }
    .lemba-hero { grid-template-columns: 1fr 360px; gap: 35px; }
    .lemba-portrait-wrap img { height: 520px; }
    .lemba-method-grid { grid-template-columns: 1fr 1fr; }
    .parent-summary-grid { grid-template-columns: 1fr 1fr; }
    .management-grid { grid-template-columns: 1fr; }
    .lesson-admin-row, .lesson-row { grid-template-columns: 80px 1fr 170px; }
    .lesson-admin-row .row-actions, .lesson-row form { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
    .landing-header .lemba-nav, .lemba-hero { width: min(100% - 30px, 1240px); }
    .landing-header .lemba-nav { justify-content: flex-start; }
    .lemba-hero { padding-top: 35px; grid-template-columns: 1fr; }
    .lemba-hero h1 { max-width: 100%; font-size: clamp(42px, 12vw, 49px); overflow-wrap: break-word; }
    .lemba-hero-copy > p { font-size: 17px; }
    .lemba-hero-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
    .lemba-portrait-wrap { justify-self: center; width: min(86vw, 430px); }
    .lemba-portrait-wrap img { height: 520px; }
    .lemba-photo-note { right: 12px; bottom: 28px; }
    .lemba-trust-strip { grid-template-columns: 1fr 1fr; }
    .lemba-trust-strip div:nth-child(2) { border-right: 0; }
    .lemba-section { padding-block: 75px; }
    .lemba-about-grid, .lemba-platform-grid, .lemba-price-grid { grid-template-columns: 1fr; gap: 18px; }
    .lemba-about-grid { gap: 38px; }
    .lemba-method-grid { grid-template-columns: 1fr; }
    .lemba-method-grid article { min-height: 210px; }
    .lemba-cta { padding: 35px 27px; flex-direction: column; align-items: flex-start; }
    .lemba-cta h2 { font-size: 34px; }
    .lemba-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
    .lemba-footer-links { margin-left: 0; }
    .parent-dashboard, .management-page { width: min(100% - 24px, 1220px); }
    .parent-hero { padding: 26px; align-items: flex-start; flex-direction: column; }
    .parent-hero h1 { font-size: 30px; }
    .parent-summary-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .parent-summary-grid article { padding: 17px; }
    .parent-homework-grid { grid-template-columns: 1fr; }
    .lesson-row, .lesson-admin-row { grid-template-columns: 70px 1fr; gap: 12px; }
    .lesson-row .lesson-price, .lesson-admin-row > div:nth-child(3), .lesson-row form, .lesson-admin-row .row-actions { grid-column: 2; }
    .page-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
    .lemba-logo strong { display: none; }
    .landing-header .lemba-nav { justify-content: space-between; }
    .lemba-header-actions { gap: 6px; }
    .lemba-header-login { padding: 9px 11px; font-size: 12px; }
}
/* Interactive student catalogs */
[data-catalog-card][hidden] {
    display: none !important;
}

.homework-complete-modal {
    width: min(480px, calc(100vw - 28px));
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: transparent;
    overflow: visible;
}

.homework-complete-modal::backdrop {
    background: rgba(24, 20, 50, .5);
    backdrop-filter: blur(6px);
}

.homework-complete-card {
    position: relative;
    display: grid;
    justify-items: center;
    padding: 38px 34px 32px;
    border-radius: 24px;
    background: radial-gradient(circle at 50% 0, #f1ffe8 0, #fff 45%);
    box-shadow: 0 32px 80px rgba(31, 28, 65, .28);
    text-align: center;
}

.homework-complete-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #eef4ea;
    color: #46633b;
    font-size: 24px;
    cursor: pointer;
}

.homework-complete-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #78c45b, #4a9f34);
    color: #fff;
    font-size: 38px;
    font-weight: 900;
    box-shadow: 0 16px 34px rgba(74, 159, 52, .25);
}

.homework-complete-card > small {
    color: #4a9f34;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
}

.homework-complete-card h2 {
    margin-top: 8px;
    color: #191a2e;
    font-size: 28px;
    font-weight: 900;
}

.homework-complete-card p {
    margin-top: 10px;
    color: #63677b;
    line-height: 1.55;
}

.homework-complete-actions {
    display: grid;
    width: 100%;
    gap: 10px;
    margin-top: 24px;
}

.homework-complete-actions .btn-primary,
.homework-complete-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.student-area .homework-layout.student-catalog-layout {
    grid-template-columns: minmax(0, 1fr);
}

.student-catalog-layout .homework-list-panel {
    min-height: 0;
}

.catalog-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.student-homework-grid,
.student-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
    padding: 28px 34px 36px;
}

.admin-homework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 28px 34px 36px;
}

.admin-homework-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 310px;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(74, 58, 148, .12);
    border-radius: 22px;
    background: linear-gradient(145deg, #fff 0%, #faf8ff 100%);
    box-shadow: 0 15px 35px rgba(42, 38, 74, .08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-homework-card::after {
    content: "";
    position: absolute;
    right: -46px;
    bottom: -52px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(113, 78, 235, .07);
    pointer-events: none;
}

.admin-homework-card:hover {
    transform: translateY(-4px);
    border-color: rgba(107, 69, 238, .3);
    box-shadow: 0 22px 44px rgba(76, 52, 164, .14);
}

.admin-homework-card-top,
.admin-homework-state,
.admin-homework-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.admin-homework-card-top {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.admin-homework-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 16px;
    background: #eee9ff;
    font-size: 25px;
}

.exam-track-badge {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.exam-track-badge.is-ege {
    background: #ebe5ff;
    color: #5f3bd5;
}

.exam-track-badge.is-oge {
    background: #e8f5df;
    color: #477c27;
}

.exam-track-badge.compact {
    min-height: 26px;
    padding: 4px 9px;
    font-size: 11px;
}

.material-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.admin-homework-card-copy {
    position: relative;
    z-index: 1;
}

.admin-homework-kicker {
    display: block;
    margin-bottom: 8px;
    color: #7f7897;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.admin-homework-card h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #211b3d;
    font-size: clamp(21px, 2vw, 27px);
    font-weight: 950;
    line-height: 1.16;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.admin-homework-meta {
    display: grid;
    gap: 6px;
    margin-top: 16px;
    color: #77718e;
    font-size: 14px;
    line-height: 1.4;
}

.admin-homework-state {
    margin-top: 18px;
}

.admin-homework-actions {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 22px;
}

.admin-homework-actions form {
    margin: 0;
}

.admin-homework-actions .btn-small,
.admin-homework-actions .icon-btn {
    position: relative;
    z-index: 2;
}

.student-homework-card,
.student-material-card {
    position: relative;
    min-width: 0;
    min-height: 292px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(74, 58, 148, .12);
    border-radius: 22px;
    background: linear-gradient(145deg, #fff 0%, #faf8ff 100%);
    box-shadow: 0 15px 35px rgba(42, 38, 74, .08);
    color: var(--student-ink);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.student-homework-card {
    display: flex;
    flex-direction: column;
}

.student-homework-card::after,
.student-material-card::after {
    content: "";
    position: absolute;
    right: -46px;
    bottom: -52px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(113, 78, 235, .07);
    pointer-events: none;
}

.student-homework-card:hover,
.student-material-card:hover {
    transform: translateY(-5px);
    border-color: rgba(107, 69, 238, .35);
    box-shadow: 0 22px 44px rgba(76, 52, 164, .16);
}

.student-homework-card:focus-visible,
.student-material-card:focus-within {
    outline: 3px solid rgba(107, 69, 238, .32);
    outline-offset: 3px;
}

.student-homework-card.is-active-homework {
    border: 2px solid #7653eb;
    background: linear-gradient(145deg, #ffffff 0%, #f1edff 100%);
    box-shadow: 0 17px 38px rgba(91, 57, 204, .17);
}

.student-homework-card.is-completed {
    border-color: rgba(75, 151, 61, .22);
    background: linear-gradient(145deg, #fff 0%, #f4faef 100%);
}

.student-homework-card.is-locked {
    cursor: default;
    border-color: rgba(83, 83, 95, .18);
    background: linear-gradient(145deg, #f8f8fa 0%, #eeeeF2 100%);
    box-shadow: 0 10px 24px rgba(42, 42, 55, .06);
}

.student-homework-card.is-locked:hover {
    transform: none;
    border-color: rgba(83, 83, 95, .18);
    box-shadow: 0 10px 24px rgba(42, 42, 55, .06);
}

.student-homework-card.is-locked .student-homework-icon,
.student-homework-card.is-locked .student-homework-status {
    background: #e1e1e7;
    color: #5f6070;
}

.student-homework-card-top,
.student-material-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
}

.student-homework-icon,
.student-material-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #eee9ff;
    font-size: 25px;
}

.student-homework-status,
.student-material-type {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #ebe5ff;
    color: #5f3bd5;
    font-size: 12px;
    font-weight: 900;
}

.is-completed .student-homework-status {
    background: #e8f5df;
    color: #477c27;
}

.student-homework-kicker,
.student-material-kicker {
    margin-bottom: 8px;
    color: #7f7897;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.student-homework-title,
.student-material-title {
    display: -webkit-box;
    overflow: hidden;
    color: #211b3d;
    font-size: clamp(21px, 2vw, 27px);
    font-weight: 950;
    line-height: 1.16;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.student-homework-meta {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    color: #77718e;
    font-size: 14px;
    line-height: 1.4;
}

.student-homework-open,
.student-material-open {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 24px;
    color: #603cdb;
    font-size: 15px;
    font-weight: 900;
}

.student-material-card {
    display: flex;
    flex-direction: column;
}

.student-material-card-link {
    position: absolute;
    z-index: 3;
    inset: 0;
    border-radius: inherit;
}

.student-material-card > :not(.student-material-card-link) {
    pointer-events: none;
}

.student-material-description {
    display: -webkit-box;
    margin-top: 13px;
    overflow: hidden;
    color: #77718e;
    font-size: 14px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.student-material-date {
    margin-top: 16px;
    color: #958ea8;
    font-size: 13px;
    font-weight: 700;
}

.catalog-filter-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 260px;
    margin: 24px 34px 34px;
    padding: 36px;
    border: 2px dashed rgba(107, 69, 238, .2);
    border-radius: 20px;
    color: #77718e;
    text-align: center;
}

.catalog-filter-empty[hidden] {
    display: none;
}

.catalog-filter-empty > span {
    font-size: 40px;
}

.catalog-filter-empty strong {
    color: #211b3d;
    font-size: 20px;
}

@media (max-width: 820px) {
    .catalog-head-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-head-actions .resource-search {
        min-width: 0;
        width: 100%;
    }

    .student-homework-grid,
    .student-material-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 20px;
    }
}

@media (max-width: 560px) {
    .student-homework-grid,
    .student-material-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .student-homework-card,
    .student-material-card {
        min-height: 250px;
        padding: 20px;
    }

    .student-homework-card-top,
    .student-material-card-top {
        margin-bottom: 20px;
    }
}


.student-area .homework-spotlight {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 132px;
    margin-bottom: 22px;
    padding: 24px 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 22px;
    background:
        radial-gradient(circle at 78% 20%, rgba(255, 255, 255, .18), transparent 22%),
        linear-gradient(130deg, #5535d6 0%, #7455eb 54%, #8f70f4 100%);
    box-shadow: 0 20px 42px rgba(83, 53, 214, .25);
    color: #fff;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.student-area .homework-spotlight::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -45px;
    bottom: -100px;
    border: 22px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.student-area .homework-spotlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 52px rgba(83, 53, 214, .32);
}

.student-area .homework-spotlight.is-locked {
    cursor: default;
    background: linear-gradient(130deg, #616273 0%, #777989 55%, #8a8b99 100%);
    box-shadow: 0 16px 34px rgba(58, 59, 70, .18);
}

.student-area .homework-spotlight.is-locked:hover {
    transform: none;
    box-shadow: 0 16px 34px rgba(58, 59, 70, .18);
}

.mini-row.is-locked {
    cursor: default;
    background: #f4f4f6;
}

.homework-spotlight-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 19px;
    background: rgba(255, 255, 255, .16);
    font-size: 31px;
    box-shadow: inset 0 1px rgba(255, 255, 255, .2);
}

.homework-spotlight-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.homework-spotlight-copy small {
    color: #e7ddff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .1em;
}

.homework-spotlight-copy strong {
    overflow: hidden;
    color: #fff;
    font-size: 27px;
    font-weight: 950;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.homework-spotlight-copy > span {
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
}

.homework-spotlight-action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 13px;
    background: #fff;
    color: #5737cf;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(37, 20, 104, .2);
}

.homework-spotlight-action b {
    font-size: 19px;
}

.student-area .quick-access {
    position: relative;
    z-index: 4;
}

.student-area .quick-grid a[data-quick-action] {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    min-height: 116px;
    border: 1px solid transparent;
    color: var(--student-ink);
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.student-area .quick-grid a[data-quick-action]:hover {
    border-color: rgba(103, 72, 218, .24);
    background: #fff;
    box-shadow: 0 12px 25px rgba(59, 43, 102, .11);
    transform: translateY(-3px);
}

.student-area .quick-grid a[data-quick-action]:active {
    transform: translateY(0) scale(.98);
}

.student-area .quick-grid a[data-quick-action] > span:nth-child(2) {
    font-weight: 800;
}

.student-area .quick-grid a[data-quick-action] small {
    color: #827a91;
    font-size: 10px;
    font-weight: 700;
}

.student-card-progress,
.student-card-links {
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.student-area .is-cabinet-highlighted {
    border-color: #7455e8 !important;
    box-shadow: 0 0 0 5px rgba(116, 85, 232, .15), 0 22px 42px rgba(64, 43, 125, .14) !important;
    transform: translateY(-3px);
}

.student-area .help-card .btn-secondary {
    cursor: pointer;
}

.student-area .contact-modal-actions a {
    text-decoration: none;
}

@media (max-width: 760px) {
    .student-area .homework-spotlight {
        grid-template-columns: 54px minmax(0, 1fr);
        padding: 20px;
    }

    .homework-spotlight-icon {
        width: 54px;
        height: 54px;
    }

    .homework-spotlight-copy strong {
        font-size: 22px;
    }

    .homework-spotlight-action {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .admin-homework-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .admin-homework-card {
        min-height: 290px;
        padding: 20px;
    }
}


html {
    scroll-behavior: smooth;
}

.student-directory-table-head,
.student-directory-row {
    grid-template-columns: minmax(220px, 1.25fr) minmax(105px, .55fr) minmax(190px, .9fr) 105px minmax(145px, .7fr);
}

.student-directory-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.student-directory-actions button {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.student-link-button {
    border: 1px solid #dcd2ec;
    color: #654592;
}

.student-link-button:hover {
    background: #f6f1fc;
}

.student-delete-button {
    border: 1px solid #efcccc;
    color: #a33c3c;
}

.student-delete-button:hover {
    background: #fff2f2;
}

.student-action-dialog {
    width: min(460px, calc(100% - 28px));
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(33, 23, 45, .28);
}

.student-action-dialog::backdrop {
    background: rgba(34, 27, 43, .56);
    backdrop-filter: blur(4px);
}

.student-action-dialog form {
    display: grid;
    padding: 30px;
    text-align: center;
}

.student-dialog-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 17px;
    place-items: center;
    border-radius: 18px;
    font-size: 25px;
    font-weight: 850;
}

.student-dialog-icon.danger {
    background: #fff0f0;
    color: #b94343;
}

.student-dialog-icon.links {
    background: #eee8fb;
    color: #6949a1;
}

.student-action-dialog h2 {
    margin: 0 0 10px;
    color: #2e2836;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
}

.student-action-dialog p {
    margin: 0 0 8px;
    color: #5f5768;
    font-size: 16px;
}

.student-action-dialog > form > small {
    color: #8b8492;
    line-height: 1.5;
}

.student-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
}

.button.danger {
    border: 1px solid #b94343;
    background: #b94343;
    color: #fff;
}

.student-links-dialog form {
    text-align: left;
}

.student-links-dialog .student-dialog-icon {
    margin-left: auto;
    margin-right: auto;
}

.student-links-dialog h2,
.student-links-dialog > form > p {
    text-align: center;
}

.student-links-dialog label {
    display: grid;
    gap: 7px;
    margin-top: 16px;
    color: #4c4456;
    font-size: 13px;
    font-weight: 750;
}

.student-links-dialog input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #dcd6e3;
    border-radius: 11px;
    outline: none;
    font: inherit;
    font-weight: 500;
}

.student-links-dialog input:focus {
    border-color: #8060b3;
    box-shadow: 0 0 0 3px rgba(128, 96, 179, .12);
}

.student-links-dialog > form > small {
    margin-top: 13px;
}

.student-card-progress,
.student-card-links {
    scroll-margin-top: 100px;
}

.card-accent.blue {
    background: #4c89d8;
}

.icon-blue {
    background: #e9f3ff;
    color: #276dbd;
}

.lesson-link-list {
    display: grid;
    gap: 10px;
}

.lesson-link-list > a,
.lesson-link-list > div {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid #e8e3ed;
    border-radius: 13px;
    background: #fbfafc;
    color: #322c39;
    text-decoration: none;
}

.lesson-link-list > a {
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.lesson-link-list > a:hover {
    border-color: #cfc1e3;
    box-shadow: 0 8px 20px rgba(70, 51, 95, .08);
    transform: translateY(-1px);
}

.lesson-link-list > .is-unavailable {
    opacity: .65;
}

.lesson-link-logo {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 850;
}

.lesson-link-list a > span:last-child,
.lesson-link-list div > span:last-child {
    display: grid;
    gap: 3px;
}

.lesson-link-list strong {
    font-size: 14px;
}

.lesson-link-list small {
    color: #81798a;
    font-size: 11px;
}

.pdf-viewer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.pdf-zoom-controls {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #ddd7e6;
    border-radius: 10px;
    background: #fff;
}

.pdf-zoom-controls button {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid #e7e2eb;
    background: transparent;
    color: #51475d;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.pdf-zoom-controls button:hover {
    background: #f4f0f8;
}

.pdf-zoom-controls output {
    min-width: 58px;
    padding: 0 8px;
    color: #665b72;
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

.pdf-zoom-controls .pdf-fit-width {
    border-right: 0;
    border-left: 1px solid #e7e2eb;
    font-size: 11px;
}

.answer-sheet-head small[data-pdf-answer-progress] {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eee9f8;
    color: #624891;
    font-size: 11px;
    font-weight: 800;
}

.pdf-answer-row input.is-missing {
    border-color: #c84d4d;
    background: #fff7f7;
    box-shadow: 0 0 0 3px rgba(200, 77, 77, .1);
}

.pdf-draft-status.is-error {
    color: #ad3838;
    font-weight: 750;
}

.pdf-submit-button.is-incomplete {
    filter: saturate(.65);
}

@media (max-width: 1050px) {
    .student-directory-table-head,
    .student-directory-row {
        grid-template-columns: minmax(200px, 1.2fr) 100px minmax(170px, .85fr) minmax(140px, .65fr);
    }

    .student-directory-table-head span:nth-child(4),
    .student-directory-row time {
        display: none;
    }
}

@media (max-width: 850px) {
    .student-directory-row {
        grid-template-columns: 1fr 1fr;
    }

    .student-directory-actions {
        align-self: end;
        justify-self: end;
    }

    .pdf-viewer-toolbar,
    .pdf-viewer-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .pdf-viewer-actions {
        gap: 8px;
    }
}

@media (max-width: 540px) {
    .student-directory-actions {
        justify-self: start;
    }

    .student-dialog-actions {
        grid-template-columns: 1fr;
    }

    .student-action-dialog form {
        padding: 24px 20px;
    }

    .pdf-zoom-controls {
        max-width: 100%;
    }

    .pdf-zoom-controls .pdf-fit-width {
        display: none;
    }
}


.answer-key-auto-status {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #ded8f2;
    border-radius: 10px;
    background: #f8f6ff;
    color: #665f7a;
    font-size: 13px;
    font-weight: 650;
}

.answer-key-auto-status.is-loading {
    border-color: #d8ccff;
    background: #f4efff;
    color: #6749ad;
}

.answer-key-auto-status.is-success {
    border-color: #bde5d0;
    background: #effaf4;
    color: #26744a;
}

.answer-key-auto-status.is-warning {
    border-color: #f2d49c;
    background: #fff9eb;
    color: #8a641a;
}

.student-directory-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 92% 12%, rgba(149, 118, 219, 0.13), transparent 26rem),
        #f7f5fb;
}

.student-directory {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 38px 0 72px;
}

.student-directory-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 34px 38px;
    border: 1px solid #e5dff0;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f6f0ff 100%);
    box-shadow: 0 18px 50px rgba(61, 43, 91, 0.08);
}

.student-directory-hero::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: 72px;
    top: -128px;
    border: 28px solid rgba(126, 91, 188, 0.08);
    border-radius: 50%;
}

.student-directory-back {
    display: inline-flex;
    margin-bottom: 22px;
    color: #675d78;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.student-directory-hero h1 {
    margin: 8px 0 9px;
    color: #26212e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1;
}

.student-directory-hero p {
    max-width: 630px;
    margin: 0;
    color: #716a7c;
    font-size: 16px;
}

.student-directory-count {
    position: relative;
    z-index: 1;
    display: grid;
    min-width: 142px;
    padding: 22px 24px;
    border: 1px solid rgba(117, 82, 171, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    text-align: center;
    backdrop-filter: blur(8px);
}

.student-directory-count strong {
    color: #704db0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    line-height: 1;
}

.student-directory-count span {
    margin-top: 6px;
    color: #6d6478;
    font-size: 13px;
    font-weight: 700;
}

.student-directory-panel {
    margin-top: 22px;
    padding: 30px;
    border: 1px solid #e6e1ec;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(55, 43, 73, 0.06);
}

.student-directory-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.student-directory-heading h2 {
    margin: 0 0 5px;
    color: #2c2734;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
}

.student-directory-heading p {
    margin: 0;
    color: #807989;
    font-size: 14px;
}

.student-directory-total {
    flex: 0 0 auto;
    padding: 8px 13px;
    border-radius: 999px;
    background: #f0ebf8;
    color: #684d98;
    font-size: 13px;
    font-weight: 750;
}

.student-directory-table {
    overflow: hidden;
    border: 1px solid #ebe7ef;
    border-radius: 16px;
}

.student-directory-table-head,
.student-directory-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) minmax(105px, .55fr) minmax(190px, .9fr) 105px minmax(145px, .7fr);
    align-items: center;
    gap: 24px;
}

.student-directory-table-head {
    padding: 13px 20px;
    background: #faf9fc;
    color: #8a8391;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.student-directory-row {
    min-height: 92px;
    padding: 16px 20px;
    border-top: 1px solid #eeeaf2;
    transition: background-color .18s ease;
}

.student-directory-row:hover {
    background: #fcfaff;
}

.student-directory-person {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
}

.student-directory-avatar {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(145deg, #7955b7, #9873d1);
    box-shadow: 0 8px 18px rgba(112, 77, 176, 0.22);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.student-directory-person div,
.student-directory-progress > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.student-directory-person strong {
    overflow: hidden;
    color: #302a38;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-directory-person small,
.student-directory-progress small {
    color: #938c9b;
    font-size: 12px;
}

.student-directory-login code {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid #e5e0e9;
    border-radius: 9px;
    background: #f8f7fa;
    color: #544b60;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
}

.student-directory-progress {
    display: grid;
    gap: 9px;
}

.student-directory-progress > div {
    grid-template-columns: auto 1fr;
    align-items: baseline;
}

.student-directory-progress strong {
    color: #63458f;
    font-size: 14px;
}

.student-directory-progress small {
    justify-self: end;
}

.student-directory-progress-bar {
    display: block;
    overflow: hidden;
    height: 7px;
    border-radius: 999px;
    background: #ece8f1;
}

.student-directory-progress-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7250ab, #a681d7);
}

.student-directory-row time {
    color: #726a7b;
    font-size: 13px;
    font-weight: 650;
}

.student-directory-mobile-label {
    display: none;
}

.student-directory-empty {
    display: grid;
    min-height: 300px;
    place-items: center;
    align-content: center;
    padding: 35px;
    text-align: center;
}

.student-directory-empty > span {
    display: grid;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    place-items: center;
    border-radius: 20px;
    background: #efe8fa;
    color: #7651ae;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: 700;
}

.student-directory-empty h2 {
    margin: 0 0 8px;
    color: #302a37;
}

.student-directory-empty p {
    margin: 0;
    color: #807887;
}

@media (max-width: 850px) {
    .student-directory {
        width: min(100% - 24px, 680px);
        padding-top: 20px;
    }

    .student-directory-hero {
        align-items: flex-start;
        padding: 26px 22px;
    }

    .student-directory-count {
        min-width: 105px;
        padding: 16px;
    }

    .student-directory-panel {
        padding: 18px;
    }

    .student-directory-table {
        border: 0;
        border-radius: 0;
    }

    .student-directory-table-head {
        display: none;
    }

    .student-directory-row {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        margin-bottom: 12px;
        padding: 18px;
        border: 1px solid #e9e4ee;
        border-radius: 15px;
    }

    .student-directory-person,
    .student-directory-progress {
        grid-column: 1 / -1;
    }

    .student-directory-mobile-label {
        display: block;
        margin-bottom: 5px;
        color: #928b99;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .student-directory-row time {
        justify-self: end;
        align-self: end;
    }
}

@media (max-width: 540px) {
    .student-directory-hero {
        display: grid;
    }

    .student-directory-count {
        grid-template-columns: auto auto;
        justify-content: center;
        align-items: baseline;
        gap: 7px;
        width: 100%;
    }

    .student-directory-count strong {
        font-size: 30px;
    }

    .student-directory-heading {
        align-items: flex-start;
    }

    .student-directory-heading p {
        display: none;
    }

    .student-directory-row {
        grid-template-columns: 1fr;
    }

    .student-directory-row time {
        justify-self: start;
    }
}

+

/* PDF homework workflow */
[data-pdf-section][hidden],
[data-quiz-section][hidden] {
    display: none !important;
}

.homework-format-card,
.pdf-import-panel {
    border: 1px solid #e3e1ef;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff 0%, #fbfaff 100%);
    padding: 28px;
    box-shadow: 0 16px 42px rgba(49, 37, 109, 0.07);
}

.format-card-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.format-card-heading h2 {
    margin: 0 0 5px;
    color: #15152a;
    font-size: 22px;
}

.format-card-heading p {
    margin: 0;
    color: #747187;
}

.format-step {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #7657ed, #4d2ed6);
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(91, 59, 218, 0.25);
}

.homework-format-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.format-option {
    position: relative;
    display: grid;
    grid-template-columns: 52px 1fr 28px;
    gap: 14px;
    align-items: center;
    min-height: 96px;
    padding: 18px;
    border: 2px solid #ece9f7;
    border-radius: 18px;
    cursor: pointer;
    transition: 180ms ease;
}

.format-option:hover {
    transform: translateY(-2px);
    border-color: #b9aaf2;
    box-shadow: 0 12px 25px rgba(75, 51, 172, 0.09);
}

.format-option:has(input:checked) {
    border-color: #6c49e6;
    background: linear-gradient(135deg, #f6f2ff, #fcfbff);
    box-shadow: 0 0 0 4px rgba(108, 73, 230, 0.08);
}

.format-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.format-option > span:nth-of-type(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.format-option strong {
    color: #18162a;
    font-size: 16px;
}

.format-option small {
    color: #777489;
    line-height: 1.35;
}

.format-option-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-weight: 900;
}

.format-option-icon.pdf {
    color: #e93b5c;
    background: #fff0f3;
    font-size: 13px;
}

.format-option-icon.quiz {
    color: #5635d9;
    background: #eee9ff;
    font-size: 24px;
}

.format-check {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: transparent;
    border: 2px solid #d8d3e8;
    border-radius: 50%;
    font-weight: 800;
}

.format-option:has(input:checked) .format-check {
    color: #fff;
    border-color: #6543df;
    background: #6543df;
}

.pdf-import-panel {
    border-color: #dcd4fa;
    background:
        radial-gradient(circle at 95% 4%, rgba(121, 87, 238, .11), transparent 28%),
        linear-gradient(145deg, #fff, #faf8ff);
}

.pdf-import-grid {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(340px, 1.15fr);
    gap: 20px;
}

.pdf-drop-zone {
    display: flex;
    min-height: 310px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 28px;
    text-align: center;
    border: 2px dashed #a995ec;
    border-radius: 20px;
    background: rgba(248, 246, 255, .85);
    cursor: pointer;
    transition: 180ms ease;
}

.pdf-drop-zone:hover {
    border-color: #623fdb;
    background: #f4f0ff;
    transform: translateY(-2px);
}

.pdf-drop-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.pdf-drop-zone strong {
    color: #24203d;
    font-size: 17px;
}

.pdf-drop-zone > span:not(.pdf-drop-icon) {
    color: #7b768e;
}

.pdf-drop-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 88px;
    color: #fff;
    border-radius: 12px 12px 18px 12px;
    background: linear-gradient(145deg, #ff5b72, #dc244b);
    box-shadow: 0 15px 28px rgba(218, 36, 74, .2);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .06em;
}

.answer-key-card {
    padding: 20px;
    border: 1px solid #e4dff3;
    border-radius: 20px;
    background: #fff;
}

.answer-key-card textarea {
    min-height: 224px;
    resize: vertical;
    font-family: Consolas, "SFMono-Regular", monospace;
    line-height: 1.65;
}

.answer-key-help {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    color: #747087;
    font-size: 13px;
}

.answer-key-help strong {
    color: #5f3edb;
    font-size: 18px;
}

.answer-key-help b {
    display: inline-grid;
    place-items: center;
    width: 20px;
    color: #5f3edb;
    border-radius: 5px;
    background: #eee9ff;
}

.pdf-import-note {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-top: 18px;
    padding: 15px 18px;
    border: 1px solid #e0d8fb;
    border-radius: 15px;
    background: #f6f2ff;
    color: #5f5972;
}

.pdf-import-note > span {
    font-size: 22px;
}

.pdf-import-note p {
    margin: 0;
    line-height: 1.5;
}

.page.pdf-homework-page {
    width: min(1500px, calc(100% - 16px));
    max-width: 1500px;
    padding: 1.25rem .5rem 2rem;
}

.pdf-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.pdf-viewer-card,
.pdf-answer-sheet,
.admin-pdf-preview {
    overflow: hidden;
    border: 1px solid #dedbe9;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(30, 22, 68, .09);
}

.pdf-viewer-toolbar {
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid #ebe8f2;
    background: #fbfaff;
}

.pdf-viewer-toolbar div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.pdf-viewer-toolbar strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-viewer-toolbar a {
    flex: 0 0 auto;
    color: #5a39da;
    font-weight: 750;
    text-decoration: none;
}

.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #31bb79;
    box-shadow: 0 0 0 5px rgba(49, 187, 121, .12);
}

.pdf-homework-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 235px);
    min-height: 680px;
    border: 0;
    background: #ececf1;
}

.pdf-answer-sheet {
    position: sticky;
    top: 18px;
    padding: 20px;
}

.answer-sheet-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 5px 10px;
    margin-bottom: 16px;
}

.answer-sheet-head > span {
    color: #1d1930;
    font-size: 22px;
    font-weight: 850;
}

.answer-sheet-head > strong {
    padding: 6px 9px;
    color: #6241dc;
    border-radius: 9px;
    background: #eee9ff;
    font-size: 12px;
}

.answer-sheet-head p {
    grid-column: 1 / -1;
    margin: 0;
    color: #817d8f;
    font-size: 13px;
}

.pdf-answer-list {
    display: grid;
    max-height: calc(100vh - 410px);
    min-height: 250px;
    gap: 9px;
    overflow-y: auto;
    padding-right: 5px;
}

.pdf-answer-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 7px;
    border: 1px solid #ece8f3;
    border-radius: 14px;
    background: #fcfbfe;
}

.pdf-answer-row > span {
    display: grid;
    place-items: center;
    height: 42px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, #7657ed, #5131d1);
    font-size: 13px;
    font-weight: 850;
}

.pdf-answer-row input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    color: #1c192a;
    border: 1px solid #ddd9e8;
    border-radius: 12px;
    outline: none;
    transition: 150ms ease;
}

.pdf-answer-row input:focus {
    border-color: #7050e6;
    box-shadow: 0 0 0 4px rgba(112, 80, 230, .1);
}

.pdf-submit-note {
    margin: 14px 0;
    padding: 11px 12px;
    color: #736d52;
    border-radius: 11px;
    background: #fff8dc;
    font-size: 12px;
    line-height: 1.4;
}

.pdf-draft-status {
    margin-top: 13px;
    color: #8a8498;
    font-size: 12px;
    text-align: center;
}

.pdf-draft-status::before {
    content: "●";
    margin-right: 6px;
    color: #a79fba;
}

.pdf-draft-status.is-saved::before {
    color: #32b978;
}

.pdf-submit-button {
    min-height: 48px;
}

.admin-pdf-preview {
    padding: 20px;
}

.admin-pdf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.admin-pdf-head h2 {
    margin: 6px 0 0;
}

.admin-pdf-frame {
    display: block;
    width: 100%;
    height: 700px;
    border: 1px solid #e1deea;
    border-radius: 15px;
    background: #eeeef2;
}

.admin-answer-key {
    margin-top: 20px;
}

.admin-answer-key h3 {
    margin: 0 0 13px;
}

.admin-answer-key-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 9px;
}

.admin-answer-key-grid > div {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 7px 10px;
    border: 1px solid #e5e1ef;
    border-radius: 12px;
    background: #fbfaff;
}

.admin-answer-key-grid span {
    display: grid;
    place-items: center;
    height: 30px;
    color: #603fda;
    border-radius: 8px;
    background: #eee9ff;
    font-weight: 850;
}

@media (max-width: 980px) {
    .pdf-workspace,
    .pdf-import-grid {
        grid-template-columns: 1fr;
    }

    .pdf-answer-sheet {
        position: static;
    }

    .pdf-answer-list {
        max-height: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pdf-homework-frame {
        height: 68vh;
        min-height: 520px;
    }
}

@media (max-width: 660px) {
    .homework-format-picker,
    .pdf-answer-list {
        grid-template-columns: 1fr;
    }

    .homework-format-card,
    .pdf-import-panel {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .format-option {
        grid-template-columns: 46px 1fr 24px;
        padding: 14px;
    }

    .format-option-icon {
        width: 46px;
        height: 46px;
    }

    .pdf-workspace {
        gap: 14px;
    }

    .pdf-viewer-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pdf-homework-frame {
        height: 62vh;
        min-height: 440px;
    }

    .admin-pdf-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-pdf-frame {
        height: 540px;
    }
}


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

body {
    min-width: 320px;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

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

button,
input,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

h1 {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.2;
}

h2,
h3 {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

p {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
}

strong {
    font-weight: 500;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-mid) 100%);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 12px rgba(83, 74, 183, 0.15);
}

.app-shell {
    min-height: 100vh;
    background: var(--bg-page);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #9E7BFF, var(--accent) 68%, #3C3489);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(107, 69, 238, 0.3);
}

.brand-copy {
    display: none;
}

.nav-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.nav-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.2s;
}

.nav-tabs a:hover,
.nav-tabs a.is-active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.nav-tabs a.is-active {
    font-weight: 600;
}

.logout-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.nav-actions,
.history-navigation {
    display: flex;
    align-items: center;
}

.nav-actions {
    justify-self: end;
    gap: 12px;
    min-width: 0;
}

.history-navigation {
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(83, 74, 183, .13);
    border-radius: 12px;
    background: rgba(255, 255, 255, .78);
}

.history-navigation button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #514a79;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
}

.history-navigation button:hover {
    background: #f0edff;
    color: #5d3bdd;
}

.logout-form button {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-form button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.page,
.student-content,
.admin-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.75rem 2rem;
}

.page.narrow {
    max-width: 760px;
}

.card {
    background: #FFFFFF;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.card.striped,
.page-header-card,
.admin-hero,
.admin-stat-card,
.student-card {
    position: relative;
    overflow: hidden;
}

.card-strip,
.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.card-strip.purple,
.card-accent.purple {
    background: var(--accent);
}

.card-strip.amber,
.card-accent.amber {
    background: var(--amber-icon);
}

.card-strip.green,
.card-accent.green {
    background: var(--green-icon);
}

.card-strip.gradient {
    background: linear-gradient(90deg, var(--accent), var(--accent-mid));
}

.btn-primary,
.button.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7D59F5, var(--accent-dark));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(107, 69, 238, 0.25);
    transition: all 0.2s;
}

.btn-primary:hover,
.button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(107, 69, 238, 0.35);
}

.btn-secondary,
.button.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
}

.btn-small,
.btn-primary.small,
.btn-secondary.small,
.button.small {
    background: var(--accent-light);
    color: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    line-height: 1;
}

.btn-primary.small {
    background: var(--accent);
    color: #fff;
    font-weight: 500;
}

.btn-secondary.small {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

.btn-secondary.full,
.button.full {
    width: 100%;
}

.pill,
.role-badge,
.status-pill,
.mini-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1;
}

.pill-purple,
.mini-badge.purple {
    background: var(--accent-light);
    color: var(--accent);
}

.pill-green,
.role-badge.student,
.status-pill.done,
.mini-badge.green {
    background: var(--green-bg);
    color: var(--green-text);
}

.pill-amber,
.role-badge,
.status-pill.pending {
    background: var(--amber-bg);
    color: var(--amber-text);
}

.pill-red,
.status-pill.overdue {
    background: var(--red-bg);
    color: var(--red-text);
}

.panel-tag,
.eyebrow,
.surface-label,
.mini-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.page-header-card,
.admin-hero {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-header-card > div:not(.card-strip),
.admin-hero > div:not(.card-strip) {
    padding-top: 4px;
}

.page-header-card .panel-tag,
.admin-hero .panel-tag {
    margin-bottom: 6px;
}

.page-header-card h1,
.admin-hero h1 {
    margin-bottom: 4px;
}

.header-btns,
.heading-actions,
.form-actions,
.mat-actions,
.item-actions,
.student-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.landing-nav {
    height: 56px;
    padding: 0 2.5rem;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-secondary);
    font-size: 13px;
}

.landing-nav-links a:not(.btn-primary):hover {
    color: var(--text-primary);
}

.hero {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-mid) 100%);
    padding: 4rem 2.5rem 3.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: 30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-copy h1 {
    color: #fff;
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.hero-copy p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    max-width: 410px;
    margin-bottom: 1.4rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-btn-primary,
.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
}

.hero-btn-primary {
    background: #fff;
    color: var(--accent);
    padding: 9px 20px;
    font-weight: 500;
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0.5px solid rgba(255, 255, 255, 0.35);
    padding: 9px 16px;
}

.hero-preview {
    background: rgba(255, 255, 255, 0.12);
    border: 0.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 1.4rem;
}

.preview-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
}

.preview-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.preview-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 7px;
}

.preview-dot.green {
    background: #A8EECF;
}

.preview-dot.amber {
    background: #FFD080;
}

.preview-row > div {
    flex: 1;
    min-width: 0;
}

.preview-title {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.preview-meta {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 2px;
}

.preview-pill {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 500;
}

.preview-pill.done {
    background: rgba(168, 238, 207, 0.22);
}

.preview-pill.open {
    background: rgba(255, 208, 128, 0.24);
}

.landing-section {
    padding: 3rem 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.feat-card {
    border-radius: 14px;
    padding: 1.4rem;
    border: 1px solid;
}

.feat-card.purple {
    background: var(--accent-light);
    border-color: #C8C4F4;
}

.feat-card.amber {
    background: var(--amber-bg);
    border-color: #F9D8A0;
}

.feat-card.green {
    background: var(--green-bg);
    border-color: #BED99A;
}

.feat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 0.9rem;
    color: #fff;
}

.feat-card.purple .feat-icon {
    background: var(--accent);
}

.feat-card.amber .feat-icon {
    background: var(--amber-icon);
}

.feat-card.green .feat-icon {
    background: var(--green-icon);
}

.feat-card h2 {
    margin-bottom: 0.4rem;
}

.landing-separator {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    max-width: 900px;
    margin: 0 auto;
}

.about-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.about-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 500;
}

.about-section h2 {
    font-size: 16px;
    margin-bottom: 4px;
}

.about-role {
    color: var(--accent);
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 0.65rem;
}

.about-section p {
    line-height: 1.7;
    max-width: 650px;
}

.chip-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.chip-row span {
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
}

.section-title {
    margin-bottom: 1rem;
}

.section-title h2 {
    font-size: 16px;
    margin-top: 4px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.step {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem;
}

.step-num {
    font-size: 22px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.step h3 {
    margin-bottom: 0.35rem;
}

.cta-block {
    background: linear-gradient(135deg, var(--accent), var(--accent-mid));
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    max-width: 855px;
    margin: 0 auto 3rem;
}

.cta-block h2 {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 0.5rem;
}

.cta-block p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.5rem;
}

.cta-block a {
    display: inline-flex;
    background: #fff;
    color: var(--accent);
    font-weight: 500;
    font-size: 13px;
    border-radius: 8px;
    padding: 9px 24px;
}

.student-top {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.student-top h1 {
    margin-bottom: 3px;
}

.student-top p {
    font-size: 14px;
}

.next-lesson {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
}

.card-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 34px;
}

.icon-purple {
    background: var(--accent-light);
    color: var(--accent);
}

.icon-amber {
    background: var(--amber-bg);
    color: var(--amber-icon);
}

.icon-green {
    background: var(--green-bg);
    color: var(--green-icon);
}

.next-lesson strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-top: 1px;
}

.student-card-grid,
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.student-bottom-grid,
.admin-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.student-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem;
}

.card-head,
.panel-title-row,
.questions-toolbar,
.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.9rem;
}

.card-head-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mini-list,
.activity-list {
    display: grid;
}

.mini-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mini-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mini-row-title {
    display: block;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-row-date,
.card-note,
.s-sub,
.s-stat,
.hw-meta,
.mat-sub,
.a-time,
.field small,
.field-error {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.lesson-surface,
.progress-tile,
.quick-grid a {
    background: var(--bg-page);
    border-radius: 8px;
}

.lesson-surface {
    padding: 10px 12px;
    margin-bottom: 8px;
    display: grid;
    gap: 6px;
}

.lesson-surface h3 {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-surface p {
    font-size: 12px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.progress-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0.9rem;
}

.progress-tile {
    padding: 10px;
}

.progress-tile strong {
    display: block;
    font-size: 26px;
    font-weight: 500;
    line-height: 1;
}

.progress-tile span {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 4px;
}

.progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 6px;
}

.progress-label strong {
    color: var(--text-primary);
    font-size: 12px;
}

.progress-track {
    height: 4px;
    background: var(--bg-page);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
}

.quick-access h2 {
    margin-bottom: 0.85rem;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.quick-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.quick-icon {
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1;
}

.activity-item,
.student-row,
.dashboard-homework-row,
.dashboard-material-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.activity-item:last-child,
.student-row:last-child,
.dashboard-homework-row:last-child,
.dashboard-material-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.a-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex: 0 0 7px;
}

.a-dot.purple {
    background: var(--accent);
}

.a-dot.green {
    background: var(--green-text);
}

.a-dot.amber {
    background: var(--amber-text);
}

.a-dot.red {
    background: var(--red-text);
}

.a-text {
    color: var(--text-primary);
    font-size: 13px;
}

.admin-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.admin-stat-card .num {
    font-size: 32px;
    font-weight: 500;
    padding-top: 4px;
    line-height: 1;
}

.admin-stat-card .lbl {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.admin-stat-card .trend {
    font-size: 12px;
    margin-top: 8px;
    color: var(--green-text);
}

.admin-stat-card .trend.amber {
    color: var(--amber-text);
}

.admin-stat-card .trend.muted {
    color: var(--text-secondary);
}

.panel-link,
.card-link {
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
}

.row-main,
.item-main {
    min-width: 0;
    flex: 1;
}

.s-avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 500;
}

.s-name,
.hw-name,
.mat-name,
.item-title {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.s-stat {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

.material-card,
.homework-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.material-type-icon,
.homework-type-icon,
.empty-icon,
.mat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.material-type-icon.pdf,
.mat-icon.pdf {
    background: var(--red-bg);
    color: var(--red-text);
}

.material-type-icon.presentation,
.mat-icon.presentation,
.admin-material-icon.presentation {
    background: var(--amber-bg);
    color: var(--amber-icon);
}

.material-type-icon.url,
.mat-icon.url {
    background: var(--blue-bg);
    color: var(--blue-text);
}

.homework-type-icon {
    background: var(--amber-bg);
    color: var(--amber-icon);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}

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

.empty-card,
.empty-state {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.empty-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 22px;
    margin: 0 auto 1rem;
}

.empty-icon.amber {
    background: var(--amber-bg);
    color: var(--amber-icon);
}

.empty-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.empty-card p,
.empty-state p {
    margin-bottom: 1rem;
}

.empty.compact {
    padding: 1rem 0;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

.panel-card,
.form-panel,
.table-panel,
.question-editor,
.question-view,
.item-card,
.login-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem;
}

.panel-card-footer {
    margin-top: 12px;
}

.form-panel,
.questions-list,
.options-list,
.question-view-list,
.student-links-list,
.item-list {
    display: grid;
    gap: 12px;
}

.completion-screen {
    display: grid;
    gap: 24px;
}

.completion-card {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.completion-card.completion-perfect {
    border-color: var(--green-icon);
    background: linear-gradient(135deg, #fff 0%, rgba(234, 243, 222, 0.3) 100%);
}

.completion-card.completion-done {
    border-color: var(--amber-icon);
    background: linear-gradient(135deg, #fff 0%, rgba(255, 244, 229, 0.3) 100%);
}

.completion-icon {
    font-size: 72px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.completion-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.completion-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: rgba(245, 245, 247, 0.5);
    border-radius: 12px;
    min-width: 280px;
}

.result-score {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 18px;
}

.result-score strong {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
}

.result-score small {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.result-mistakes {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--amber-text);
}

.result-mistakes strong {
    font-size: 20px;
    font-weight: 600;
}

.result-perfect {
    font-size: 16px;
    font-weight: 600;
    color: var(--green-text);
}

.completion-button {
    margin-top: 8px;
    min-width: 240px;
}

.completion-details {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 24px;
}

.completion-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.completion-note {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.field {
    display: grid;
    gap: 6px;
}

.field span,
.field label {
    font-size: 13px;
    font-weight: 500;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="url"],
.field input[type="file"],
.field textarea,
.option-row input[type="text"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field textarea:focus,
.option-row input[type="text"]:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(83, 74, 183, 0.1);
    box-shadow: 0 2px 8px rgba(83, 74, 183, 0.1);
}

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

.alert {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
}

.alert.success {
    border-color: var(--green-bg);
    background: var(--green-bg);
    color: var(--green-text);
}

.alert.error {
    border-color: var(--red-bg);
    background: var(--red-bg);
    color: var(--red-text);
}

.option-row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.option-row input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: var(--accent);
}

.ghost-button {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
}

.ghost-button:hover {
    color: var(--text-primary);
}

.question-view-title {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.question-view-title > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
}

.question-image {
    display: block;
    width: min(100%, 820px);
    max-height: 720px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
}

.answer-list {
    display: grid;
    gap: 8px;
    list-style: none;
}

.answer-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-page);
    font-size: 13px;
}

.answer-list li.is-correct {
    background: var(--green-bg);
}

.answer-list strong,
.answer-correct {
    color: var(--green-text);
    font-weight: 500;
}

.answer-wrong {
    color: var(--red-text);
}

.table-panel {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 11px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

.results-table th {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table .mat-actions {
    justify-content: flex-start;
}

.auth-screen {
    min-height: 100vh;
    background: #f4f3f0;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-panel {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.avatar-mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7D59F5, var(--accent-dark));
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 20px rgba(107, 69, 238, 0.25);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.5;
}

.lead {
    margin-bottom: 1rem;
}

.hero-badge.login-badge,
.login-panel .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding: 6px 10px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
}

.badge-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    color: var(--accent);
    font-size: 11px;
    font-weight: 500;
}

.login-form {
    display: grid;
    gap: 20px;
    margin: 0 0 24px;
    text-align: left;
}

.login-form .field {
    display: grid;
    gap: 8px;
}

.login-form .field span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-switch {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    nav,
    .landing-nav {
        align-items: stretch;
        flex-direction: column;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 10px;
    }

    .nav-tabs,
    .landing-nav-links {
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
    }

    .logout-form {
        justify-content: space-between;
        width: 100%;
    }

    .hero-inner,
    .features-grid,
    .steps-grid,
    .about-section,
    .student-top,
    .student-card-grid,
    .student-bottom-grid,
    .admin-stats,
    .admin-two-col {
        grid-template-columns: 1fr;
    }

    .page-header-card,
    .admin-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .next-lesson {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 620px) {
    .page,
    .student-content,
    .admin-content,
    .page.narrow {
        padding: 1.25rem 1rem;
    }

    .hero,
    .landing-section,
    .about-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

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

    .material-card,
    .homework-card {
        align-items: flex-start;
    }

    .mat-actions,
    .header-btns,
    .heading-actions,
    .form-actions {
        justify-content: stretch;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary,
    .button.primary,
    .button.secondary {
        width: 100%;
    }

    .option-row {
        grid-template-columns: 20px minmax(0, 1fr);
    }

    .option-row .ghost-button {
        grid-column: 2;
        justify-self: start;
    }
}

/* Focused admin dashboard */
.admin-dashboard .admin-hero-card {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 148px;
    padding: 28px 32px;
}

.admin-dashboard .admin-hero-copy p {
    max-width: 680px;
}

.admin-dashboard .admin-hero-actions {
    min-width: 220px;
}

.admin-dashboard .admin-stats-grid {
    gap: 16px;
    margin: 20px 0;
}

.admin-dashboard .admin-stat-card {
    min-height: 112px;
    padding: 20px;
}

.admin-dashboard .admin-dashboard-grid {
    display: block;
}

.admin-dashboard .admin-main-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-dashboard .admin-card-section {
    margin: 0;
}

.admin-dashboard .homework-results {
    grid-column: 1 / -1;
    order: 1;
}

.admin-dashboard .students {
    order: 2;
}

.admin-dashboard .materials {
    order: 3;
}

.admin-status.neutral {
    background: #f1f2f5;
    color: #6c7080;
}

.btn-small.review-needed {
    background: #fff0d8;
    color: #9a5a00;
}

/* Homework review workspace */
.page.admin-results-page {
    width: min(1360px, calc(100% - 32px));
    max-width: 1360px;
}

.page.pdf-review-page {
    width: min(1500px, calc(100% - 16px));
    max-width: 1500px;
    padding: 1.25rem .5rem 2rem;
}

.admin-review-workspace {
    grid-template-columns: minmax(0, 1fr) 390px;
}

.admin-review-answer-sheet {
    top: 88px;
    padding: 20px;
}

.admin-review-answer-list {
    display: grid;
    max-height: calc(100vh - 390px);
    min-height: 260px;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}

.admin-review-answer-row {
    padding: 13px;
    border: 1px solid #dfe2e8;
    border-radius: 14px;
    background: #f8f9fb;
}

.admin-review-answer-row.is-correct {
    border-color: #cce4bf;
    background: #f3faef;
}

.admin-review-answer-row.is-wrong {
    border-color: #efbcbc;
    background: #fff2f2;
}

.admin-review-answer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.admin-review-answer-head > span {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    background: #e9e6f7;
    color: #573bc7;
    font-weight: 900;
}

.admin-review-answer-row.is-correct .admin-review-answer-head strong {
    color: #3f7d2d;
}

.admin-review-answer-row.is-wrong .admin-review-answer-head strong {
    color: #b53535;
}

.admin-review-answer-row p {
    margin: 4px 0 0;
    color: #5e6170;
    font-size: 13px;
    line-height: 1.4;
}

.admin-review-answer-row p b {
    color: #202130;
}

.review-complete-form {
    margin-top: 16px;
}

.review-complete-button {
    background: linear-gradient(135deg, #66ad45, #4a9131);
    box-shadow: 0 12px 24px rgba(74, 145, 49, .2);
}

.review-complete-state {
    border: 1px solid #bcdbaa;
    background: #edf8e7;
    color: #3e762b;
}

.review-complete-confirmation {
    display: grid;
    gap: 4px;
    margin-top: 16px;
    padding: 13px;
    border-radius: 12px;
    background: #edf8e7;
    color: #3e762b;
    text-align: center;
}

.review-complete-confirmation span {
    font-size: 12px;
}

@media (max-width: 1050px) {
    .admin-dashboard .admin-main-column,
    .admin-review-workspace {
        grid-template-columns: 1fr;
    }

    .admin-dashboard .homework-results {
        grid-column: auto;
    }

    .admin-review-answer-sheet {
        position: static;
    }

    .admin-review-answer-list {
        max-height: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .admin-dashboard .admin-hero-card,
    .admin-dashboard .admin-main-column,
    .admin-review-answer-list {
        grid-template-columns: 1fr;
    }

    .admin-dashboard .admin-hero-actions {
        min-width: 0;
        width: 100%;
    }
}

.landing-skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 9px;
    background: #10122E;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    transform: translateY(-150%);
    transition: transform 0.18s ease;
}

.landing-skip-link:focus {
    transform: translateY(0);
}

.landing-page {
    --landing-ink: #10122E;
    --landing-muted: #515778;
    --landing-purple: #6B45EE;
    --landing-purple-dark: #5130D4;
    --landing-purple-soft: #F0ECFF;
    --landing-yellow: #FFC72C;
    --landing-yellow-soft: #FFF5D8;
    --landing-green: #83B958;
    --landing-green-soft: #EDF7E4;
    --landing-shadow: 0 18px 45px rgba(39, 33, 91, 0.12);
    min-height: 100vh;
    background:
        radial-gradient(circle at 82% 13%, rgba(128, 91, 242, 0.11), transparent 24rem),
        radial-gradient(circle at 4% 58%, rgba(255, 199, 44, 0.12), transparent 22rem),
        radial-gradient(circle at 78% 78%, rgba(131, 185, 88, 0.12), transparent 18rem),
        linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px),
        #FFFDF8;
    background-size: auto, auto, auto, 56px 56px, 56px 56px, auto;
    color: var(--landing-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    position: relative;
}

.landing-page p {
    color: var(--landing-muted);
}

.landing-container {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
}

#about,
#services,
#reviews,
#contacts,
#contact-cards {
    scroll-margin-top: 94px;
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 253, 249, 0.94);
    border-bottom: 1px solid rgba(103, 85, 168, 0.08);
    backdrop-filter: blur(14px);
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.landing-header.is-scrolled {
    background: rgba(255, 253, 249, 0.98);
    box-shadow: 0 10px 30px rgba(38, 31, 79, 0.08);
}

.landing-header .landing-nav {
    position: static;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(230px, 1fr);
    align-items: center;
    gap: 24px;
    width: min(1220px, calc(100% - 40px));
    height: 72px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    justify-self: start;
}

.landing-brand .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    background: radial-gradient(circle at 30% 25%, #9E7BFF, var(--landing-purple) 68%, #4327B9);
    box-shadow: 0 9px 20px rgba(107, 69, 238, 0.25);
    font-size: 13px;
}

.landing-brand-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.landing-brand-text strong {
    color: var(--landing-ink);
    font-size: 15px;
    font-weight: 700;
}

.landing-brand-text small {
    color: #2F3046;
    font-size: 12px;
}

.landing-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2.6vw, 42px);
    color: #15162B;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.landing-menu a {
    position: relative;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.landing-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -11px;
    height: 3px;
    border-radius: 999px;
    background: var(--landing-purple);
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.landing-menu a:hover,
.landing-page:has(#about:target) .nav-about,
.landing-page:has(#services:target) .nav-services,
.landing-page:has(#reviews:target) .nav-reviews,
.landing-page:has(#contacts:target) .nav-contacts,
.landing-page:has(#contact-cards:target) .nav-contacts {
    color: var(--landing-purple);
}

.landing-page:has(#about:target) .nav-about::after,
.landing-page:has(#services:target) .nav-services::after,
.landing-page:has(#reviews:target) .nav-reviews::after,
.landing-page:has(#contacts:target) .nav-contacts::after,
.landing-page:has(#contact-cards:target) .nav-contacts::after {
    opacity: 1;
    transform: scaleX(1);
}

.landing-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}

.landing-header-button,
.landing-login-button,
.landing-primary-button,
.landing-secondary-button,
.cta-button {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.landing-header-button,
.landing-primary-button {
    background: linear-gradient(135deg, #7D59F5, var(--landing-purple-dark));
    color: #fff;
    box-shadow: 0 15px 30px rgba(107, 69, 238, 0.25);
}

.landing-header-button {
    min-height: 42px;
    padding: 0 26px;
}

.landing-login-button {
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid rgba(107, 69, 238, 0.4);
    background: rgba(255, 255, 255, 0.72);
    color: var(--landing-purple);
    box-shadow: 0 10px 22px rgba(107, 69, 238, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.landing-login-button:hover {
    border-color: rgba(107, 69, 238, 0.68);
    background: #fff;
    box-shadow: 0 14px 28px rgba(107, 69, 238, 0.14);
    transform: translateY(-1px);
}

.landing-plane-button {
    border: 0;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    background: #F3EEFF;
    color: var(--landing-purple);
    cursor: pointer;
}

.landing-plane-button svg,
.cta-plane svg,
.feature-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.landing-hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 8px;
    background:
        linear-gradient(rgba(107, 69, 238, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 69, 238, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 82% 18%, rgba(132, 94, 255, 0.12), transparent 30%),
        radial-gradient(circle at 12% 88%, rgba(255, 199, 44, 0.08), transparent 24%),
        transparent;
    background-size: 56px 56px, 56px 56px, auto, auto;
}

.landing-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
    align-items: center;
    gap: 54px;
    min-height: 470px;
}

.landing-hero-grid > * {
    min-width: 0;
}

.landing-hero-copy {
    position: relative;
    z-index: 3;
    padding: 26px 0 32px 70px;
}

.landing-hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 16px;
    padding: 5px 18px;
    border-radius: 999px;
    background: var(--landing-green-soft);
    color: #66933A;
    font-size: 13px;
    font-weight: 600;
}

.landing-hero h1 {
    display: grid;
    gap: 2px;
    color: var(--landing-ink);
    font-size: clamp(40px, 3.8vw, 56px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: 0;
    margin: 0;
}

.hero-script {
    color: var(--landing-purple);
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: clamp(42px, 4.2vw, 60px);
    font-weight: 700;
    line-height: 1.05;
}

.hero-underline {
    display: block;
    width: min(420px, 82%);
    height: 15px;
    margin: -2px 0 16px;
    background:
        linear-gradient(95deg, transparent 0 4%, var(--landing-yellow) 4% 94%, transparent 94%),
        linear-gradient(180deg, transparent 0 45%, var(--landing-yellow) 45% 66%, transparent 66%);
    clip-path: polygon(0 44%, 30% 34%, 73% 42%, 100% 33%, 99% 58%, 56% 60%, 22% 70%, 2% 62%);
}

.landing-hero-text {
    max-width: 470px;
    margin-bottom: 24px;
    color: #30334D;
    font-size: 16px;
    line-height: 1.7;
}

.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 34px;
}

.landing-primary-button {
    min-width: 222px;
    padding: 0 24px;
}

.landing-secondary-button {
    min-width: 206px;
    padding: 0 24px;
    background: #F1F0FA;
    color: #24253C;
}

.landing-header-button,
.landing-primary-button,
.landing-secondary-button,
.cta-button,
.service-price-button,
.reviews-button,
.contact-help-panel button,
.contact-modal-actions a,
.landing-plane-button,
.contact-modal-close {
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

@media (hover: hover) {
    .landing-header-button:hover,
    .landing-primary-button:hover,
    .cta-button:hover,
    .service-price-button:hover,
    .contact-help-panel button:hover {
        filter: brightness(1.04);
        transform: translateY(-2px);
    }

    .landing-secondary-button:hover,
    .reviews-button:hover,
    .contact-modal-actions a:hover {
        border-color: rgba(107, 69, 238, 0.72);
        box-shadow: 0 14px 28px rgba(73, 53, 150, 0.13);
        transform: translateY(-2px);
    }

    .landing-plane-button:hover,
    .contact-modal-close:hover {
        transform: translateY(-1px) scale(1.04);
    }
}

.landing-page a:focus-visible,
.landing-page button:focus-visible,
.landing-skip-link:focus-visible {
    outline: 3px solid #FFC72C;
    outline-offset: 3px;
}

.hero-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 520px;
}

.hero-benefit {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
}

.benefit-icon {
    grid-row: span 2;
    color: #FFB900;
    font-size: 28px;
    line-height: 1;
}

.hero-benefit strong {
    color: var(--landing-ink);
    font-size: 13px;
    font-weight: 800;
}

.hero-benefit small {
    color: #34374D;
    font-size: 12px;
}

.landing-hero-visual {
    position: relative;
    min-height: 486px;
    align-self: stretch;
    max-width: 100%;
}

.hero-blob {
    position: absolute;
    right: 10px;
    bottom: 38px;
    width: min(95%, 575px);
    height: 355px;
    border-radius: 48% 52% 32% 68% / 57% 41% 59% 43%;
    background: linear-gradient(145deg, rgba(183, 164, 255, 0.95), rgba(111, 75, 226, 0.64));
    transform: rotate(-7deg);
    z-index: 0;
}

.hero-dot-field {
    position: absolute;
    right: 0;
    bottom: 90px;
    width: 210px;
    height: 210px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.58) 2px, transparent 2px);
    background-size: 16px 16px;
    opacity: 0.75;
    z-index: 1;
}

.hero-photo {
    position: absolute;
    right: 42px;
    bottom: -1px;
    z-index: 2;
    width: min(520px, 88%);
    max-height: 515px;
    object-fit: contain;
    filter: drop-shadow(0 24px 28px rgba(63, 51, 91, 0.08));
}

.hero-method-note {
    position: absolute;
    right: 18px;
    bottom: 10px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #D4C8FF;
    border-radius: 10px;
    background: rgba(248, 246, 255, 0.96);
    color: #624DD3;
    box-shadow: 0 10px 24px rgba(64, 47, 111, 0.1);
    font-size: 13px;
    font-weight: 700;
}

.hero-note {
    position: absolute;
    right: 4px;
    bottom: 56px;
    z-index: 4;
    min-width: 238px;
    padding: 24px 28px 24px 30px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 35px rgba(64, 47, 111, 0.14);
    transform: rotate(-1deg);
    color: #15162B;
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 20px;
    line-height: 1.35;
}

.hero-note strong,
.hero-note span {
    display: block;
}

.hero-note-heart {
    position: absolute;
    right: 20px;
    bottom: 18px;
    color: var(--landing-purple);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.doodle {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.doodle svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.doodle-check {
    top: 58px;
    left: 60%;
    width: 58px;
    height: 58px;
    color: var(--landing-purple);
    transform: rotate(-9deg);
}

.doodle-arrow {
    left: -26px;
    top: 230px;
    width: 88px;
    height: 136px;
    color: var(--landing-purple);
}

.doodle-star {
    right: -8px;
    top: 238px;
    width: 54px;
    height: 54px;
    color: #FFBC00;
    transform: rotate(12deg);
}

.doodle-rays {
    top: 122px;
    left: 49%;
    width: 58px;
    height: 54px;
    color: #FFBC00;
    background:
        linear-gradient(currentColor, currentColor) 6px 6px / 4px 32px no-repeat,
        linear-gradient(currentColor, currentColor) 30px 17px / 4px 28px no-repeat,
        linear-gradient(currentColor, currentColor) 49px 35px / 4px 22px no-repeat;
    transform: rotate(27deg);
}

.features-section {
    position: relative;
    padding: 10px 0 12px;
}

.features-section::before {
    content: "✦";
    position: absolute;
    left: max(18px, calc((100% - 1220px) / 2 - 42px));
    top: -12px;
    color: rgba(255, 184, 0, 0.75);
    font-size: 26px;
    line-height: 1;
}

.features-section::after {
    content: "";
    position: absolute;
    right: max(18px, calc((100% - 1220px) / 2 - 30px));
    bottom: -16px;
    width: 62px;
    height: 44px;
    border: 3px solid rgba(107, 69, 238, 0.26);
    border-left-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
    transform: rotate(-18deg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.features-grid > *,
.stats-grid > *,
.about-grid > *,
.service-pricing-grid > *,
.service-contact-grid > *,
.reviews-grid > *,
.reviews-metrics > *,
.contacts-hero-grid > *,
.contacts-grid > *,
.contact-steps-panel > *,
.cta-section > * {
    min-width: 0;
}

.feature-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 20px;
    min-height: 104px;
    min-width: 0;
    padding: 22px 24px;
    border-radius: 12px;
    box-shadow: var(--landing-shadow);
}

.feature-card > div {
    min-width: 0;
}

.feature-card-purple {
    background: #F0EDFF;
}

.feature-card-yellow {
    background: #FFF5E4;
}

.feature-card-green {
    background: #F1F6E8;
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    color: #fff;
}

.feature-card-purple .feature-icon {
    background: linear-gradient(135deg, #8B68FF, #5E36E6);
}

.feature-card-yellow .feature-icon {
    background: linear-gradient(135deg, #FFCB33, #FFAE00);
}

.feature-card-green .feature-icon {
    background: linear-gradient(135deg, #96C965, #6EA647);
}

.feature-card h2 {
    color: var(--landing-ink);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.feature-card p {
    color: #59607D;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: break-word;
}

.feature-arrow {
    color: var(--landing-purple);
    font-size: 23px;
}

.feature-card-yellow .feature-arrow {
    color: #E5A000;
}

.feature-card-green .feature-arrow {
    color: #79A94E;
}

.stats-strip {
    position: relative;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 190px;
    align-items: center;
    gap: 24px;
    min-height: 154px;
    margin: 0 auto 18px;
    padding: 24px 26px 22px 38px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 22% 0, rgba(255, 255, 255, 0.18), transparent 26%),
        linear-gradient(135deg, #7555F0, #6544E4 62%, #7756ED);
    color: #fff;
    box-shadow: 0 18px 34px rgba(84, 62, 201, 0.24);
    overflow: hidden;
}

.stats-script {
    display: grid;
    color: #fff;
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 25px;
    line-height: 1.18;
}

.stats-script::after {
    content: "";
    width: 124px;
    height: 12px;
    margin-top: 8px;
    background: var(--landing-yellow);
    clip-path: polygon(0 48%, 44% 28%, 100% 42%, 99% 67%, 58% 58%, 12% 78%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.stat-item {
    min-height: 78px;
    padding: 0 22px;
    border-left: 1px dashed rgba(255, 255, 255, 0.28);
}

.stat-item strong {
    display: block;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-item span {
    display: block;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.35;
}

.sticky-note {
    justify-self: end;
    width: 180px;
    padding: 26px 18px;
    background: #FFF0A7;
    color: #17172B;
    box-shadow: 0 12px 22px rgba(42, 28, 102, 0.18);
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-size: 18px;
    line-height: 1.35;
    text-align: center;
    transform: rotate(4deg);
}

.sticky-note::before {
    content: "";
    position: absolute;
    width: 76px;
    height: 17px;
    margin: -36px 0 0 42px;
    background: rgba(130, 84, 236, 0.35);
}

.about-section {
    display: block;
    grid-template-columns: none;
    gap: 0;
    width: 100%;
    padding: 6px 0 22px;
    max-width: none;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: "";
    position: absolute;
    left: max(12px, calc((100% - 1220px) / 2 - 72px));
    top: 18px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(131, 185, 88, 0.13);
    filter: blur(8px);
    pointer-events: none;
}

.about-section::after {
    content: "";
    position: absolute;
    right: max(18px, calc((100% - 1220px) / 2 - 44px));
    top: 28px;
    width: 84px;
    height: 84px;
    background-image: radial-gradient(rgba(107, 69, 238, 0.18) 2px, transparent 2px);
    background-size: 14px 14px;
    pointer-events: none;
}

.about-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 320px;
    align-items: start;
    gap: 42px;
    max-width: 1220px;
}

.about-photo-card {
    position: relative;
    width: 220px;
    height: 178px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-page);
    box-shadow: 0 16px 30px rgba(69, 103, 43, 0.16);
}

.about-photo-card img {
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 94%;
    height: 188px;
    object-fit: contain;
    object-position: bottom center;
    transform: translateX(-50%);
}

.about-spark {
    position: absolute;
    top: -16px;
    right: -15px;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #D8C8FF;
    color: #FFE04E;
    font-size: 30px;
    box-shadow: 0 10px 24px rgba(107, 69, 238, 0.18);
}

.about-copy h2 {
    color: var(--landing-ink);
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 16px;
}

.about-copy p {
    max-width: 590px;
    color: #565D7F;
    font-size: 14px;
    line-height: 1.7;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.about-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 14px;
    border-radius: 999px;
    background: #F0ECFF;
    color: var(--landing-purple);
    font-size: 12px;
    font-weight: 700;
}

.about-checklist {
    display: grid;
    gap: 14px;
    list-style: none;
    color: #272A3D;
    font-size: 14px;
}

.about-checklist li {
    position: relative;
    padding-left: 28px;
}

.about-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #89B85D;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    margin-bottom: 12px;
    padding: 5px 15px;
    border-radius: 999px;
    background: var(--landing-green-soft);
    color: #5E8E34;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.section-hero {
    position: relative;
    display: grid;
    justify-items: center;
    text-align: center;
    margin-bottom: 40px;
}

.section-hero h2,
.contacts-hero-copy h2 {
    color: var(--landing-ink);
    font-size: clamp(34px, 4vw, 50px);
    font-weight: 900;
    line-height: 1.08;
}

.section-underline {
    display: block;
    width: min(360px, 86%);
    height: 13px;
    margin: -2px 0 14px;
    background: var(--landing-yellow);
    clip-path: polygon(0 50%, 30% 34%, 72% 47%, 100% 35%, 99% 59%, 58% 57%, 21% 73%, 1% 63%);
}

.section-hero p,
.contacts-hero-copy p {
    max-width: 720px;
    color: #59607D;
    font-size: 17px;
    line-height: 1.55;
}

.section-hero .section-lead {
    margin-bottom: 6px;
    color: #545A79;
}

.section-doodle {
    position: absolute;
    pointer-events: none;
}

.section-star {
    left: 10%;
    top: 62px;
    color: var(--landing-purple);
    font-size: 72px;
    line-height: 1;
    transform: rotate(-12deg);
}

.section-rays {
    right: 24%;
    top: 18px;
    width: 58px;
    height: 54px;
    color: #FFBC00;
    background:
        linear-gradient(currentColor, currentColor) 6px 6px / 4px 32px no-repeat,
        linear-gradient(currentColor, currentColor) 30px 17px / 4px 28px no-repeat,
        linear-gradient(currentColor, currentColor) 49px 35px / 4px 22px no-repeat;
    transform: rotate(27deg);
}

.services-page-section {
    position: relative;
    padding: 58px 0 34px;
    overflow: hidden;
}

.services-page-section::before,
.services-page-section::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.services-page-section::before {
    left: max(16px, calc((100% - 1220px) / 2 - 70px));
    bottom: 12%;
    width: 122px;
    height: 122px;
    border: 4px solid rgba(107, 69, 238, 0.36);
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
    transform: rotate(-36deg);
}

.services-page-section::after {
    right: max(16px, calc((100% - 1220px) / 2 - 72px));
    top: 42%;
    width: 150px;
    height: 170px;
    background-image: radial-gradient(rgba(107, 69, 238, 0.18) 2px, transparent 2px);
    background-size: 15px 15px;
}

.service-pricing-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.service-price-card {
    --service-color: var(--landing-purple);
    display: grid;
    align-content: start;
    min-height: 372px;
    padding: 38px 32px 28px;
    border-top: 5px solid var(--service-color);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(42, 38, 74, 0.11);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-price-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 54px rgba(42, 38, 74, 0.16);
}

.service-price-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    margin-bottom: 24px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--service-color) 13%, #fff);
    color: var(--service-color);
}

.service-price-icon svg,
.contact-icon svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-price-card h3 {
    max-width: 270px;
    color: var(--landing-ink);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.32;
    margin-bottom: 14px;
}

.service-price-card p {
    max-width: 280px;
    color: #59607D;
    font-size: 15px;
    line-height: 1.65;
}

.service-price-card strong {
    display: block;
    margin-top: 30px;
    color: var(--service-color);
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
}

.service-price-note {
    display: block;
    margin-top: 8px;
    color: #59607D;
    font-size: 14px;
}

.service-price-button {
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 28px;
    border-radius: 12px;
    background: var(--service-color);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.service-price-purple {
    --service-color: var(--landing-purple);
}

.service-price-yellow {
    --service-color: #F5A400;
}

.service-price-green {
    --service-color: #64A83E;
}

.services-contact-panel {
    position: relative;
    z-index: 1;
    margin-top: 34px;
    padding: 34px 64px;
    border: 2px dashed rgba(107, 69, 238, 0.24);
    border-radius: 18px;
    background: rgba(249, 247, 255, 0.7);
}

.services-contact-title {
    display: grid;
    justify-items: center;
    text-align: center;
    margin-bottom: 28px;
}

.services-contact-title > span {
    color: var(--landing-purple);
    font-size: 30px;
    line-height: 1;
}

.services-contact-title h3 {
    color: var(--landing-ink);
    font-size: 22px;
    font-weight: 900;
    margin-top: 4px;
}

.services-contact-title p {
    max-width: 470px;
    margin-top: 8px;
    color: #59607D;
    font-size: 14px;
    line-height: 1.55;
}

.service-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.service-contact-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 4px 18px;
    min-height: 118px;
    padding: 18px 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(42, 38, 74, 0.07);
}

.service-contact-card .contact-icon {
    grid-row: span 3;
}

.service-contact-card strong {
    color: var(--landing-ink);
    font-size: 17px;
    font-weight: 900;
}

.service-contact-card span:not(.contact-icon) {
    color: var(--landing-purple);
    font-size: 14px;
    font-weight: 800;
}

.service-contact-card em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 28px;
    margin-top: 6px;
    padding: 0 12px;
    border-radius: 8px;
    background: #F1EDFF;
    color: var(--landing-purple);
    font-size: 12px;
    font-weight: 900;
    font-style: normal;
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 14px;
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
}

.contact-icon-vk {
    background: linear-gradient(135deg, #6DA8F1, #2F74D8);
}

.contact-icon-telegram {
    background: linear-gradient(135deg, #2FC5F2, #1B9BDC);
}

.contact-icon-phone {
    background: linear-gradient(135deg, #82C94C, #58A832);
}

.reviews-section {
    position: relative;
    padding: 58px 0 26px;
    overflow: hidden;
}

.reviews-section::after {
    content: "";
    position: absolute;
    right: max(18px, calc((100% - 1220px) / 2 - 54px));
    bottom: 26px;
    width: 118px;
    height: 150px;
    background-image: radial-gradient(rgba(107, 69, 238, 0.22) 2px, transparent 2px);
    background-size: 16px 16px;
    pointer-events: none;
}

.reviews-header {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 36px;
    margin-bottom: 24px;
}

.reviews-title {
    position: relative;
}

.reviews-title .section-badge {
    margin-bottom: 14px;
}

.reviews-title h2 {
    max-width: 640px;
    color: var(--landing-ink);
    font-size: 32px;
    font-weight: 900;
    line-height: 1.1;
}

.reviews-title p {
    max-width: 560px;
    margin-top: 6px;
    color: #30334D;
    font-size: 14px;
    font-weight: 700;
}

.reviews-underline {
    display: block;
    width: min(420px, 100%);
    height: 13px;
    margin-top: -2px;
    background: var(--landing-yellow);
    clip-path: polygon(0 50%, 30% 34%, 72% 47%, 100% 35%, 99% 59%, 58% 57%, 21% 73%, 1% 63%);
}

.reviews-doodle-star {
    position: absolute;
    right: -76px;
    top: 18px;
    color: #FFB900;
    font-size: 54px;
    line-height: 1;
    transform: rotate(14deg);
}

.reviews-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(96px, auto));
    gap: 30px;
    text-align: center;
}

.review-metric strong {
    display: block;
    color: var(--landing-purple);
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
}

.review-metric span {
    display: block;
    margin-top: 6px;
    color: #30334D;
    font-size: 13px;
    line-height: 1.35;
}

.review-metric:first-child::after {
    content: "★★★★★";
    display: block;
    margin-top: 7px;
    color: var(--landing-yellow);
    font-size: 17px;
    letter-spacing: 1px;
}

.reviews-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
}

.review-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 36px rgba(42, 38, 74, 0.09);
}

.review-card-compact::before {
    content: "”";
    position: absolute;
    right: 24px;
    top: 18px;
    color: var(--landing-purple);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.review-card-large {
    grid-column: span 6;
    min-height: 166px;
    padding: 24px 30px 22px 62px;
}

.review-card-compact {
    grid-column: span 3;
    min-height: 164px;
    padding: 22px 24px;
}

.review-quote {
    position: absolute;
    left: 30px;
    top: 18px;
    color: var(--landing-purple);
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}

.review-card p {
    color: #29304F;
    font-size: 14px;
    line-height: 1.65;
}

.review-card-compact p {
    font-size: 13px;
    line-height: 1.58;
}

.review-stars {
    color: var(--landing-yellow);
    font-size: 17px;
    letter-spacing: 2px;
    line-height: 1;
}

.review-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    margin-top: 2px;
}

.review-footer strong {
    min-width: 0;
    color: #30334D;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.review-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #105463;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.review-avatar-purple {
    background: #6D5BBB;
}

.review-avatar-ink {
    background: #2D3447;
}

.review-avatar-gray {
    background: #6C7280;
}

.review-avatar-berry {
    background: #8D4C75;
}

.review-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    margin-left: auto;
    padding: 4px 11px;
    border-radius: 8px;
    background: #EAF5DD;
    color: #5F8E35;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.review-tag-purple {
    background: #EEE9FF;
    color: var(--landing-purple);
}

.review-tag-blue {
    background: #E8EFFF;
    color: #496DD6;
}

.review-tag-yellow {
    background: #FFF0C8;
    color: #C37A00;
}

.reviews-button {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(280px, 100%);
    min-height: 44px;
    margin: 24px auto 0;
    border: 1px solid rgba(107, 69, 238, 0.44);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--landing-purple);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(42, 38, 74, 0.06);
}

.reviews-cta-section {
    margin-top: 0;
}

.contacts-page-section {
    position: relative;
    padding: 52px 0 8px;
    overflow: hidden;
}

.contacts-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.9fr);
    align-items: center;
    gap: 48px;
    margin-bottom: 40px;
}

.contacts-hero-copy h2 {
    margin-bottom: 0;
}

.contacts-hero-copy .section-underline {
    width: 280px;
}

.contacts-hero-copy p {
    margin-top: 6px;
}

.contacts-illustration {
    position: relative;
    min-height: 250px;
}

.message-bubble {
    position: absolute;
    left: 90px;
    top: 8px;
    display: grid;
    place-items: center;
    width: 142px;
    height: 90px;
    border-radius: 45px 45px 36px 36px;
    background: linear-gradient(135deg, #D9CCFF, #B79DFF);
    color: #fff;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 8px;
    box-shadow: 0 16px 34px rgba(107, 69, 238, 0.15);
}

.message-bubble::after {
    content: "";
    position: absolute;
    left: 34px;
    bottom: -18px;
    border: 18px solid transparent;
    border-top-color: #B79DFF;
    border-right-width: 7px;
}

.mail-circle {
    position: absolute;
    left: 114px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #FFF1C9;
    color: #F5A400;
    font-size: 44px;
    transform: rotate(-8deg);
}

.notebook {
    position: absolute;
    right: 44px;
    top: 66px;
    width: 142px;
    height: 144px;
    border: 6px solid #A58BFF;
    border-radius: 12px;
    background:
        repeating-linear-gradient(#fff 0 24px, #EDE7FF 25px 27px),
        #fff;
    transform: rotate(8deg);
    box-shadow: 0 16px 32px rgba(107, 69, 238, 0.14);
}

.notebook::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 16px;
    width: 16px;
    height: 94px;
    background: repeating-linear-gradient(#A58BFF 0 7px, transparent 7px 17px);
}

.pen {
    position: absolute;
    right: 54px;
    top: 82px;
    width: 18px;
    height: 126px;
    border-radius: 9px;
    background: linear-gradient(#7E5CF0 0 66%, #4F32C9 66% 84%, #FFE2A7 84%);
    transform: rotate(31deg);
    box-shadow: 0 12px 22px rgba(107, 69, 238, 0.22);
}

.contacts-dot-field {
    position: absolute;
    right: 0;
    bottom: 10px;
    width: 154px;
    height: 112px;
    background-image: radial-gradient(rgba(107, 69, 238, 0.22) 2px, transparent 2px);
    background-size: 15px 15px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.contact-card {
    display: grid;
    align-content: start;
    min-height: 270px;
    padding: 30px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 36px rgba(42, 38, 74, 0.09);
}

.contact-card h3 {
    margin-top: 20px;
    color: var(--landing-ink);
    font-size: 20px;
    font-weight: 900;
}

.contact-card strong {
    display: block;
    margin-top: 8px;
    color: var(--landing-purple);
    font-size: 15px;
    font-weight: 900;
}

.contact-card p {
    margin-top: 20px;
    color: #59607D;
    font-size: 14px;
    line-height: 1.6;
}

.contact-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    margin-top: 24px;
    border: 1px solid rgba(107, 69, 238, 0.35);
    border-radius: 9px;
    color: var(--landing-purple);
    font-size: 13px;
    font-weight: 900;
}

.contact-steps-panel {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0 22px;
    margin-top: 28px;
    padding: 30px;
    border: 1px solid rgba(107, 69, 238, 0.12);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(245, 241, 255, 0.92), rgba(255, 255, 255, 0.9));
    box-shadow: 0 14px 30px rgba(42, 38, 74, 0.06);
}

.contact-panel-icon,
.contact-help-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #F1EDFF;
    color: var(--landing-purple);
    font-size: 25px;
    font-weight: 900;
}

.contact-steps-panel h3 {
    color: var(--landing-ink);
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 20px;
}

.contact-steps-panel ol {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    list-style: none;
    counter-reset: contact-step;
}

.contact-steps-panel li {
    position: relative;
    counter-increment: contact-step;
    padding-top: 36px;
    color: #59607D;
    font-size: 14px;
    line-height: 1.55;
}

.contact-steps-panel li::before {
    content: counter(contact-step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    color: var(--landing-purple);
    font-size: 13px;
    font-weight: 900;
}

.contact-help-panel {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 20px;
    margin-top: 28px;
    padding: 32px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(237, 248, 231, 0.96), rgba(255, 255, 255, 0.9));
    box-shadow: 0 14px 30px rgba(42, 38, 74, 0.06);
}

.contact-help-icon {
    background: var(--landing-green-soft);
    color: #64A83E;
}

.contact-help-panel h3 {
    color: var(--landing-ink);
    font-size: 22px;
    font-weight: 900;
}

.contact-help-panel p {
    max-width: 800px;
    margin-top: 10px;
    color: #59607D;
    font-size: 14px;
    line-height: 1.55;
}

.contact-help-panel a,
.contact-help-panel button {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    margin-top: 18px;
    padding: 0 30px;
    border-radius: 10px;
    background: #64A83E;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.cta-section {
    position: relative;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 26px;
    min-height: 98px;
    margin-top: 2px;
    margin-bottom: 24px;
    padding: 22px 34px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 94% 78%, rgba(255, 220, 64, 0.18), transparent 18%),
        linear-gradient(135deg, #7655F0, #6544E4);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 18px 34px rgba(84, 62, 201, 0.2);
}

.cta-plane {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    color: #fff;
    transform: rotate(-8deg);
}

.cta-plane svg {
    width: 56px;
    height: 56px;
    stroke-width: 1.8;
}

.cta-copy h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 6px;
}

.cta-copy p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.cta-button {
    min-width: 292px;
    padding: 0 28px;
    background: var(--landing-yellow);
    color: #17172B;
    box-shadow: 0 12px 24px rgba(255, 199, 44, 0.22);
}

.contact-modal {
    width: min(430px, calc(100vw - 32px));
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: var(--landing-ink);
    overflow: visible;
}

.contact-modal::backdrop {
    background: rgba(20, 17, 43, 0.42);
    backdrop-filter: blur(5px);
}

.contact-modal-card {
    position: relative;
    padding: 30px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 10%, rgba(107, 69, 238, 0.12), transparent 34%),
        linear-gradient(135deg, #FFFDF8, #FFFFFF);
    box-shadow: 0 28px 70px rgba(33, 26, 75, 0.28);
}

.contact-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #F1EDFF;
    color: var(--landing-purple);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.contact-modal-head {
    display: grid;
    justify-items: center;
    text-align: center;
    padding: 8px 24px 22px;
}

.contact-modal-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7D59F5, #5C39DE);
    color: #fff;
    font-size: 25px;
    box-shadow: 0 12px 24px rgba(107, 69, 238, 0.22);
}

.contact-modal h2 {
    color: var(--landing-ink);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
}

.contact-modal p {
    margin-top: 8px;
    color: #59607D;
    font-size: 14px;
    line-height: 1.45;
}

.contact-modal-actions {
    display: grid;
    gap: 12px;
}

.contact-modal-actions a {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 10px 14px;
    border: 1px solid rgba(107, 69, 238, 0.12);
    border-radius: 15px;
    background: #fff;
    color: var(--landing-ink);
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(42, 38, 74, 0.06);
}

.contact-modal-actions .contact-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 13px;
    font-size: 15px;
}

@media (min-width: 901px) {
    .landing-hero h1 > span {
        white-space: nowrap;
    }
}

@media (max-width: 1100px) {
    .landing-header .landing-nav {
        grid-template-columns: minmax(190px, 1fr) auto;
    }

    .landing-menu {
        order: 3;
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: 100%;
        padding-bottom: 12px;
        overflow-x: auto;
    }

    .landing-header .landing-nav {
        height: auto;
        padding-top: 14px;
    }

    .landing-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
        gap: 20px;
    }

    .landing-hero-copy {
        padding-left: 18px;
    }

    .features-grid,
    .stats-grid {
        gap: 16px;
    }

    .feature-card {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .feature-arrow {
        display: none;
    }

    .reviews-grid {
        gap: 18px;
    }

    .review-card-compact {
        grid-column: span 6;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }

    .stats-script,
    .sticky-note {
        justify-self: start;
    }

    .sticky-note {
        width: 210px;
    }

    .about-grid {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 28px;
    }

    .about-checklist {
        grid-column: 2;
    }

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

    .service-price-card:last-child,
    .contact-card:last-child {
        grid-column: 1 / -1;
    }

    .services-contact-panel {
        padding: 30px;
    }

    .service-contact-grid {
        gap: 16px;
    }

    .contacts-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
        gap: 24px;
    }

    .contact-steps-panel ol {
        gap: 18px;
    }
}

@media (max-width: 900px) {
    .landing-header .landing-nav {
        display: flex;
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        gap: 14px;
        width: min(100% - 32px, 1220px);
        padding: 12px 0;
    }

    .landing-menu {
        display: none;
    }

    .landing-header-button {
        padding: 0 18px;
    }

    .landing-hero {
        padding-top: 28px;
    }

    .landing-hero-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .landing-hero-copy {
        padding: 8px 0 0;
    }

    .landing-hero-visual {
        min-height: 430px;
        width: min(620px, 100%);
        margin: 0 auto;
    }

    .hero-benefits,
    .features-grid,
    .service-pricing-grid,
    .service-contact-grid,
    .stats-grid,
    .about-grid,
    .contacts-hero-grid,
    .contacts-grid,
    .cta-section {
        grid-template-columns: 1fr;
    }

    .hero-benefits {
        max-width: 100%;
    }

    .feature-card {
        grid-template-columns: 58px minmax(0, 1fr) 22px;
    }

    .feature-arrow {
        display: block;
    }

    .stats-strip {
        padding: 26px;
    }

    .stat-item {
        border-left: 0;
        border-top: 1px dashed rgba(255, 255, 255, 0.28);
        padding: 18px 0 0;
    }

    .about-grid {
        align-items: start;
    }

    .reviews-header {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 20px;
    }

    .reviews-metrics {
        justify-self: start;
    }

    .reviews-doodle-star {
        right: 18px;
        top: 2px;
    }

    .about-photo-card {
        width: min(260px, 100%);
    }

    .about-checklist {
        grid-column: auto;
    }

    .service-price-card:last-child,
    .contact-card:last-child {
        grid-column: auto;
    }

    .section-star,
    .section-rays,
    .services-page-section::before,
    .services-page-section::after {
        display: none;
    }

    .contacts-illustration {
        min-height: 220px;
        width: min(430px, 100%);
        margin: 0 auto;
    }

    .contact-steps-panel {
        grid-template-columns: 1fr;
    }

    .contact-steps-panel ol {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .cta-section {
        justify-items: start;
    }
}

@media (max-width: 560px) {
    .landing-page {
        overflow-x: hidden;
    }

    .landing-container {
        width: min(1220px, calc(100vw - 28px));
    }

    .landing-brand-text small {
        display: none;
    }

    .landing-header-actions {
        gap: 8px;
    }

    .landing-login-button {
        min-height: 38px;
        padding: 0 14px;
    }

    .landing-header-button {
        display: none;
    }

    .landing-plane-button {
        display: grid;
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .landing-hero h1 {
        font-size: clamp(32px, 8.6vw, 36px);
        line-height: 1.04;
        max-width: 100%;
    }

    .landing-hero-grid,
    .landing-hero-copy {
        width: 100%;
        max-width: calc(100vw - 28px);
    }

    .hero-script {
        font-size: clamp(33px, 9vw, 38px);
        overflow-wrap: break-word;
    }

    .landing-hero-text {
        font-size: 14px;
        width: 100%;
        max-width: 330px;
        overflow-wrap: anywhere;
    }

    .landing-hero-actions,
    .hero-benefits {
        grid-template-columns: 1fr;
    }

    .landing-primary-button,
    .landing-secondary-button,
    .cta-button {
        width: 100%;
        min-width: 0;
    }

    .landing-hero-visual {
        min-height: 330px;
        width: 100%;
        max-width: calc(100vw - 28px);
        overflow: hidden;
    }

    .hero-photo {
        right: 2%;
        width: 96%;
        max-height: 375px;
    }

    .hero-blob {
        right: 0;
        bottom: 24px;
        height: 245px;
    }

    .hero-note {
        right: auto;
        left: min(190px, calc(100% - 176px));
        bottom: 28px;
        min-width: 0;
        width: 166px;
        padding: 16px 18px;
        font-size: 16px;
    }

    .hero-method-note {
        right: auto;
        left: 10px;
        bottom: 10px;
        max-width: 176px;
        padding: 8px 10px;
        font-size: 11px;
        line-height: 1.25;
    }

    .doodle-check,
    .doodle-arrow,
    .doodle-rays,
    .doodle-star {
        display: none;
    }

    .services-page-section,
    .contacts-page-section {
        padding-top: 38px;
    }

    .section-hero {
        justify-items: start;
        text-align: left;
        margin-bottom: 24px;
    }

    .section-hero h2,
    .contacts-hero-copy h2 {
        font-size: 32px;
    }

    .section-hero p,
    .contacts-hero-copy p {
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .section-underline,
    .contacts-hero-copy .section-underline {
        width: min(280px, 100%);
    }

    .service-pricing-grid,
    .service-contact-grid,
    .contacts-grid {
        gap: 14px;
    }

    .service-price-card {
        min-height: 0;
        padding: 24px 20px;
    }

    .service-price-card h3 {
        font-size: 21px;
        overflow-wrap: anywhere;
    }

    .service-price-card p,
    .service-price-note {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .service-price-card strong {
        font-size: 36px;
    }

    .service-price-button {
        min-height: 48px;
        text-align: center;
    }

    .services-contact-panel {
        padding: 22px 16px;
    }

    .services-contact-title h3,
    .contact-steps-panel h3,
    .contact-help-panel h3 {
        font-size: 20px;
    }

    .service-contact-card {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 16px;
    }

    .service-contact-card span:not(.contact-icon),
    .service-contact-card strong,
    .service-contact-card em {
        overflow-wrap: anywhere;
    }

    .contact-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 13px;
        font-size: 16px;
    }

    .contacts-illustration {
        min-height: 180px;
        transform: scale(0.84);
        transform-origin: top center;
        margin-bottom: -28px;
    }

    .contacts-grid {
        margin-top: 6px;
    }

    .contact-card,
    .contact-steps-panel,
    .contact-help-panel {
        padding: 20px;
    }

    .contact-card {
        min-height: 0;
    }

    .contact-card h3 {
        margin-top: 16px;
    }

    .contact-card p,
    .contact-steps-panel li,
    .contact-help-panel p {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .contact-card a,
    .contact-help-panel a,
    .contact-help-panel button {
        width: 100%;
        padding: 0 14px;
        white-space: normal;
        text-align: center;
    }

    .reviews-title h2 {
        width: 100%;
        max-width: 330px;
        font-size: 24px;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .reviews-doodle-star {
        display: none;
    }

    .reviews-header,
    .reviews-title {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .reviews-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
        max-width: 330px;
    }

    .review-metric strong {
        font-size: 27px;
    }

    .review-metric span {
        font-size: 11px;
        overflow-wrap: anywhere;
    }

    .review-metric:first-child::after {
        font-size: 13px;
        letter-spacing: 0;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .review-card-large,
    .review-card-compact {
        grid-column: 1;
        min-height: 0;
        padding: 20px;
    }

    .review-card-large {
        padding-left: 46px;
    }

    .review-quote {
        left: 20px;
        top: 18px;
        font-size: 26px;
    }

    .review-card p {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .review-footer {
        flex-wrap: wrap;
    }

    .review-footer strong {
        flex: 1 1 calc(100% - 48px);
    }

    .review-tag {
        margin-left: 44px;
        white-space: normal;
    }

    .feature-card {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 16px;
        padding: 18px;
    }

    .feature-card h2,
    .feature-card p {
        max-width: 230px;
        overflow-wrap: anywhere;
    }

    .feature-icon {
        width: 46px;
        height: 46px;
    }

    .feature-arrow {
        display: none;
    }

    .stats-strip {
        border-radius: 12px;
        padding: 22px;
    }

    .about-copy h2,
    .cta-copy h2 {
        font-size: 25px;
    }

    .about-grid,
    .about-copy,
    .about-copy p,
    .about-tags,
    .about-checklist {
        width: 100%;
        max-width: 320px;
    }

    .about-copy p,
    .about-checklist li,
    .about-tags span {
        overflow-wrap: anywhere;
    }

    .about-tags {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-tags span {
        max-width: 100%;
        white-space: normal;
        line-height: 1.25;
    }

    .cta-section {
        gap: 14px;
        width: min(1220px, calc(100vw - 28px));
        max-width: calc(100vw - 28px);
        padding: 22px;
        overflow: hidden;
    }

    .cta-copy,
    .cta-copy h2,
    .cta-copy p {
        width: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .cta-copy h2 {
        font-size: 22px;
        line-height: 1.15;
    }

    .cta-button {
        min-height: 50px;
        padding: 0 16px;
        white-space: normal;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-page *,
    .landing-page *::before,
    .landing-page *::after,
    .landing-skip-link {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Maria: personal homework audience and lesson-review mode */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.homework-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.homework-setting-card { min-width: 0; padding: 22px; border: 1px solid rgba(127, 29, 45, .14); border-radius: 20px; background: linear-gradient(160deg, #fff, #fff9f7); box-shadow: 0 12px 28px rgba(75, 16, 28, .05); }
.homework-setting-heading { margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.homework-setting-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: white; background: var(--lemba-wine); font-weight: 900; }
.homework-setting-icon.answers { color: #775106; background: #fff0c4; }
.homework-setting-heading h2 { margin: 0 0 3px; font-size: 18px; }
.homework-setting-heading p { margin: 0; color: var(--lemba-muted); font-size: 12px; }
.homework-choice-group { margin: 0; padding: 0; display: grid; gap: 9px; border: 0; }
.homework-choice-option { position: relative; padding: 13px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 11px; border: 1px solid #eadfd7; border-radius: 14px; cursor: pointer; }
.homework-choice-option:hover { border-color: #d5b4b9; }
.homework-choice-option:has(input:checked) { border-color: var(--lemba-wine); background: #fff5f5; box-shadow: 0 0 0 3px rgba(127, 29, 45, .06); }
.homework-choice-option > input, .homework-student-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.homework-choice-option:has(input:focus-visible), .homework-student-option:has(input:focus-visible) { outline: 3px solid rgba(127, 29, 45, .2); outline-offset: 2px; }
.homework-choice-mark { width: 20px; height: 20px; border: 2px solid #cdbdc0; border-radius: 50%; }
.homework-choice-option input:checked + .homework-choice-mark { border: 6px solid var(--lemba-wine); }
.homework-choice-option > span:last-child { min-width: 0; display: grid; gap: 3px; }
.homework-choice-option strong { font-size: 14px; }
.homework-choice-option small { color: var(--lemba-muted); font-size: 12px; line-height: 1.35; }
.homework-student-picker { margin-top: 16px; padding-top: 15px; display: grid; gap: 10px; border-top: 1px solid #eadfd7; }
.homework-student-picker[hidden] { display: none; }
.homework-student-picker-title { font-size: 13px; }
.homework-student-options { max-height: 350px; padding-right: 3px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.homework-student-option { position: relative; min-width: 0; padding: 10px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 22px; align-items: center; gap: 9px; border: 1px solid #eadfd7; border-radius: 13px; cursor: pointer; }
.homework-student-option:has(input:checked) { border-color: #5a906f; background: #f1f8f3; }
.homework-student-option .admin-student-avatar { width: 38px; height: 38px; }
.homework-student-name { min-width: 0; display: grid; gap: 2px; }
.homework-student-name strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.homework-student-name small { color: var(--lemba-muted); font-size: 10px; }
.homework-student-check { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #cdbdc0; border-radius: 7px; color: transparent; font-size: 12px; font-weight: 900; }
.homework-student-option input:checked ~ .homework-student-check { border-color: #477c5d; color: white; background: #477c5d; }
.format-option.is-disabled { opacity: .5; cursor: not-allowed; }
.pdf-import-note[hidden] { display: none !important; }

@media (max-width: 900px) {
    .homework-settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .homework-setting-card { padding: 17px; }
    .homework-student-options { grid-template-columns: 1fr; }
}

/* Maria: parent account management */
.parent-management-page { max-width: 1320px; }
.parent-management-hero { margin-bottom: 22px; padding: 30px 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; border-radius: 25px; color: white; background: linear-gradient(125deg, var(--lemba-wine-dark), var(--lemba-wine)); box-shadow: 0 20px 48px rgba(75, 16, 28, .15); }
.parent-management-hero > div:first-child > span, .parent-panel-title > span, .parent-list-heading > div > span { font-size: 10px; font-weight: 850; letter-spacing: .15em; }
.parent-management-hero h1 { margin: 7px 0; font: 600 38px Georgia, serif; }
.parent-management-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.72); }
.parent-management-stat { min-width: 105px; padding: 15px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.08); text-align: center; }
.parent-management-stat strong { display: block; font: 700 28px Georgia, serif; }
.parent-management-stat span { color: rgba(255,255,255,.7); font-size: 11px; }
.parent-management-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); align-items: start; gap: 20px; }
.parent-create-panel, .parent-list-panel { border: 1px solid #eadfd7; border-radius: 23px; background: white; box-shadow: 0 12px 34px rgba(65, 31, 37, .05); }
.parent-create-panel { padding: 28px; }
.parent-list-panel { position: sticky; top: 18px; overflow: hidden; }
.parent-panel-title { margin-bottom: 24px; }
.parent-panel-title > span, .parent-list-heading > div > span { color: var(--lemba-wine); }
.parent-panel-title h2, .parent-list-heading h2 { margin: 5px 0 6px; font: 600 28px Georgia, serif; }
.parent-panel-title p { margin: 0; color: var(--lemba-muted); font-size: 13px; }
.parent-create-form { display: grid; gap: 16px; }
.parent-form-step { min-width: 0; margin: 0; padding: 22px; border: 1px solid #eadfd7; border-radius: 18px; background: #fffdfb; }
.parent-form-step > header { margin-bottom: 18px; display: flex; align-items: center; gap: 13px; }
.parent-form-step > header > b, .parent-submit-step > div > b { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 12px; color: white; background: var(--lemba-wine); font-size: 14px; }
.parent-form-step header h3 { margin: 0 0 3px; font: 600 21px Georgia, serif; }
.parent-form-step header p { margin: 0; color: var(--lemba-muted); font-size: 12px; }
.parent-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.parent-field-wide { grid-column: 1 / -1; }
.parent-password-field { position: relative; display: block; }
.parent-password-field input { width: 100%; padding-right: 82px !important; }
.parent-password-field button { position: absolute; top: 50%; right: 8px; padding: 6px 8px; border: 0; border-radius: 7px; color: var(--lemba-wine); background: #f7e5e7; cursor: pointer; transform: translateY(-50%); font-size: 11px; font-weight: 750; }
.parent-selected-count { margin-left: auto; padding: 7px 10px; border-radius: 999px; color: var(--lemba-muted); background: #f3eeeb; font-size: 11px; font-weight: 800; white-space: nowrap; }
.parent-selected-count.has-selection { color: #276749; background: #e7f6ed; }
.parent-student-step.has-error { border-color: var(--red-text); box-shadow: 0 0 0 3px rgba(163, 45, 45, .08); }
.parent-student-search { height: 44px; margin-bottom: 12px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border: 1px solid #dfd2ca; border-radius: 13px; background: white; }
.parent-student-search span { color: var(--lemba-muted); font-size: 22px; line-height: 1; }
.parent-student-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; }
.parent-student-grid { max-height: 355px; padding-right: 3px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.parent-student-card { position: relative; min-width: 0; padding: 12px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 23px; align-items: center; gap: 10px; border: 1px solid #e7dbd4; border-radius: 14px; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.parent-student-card[hidden] { display: none; }
.parent-student-card:hover { border-color: #d3b2b7; transform: translateY(-1px); }
.parent-student-card.is-selected { border-color: var(--lemba-wine); background: #fff5f5; }
.parent-student-card input { position: absolute; opacity: 0; pointer-events: none; }
.parent-student-card:has(input:focus-visible) { outline: 3px solid rgba(127, 29, 45, .2); outline-offset: 2px; }
.parent-student-card .admin-student-avatar { width: 42px; height: 42px; }
.parent-student-card > span:nth-of-type(2) { min-width: 0; display: grid; gap: 3px; }
.parent-student-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.parent-student-card small { color: var(--lemba-muted); font-size: 10px; }
.parent-student-card i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #d7c9c2; border-radius: 7px; color: transparent; font-style: normal; font-size: 11px; font-weight: 900; }
.parent-student-card.is-selected i { border-color: var(--lemba-wine); color: white; background: var(--lemba-wine); }
.parent-student-no-results { margin: 0; padding: 18px; border-radius: 12px; color: var(--lemba-muted); background: #f8f3ef; text-align: center; }
.parent-submit-step { padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 18px; color: white; background: var(--lemba-ink); }
.parent-submit-step > div { display: flex; align-items: center; gap: 12px; }
.parent-submit-step > div > b { color: var(--lemba-wine); background: white; }
.parent-submit-step span { display: grid; gap: 2px; }
.parent-submit-step small { color: rgba(255,255,255,.62); }
.parent-submit-step .button { min-width: 180px; border-color: var(--lemba-wine); background: var(--lemba-wine); }
.parent-list-heading { padding: 25px 25px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eee3dc; }
.parent-list-heading h2 { margin-bottom: 0; }
.parent-list-heading > b { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--lemba-wine); background: #f7e5e7; }
.parent-list-panel .parent-empty { padding: 42px 25px; display: grid; gap: 6px; text-align: center; }
.parent-list-panel .parent-empty strong { color: var(--lemba-ink); }
.parent-account-list { max-height: 680px; overflow-y: auto; }
.parent-account-card { padding: 16px 20px; display: grid; grid-template-columns: 45px minmax(0, 1fr) 32px; align-items: start; gap: 11px; border-bottom: 1px solid #eee3dc; }
.parent-account-card:last-child { border-bottom: 0; }
.parent-account-main { min-width: 0; display: grid; gap: 3px; }
.parent-account-main > small { color: var(--lemba-muted); font-size: 11px; }
.parent-linked-students { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.parent-linked-students span { padding: 4px 7px; border-radius: 999px; color: #6e2632; background: #f8e9eb; font-size: 10px; font-weight: 700; }
.parent-delete-button { width: 30px; height: 30px; border: 0; border-radius: 9px; color: #a32d2d; background: #fcebeb; cursor: pointer; font-size: 19px; }
.lesson-review-note { align-self: start; }
.lesson-review-note h2 { margin: 12px 0; font: 600 25px Georgia, serif; }
.lesson-review-note p { color: var(--lemba-muted); line-height: 1.6; }

@media (max-width: 1050px) {
    .parent-management-grid { grid-template-columns: 1fr; }
    .parent-list-panel { position: static; }
}
@media (max-width: 650px) {
    .parent-management-hero { padding: 24px; align-items: flex-start; flex-direction: column; }
    .parent-management-hero h1 { font-size: 31px; }
    .parent-management-stat { min-width: 0; text-align: left; }
    .parent-create-panel { padding: 18px 14px; }
    .parent-form-step { padding: 17px 13px; }
    .parent-fields-grid, .parent-student-grid { grid-template-columns: 1fr; }
    .parent-field-wide { grid-column: auto; }
    .parent-form-step > header { align-items: flex-start; flex-wrap: wrap; }
    .parent-selected-count { margin-left: 49px; }
    .parent-submit-step { align-items: stretch; flex-direction: column; }
    .parent-submit-step .button { width: 100%; }
}

@media (max-width: 420px) {
    .landing-header .landing-nav {
        width: min(100% - 24px, 1220px);
        gap: 10px;
    }

    .landing-brand-text {
        display: none;
    }
}

.admin-shell {
    --admin-bg: #FFFDF8;
    --admin-ink: #11142E;
    --admin-muted: #687089;
    --admin-line: rgba(83, 74, 183, 0.13);
    --admin-purple: #6B45EE;
    --admin-purple-dark: #4F31CD;
    --admin-purple-soft: #F1EDFF;
    --admin-amber: #FF9900;
    --admin-amber-soft: #FFF5DD;
    --admin-green: #73B84B;
    --admin-green-soft: #EDF8E7;
    --admin-shadow: 0 22px 54px rgba(42, 38, 74, 0.08);
    background:
        linear-gradient(rgba(107, 69, 238, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 69, 238, 0.025) 1px, transparent 1px),
        var(--admin-bg);
    background-size: 64px 64px;
    color: var(--admin-ink);
}

.admin-shell > nav {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto minmax(240px, 1fr);
    height: 74px;
    padding: 0 34px;
    border-bottom: 1px solid rgba(50, 43, 91, 0.1);
    background: rgba(255, 253, 249, 0.94);
    backdrop-filter: blur(14px);
}

.admin-shell .brand {
    justify-self: start;
    gap: 12px;
}

.admin-shell .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    background: linear-gradient(135deg, #9274FF, var(--admin-purple));
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(107, 69, 238, 0.22);
}

.admin-shell .brand-copy {
    display: grid;
    gap: 2px;
}

.admin-shell .brand-copy strong {
    color: var(--admin-ink);
    font-size: 15px;
    font-weight: 800;
}

.admin-shell .brand-copy small {
    color: var(--admin-muted);
    font-size: 12px;
}

.admin-shell .nav-tabs {
    justify-self: center;
    gap: 8px;
}

.admin-shell .nav-tabs a {
    min-height: 42px;
    padding: 10px 20px;
    border-radius: 12px;
    color: #5D6278;
    font-size: 15px;
    font-weight: 700;
}

.admin-shell .nav-tabs a:hover,
.admin-shell .nav-tabs a.is-active {
    background: var(--admin-purple-soft);
    color: var(--admin-purple);
}

.admin-shell .logout-form {
    justify-self: end;
    gap: 12px;
}

.admin-shell .role-badge {
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid rgba(107, 69, 238, 0.12);
    background: var(--admin-purple-soft);
    color: var(--admin-purple);
    font-size: 13px;
    font-weight: 800;
}

.admin-shell .logout-form button {
    min-height: 38px;
    padding: 8px 16px;
    border-color: rgba(49, 43, 91, 0.12);
    border-radius: 12px;
    background: #fff;
    color: var(--admin-ink);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(42, 38, 74, 0.04);
}

.admin-dashboard,
.homework-builder {
    width: min(1360px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.admin-hero-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px 240px;
    align-items: center;
    gap: 26px;
    min-height: 188px;
    padding: 34px 38px;
    border: 1px solid rgba(107, 69, 238, 0.1);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(245, 241, 255, 0.96), rgba(255, 255, 255, 0.9)),
        #fff;
    box-shadow: var(--admin-shadow);
    overflow: hidden;
}

.admin-eyebrow,
.builder-eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--admin-purple);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.admin-hero-card h1,
.homework-builder-hero h1 {
    color: var(--admin-ink);
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 0;
}

.admin-hero-card p,
.homework-builder-hero p {
    max-width: 660px;
    margin-top: 12px;
    color: var(--admin-muted);
    font-size: 15px;
}

.admin-hero-actions {
    display: grid;
    gap: 12px;
    justify-items: stretch;
}

.admin-primary-action,
.admin-secondary-action,
.admin-outline-action,
.builder-add-question,
.builder-back-link,
.builder-save-button,
.builder-cancel-button,
.builder-add-option,
.builder-after-save a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.admin-primary-action,
.builder-add-question,
.builder-save-button {
    border: 0;
    background: linear-gradient(135deg, #7D59F5, var(--admin-purple-dark));
    color: #fff;
    box-shadow: 0 14px 30px rgba(107, 69, 238, 0.24);
}

.admin-secondary-action,
.admin-outline-action,
.builder-back-link,
.builder-cancel-button,
.builder-after-save a {
    border: 1px solid rgba(107, 69, 238, 0.32);
    background: rgba(255, 255, 255, 0.82);
    color: var(--admin-purple);
}

.admin-hero-illustration {
    position: relative;
    height: 128px;
}

.admin-notebook {
    position: absolute;
    left: 68px;
    top: 8px;
    width: 104px;
    height: 116px;
    border-radius: 14px 18px 18px 14px;
    background:
        repeating-linear-gradient(180deg, transparent 0 18px, rgba(107, 69, 238, 0.11) 19px 21px),
        #fff;
    border: 1px solid rgba(107, 69, 238, 0.16);
    box-shadow: 0 16px 30px rgba(107, 69, 238, 0.13);
    transform: rotate(-8deg);
}

.admin-notebook::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 14px;
    width: 14px;
    height: 84px;
    border-radius: 999px;
    border: 5px solid #8B70F2;
    border-right: 0;
}

.admin-pencil,
.admin-pencil.small {
    position: absolute;
    border-radius: 999px;
    background: linear-gradient(90deg, #8B70F2, #5E3FDC);
    box-shadow: 0 10px 18px rgba(107, 69, 238, 0.22);
}

.admin-pencil {
    left: 146px;
    top: 26px;
    width: 14px;
    height: 104px;
    transform: rotate(34deg);
}

.admin-pencil.small {
    left: 220px;
    top: 64px;
    width: 10px;
    height: 70px;
    background: linear-gradient(90deg, #FFB12A, #FF9900);
    transform: rotate(-4deg);
}

.admin-star {
    position: absolute;
    color: #FFBD43;
    font-size: 20px;
}

.admin-star.one {
    right: 82px;
    top: 14px;
}

.admin-star.two {
    right: 30px;
    top: 56px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 26px 0 22px;
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 140px;
    padding: 26px;
    border: 1px solid var(--admin-line);
    border-top-color: rgba(107, 69, 238, 0.42);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(42, 38, 74, 0.06);
}

.admin-stat-card.amber {
    border-top-color: rgba(255, 153, 0, 0.48);
}

.admin-stat-card.green {
    border-top-color: rgba(115, 184, 75, 0.52);
}

.admin-stat-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 50%;
    background: var(--admin-purple-soft);
    color: var(--admin-purple);
    font-size: 26px;
    font-weight: 900;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
    line-height: 1;
}

.admin-stat-icon svg {
    width: 34px;
    height: 34px;
    overflow: visible;
    fill: #fff !important;
    stroke: rgba(255, 255, 255, .95) !important;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-stat-icon svg .accent-stroke {
    fill: none;
    stroke: #fff !important;
    stroke-width: 4;
}

.admin-stat-letter {
    color: #fff !important;
    font-family: inherit;
    font-size: 25px;
    font-weight: 950;
    letter-spacing: -.04em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

.admin-stat-letter.wide { font-size: 18px; letter-spacing: -.08em; }
.admin-stat-letter.check { font-size: 31px; }

.admin-stat-card:nth-child(1) .admin-stat-icon {
    background: linear-gradient(145deg, #6f45e8, #9a7bff);
    color: #fff;
    transform: rotate(-3deg);
}

.admin-stat-card:nth-child(2) .admin-stat-icon {
    background: linear-gradient(145deg, #f08a1c, #ffc253);
    color: #fff;
    transform: rotate(3deg);
}

.admin-stat-card:nth-child(3) .admin-stat-icon {
    background: linear-gradient(145deg, #4f9d47, #83ca65);
    color: #fff;
    transform: rotate(-2deg);
}

.admin-stat-card:nth-child(4) .admin-stat-icon {
    background: linear-gradient(145deg, #4e77d8, #7da5ff);
    color: #fff;
    transform: rotate(2deg);
}

.admin-stat-card.amber .admin-stat-icon {
    background: linear-gradient(145deg, #f08a1c, #ffc253);
    color: #fff;
}

.admin-stat-card.green .admin-stat-icon {
    background: linear-gradient(145deg, #4f9d47, #83ca65);
    color: #fff;
}

.admin-stat-card.mixed .admin-stat-icon {
    background: linear-gradient(145deg, #4e77d8, #7da5ff);
    color: #fff;
}

.admin-stat-card strong {
    display: block;
    color: var(--admin-ink);
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}

.admin-stat-card span,
.admin-stat-card small {
    display: block;
}

.admin-stat-card span {
    margin-top: 6px;
    color: #5D6278;
    font-size: 15px;
    font-weight: 700;
}

.admin-stat-card small {
    margin-top: 10px;
    color: var(--admin-green);
    font-size: 13px;
    font-weight: 800;
}

.admin-stat-card .admin-stat-icon.admin-stat-letter {
    display: grid;
    place-items: center;
    margin-top: 0;
    color: #fff;
    font-family: inherit;
    font-size: 25px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -.04em;
    text-align: center;
}

.admin-stat-card .admin-stat-icon.admin-stat-letter.wide {
    font-size: 18px;
    letter-spacing: -.08em;
}

.admin-stat-card .admin-stat-icon.admin-stat-letter.check {
    font-size: 31px;
}

.admin-stat-card.amber small {
    color: var(--admin-amber);
}

.admin-stat-card.green small,
.admin-stat-card.mixed small {
    color: var(--admin-muted);
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.admin-main-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.admin-side-column {
    display: grid;
    align-content: start;
    gap: 22px;
}

.admin-card-section,
.admin-tip-card,
.homework-builder-form,
.homework-builder-hero,
.builder-after-save {
    border: 1px solid rgba(49, 43, 91, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 38px rgba(42, 38, 74, 0.06);
}

.admin-card-section {
    min-height: 210px;
    padding: 24px;
}

.admin-card-section.students,
.admin-card-section.materials {
    min-height: 245px;
}

.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.admin-section-head h2,
.admin-tip-card h2,
.builder-after-save h2 {
    color: var(--admin-ink);
    font-size: 18px;
    font-weight: 900;
}

.admin-section-head a {
    color: var(--admin-purple);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-student-list,
.admin-homework-list,
.admin-material-list,
.admin-activity-list,
.admin-action-list {
    display: grid;
    gap: 12px;
}

.admin-student-row,
.admin-homework-row,
.admin-material-row,
.admin-activity-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(49, 43, 91, 0.08);
}

.admin-student-row:last-child,
.admin-homework-row:last-child,
.admin-material-row:last-child,
.admin-activity-row:last-child {
    border-bottom: 0;
}

.admin-student-avatar,
.admin-material-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: var(--admin-purple-soft);
    color: var(--admin-purple);
    font-size: 14px;
    font-weight: 900;
}

.admin-student-avatar,
.student-directory-avatar,
.person-avatar {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.admin-student-avatar svg,
.student-directory-avatar svg,
.person-avatar svg {
    position: absolute;
    inset: 5px 5px -5px;
    width: calc(100% - 10px);
    height: calc(100% - 2px);
    fill: rgba(255, 255, 255, .88) !important;
    z-index: 0;
}

.admin-student-avatar b,
.student-directory-avatar b,
.person-avatar b {
    position: absolute;
    right: 2px;
    bottom: 2px;
    min-width: 19px;
    padding: 2px 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #fff;
    color: #4d3678;
    font-size: 9px;
    line-height: 1.1;
    text-align: center;
    z-index: 1;
}

.avatar-tone-0 { background: linear-gradient(145deg, #7554c7, #9a7ce8) !important; }
.avatar-tone-1 { background: linear-gradient(145deg, #e77b91, #f3a9b7) !important; }
.avatar-tone-2 { background: linear-gradient(145deg, #3f9b8c, #75c5b7) !important; }
.avatar-tone-3 { background: linear-gradient(145deg, #d88a32, #f0b76e) !important; }
.avatar-tone-4 { background: linear-gradient(145deg, #477cc4, #79a6e3) !important; }

.essay-student-avatar.person-avatar {
    background: linear-gradient(145deg, #7554c7, #a78ce8);
    color: #fff;
}

.admin-student-row strong,
.admin-homework-row strong,
.admin-material-row strong,
.admin-activity-row strong {
    display: block;
    color: var(--admin-ink);
    font-size: 15px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-student-row span,
.admin-student-row small,
.admin-homework-row span,
.admin-material-row span,
.admin-activity-row span {
    display: block;
    color: var(--admin-muted);
    font-size: 13px;
}

.admin-student-row small {
    white-space: nowrap;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.admin-status.pending {
    background: var(--admin-amber-soft);
    color: #C77400;
}

.admin-status.done {
    background: var(--admin-green-soft);
    color: #3F8125;
}

.admin-empty-state {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
    min-height: 140px;
    color: var(--admin-muted);
    text-align: center;
}

.admin-empty-state.compact {
    min-height: 96px;
}

.admin-empty-state strong {
    color: #555D76;
    font-size: 15px;
    font-weight: 800;
}

.admin-empty-state p,
.admin-empty-state span,
.admin-tip-card p,
.admin-card-section.support p {
    color: var(--admin-muted);
    font-size: 14px;
}

.admin-empty-icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: var(--admin-purple-soft);
    color: var(--admin-purple);
    font-size: 30px;
}

.admin-empty-icon.amber {
    background: var(--admin-amber-soft);
    color: var(--admin-amber);
}

.admin-empty-icon.green {
    background: var(--admin-green-soft);
    color: var(--admin-green);
}

.admin-outline-action.full {
    width: 100%;
}

.admin-action-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(49, 43, 91, 0.1);
    border-radius: 12px;
    background: #fff;
    color: var(--admin-ink);
    font-size: 14px;
    font-weight: 800;
}

.admin-action-list span {
    color: var(--admin-purple);
    font-size: 24px;
    line-height: 1;
}

.admin-tip-card {
    padding: 24px;
    background: linear-gradient(135deg, rgba(241, 237, 255, 0.96), rgba(255, 255, 255, 0.94));
}

.admin-card-section.support {
    display: grid;
    gap: 14px;
    min-height: 0;
}

.admin-activity-chart {
    position: relative;
    height: 92px;
    margin-bottom: 16px;
    border: 1px solid rgba(49, 43, 91, 0.08);
    border-radius: 16px;
    background:
        linear-gradient(180deg, transparent 32%, rgba(107, 69, 238, 0.08) 33%, transparent 34%),
        linear-gradient(180deg, transparent 66%, rgba(107, 69, 238, 0.08) 67%, transparent 68%),
        #fff;
    overflow: hidden;
}

.admin-activity-chart span {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 22px;
    height: 46px;
    border: solid rgba(107, 69, 238, 0.42);
    border-width: 2px 0 0;
    border-radius: 52% 48% 0 0;
    transform: skewX(-20deg);
}

.homework-builder {
    width: min(1220px, calc(100vw - 48px));
}

.homework-builder-hero {
    position: relative;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 210px;
    padding: 36px 40px;
    border-top: 5px solid var(--admin-amber);
}

.builder-hero-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--admin-amber-soft);
}

.builder-clipboard {
    width: 50px;
    height: 64px;
    border: 2px solid #AA93FF;
    border-radius: 10px;
    background:
        repeating-linear-gradient(180deg, transparent 0 14px, rgba(107, 69, 238, 0.15) 15px 17px),
        #fff;
    box-shadow: 0 10px 22px rgba(107, 69, 238, 0.12);
}

.builder-clipboard::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 42px;
    width: 28px;
    height: 14px;
    border-radius: 9px 9px 5px 5px;
    background: var(--admin-purple);
}

.builder-pen {
    position: absolute;
    right: 20px;
    bottom: 18px;
    width: 12px;
    height: 56px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8B70F2, #5E3FDC);
    transform: rotate(38deg);
}

.builder-eyebrow {
    color: #F08A00;
}

.builder-back-link {
    min-width: 170px;
    padding: 0 22px;
}

.homework-builder-form {
    display: grid;
    gap: 26px;
    margin-top: 24px;
    padding: 36px 40px;
    border-radius: 22px;
}

.builder-field {
    display: grid;
    gap: 12px;
}

.builder-field > span,
.builder-options-label {
    color: var(--admin-ink);
    font-size: 16px;
    font-weight: 900;
}

.builder-field > span small {
    color: var(--admin-muted);
    font-size: 14px;
    font-weight: 600;
}

.builder-field input[type="text"],
.builder-field input[type="file"],
.builder-field textarea,
.builder-option-row input[type="text"] {
    width: 100%;
    min-height: 58px;
    border: 1px solid rgba(49, 43, 91, 0.18);
    border-radius: 13px;
    background: #fff;
    color: var(--admin-ink);
    font-size: 15px;
    padding: 14px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.builder-field input[type="file"] {
    padding: 16px;
    cursor: pointer;
}

.builder-field textarea {
    min-height: 118px;
    resize: vertical;
}

.builder-field input:focus,
.builder-field textarea:focus,
.builder-option-row input[type="text"]:focus {
    border-color: var(--admin-purple);
    outline: 3px solid rgba(107, 69, 238, 0.12);
}

.builder-questions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.builder-title-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.builder-title-line h2 {
    color: var(--admin-ink);
    font-size: 20px;
    font-weight: 900;
}

.question-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--admin-purple-soft);
    color: var(--admin-purple);
    font-size: 14px;
    font-weight: 900;
}

.builder-questions-head p {
    margin-top: 8px;
    color: var(--admin-muted);
    font-size: 15px;
}

.builder-add-question {
    min-width: 216px;
    padding: 0 24px;
}

.builder-questions-list {
    gap: 20px;
}

.builder-question-card {
    display: grid;
    gap: 22px;
    padding: 24px;
    border: 1px solid rgba(107, 69, 238, 0.1);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(246, 243, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.builder-question-header {
    display: grid;
    grid-template-columns: 20px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.builder-drag-handle {
    color: #8D94AA;
    font-size: 18px;
    letter-spacing: 0;
}

.builder-question-index {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--admin-purple);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.builder-question-header h3 {
    color: var(--admin-ink);
    font-size: 18px;
    font-weight: 900;
}

.builder-remove-button,
.builder-remove-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid rgba(214, 55, 55, 0.16);
    border-radius: 12px;
    background: #fff;
    color: #D63737;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.builder-remove-button {
    padding: 0 16px;
}

.builder-options-block {
    display: grid;
    gap: 12px;
}

.builder-options-list {
    gap: 10px;
}

.builder-option-row {
    display: grid;
    grid-template-columns: 22px 44px minmax(0, 1fr) auto 48px;
    align-items: center;
    gap: 10px;
}

.builder-option-row input[type="radio"] {
    width: 21px;
    height: 21px;
    accent-color: var(--admin-purple);
}

.builder-option-letter {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--admin-purple-soft);
    color: var(--admin-purple);
    font-size: 16px;
    font-weight: 900;
}

.builder-correct-badge {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #DDF8E6;
    color: #208348;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.builder-option-row.is-correct .builder-correct-badge,
.builder-option-row:has([data-option-radio]:checked) .builder-correct-badge {
    display: inline-flex;
}

.builder-remove-option {
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.builder-add-option {
    justify-self: start;
    min-height: 44px;
    padding: 0 18px;
    border: 1px dashed rgba(107, 69, 238, 0.58);
    background: rgba(255, 255, 255, 0.72);
    color: var(--admin-purple);
}

.builder-hint {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid rgba(255, 153, 0, 0.42);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 245, 221, 0.96), rgba(255, 255, 255, 0.9));
}

.builder-hint > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--admin-amber);
    color: var(--admin-amber);
    font-weight: 900;
}

.builder-hint strong {
    display: block;
    color: var(--admin-ink);
    font-size: 15px;
    font-weight: 900;
}

.builder-hint p {
    margin-top: 4px;
    color: var(--admin-muted);
    font-size: 14px;
}

.builder-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    padding-top: 8px;
}

.builder-cancel-button,
.builder-save-button {
    min-width: 190px;
    padding: 0 24px;
}

.builder-save-button {
    min-width: 320px;
}

.builder-after-save {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
    padding: 26px 34px;
    background: linear-gradient(135deg, rgba(241, 237, 255, 0.98), rgba(255, 255, 255, 0.94));
}

.builder-after-icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--admin-purple-soft);
    color: var(--admin-purple);
    font-size: 30px;
    font-weight: 900;
}

.builder-after-save p {
    margin-top: 8px;
    color: var(--admin-muted);
    font-size: 15px;
}

.builder-after-save a {
    min-width: 220px;
    padding: 0 22px;
}

@media (max-width: 1120px) {
    .admin-shell > nav {
        grid-template-columns: minmax(220px, 1fr) auto;
        height: auto;
        gap: 12px;
        padding: 14px 24px;
    }

    .admin-shell .nav-tabs {
        order: 3;
        grid-column: 1 / -1;
        justify-self: center;
    }

    .admin-hero-card {
        grid-template-columns: minmax(0, 1fr) 220px;
    }

    .admin-hero-illustration {
        display: none;
    }

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

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

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

    .admin-card-section.events,
    .admin-card-section.quick {
        min-height: 100%;
    }

    .homework-builder-hero {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .builder-back-link {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .admin-dashboard,
    .homework-builder {
        width: min(100vw - 28px, 1360px);
        padding: 20px 0 34px;
    }

    .admin-shell > nav {
        display: flex;
        align-items: stretch;
        flex-direction: column;
    }

    .admin-shell .brand,
    .admin-shell .logout-form,
    .admin-shell .nav-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .admin-shell .nav-tabs {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .admin-hero-card,
    .homework-builder-hero,
    .homework-builder-form,
    .builder-after-save,
    .admin-card-section {
        border-radius: 18px;
        padding: 22px;
    }

    .admin-hero-card,
    .homework-builder-hero,
    .builder-after-save {
        grid-template-columns: 1fr;
    }

    .admin-hero-card h1,
    .homework-builder-hero h1 {
        font-size: 27px;
    }

    .admin-hero-actions,
    .admin-main-column,
    .admin-side-column,
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-student-row,
    .admin-homework-row,
    .admin-material-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-student-row small,
    .admin-status {
        grid-column: 2;
        justify-self: start;
    }

    .builder-questions-head,
    .builder-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .builder-add-question,
    .builder-cancel-button,
    .builder-save-button,
    .builder-back-link,
    .builder-after-save a {
        width: 100%;
        min-width: 0;
    }

    .builder-question-header {
        grid-template-columns: 20px 38px minmax(0, 1fr);
    }

    .builder-remove-button {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .builder-option-row {
        grid-template-columns: 22px 42px minmax(0, 1fr) 44px;
    }

    .builder-correct-badge {
        grid-column: 3 / 4;
        justify-self: start;
    }
}

@media (max-width: 460px) {
    .admin-shell .brand-copy {
        display: none;
    }

    .admin-shell .logout-form {
        flex-wrap: wrap;
    }

    .builder-hero-icon {
        width: 82px;
        height: 82px;
    }

    .builder-option-row {
        grid-template-columns: 22px 38px minmax(0, 1fr);
    }

    .builder-remove-option {
        grid-column: 3;
        justify-self: end;
    }

    .builder-correct-badge {
        grid-column: 1 / -1;
    }
}

.student-area {
    --student-ink: #11132B;
    --student-muted: #596179;
    --student-purple: #6B45EE;
    --student-purple-dark: #5130D4;
    --student-purple-soft: #F1EDFF;
    --student-amber: #FFB21F;
    --student-amber-soft: #FFF4DE;
    --student-green: #74B84B;
    --student-green-soft: #EDF8E7;
    --student-line: rgba(124, 58, 237, 0.05);
    --student-border: rgba(49, 43, 91, 0.1);
    --student-shadow: 0 20px 46px rgba(42, 38, 74, 0.1);
    min-height: 100vh;
    color: var(--student-ink);
    background:
        radial-gradient(circle at 6% 70%, rgba(255, 199, 44, 0.16), transparent 21rem),
        radial-gradient(circle at 88% 22%, rgba(107, 69, 238, 0.14), transparent 25rem),
        radial-gradient(circle at 84% 84%, rgba(116, 184, 75, 0.13), transparent 18rem),
        linear-gradient(var(--student-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--student-line) 1px, transparent 1px),
        #FFFDF8;
    background-size: auto, auto, auto, 56px 56px, 56px 56px, auto;
}

.student-area > nav {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) auto minmax(210px, 1fr);
    align-items: center;
    height: 68px;
    padding: 0 max(24px, calc((100% - 1360px) / 2));
    background: rgba(255, 253, 248, 0.94);
    border-bottom: 1px solid rgba(54, 48, 100, 0.1);
    backdrop-filter: blur(16px);
}

.student-area > nav .brand {
    justify-self: start;
}

.student-area > nav .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    background: radial-gradient(circle at 30% 24%, #9E7BFF, var(--student-purple) 68%, #4327B9);
    box-shadow: 0 10px 22px rgba(107, 69, 238, 0.22);
    font-size: 13px;
    font-weight: 800;
}

.student-area .nav-tabs {
    justify-self: center;
    gap: 28px;
}

.student-area .nav-tabs a {
    position: relative;
    min-height: 42px;
    padding: 9px 4px;
    border-radius: 0;
    color: #181A2E;
    font-size: 15px;
    font-weight: 700;
}

.student-area .nav-tabs a:hover {
    background: transparent;
    color: var(--student-purple);
}

.student-area .nav-tabs a.is-active {
    background: transparent;
    color: var(--student-purple-dark);
}

.student-area .nav-tabs a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: var(--student-purple);
}

.student-area .logout-form {
    justify-self: end;
    gap: 14px;
}

.student-area .role-badge.student {
    min-height: 34px;
    padding: 7px 18px;
    background: #EAF7DF;
    color: #327321;
    font-size: 14px;
    font-weight: 700;
}

.student-area .logout-form button {
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid rgba(31, 35, 59, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #17172B;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(26, 24, 54, 0.05);
}

.student-area .page,
.student-area .student-content {
    width: min(1360px, calc(100% - 48px));
    max-width: 1360px;
    margin: 0 auto;
    padding: 34px 0 44px;
}

.student-page {
    position: relative;
}

.student-decor {
    position: fixed;
    z-index: 0;
    pointer-events: none;
}

.decor-dot-field {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(rgba(107, 69, 238, 0.18) 2px, transparent 2px);
    background-size: 16px 16px;
}

.decor-dot-field-left {
    left: 42px;
    top: 52%;
}

.decor-dot-field-right {
    right: 34px;
    top: 16%;
}

.decor-star {
    color: rgba(255, 178, 31, 0.88);
    font-size: 50px;
    line-height: 1;
}

.decor-star-left {
    left: 82px;
    top: 20%;
}

.decor-squiggle {
    width: 74px;
    height: 74px;
    border: 5px solid rgba(107, 69, 238, 0.3);
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
}

.decor-squiggle-left {
    left: 96px;
    top: 34%;
    transform: rotate(28deg);
}

.decor-squiggle-right {
    right: 98px;
    bottom: 18%;
    transform: rotate(-34deg);
}

.student-page > :not(.student-decor) {
    position: relative;
    z-index: 1;
}

.student-area .dashboard-top,
.student-area .student-dashboard-grid,
.student-area .student-card-grid,
.student-area .homework-layout,
.student-area .resource-panel,
.student-area .resource-hero,
.student-area .card,
.student-area .dashboard-welcome,
.student-area .dashboard-next-lesson {
    min-width: 0;
    max-width: 100%;
}

.student-area .card,
.resource-hero,
.resource-panel,
.dashboard-welcome,
.dashboard-next-lesson,
.how-card,
.side-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--student-border);
    border-radius: 24px;
    box-shadow: var(--student-shadow);
}

.dashboard-top {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(360px, 1fr);
    gap: 34px;
    margin-bottom: 26px;
}

.dashboard-welcome {
    position: relative;
    overflow: hidden;
    min-height: 236px;
    padding: 34px 36px;
    background:
        radial-gradient(circle at 92% 18%, rgba(107, 69, 238, 0.13), transparent 12rem),
        linear-gradient(135deg, rgba(244, 239, 255, 0.96), rgba(255, 255, 255, 0.9));
}

.dashboard-welcome h1 {
    color: var(--student-ink);
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 12px;
}

.dashboard-welcome p,
.dashboard-next-lesson p,
.resource-hero p,
.resource-empty p,
.side-card p,
.student-empty-state p,
.student-empty-inline p,
.how-card p {
    color: var(--student-muted);
    font-size: 16px;
    line-height: 1.55;
}

.welcome-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.metric-tile {
    display: grid;
    grid-template-columns: 52px auto;
    align-items: center;
    column-gap: 14px;
    min-height: 86px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(47, 41, 91, 0.06);
}

.metric-icon {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 21px;
}

.metric-purple .metric-icon {
    background: var(--student-purple-soft);
    color: var(--student-purple);
}

.metric-amber .metric-icon {
    background: var(--student-amber-soft);
    color: var(--student-amber);
}

.metric-green .metric-icon {
    background: var(--student-green-soft);
    color: var(--student-green);
}

.metric-tile strong {
    color: var(--student-ink);
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
}

.metric-tile span:last-child {
    color: #40465E;
    font-size: 15px;
}

.welcome-smile {
    position: absolute;
    right: 36px;
    top: 34px;
    width: 64px;
    height: 64px;
    border: 4px solid rgba(107, 69, 238, 0.38);
    border-top-color: transparent;
    border-left-color: transparent;
    border-radius: 50%;
    transform: rotate(42deg);
}

.dashboard-next-lesson {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    align-items: center;
    min-height: 236px;
    padding: 34px;
}

.dashboard-next-lesson .mini-label,
.resource-hero .panel-tag {
    color: var(--student-purple);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.dashboard-next-lesson strong {
    display: block;
    margin: 10px 0 26px;
    color: var(--student-ink);
    font-size: 22px;
    font-weight: 900;
}

.calendar-illustration {
    position: relative;
    justify-self: end;
    width: 138px;
    height: 116px;
    border-radius: 20px;
    background:
        linear-gradient(#B9A4FF 0 32px, #F2EEFF 32px),
        repeating-linear-gradient(90deg, transparent 0 20px, rgba(107, 69, 238, 0.12) 20px 32px);
    box-shadow: inset 0 -12px 0 rgba(107, 69, 238, 0.08);
}

.calendar-illustration::before,
.calendar-illustration::after {
    content: "";
    position: absolute;
    top: -12px;
    width: 11px;
    height: 31px;
    border-radius: 8px;
    background: #B9A4FF;
}

.calendar-illustration::before {
    left: 28px;
}

.calendar-illustration::after {
    right: 28px;
}

.calendar-illustration span {
    position: absolute;
    right: -16px;
    bottom: -12px;
    width: 58px;
    height: 58px;
    border: 5px solid #B9A4FF;
    border-radius: 50%;
    background: #fff;
}

.calendar-illustration span::before,
.calendar-illustration span::after {
    content: "";
    position: absolute;
    left: 27px;
    top: 14px;
    width: 4px;
    height: 19px;
    border-radius: 999px;
    background: #B9A4FF;
    transform-origin: bottom center;
}

.calendar-illustration span::after {
    height: 15px;
    transform: rotate(90deg);
}

.student-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
}

.student-dashboard-main {
    min-width: 0;
}

.student-area .student-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.student-area .student-card {
    min-height: 290px;
    padding: 28px;
    border-radius: 22px;
}

.student-area .card-accent,
.student-area .card-strip {
    height: 5px;
}

.student-area .card-accent.purple,
.student-area .card-strip.purple {
    background: var(--student-purple);
}

.student-area .card-accent.amber,
.student-area .card-strip.amber {
    background: var(--student-amber);
}

.student-area .card-accent.green {
    background: var(--student-green);
}

.student-area .card-head {
    align-items: flex-start;
    margin-bottom: 22px;
}

.student-area .card-head h2,
.quick-access h2,
.events-card h2,
.help-card h2,
.how-card h2,
.resource-panel h2,
.side-card h2 {
    color: var(--student-ink);
    font-size: 22px;
    font-weight: 900;
}

.student-area .card-head p {
    color: var(--student-muted);
    font-size: 16px;
}

.student-area .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 27px;
}

.student-area .icon-purple {
    background: var(--student-purple-soft);
    color: var(--student-purple);
}

.student-area .icon-amber {
    background: var(--student-amber-soft);
    color: var(--student-amber);
}

.student-area .icon-green {
    background: var(--student-green-soft);
    color: var(--student-green);
}

.student-empty-state {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 170px;
    text-align: center;
}

.student-empty-state strong,
.student-empty-inline strong {
    color: var(--student-ink);
    font-size: 18px;
    font-weight: 900;
}

.student-empty-state p,
.student-empty-inline p,
.student-area .card p,
.resource-empty p {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.empty-visual {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 22px;
    font-size: 36px;
    background: #F3EEFF;
    color: var(--student-purple);
}

.empty-folder {
    background: var(--student-amber-soft);
}

.student-area .lesson-surface,
.student-area .progress-tile,
.student-area .quick-grid a {
    background: rgba(246, 243, 255, 0.76);
    border-radius: 16px;
}

.student-area .lesson-surface {
    padding: 18px;
}

.student-area .lesson-surface h3 {
    font-size: 17px;
    font-weight: 800;
}

.student-area .lesson-surface p,
.student-area .card-note {
    font-size: 14px;
}

.student-area .progress-tiles {
    gap: 18px;
}

.student-area .progress-tile {
    padding: 22px;
    background: var(--student-green-soft);
}

.student-area .progress-tile strong {
    font-size: 34px;
    font-weight: 900;
}

.student-area .progress-track {
    height: 8px;
    background: rgba(58, 54, 91, 0.08);
}

.student-area .progress-fill {
    background: var(--student-green);
}

.student-sidebar {
    display: grid;
    align-content: start;
    gap: 20px;
}

.student-sidebar .card {
    padding: 24px;
}

.student-area .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.student-area .quick-grid a {
    min-height: 104px;
    justify-content: center;
    font-size: 15px;
}

.student-area .quick-icon {
    color: var(--student-purple);
    font-size: 32px;
}

.student-empty-inline {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 12px 18px;
    align-items: center;
    min-height: 118px;
}

.student-empty-inline > span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--student-purple-soft);
    color: var(--student-purple);
    font-size: 30px;
}

.help-card {
    display: grid;
    gap: 12px;
    background: linear-gradient(135deg, rgba(237, 248, 231, 0.95), rgba(255, 255, 255, 0.95));
}

.help-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--student-green-soft);
    color: var(--student-green);
    font-weight: 900;
}

.how-card {
    padding: 28px;
}

.how-card .section-title {
    margin-bottom: 18px;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.how-grid article {
    min-height: 120px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(49, 43, 91, 0.08);
}

.how-grid h3 {
    margin: 12px 0 8px;
    color: var(--student-ink);
    font-size: 17px;
    font-weight: 900;
}

.how-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 23px;
}

.how-icon.purple {
    background: var(--student-purple-soft);
    color: var(--student-purple);
}

.how-icon.amber {
    background: var(--student-amber-soft);
    color: var(--student-amber);
}

.how-icon.green {
    background: var(--student-green-soft);
    color: var(--student-green);
}

.resource-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 300px;
    align-items: center;
    min-height: 210px;
    margin-bottom: 24px;
    padding: 42px 48px;
    border-top: 6px solid var(--student-purple);
}

.resource-hero-amber {
    border-top-color: var(--student-amber);
}

.resource-hero h1 {
    color: var(--student-ink);
    font-size: 42px;
    font-weight: 900;
    margin: 14px 0 12px;
}

.resource-admin-action {
    position: relative;
    z-index: 2;
    justify-self: end;
}

.resource-illustration {
    position: relative;
    width: 260px;
    height: 160px;
    justify-self: end;
}

.folder-illustration .folder-back {
    position: absolute;
    right: 10px;
    bottom: 16px;
    width: 138px;
    height: 106px;
    border-radius: 18px;
    background: linear-gradient(135deg, #FFD761, #FFB52F);
    transform: rotate(9deg);
}

.folder-illustration .folder-front {
    position: absolute;
    right: 46px;
    bottom: 0;
    width: 150px;
    height: 104px;
    border-radius: 18px 18px 22px 22px;
    background: linear-gradient(135deg, #A58BFF, #6B45EE);
    box-shadow: 0 16px 28px rgba(107, 69, 238, 0.2);
}

.folder-illustration .paper {
    position: absolute;
    right: 72px;
    top: 8px;
    width: 88px;
    height: 104px;
    border-radius: 12px;
    background: #F6F2FF;
    box-shadow: 0 10px 24px rgba(107, 69, 238, 0.1);
}

.folder-illustration .paper::before,
.folder-illustration .paper::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    height: 7px;
    border-radius: 999px;
    background: #B8A6FF;
}

.folder-illustration .paper::before {
    top: 28px;
}

.folder-illustration .paper::after {
    top: 50px;
}

.folder-illustration .paper-two {
    right: 110px;
    top: 26px;
    transform: rotate(-6deg);
    opacity: 0.8;
}

.folder-illustration .download-bubble {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B9A4FF, #7251EA);
    color: #fff;
    font-size: 42px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(107, 69, 238, 0.24);
}

.homework-illustration .homework-blob {
    position: absolute;
    inset: 24px 20px 10px 26px;
    border-radius: 45% 55% 42% 58%;
    background: rgba(107, 69, 238, 0.1);
}

.homework-illustration .tablet {
    position: absolute;
    right: 72px;
    top: 20px;
    width: 92px;
    height: 118px;
    border-radius: 18px;
    background: #F6F2FF;
    border: 9px solid #9E86FF;
    box-shadow: 0 16px 28px rgba(107, 69, 238, 0.18);
}

.homework-illustration .tablet::before {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    top: -19px;
    height: 18px;
    border-radius: 10px 10px 2px 2px;
    background: #FFB21F;
}

.homework-illustration .tablet::after {
    content: "✓\A✓\A✓";
    white-space: pre;
    position: absolute;
    left: 18px;
    top: 20px;
    color: #FFB21F;
    font-weight: 900;
    line-height: 24px;
}

.homework-illustration .pencil {
    position: absolute;
    right: 36px;
    bottom: 28px;
    width: 24px;
    height: 98px;
    border-radius: 12px;
    background: linear-gradient(#7E5CF0 0 58%, #FFB21F 58% 84%, #FFE7AE 84%);
    transform: rotate(32deg);
    box-shadow: 0 12px 22px rgba(107, 69, 238, 0.18);
}

.resource-panel {
    overflow: hidden;
    padding: 0;
}

.resource-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 34px 0;
}

.resource-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    height: 50px;
    padding: 0 18px;
    border: 1px solid rgba(49, 43, 91, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--student-muted);
}

.resource-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--student-ink);
    font-size: 15px;
}

.filter-tabs {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 34px;
    border-bottom: 1px solid rgba(49, 43, 91, 0.08);
    overflow-x: auto;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 20px;
    border: 1px solid rgba(49, 43, 91, 0.14);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--student-ink);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.filter-tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #7D59F5, #5C39DE);
    color: #fff;
    box-shadow: 0 12px 24px rgba(107, 69, 238, 0.24);
}

.resource-empty {
    position: relative;
    display: grid;
    place-items: center;
    gap: 18px;
    min-height: 420px;
    margin: 24px 34px 34px;
    padding: 48px 24px;
    border: 2px dashed rgba(107, 69, 238, 0.24);
    border-radius: 22px;
    text-align: center;
}

.resource-empty h3 {
    color: var(--student-ink);
    font-size: 26px;
    font-weight: 900;
}

.resource-empty p {
    max-width: 560px;
}

.empty-blob-icon {
    display: grid;
    place-items: center;
    width: 122px;
    height: 122px;
    border-radius: 50%;
    background: var(--student-purple-soft);
    color: var(--student-purple);
    font-size: 54px;
    box-shadow: 0 15px 34px rgba(107, 69, 238, 0.12);
}

.resource-hint,
.new-homework-note {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    max-width: 700px;
    padding: 14px 24px;
    border-radius: 15px;
    background: rgba(241, 237, 255, 0.82);
    color: #5B5772;
    font-size: 15px;
    font-weight: 700;
}

.resource-list {
    padding: 24px 34px 34px;
}

.student-area .material-card,
.student-area .homework-card {
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 14px;
    border-color: rgba(49, 43, 91, 0.09);
    box-shadow: 0 12px 24px rgba(42, 38, 74, 0.06);
}

.student-area .material-type-icon,
.student-area .homework-type-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 24px;
}

.student-area .mat-name,
.student-area .hw-name {
    color: var(--student-ink);
    font-size: 17px;
    font-weight: 900;
}

.student-area .mat-sub,
.student-area .hw-meta,
.student-area .a-time {
    color: var(--student-muted);
    font-size: 14px;
}

.homework-completion-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(83, 74, 183, .14);
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.homework-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.homework-list-panel {
    min-height: 550px;
}

.sort-select {
    min-height: 46px;
    padding: 8px 40px 8px 16px;
    border: 1px solid rgba(49, 43, 91, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--student-ink);
    font-size: 15px;
    font-weight: 700;
}

.homework-empty {
    min-height: 392px;
    border: 0;
}

.new-homework-note {
    background: linear-gradient(135deg, #7D59F5, #5C39DE);
    color: #fff;
    box-shadow: 0 12px 24px rgba(107, 69, 238, 0.24);
}

.homework-sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}

.side-card {
    padding: 26px;
}

.how-work-card {
    background: linear-gradient(135deg, rgba(245, 241, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.how-work-card ol {
    display: grid;
    gap: 20px;
    margin-top: 22px;
    list-style: none;
    counter-reset: homework-step;
}

.how-work-card li {
    position: relative;
    padding-left: 44px;
    counter-increment: homework-step;
}

.how-work-card li::before {
    content: counter(homework-step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--student-purple);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.how-work-card strong {
    display: block;
    color: var(--student-ink);
    font-size: 15px;
    font-weight: 900;
}

.how-work-card span {
    display: block;
    margin-top: 4px;
    color: var(--student-muted);
    font-size: 14px;
    line-height: 1.45;
}

.tip-card {
    background: linear-gradient(135deg, rgba(255, 244, 222, 0.95), rgba(255, 255, 255, 0.92));
}

.contact-card {
    background: linear-gradient(135deg, rgba(237, 248, 231, 0.95), rgba(255, 255, 255, 0.92));
}

.side-card .btn-secondary {
    margin-top: 14px;
    min-height: 46px;
    border: 0;
    background: #fff;
    box-shadow: 0 10px 22px rgba(42, 38, 74, 0.06);
}

@media (max-width: 1180px) {
    .student-dashboard-grid,
    .homework-layout {
        grid-template-columns: 1fr;
    }

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

    .dashboard-top,
    .resource-hero {
        grid-template-columns: 1fr;
    }

    .resource-illustration,
    .resource-admin-action {
        justify-self: start;
    }
}

@media (max-width: 900px) {
    .student-area > nav {
        grid-template-columns: auto 1fr;
        height: auto;
        padding: 12px 18px;
        gap: 12px;
    }

    .student-area .nav-tabs {
        order: 3;
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: flex-start;
        gap: 18px;
        overflow-x: auto;
    }

    .student-area .logout-form {
        justify-self: end;
        grid-column: 2;
        width: auto;
        justify-content: flex-end;
    }

    .student-area .nav-actions {
        justify-self: end;
        grid-column: 2;
    }

    .student-area .student-content,
    .student-area .page {
        width: min(calc(100% - 28px), 1360px);
        padding-top: 22px;
    }

    .dashboard-top,
    .student-area .student-card-grid,
    .how-grid,
    .student-sidebar,
    .homework-sidebar,
    .welcome-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-next-lesson {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .calendar-illustration {
        justify-self: start;
    }

    .resource-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .resource-search {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .student-area > nav .brand-mark {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .student-area .nav-tabs a {
        font-size: 14px;
    }

    .student-area .logout-form {
        gap: 8px;
        width: auto;
        justify-content: flex-end;
        justify-self: start;
    }

    .student-area .nav-actions {
        gap: 7px;
    }

    .student-area .history-navigation {
        gap: 2px;
        padding: 2px;
    }

    .student-area .history-navigation button {
        width: 28px;
        height: 28px;
    }

    .student-area .logout-form button {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .student-area .role-badge.student {
        min-height: 30px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .student-area .logout-form button {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 13px;
    }

    .dashboard-welcome,
    .dashboard-next-lesson,
    .resource-hero,
    .resource-panel-head,
    .filter-tabs,
    .resource-list,
    .how-card,
    .side-card,
    .student-sidebar .card,
    .student-area .student-card {
        padding-left: 18px;
        padding-right: 18px;
    }

    .dashboard-welcome h1,
    .resource-hero h1 {
        font-size: 30px;
    }

    .dashboard-next-lesson,
    .dashboard-welcome {
        min-height: 0;
    }

    .metric-tile {
        grid-template-columns: 44px auto;
        padding: 14px;
    }

    .student-area .student-empty-state p,
    .student-area .student-empty-inline p {
        max-width: 260px;
    }

    .resource-hero {
        min-height: 0;
        padding-top: 30px;
        padding-bottom: 24px;
    }

    .resource-illustration {
        transform: scale(0.8);
        transform-origin: left center;
        margin-top: -16px;
        margin-bottom: -18px;
    }

    .filter-tabs {
        gap: 10px;
    }

    .filter-tab {
        min-height: 40px;
        padding: 8px 14px;
        font-size: 14px;
    }

    .resource-empty {
        min-height: 360px;
        margin: 18px;
        padding: 34px 18px;
    }

    .student-area .material-card,
    .student-area .homework-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .student-area .mat-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .decor-dot-field,
    .decor-squiggle,
    .decor-star {
        display: none;
    }
}

/* Calm student cabinet: one clear hierarchy, no duplicate panels */
.student-area .dashboard-top {
    display: block;
    margin-bottom: 22px;
}

.student-area .dashboard-welcome {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(470px, 1.15fr);
    align-items: center;
    gap: 36px;
    min-height: 170px;
    padding: 28px 32px;
}

.student-area .dashboard-welcome h1 {
    margin-bottom: 8px;
    font-size: 31px;
}

.student-area .welcome-metrics {
    gap: 12px;
    margin-top: 0;
}

.student-area .metric-tile {
    grid-template-columns: 42px auto;
    min-height: 72px;
    padding: 14px;
}

.student-area .metric-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
}

.student-area .metric-tile strong {
    font-size: 26px;
}

.student-area .metric-tile span:last-child {
    font-size: 13px;
}

.student-area .welcome-smile {
    display: none;
}

.student-area .student-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.student-area .student-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 18px;
}

.student-area .student-card {
    min-height: 0;
    padding: 24px;
}

.student-area .student-card-links {
    grid-column: 1 / -1;
}

.student-area .student-card-links .lesson-link-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-area .student-card-homeworks .card-icon,
.student-area .student-card-material .card-icon {
    display: none;
}

.cabinet-card-link {
    margin-left: auto;
    padding: 9px 12px;
    border-radius: 10px;
    background: #f1edff;
    color: #5d3bdd;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.cabinet-card-link:hover {
    background: #e6dfff;
}

.student-area .student-sidebar {
    display: block;
}

.student-area .student-sidebar .help-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 16px;
    padding: 20px 24px;
}

.student-area .help-card .help-icon {
    grid-column: 1;
    grid-row: 1 / 3;
}

.student-area .help-card h2 {
    grid-column: 2;
    grid-row: 1;
    font-size: 18px;
}

.student-area .help-card p {
    grid-column: 2;
    grid-row: 2;
    font-size: 14px;
}

.student-area .help-card .btn-secondary {
    grid-column: 3;
    grid-row: 1 / 3;
    width: auto;
    min-width: 210px;
}

@media (max-width: 900px) {
    .student-area .dashboard-welcome,
    .student-area .student-card-grid {
        grid-template-columns: 1fr;
    }

    .student-area .welcome-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .student-area .student-card-links {
        grid-column: auto;
    }

    .student-area .student-card-links .lesson-link-list {
        grid-template-columns: 1fr;
    }

    .student-area .student-sidebar .help-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .student-area .help-card .btn-secondary {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        margin-top: 12px;
    }
}

@media (max-width: 620px) {
    .student-area .dashboard-welcome {
        gap: 22px;
        padding: 22px 18px;
    }

    .student-area .welcome-metrics {
        grid-template-columns: 1fr;
    }

    .cabinet-card-link {
        padding: 8px;
        font-size: 12px;
    }
}

/* Essay writing and review */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.essay-page {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 64px;
}

.essay-page h1,
.essay-page h2,
.essay-page p {
    margin-top: 0;
}

.essay-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .11em;
}

.essay-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
    padding: 32px 36px;
    border: 1px solid rgba(83, 74, 183, .12);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 20%, rgba(137, 122, 255, .2), transparent 34%),
        linear-gradient(135deg, #fff 0%, #f6f3ff 100%);
    box-shadow: 0 18px 46px rgba(47, 39, 108, .08);
}

.essay-hero h1 {
    margin-bottom: 8px;
    color: #211c45;
    font-size: clamp(30px, 4vw, 46px);
}

.essay-hero p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.essay-primary-action {
    flex: 0 0 auto;
    min-height: 50px;
}

.essay-queue-count {
    display: grid;
    min-width: 150px;
    padding: 20px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(67, 52, 143, .12);
    text-align: center;
}

.essay-queue-count strong {
    color: var(--accent);
    font-size: 38px;
    line-height: 1;
}

.essay-queue-count span {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.essay-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.essay-list-card,
.essay-admin-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    color: inherit;
    box-shadow: 0 8px 24px rgba(29, 25, 66, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.essay-list-card:hover,
.essay-admin-row:hover {
    transform: translateY(-2px);
    border-color: rgba(83, 74, 183, .3);
    box-shadow: 0 14px 34px rgba(39, 32, 92, .1);
}

.essay-card-icon,
.essay-student-avatar {
    display: grid;
    flex: 0 0 48px;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 22px;
    font-weight: 900;
}

.essay-list-card.is-reviewed .essay-card-icon {
    background: var(--green-bg);
    color: var(--green-text);
}

.essay-card-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.essay-card-copy small,
.essay-card-copy span {
    color: var(--text-secondary);
    font-size: 13px;
}

.essay-card-copy strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.essay-card-status,
.essay-detail-status {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.essay-card-status.pending,
.essay-detail-status.pending {
    background: var(--amber-bg);
    color: var(--amber-text);
}

.essay-card-status.reviewed,
.essay-detail-status.reviewed {
    background: var(--green-bg);
    color: var(--green-text);
}

.essay-card-status.draft {
    background: var(--blue-bg);
    color: var(--blue-text);
}

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

[data-essay-row][hidden] {
    display: none !important;
}

.essay-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.essay-filter-bar > span {
    margin: 0 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.essay-filter-bar button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.essay-filter-bar button:hover,
.essay-filter-bar button.is-active {
    background: var(--accent-light);
    color: var(--accent);
}

.essay-filter-bar small {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(83, 74, 183, .1);
    color: inherit;
    font-size: 11px;
}

.essay-filter-empty {
    display: grid;
    justify-items: center;
    padding: 44px 20px;
    border: 1px dashed rgba(83, 74, 183, .25);
    border-radius: 18px;
    color: var(--text-secondary);
    text-align: center;
}

.essay-filter-empty[hidden] {
    display: none;
}

.essay-filter-empty > span {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 28px;
}

.essay-filter-empty strong {
    color: var(--text-primary);
}

.essay-filter-empty p {
    margin: 4px 0 0;
}

.essay-admin-row {
    min-height: 88px;
}

.essay-admin-row .essay-card-copy {
    flex: 1;
}

.essay-empty {
    display: grid;
    justify-items: center;
    padding: 70px 24px;
    border: 1px dashed rgba(83, 74, 183, .25);
    border-radius: 24px;
    background: rgba(255, 255, 255, .75);
    text-align: center;
}

.essay-empty > span {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 32px;
}

.essay-empty h2 {
    margin-bottom: 8px;
}

.essay-empty p {
    margin-bottom: 22px;
    color: var(--text-secondary);
}

.essay-write-page {
    max-width: 1060px;
}

.essay-write-card,
.essay-reviewed-text-card,
.essay-original-text-card,
.essay-review-text-card,
.essay-criteria-results {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 42px rgba(31, 28, 65, .07);
}

.essay-write-head,
.essay-section-head,
.essay-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.essay-write-head {
    margin-bottom: 24px;
}

.essay-write-head h1 {
    margin-bottom: 7px;
    font-size: 36px;
}

.essay-write-head p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.essay-word-meter {
    display: grid;
    min-width: 104px;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--amber-bg);
    color: var(--amber-text);
    text-align: center;
}

.essay-word-meter.is-ready {
    background: var(--green-bg);
    color: var(--green-text);
}

.essay-word-meter strong {
    font-size: 27px;
    line-height: 1;
}

.essay-word-meter span {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 800;
}

.essay-title-field {
    margin-bottom: 18px;
}

.essay-title-field span,
.essay-text-field > span {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.essay-title-field small {
    color: var(--text-secondary);
    font-weight: 500;
}

.essay-text-field textarea {
    min-height: 520px;
    padding: 24px;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    background: #fcfcfe;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    line-height: 1.8;
    resize: vertical;
}

.essay-write-note,
.essay-short-warning {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--amber-bg);
    color: var(--amber-text);
    font-size: 14px;
}

.essay-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.essay-detail-head {
    align-items: center;
    margin-bottom: 22px;
}

.essay-detail-head h1 {
    margin: 10px 0 7px;
    font-size: clamp(28px, 4vw, 40px);
}

.essay-detail-head p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.essay-back-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.essay-pending-card {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff8e9, #fff);
    border: 1px solid rgba(239, 159, 39, .24);
}

.essay-pending-card > span {
    font-size: 34px;
}

.essay-pending-card h2 {
    margin-bottom: 5px;
}

.essay-pending-card p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.essay-original-text-card h2 {
    margin-bottom: 18px;
}

.essay-rendered-text,
.essay-review-text {
    color: #252238;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.85;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.essay-rendered-text mark,
.essay-review-mark {
    padding: 1px 2px;
    border-radius: 4px;
    background: #ffe4a8;
    color: inherit;
    cursor: pointer;
}

.essay-rendered-text sup {
    margin-left: 2px;
    color: var(--red-text);
    font-family: inherit;
    font-size: 11px;
    font-weight: 900;
}

.error-spelling,
.error-grammar {
    background: #ffd8d8 !important;
    text-decoration: underline wavy #c83b3b 1.5px;
}

.error-punctuation {
    background: #fff0a8 !important;
    text-decoration: underline wavy #d49300 1.5px;
}

.error-speech,
.error-logic {
    background: #fff0bb !important;
}

.error-content,
.error-fact {
    background: #ddd8ff !important;
}

.error-other {
    background: #d9eaff !important;
}

.essay-result-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, .7fr);
    gap: 20px;
    align-items: start;
}

.essay-score-badge {
    display: grid;
    min-width: 86px;
    padding: 12px;
    border-radius: 16px;
    background: var(--accent-light);
    color: var(--accent);
    text-align: center;
}

.essay-score-badge strong {
    font-size: 30px;
    line-height: 1;
}

.essay-score-badge span {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 800;
}

.essay-reviewed-text-card .essay-section-head {
    margin-bottom: 22px;
}

.essay-feedback-card,
.essay-annotation-results,
.essay-score-summary,
.essay-criterion-form-card,
.essay-overall-comment,
.essay-reviewed-check {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(31, 28, 65, .06);
}

.essay-feedback-card {
    padding: 22px;
    background: linear-gradient(135deg, #f7f3ff, #fff);
}

.essay-feedback-card p {
    margin-bottom: 0;
    line-height: 1.65;
    white-space: pre-wrap;
}

.essay-result-sidebar {
    display: grid;
    gap: 16px;
}

.essay-annotation-results {
    padding: 20px;
}

.essay-annotation-results h2 {
    margin-bottom: 16px;
    font-size: 20px;
}

.essay-annotation-results article,
.essay-annotation-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
    border-top: 1px solid var(--border);
}

.essay-annotation-results article:first-of-type {
    border-top: 0;
}

.annotation-number {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--red-bg);
    color: var(--red-text);
    font-size: 12px;
    font-weight: 900;
}

.essay-annotation-results small,
.essay-annotation-item small {
    display: block;
    color: var(--red-text);
    font-weight: 800;
}

.essay-annotation-results strong,
.essay-annotation-item strong {
    display: block;
    margin: 3px 0;
    overflow-wrap: anywhere;
}

.essay-annotation-results p,
.essay-annotation-item p {
    margin-bottom: 0;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
}

.essay-criteria-results {
    margin-top: 20px;
}

.essay-criteria-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.essay-criteria-result-grid article {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 15px;
    border-radius: 14px;
    background: #f8f8fb;
}

.criterion-code {
    display: grid;
    place-items: center;
    width: 38px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.essay-criteria-result-grid p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.criterion-result-score {
    color: var(--accent);
    font-size: 17px;
    font-weight: 900;
}

.essay-review-page {
    max-width: 1540px;
}

.essay-short-warning {
    margin: 0 0 18px;
}

.essay-review-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.essay-review-text-card {
    position: static;
}

.essay-selection-hint {
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.essay-review-text {
    min-height: 560px;
    max-height: none;
    margin-top: 18px;
    padding: 24px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fcfcfe;
    user-select: text;
}

.essay-annotation-editor {
    display: grid;
    grid-template-columns: minmax(150px, .65fr) minmax(150px, .45fr) minmax(260px, 1fr);
    gap: 12px;
    align-items: end;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid rgba(83, 74, 183, .2);
    border-radius: 16px;
    background: #f7f5ff;
}

.essay-annotation-editor[hidden] {
    display: none;
}

.essay-annotation-editor small,
.essay-annotation-editor label > span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.essay-annotation-editor strong {
    display: block;
    max-height: 60px;
    overflow: auto;
}

.essay-annotation-editor select,
.essay-annotation-editor textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #fff;
}

.essay-annotation-editor > div:last-child {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.essay-annotation-list {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.essay-annotation-list .essay-section-head {
    align-items: center;
}

.essay-annotation-list h2 {
    margin-bottom: 0;
    font-size: 19px;
}

.essay-annotation-list [data-annotation-count] {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}

.essay-annotation-empty {
    margin: 14px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.essay-annotation-item {
    position: relative;
    grid-template-columns: 30px minmax(0, 1fr) 32px;
}

.essay-annotation-remove {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: var(--red-bg);
    color: var(--red-text);
    font-size: 20px;
    cursor: pointer;
}

.essay-review-criteria {
    display: grid;
    gap: 14px;
}

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

.essay-criterion-row:nth-child(2) {
    border-top: 0;
}

.essay-review-validation-dialog {
    width: min(520px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(31, 28, 65, .28);
}

.essay-review-validation-dialog::backdrop { background: rgba(31, 28, 65, .48); }
.essay-review-validation-card { padding: 28px; }
.essay-review-validation-card h2 { margin: 0 0 10px; }
.essay-review-validation-card p { color: var(--text-secondary); }
.essay-review-validation-card ul { margin: 16px 0 22px; color: var(--red-text); font-weight: 800; }

.exam-track-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}
.exam-track-picker legend { margin-bottom: 9px; font-weight: 900; }
.exam-track-picker label { display: flex; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--border-strong); border-radius: 14px; cursor: pointer; }
.exam-track-picker label:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.exam-track-picker span { display: grid; }
.exam-track-picker small { color: var(--text-secondary); }
.admin-track-picker { margin-bottom: 22px; }

.essay-score-summary {
    display: grid;
    justify-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #eeeaff, #fff);
}

.essay-score-summary > span,
.essay-score-summary small {
    color: var(--text-secondary);
}

.essay-score-summary strong {
    margin: 4px 0;
    color: var(--accent);
    font-size: 34px;
}

.essay-criterion-form-card {
    overflow: hidden;
}

.essay-criterion-row {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.essay-criterion-row:first-child {
    border-top: 0;
}

.essay-criterion-heading {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.essay-criterion-heading strong,
.essay-criterion-heading small {
    display: block;
}

.essay-criterion-heading small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.4;
}

.criterion-score-select select {
    min-width: 68px;
    padding: 8px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: #fff;
    font-weight: 800;
}

.essay-criterion-row > textarea,
.essay-overall-comment textarea {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafafd;
    resize: vertical;
}

.essay-overall-comment {
    display: block;
    padding: 18px;
}

.essay-overall-comment > span {
    font-weight: 900;
}

.essay-reviewed-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
}

.essay-reviewed-check input {
    width: 22px;
    height: 22px;
    accent-color: var(--accent);
}

.essay-reviewed-check span {
    display: grid;
    gap: 3px;
}

.essay-reviewed-check small {
    color: var(--text-secondary);
}

.essay-save-review {
    width: 100%;
    min-height: 50px;
}

.essay-assignment-section {
    margin: 24px 0;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 42px rgba(31, 28, 65, .06);
}

.essay-assignment-section .essay-section-head {
    align-items: center;
    margin-bottom: 18px;
}

.essay-assignment-section h2,
.essay-assignment-workspace h2 {
    margin: 5px 0 0;
}

.essay-assignment-grid {
    display: grid;
    gap: 12px;
}

.essay-assignment-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--text-primary);
    background: #fbfaff;
}

a.essay-assignment-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.essay-assignment-card strong {
    display: block;
}

.essay-assignment-card p,
.essay-assignment-empty {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.essay-assignment-count {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.essay-assignment-workspace {
    display: grid;
    grid-template-columns: minmax(320px, .8fr) minmax(520px, 1.2fr);
    align-items: start;
    gap: 20px;
}

.essay-assignment-write-page {
    max-width: 1440px;
}

.essay-source-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #fffdf8;
    box-shadow: 0 14px 42px rgba(31, 28, 65, .06);
}

.essay-source-text {
    margin-top: 18px;
    white-space: pre-wrap;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.75;
}

.essay-source-details {
    margin-bottom: 20px;
}

.essay-source-details summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 800;
}

.essay-source-field,
.essay-instructions-field {
    display: block;
    margin-bottom: 18px;
}

.essay-source-field > span,
.essay-instructions-field > span {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.essay-source-field textarea {
    min-height: 420px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.7;
}

@media (max-width: 1120px) {
    .essay-result-layout,
    .essay-review-layout {
        grid-template-columns: 1fr;
    }

    .essay-review-text-card {
        position: static;
    }

    .essay-review-text {
        max-height: none;
    }

    .essay-review-criteria {
        grid-template-columns: minmax(0, 1fr);
    }

    .essay-assignment-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .essay-page {
        width: min(100% - 24px, 1440px);
        padding-top: 22px;
    }

    .essay-hero,
    .essay-write-head,
    .essay-detail-head {
        align-items: stretch;
        flex-direction: column;
    }

    .essay-primary-action,
    .essay-queue-count {
        width: 100%;
    }

    .essay-list-grid,
    .essay-criteria-result-grid {
        grid-template-columns: 1fr;
    }

    .essay-assignment-section .essay-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .essay-write-card,
    .essay-reviewed-text-card,
    .essay-original-text-card,
    .essay-review-text-card,
    .essay-criteria-results {
        padding: 20px;
        border-radius: 18px;
    }

    .essay-text-field textarea {
        min-height: 430px;
        padding: 16px;
        font-size: 17px;
    }

    .essay-annotation-editor {
        grid-template-columns: 1fr;
    }

    .essay-annotation-editor > div:last-child {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .essay-hero {
        padding: 24px 20px;
    }

    .essay-list-card,
    .essay-admin-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .essay-card-status {
        margin-left: 64px;
    }

    .essay-card-copy {
        flex: 1;
    }

    .essay-assignment-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .essay-assignment-card > :last-child {
        grid-column: 2;
    }

    .essay-filter-bar {
        align-items: stretch;
    }

    .essay-filter-bar > span {
        display: none;
    }

    .essay-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .essay-short-warning,
    .essay-write-note {
        display: grid;
    }

    .essay-review-text {
        min-height: 380px;
        padding: 16px;
        font-size: 17px;
    }

    .essay-selection-hint {
        display: none;
    }
}

/* Landing product showcase */
.landing-page:has(#platform:target) .nav-platform {
    color: var(--landing-purple);
}

.landing-page:has(#platform:target) .nav-platform::after {
    opacity: 1;
    transform: scaleX(1);
}

.platform-showcase-section {
    position: relative;
    overflow: hidden;
    padding: 74px 0 64px;
    background:
        radial-gradient(circle at 8% 18%, rgba(255, 190, 62, 0.13), transparent 24%),
        radial-gradient(circle at 92% 76%, rgba(130, 195, 90, 0.12), transparent 25%),
        linear-gradient(180deg, #fffdf9 0%, #f7f3ff 52%, #fffdf9 100%);
    scroll-margin-top: 72px;
}

.platform-showcase-section::before {
    content: "";
    position: absolute;
    top: 110px;
    right: -90px;
    width: 250px;
    height: 250px;
    border: 1px dashed rgba(107, 69, 238, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.platform-showcase-heading {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.platform-showcase-heading .section-badge {
    display: inline-flex;
    margin-bottom: 12px;
}

.platform-showcase-heading h2 {
    margin: 0;
    color: var(--landing-ink);
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.platform-showcase-heading p {
    max-width: 650px;
    margin: 16px auto 0;
    color: var(--landing-muted);
    font-size: 17px;
    line-height: 1.65;
}

.platform-showcase-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(330px, 0.72fr);
    gap: 24px;
    align-items: stretch;
}

.platform-window {
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(73, 58, 126, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 50px rgba(54, 40, 108, 0.12);
}

.platform-window-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(73, 58, 126, 0.1);
    background: #fbf9ff;
}

.platform-window-bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ffbd45;
}

.platform-window-bar span:nth-child(2) {
    background: #9b81f6;
}

.platform-window-bar span:nth-child(3) {
    background: #8bcf72;
}

.platform-window-bar em {
    overflow: hidden;
    margin-left: 6px;
    color: #7a748e;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.platform-window img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top;
    background: #f7f4ff;
    image-rendering: -webkit-optimize-contrast;
}

.platform-image-link {
    display: block;
    cursor: zoom-in;
}

.platform-window figcaption {
    display: grid;
    gap: 5px;
    min-height: 88px;
    padding: 18px 22px 20px;
    border-top: 1px solid rgba(73, 58, 126, 0.08);
}

.platform-window figcaption strong {
    color: var(--landing-ink);
    font-size: 17px;
    font-weight: 900;
}

.platform-window figcaption span {
    color: var(--landing-muted);
    font-size: 13px;
    line-height: 1.5;
}

.platform-benefit-list {
    display: grid;
    grid-template-rows: repeat(4, minmax(0, 1fr)) auto;
    gap: 12px;
}

.platform-benefit-list article {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 17px;
    border: 1px solid rgba(73, 58, 126, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 26px rgba(54, 40, 108, 0.06);
}

.platform-benefit-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 22px;
    font-weight: 900;
}

.platform-benefit-purple {
    color: #6642e5;
    background: #eee9ff;
}

.platform-benefit-amber {
    color: #d88400;
    background: #fff0cf;
}

.platform-benefit-green {
    color: #4d9a30;
    background: #eaf6e3;
}

.platform-benefit-blue {
    color: #2976bf;
    background: #e7f2ff;
}

.platform-benefit-list h3 {
    margin: 1px 0 5px;
    color: var(--landing-ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
}

.platform-benefit-list p {
    margin: 0;
    color: var(--landing-muted);
    font-size: 12px;
    line-height: 1.5;
}

.platform-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 54px;
    padding: 13px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7654ef, #5533d2);
    color: #fff;
    box-shadow: 0 14px 28px rgba(95, 59, 221, 0.22);
    font-size: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.platform-login-link:hover {
    color: #fff;
    box-shadow: 0 18px 34px rgba(95, 59, 221, 0.28);
    transform: translateY(-2px);
}

.platform-login-link span {
    font-size: 20px;
}

.platform-preview-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.platform-preview-grid .platform-window {
    box-shadow: 0 16px 38px rgba(54, 40, 108, 0.09);
}

.platform-preview-grid .platform-window img {
    aspect-ratio: 16 / 7.6;
}

@media (max-width: 1060px) {
    .platform-showcase-grid {
        grid-template-columns: 1fr;
    }

    .platform-benefit-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .platform-login-link {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .essay-criterion-form-card,
    .exam-track-picker { grid-template-columns: 1fr; }
    .platform-showcase-section {
        padding: 52px 0 46px;
    }

    .platform-showcase-heading {
        margin-bottom: 26px;
        text-align: left;
    }

    .platform-showcase-heading h2 {
        font-size: clamp(32px, 10vw, 42px);
    }

    .platform-showcase-heading p {
        margin-left: 0;
        font-size: 15px;
    }

    .platform-benefit-list,
    .platform-preview-grid {
        grid-template-columns: 1fr;
    }

    .platform-login-link {
        grid-column: auto;
    }

    .platform-window {
        border-radius: 18px;
    }
}

@media (max-width: 520px) {
    .platform-window-main img {
        aspect-ratio: 4 / 3;
    }

    .platform-preview-grid .platform-window img {
        aspect-ratio: 4 / 2.4;
    }

    .platform-window figcaption {
        min-height: 0;
        padding: 16px;
    }

    .platform-benefit-list article {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 15px;
    }

    .platform-benefit-icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 19px;
    }
}

/* Maria landing: opaque contact dialog */
.contact-modal.lemba-contact-modal {
    width: min(460px, calc(100vw - 28px));
    max-height: calc(100vh - 24px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: transparent;
    overflow-y: auto;
}

.lemba-contact-modal::backdrop {
    background: rgba(34, 18, 22, .58);
    backdrop-filter: blur(7px);
}

.lemba-contact-modal .contact-modal-card {
    padding: 30px;
    border: 1px solid rgba(127, 29, 45, .12);
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 8%, rgba(201, 95, 111, .14), transparent 34%),
        #fffdf8;
    box-shadow: 0 30px 80px rgba(48, 18, 24, .34);
}

.lemba-contact-modal .contact-modal-icon {
    background: linear-gradient(135deg, var(--lemba-rose), var(--lemba-wine));
    box-shadow: 0 12px 24px rgba(127, 29, 45, .22);
    font: 700 15px Georgia, serif;
}

.lemba-contact-modal .contact-modal-close {
    color: var(--lemba-wine);
    background: #f7e5e7;
}

.lemba-contact-modal .contact-modal-head h2 {
    color: var(--lemba-ink);
    font-family: Georgia, serif;
}

.lemba-contact-modal .contact-modal-head p {
    color: var(--lemba-muted);
}

.lemba-contact-modal .contact-modal-actions a {
    border-color: rgba(127, 29, 45, .14);
    color: var(--lemba-ink);
    background: white;
    text-decoration: none;
}

.lemba-contact-modal .contact-modal-actions a:hover {
    border-color: rgba(127, 29, 45, .36);
    box-shadow: 0 13px 28px rgba(127, 29, 45, .12);
    transform: translateY(-1px);
}

.lemba-contact-modal .lemba-contact-icon {
    display: grid;
    place-items: center;
    color: white;
    background: var(--lemba-wine);
    font-size: 12px;
    font-weight: 850;
}

.lemba-contact-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.lemba-contact-copy strong {
    font-size: 15px;
    font-weight: 800;
}

.lemba-contact-copy small {
    color: var(--lemba-muted);
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .lemba-contact-modal .contact-modal-card { padding: 24px 18px 20px; }
    .lemba-contact-modal .contact-modal-head { padding-inline: 38px; }
    .lemba-contact-modal .contact-modal-actions a { min-height: 60px; }
    .lemba-header-login { padding-inline: 9px; font-size: 11px; }
}

/* Lesson creation, paired billing and Maria's calendar */
.lemba-method-credit {
    width: fit-content;
    margin: 26px 0 0;
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #fff5f2;
    background: rgba(255, 255, 255, .08);
    font-weight: 700;
}

.lesson-create-page {
    width: min(100% - 48px, 1080px);
    margin: 0 auto;
    padding: 38px 0 80px;
}

.lesson-create-heading {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.lesson-create-heading h1 {
    margin: 7px 0 8px;
    font: 600 42px/1.08 Georgia, serif;
}

.lesson-create-heading p {
    max-width: 680px;
    margin: 0;
    color: var(--lemba-muted);
    line-height: 1.55;
}

.lesson-create-form {
    display: grid;
    gap: 18px;
}

.lesson-form-section,
.lesson-create-actions,
.lesson-calendar-panel,
.lesson-billing-panel {
    border: 1px solid #eadfd7;
    border-radius: 24px;
    background: white;
    box-shadow: 0 12px 34px rgba(65, 31, 37, .055);
}

.lesson-form-section { padding: 28px; }

.lesson-form-step {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.lesson-form-step > b {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    color: white;
    background: var(--lemba-wine);
    font-size: 15px;
}

.lesson-form-step h2 {
    margin: 0 0 3px;
    font: 600 25px Georgia, serif;
}

.lesson-form-step p { margin: 0; color: var(--lemba-muted); font-size: 13px; }

.lesson-format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.lesson-format-card {
    position: relative;
    min-height: 108px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid #eadfd7;
    border-radius: 18px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.lesson-format-card:hover { border-color: #d5b4b9; transform: translateY(-1px); }
.lesson-format-card.is-selected { border-color: var(--lemba-wine); box-shadow: 0 0 0 4px rgba(127, 29, 45, .08); }
.lesson-format-card input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lesson-format-card input:focus-visible + .lesson-format-icon { outline: 3px solid rgba(127, 29, 45, .25); outline-offset: 3px; }
.lesson-format-icon { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: var(--lemba-wine); background: #f7e5e7; font: 700 22px Georgia, serif; }
.lesson-format-card.pair .lesson-format-icon { color: #775106; background: #fff1c9; }
.lesson-format-card > span:last-child { display: flex; flex-direction: column; gap: 5px; }
.lesson-format-card strong { font-size: 17px; }
.lesson-format-card small { color: var(--lemba-muted); }

.student-selection-count {
    margin-left: auto;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--lemba-wine);
    background: #f7e5e7;
    font-size: 12px;
    font-weight: 800;
}
.student-selection-count.is-complete { color: #276749; background: #e7f6ed; }

.lesson-student-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lesson-student-card {
    position: relative;
    min-width: 0;
    padding: 14px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
    border: 1px solid #e6dad3;
    border-radius: 16px;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.lesson-student-card:hover { border-color: #d5b4b9; }
.lesson-student-card.is-selected { border-color: var(--lemba-wine); background: #fff8f7; }
.lesson-student-card.selection-rejected { animation: lesson-rejected .4s ease; }
.lesson-student-card input { position: absolute; opacity: 0; }
.lesson-student-card > span:nth-of-type(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lesson-student-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-student-card small { color: var(--lemba-muted); }
.lesson-student-card i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #d9cbc3; border-radius: 50%; color: transparent; font-style: normal; }
.lesson-student-card.is-selected i { border-color: var(--lemba-wine); color: white; background: var(--lemba-wine); }
.lesson-student-empty { padding: 20px; border-radius: 14px; color: var(--lemba-muted); background: #f8f3ef; text-align: center; }
@keyframes lesson-rejected { 50% { border-color: var(--red-text); transform: translateX(4px); } }

.lesson-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.lesson-field-wide { grid-column: 1 / -1; }
.input-with-suffix { position: relative; }
.input-with-suffix input { width: 100%; padding-right: 56px !important; }
.input-with-suffix i { position: absolute; top: 50%; right: 16px; color: var(--lemba-muted); font-style: normal; transform: translateY(-50%); pointer-events: none; }
.lesson-fields-grid input[readonly] { color: #775106; border-color: #ead394; background: #fff9e9; font-weight: 800; }
[data-pair-price-note] { color: #775106 !important; font-weight: 650; }
.lesson-recurrence-field { max-width: 360px; }

.lesson-create-actions {
    position: sticky;
    bottom: 14px;
    z-index: 4;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    box-shadow: 0 18px 45px rgba(44, 22, 27, .16);
}
.lesson-create-actions > div { display: flex; flex-direction: column; gap: 3px; }
.lesson-create-actions > div span { color: var(--lemba-muted); font-size: 12px; }

.lesson-management-page { padding-bottom: 80px; }
.lesson-calendar-panel { padding: 24px; }
.lesson-calendar-head { margin-bottom: 18px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 15px; text-align: center; }
.lesson-calendar-head > a { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid #e7dad2; border-radius: 14px; color: var(--lemba-wine); background: #fffaf7; text-decoration: none; font-size: 20px; }
.lesson-calendar-head > a:hover { border-color: var(--lemba-wine); }
.lesson-calendar-head span, .lesson-billing-head span { color: var(--lemba-wine); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.lesson-calendar-head h2 { margin: 3px 0; font: 600 30px Georgia, serif; }
.lesson-calendar-head small { color: var(--lemba-muted); }
.lesson-calendar-weekdays, .lesson-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.lesson-calendar-weekdays { margin-bottom: 7px; color: var(--lemba-muted); font-size: 11px; font-weight: 800; text-align: center; text-transform: uppercase; }
.lesson-calendar-grid { overflow: hidden; border: 1px solid #eadfd7; border-radius: 18px; background: #eadfd7; gap: 1px; }
.lesson-calendar-blank, .lesson-calendar-day { min-height: 142px; background: white; }
.lesson-calendar-blank { background: #faf7f4; }
.lesson-calendar-day { min-width: 0; padding: 10px; }
.lesson-calendar-day.is-today { box-shadow: inset 0 0 0 2px var(--lemba-rose); }
.lesson-calendar-date { min-height: 25px; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.lesson-calendar-date b { font-size: 13px; }
.lesson-calendar-date span { color: var(--lemba-wine); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.lesson-calendar-events { display: grid; gap: 6px; }
.lesson-calendar-slot { width: 100%; min-width: 0; padding: 8px; border: 0; border-left: 3px solid #537a67; border-radius: 8px; color: inherit; background: #edf6f1; font: inherit; text-align: left; }
.lesson-calendar-slot.pair { border-left-color: #b07a18; background: #fff5d8; }
.lesson-calendar-slot.pair { cursor: pointer; }
.lesson-calendar-slot.pair:hover { box-shadow: 0 5px 14px rgba(119, 81, 6, .12); }
.lesson-calendar-slot.pair:focus-visible { outline: 2px solid #b07a18; outline-offset: 2px; }
.lesson-calendar-slot > div { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.lesson-calendar-slot time { color: #234b38; font-size: 11px; font-weight: 850; }
.lesson-calendar-slot.pair time { color: #775106; }
.lesson-calendar-slot > div span { color: var(--lemba-muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.lesson-calendar-slot strong, .lesson-calendar-slot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-calendar-slot strong { margin-top: 4px; font-size: 11px; }
.lesson-calendar-slot.pair strong { overflow: visible; text-overflow: clip; white-space: normal; line-height: 1.3; }
.lesson-calendar-slot small { margin-top: 2px; color: var(--lemba-muted); font-size: 9px; }
.pair-open-hint { margin-top: 6px; display: flex; align-items: center; gap: 5px; color: #775106; font-size: 8px; font-weight: 750; }
.pair-open-hint b { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: white; background: #b07a18; font-size: 9px; }
.lesson-calendar-empty { padding: 22px 0 5px; color: var(--lemba-muted); text-align: center; }
.lesson-calendar-legend { margin-top: 14px; display: flex; justify-content: flex-end; gap: 18px; color: var(--lemba-muted); font-size: 11px; }
.lesson-calendar-legend span { display: flex; align-items: center; gap: 6px; }
.lesson-calendar-legend i { width: 9px; height: 9px; border-radius: 50%; background: #537a67; }
.lesson-calendar-legend i.pair { background: #b07a18; }

.lesson-billing-panel { margin-top: 22px; padding: 28px; }
.lesson-billing-head { margin-bottom: 12px; }
.lesson-billing-head h2 { margin: 5px 0; font: 600 28px Georgia, serif; }
.lesson-billing-head p { margin: 0; color: var(--lemba-muted); }
.lesson-admin-list { display: grid; }
.lesson-admin-main { display: flex; flex-direction: column; gap: 4px; }
.lesson-admin-badges { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px !important; }
.lesson-format-pill, .lesson-status-pill { width: fit-content; padding: 4px 8px; border-radius: 999px; color: #276749 !important; background: #e7f6ed; font-size: 10px !important; font-weight: 800; }
.lesson-format-pill.pair { color: #775106 !important; background: #fff1c9; }
.lesson-status-pill { color: var(--lemba-muted) !important; background: #f2ece8; }
.lesson-main .lesson-format-pill { margin-bottom: 3px; }
.lesson-main small { color: var(--lemba-muted); font-size: 11px; }
.btn-small.muted { color: var(--lemba-muted); background: #f5f0ed; }
.lesson-admin-row time span, .lesson-row time span { line-height: 1.35; }

.pair-lesson-dialog {
    width: min(92vw, 480px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    color: var(--lemba-ink);
    background: transparent;
    box-shadow: 0 30px 90px rgba(45, 20, 25, .32);
}
.pair-lesson-dialog::backdrop { background: rgba(31, 18, 21, .56); backdrop-filter: blur(4px); }
.pair-lesson-dialog-card { position: relative; padding: 30px; border: 1px solid #eadfd7; border-radius: 24px; background: #fffdf8; }
.pair-lesson-dialog-card > span { color: #9a6810; font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.pair-lesson-dialog-card h2 { margin: 8px 40px 6px 0; font: 600 30px Georgia, serif; }
.pair-lesson-dialog-card > p { margin: 0; color: var(--lemba-muted); }
.pair-lesson-dialog-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--lemba-wine); background: #f7e5e7; font-size: 22px; cursor: pointer; }
.pair-lesson-students { margin-top: 22px; display: grid; gap: 9px; }
.pair-lesson-students > div { padding: 14px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 11px; border: 1px solid #eadfd7; border-radius: 14px; background: white; }
.pair-lesson-students b { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: white; background: var(--lemba-wine); }
.pair-lesson-students strong { font-size: 16px; }

@media (max-width: 1040px) {
    .lesson-calendar-day { min-height: 126px; padding: 7px; }
    .lesson-calendar-slot > div span, .lesson-calendar-slot small { display: none; }
    .lesson-admin-row { grid-template-columns: 100px minmax(180px, 1fr) 160px; }
    .lesson-admin-row .row-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
    .lesson-create-page { width: min(100% - 24px, 1080px); padding-top: 24px; }
    .lesson-create-heading { align-items: flex-start; flex-direction: column; }
    .lesson-create-heading h1 { font-size: 34px; }
    .lesson-form-section { padding: 20px 16px; }
    .lesson-form-step { align-items: flex-start; }
    .student-selection-count { margin-left: 0; white-space: nowrap; }
    .lesson-format-grid, .lesson-student-grid, .lesson-fields-grid { grid-template-columns: 1fr; }
    .lesson-field-wide { grid-column: auto; }
    .lesson-create-actions { grid-template-columns: 1fr 1fr; bottom: 8px; }
    .lesson-create-actions > div { grid-column: 1 / -1; }
    .lesson-create-actions .button { width: 100%; }
    .lesson-calendar-panel { padding: 17px 14px; }
    .lesson-calendar-weekdays, .lesson-calendar-blank { display: none; }
    .lesson-calendar-grid { display: block; overflow: visible; border: 0; background: transparent; }
    .lesson-calendar-day { display: none; min-height: 0; margin-top: 10px; padding: 12px; border: 1px solid #eadfd7; border-radius: 14px; }
    .lesson-calendar-day.has-lessons, .lesson-calendar-day.is-today { display: block; }
    .lesson-calendar-date { margin-bottom: 6px; }
    .lesson-calendar-slot > div span, .lesson-calendar-slot small { display: inline; }
    .lesson-calendar-slot strong, .lesson-calendar-slot small { white-space: normal; }
    .lesson-calendar-legend { justify-content: flex-start; }
    .lesson-billing-panel { padding: 20px 16px; }
    .lesson-admin-row { grid-template-columns: 76px 1fr; gap: 12px; }
    .lesson-admin-row .lesson-price, .lesson-admin-row .row-actions { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
    .lesson-format-card, .lesson-student-card { transition: none; }
    .lesson-student-card.selection-rejected { animation: none; }
}
