:root {
    --ink: #183029;
    --ink-soft: #3b514a;
    --muted: #687771;
    --line: #dce3de;
    --line-strong: #bdcbc2;
    --paper: #f7f8f3;
    --white: #ffffff;
    --teal: #00843d;
    --teal-dark: #006b31;
    --teal-pale: #e6f3eb;
    --navy: #002776;
    --blue-pale: #eaf0fb;
    --yellow: #ffdf00;
    --yellow-pale: #fff8c9;
    --red: #b63a45;
    --red-pale: #fff0f1;
    --green: #00843d;
    --shadow: 0 16px 36px rgba(0, 39, 118, .1);
    --shadow-small: 0 6px 18px rgba(24, 48, 41, .08);
    --radius: 7px;
    --radius-small: 4px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

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

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

button, a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
    color: var(--navy);
    line-height: 1.12;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.45rem, 5vw, 4.7rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); margin-bottom: .75rem; }
h3 { font-size: 1.35rem; margin-bottom: .65rem; }

.shell {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.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;
}

.muted { color: var(--muted); }

.eyebrow {
    display: block;
    margin-bottom: .55rem;
    color: var(--teal);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.3;
    text-transform: uppercase;
}

.site-header {
    position: sticky;
    z-index: 40;
    top: 0;
    background: rgba(255, 255, 255, .94);
    border-top: 4px solid var(--teal);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--teal) 0 58%, var(--navy) 58% 100%);
    color: var(--white);
    font-size: .8rem;
    letter-spacing: -.04em;
    box-shadow: 4px 4px 0 var(--yellow);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 650;
}

.main-nav > a:not(.button) {
    padding: .45rem .1rem;
    border-bottom: 2px solid transparent;
}

.main-nav > a:not(.button):hover,
.main-nav > a.is-active:not(.button) {
    color: var(--teal);
    border-color: var(--teal);
}

.main-nav .admin-link { color: #775a10; }

.account-menu {
    padding-left: 1.1rem;
    border-left: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: .75rem;
}

.account-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-toggle {
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    display: none;
}

.nav-toggle span:not(.sr-only) {
    width: 100%;
    height: 2px;
    margin: 4px 0;
    display: block;
    background: var(--navy);
    border-radius: 4px;
}

.admin-bar { background: var(--navy); color: rgba(255, 255, 255, .76); }

.admin-nav {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    font-size: .9rem;
    white-space: nowrap;
}

.admin-nav strong { color: var(--white); margin-right: .6rem; }
.admin-nav a:hover, .admin-nav a.is-active { color: var(--yellow); }

.button {
    min-height: 46px;
    padding: .72rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    cursor: pointer;
    font-weight: 750;
    line-height: 1.2;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.button:hover { transform: translateY(-1px); }
.button:focus-visible, .text-button:focus-visible, a:focus-visible, .word-card:focus-visible, .interactive-word:focus-visible { outline: 3px solid rgba(255, 223, 0, .72); outline-offset: 3px; }
.button-primary { background: var(--teal); color: var(--white); box-shadow: 4px 4px 0 rgba(0, 39, 118, .14); }
.button-primary:hover { background: var(--teal-dark); box-shadow: 5px 5px 0 rgba(0, 39, 118, .2); }
.button-secondary { background: var(--white); color: var(--navy); border-color: var(--navy); }
.button-secondary:hover { background: var(--blue-pale); border-color: var(--navy); }
.button-quiet { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.button-danger { background: var(--red); color: var(--white); }
.button-small { min-height: 38px; padding: .55rem .85rem; font-size: .88rem; }
.button-full { width: 100%; }
.button[disabled] { cursor: default; opacity: .72; transform: none; }

.text-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--teal);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 700;
}

.danger-text { color: var(--red); }
.text-link { color: var(--teal-dark); font-weight: 750; }
.text-link:hover { color: var(--teal); }

.welcome-hero {
    overflow: hidden;
    padding: clamp(4rem, 8vw, 7rem) 0;
    background:
        linear-gradient(120deg, rgba(0, 132, 61, .08), transparent 45%),
        radial-gradient(circle at 86% 12%, rgba(255, 223, 0, .3), transparent 27%),
        linear-gradient(135deg, #f8fbf7 0%, #fffced 62%, #eef3fc 100%);
    border-bottom: 4px solid var(--yellow);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.03fr .97fr;
    align-items: center;
    gap: clamp(3rem, 7vw, 7rem);
}

.hero-copy h1 { max-width: 760px; }
.hero-copy p { max-width: 650px; color: var(--ink-soft); font-size: 1.16rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.lesson-preview {
    position: relative;
    padding: clamp(1.6rem, 4vw, 3rem);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: var(--shadow);
}

.lesson-preview::before {
    content: "";
    position: absolute;
    width: 8px;
    inset: 22px auto 22px -4px;
    background: linear-gradient(to bottom, var(--teal) 0 34%, var(--yellow) 34% 67%, var(--navy) 67% 100%);
    border-radius: 2px;
}

.preview-top, .card-meta {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}

.lesson-preview > p { margin: 2.4rem 0; color: var(--navy); font-size: clamp(1.45rem, 3vw, 2.15rem); line-height: 1.65; }
.demo-word { border-bottom: 3px solid var(--yellow); font-weight: 750; }

.preview-translation {
    padding: 1.2rem 1.3rem;
    border-left: 4px solid var(--navy);
    border-radius: 4px;
    background: var(--blue-pale);
    display: grid;
    gap: .15rem;
}

.preview-translation .eyebrow { margin: 0; }
.preview-translation strong { font-size: 1.12rem; }
.preview-translation > span:last-child { color: var(--muted); font-size: .88rem; }

.level-badge, .draft-badge, .status-badge, .count-pill {
    padding: .3rem .6rem;
    border-radius: 3px;
    background: var(--teal-pale);
    color: var(--teal-dark);
    font-size: .75rem;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: .04em;
}

.level-yellow { background: var(--yellow-pale); color: #6b5108; }
.draft-badge, .status-badge.draft { background: #edf1f3; color: #596871; }
.status-badge.published { background: #def3e9; color: var(--green); }
.premium-badge, .free-badge, .complete-badge {
    padding: .3rem .6rem;
    border-radius: 3px;
    font-size: .72rem;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: .03em;
    white-space: nowrap;
}
.premium-badge { background: var(--navy); color: var(--yellow); }
.free-badge { background: #edf7f0; color: var(--teal-dark); border: 1px solid #c6e3d0; }
.complete-badge { background: var(--teal); color: var(--white); }

.feature-row {
    padding-block: 4.4rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

.feature-row article { padding: 1.8rem; border-top: 4px solid var(--teal); border-radius: 4px; background: var(--white); box-shadow: var(--shadow-small); }
.feature-row article:nth-child(2) { border-top-color: var(--yellow); }
.feature-row article:nth-child(3) { border-top-color: var(--navy); }
.feature-row h2 { font-size: 1.25rem; }
.feature-row p { margin-bottom: 0; color: var(--muted); }
.feature-number { display: block; margin-bottom: 1.2rem; color: var(--teal); font-size: .78rem; font-weight: 850; }

.page-head { padding: clamp(3.2rem, 7vw, 5.5rem) 0 2.2rem; }
.page-head > div:first-child { max-width: 760px; }
.page-head h1 { margin-bottom: .7rem; font-size: clamp(2.35rem, 5vw, 4rem); }
.page-head p { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }
.compact-head { padding-bottom: 1.5rem; }
.compact-head h1 { font-size: clamp(2.15rem, 4vw, 3.2rem); }
.dashboard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }

.vocabulary-stat {
    min-width: 175px;
    padding: 1.25rem 1.4rem;
    border-radius: 5px;
    background: var(--navy);
    color: var(--white);
    display: grid;
    transition: transform .16s ease;
}

a.vocabulary-stat:hover { transform: translateY(-2px); }
.vocabulary-stat strong { font-size: 2rem; line-height: 1; }
.vocabulary-stat span { font-weight: 700; }
.vocabulary-stat small { color: rgba(255, 255, 255, .68); }
.vocabulary-stat-static { background: var(--teal); }

.content-section { padding: 2rem 0 4.5rem; }
.section-no-top { padding-top: 0; }
.section-tinted { padding: 2.2rem; margin-bottom: 4.5rem; border-radius: 6px; background: #eaf4ed; }
.section-heading { margin-bottom: 1.4rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.section-heading h2 { margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.content-card {
    min-height: 260px;
    padding: 1.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-small);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.content-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.content-card.has-cover { padding-top: 0; overflow: hidden; }
.card-cover {
    height: 180px;
    margin: 0 -1.6rem 1.4rem;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: var(--teal-pale);
}
.card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .28s ease; }
.content-card:hover .card-cover img { transform: scale(1.025); }
.content-card h2, .content-card h3 { margin-top: 1.45rem; }
.content-card p { color: var(--muted); }
.content-card .card-action { margin-top: auto; padding-top: 1.2rem; color: var(--teal); font-weight: 800; }
.kit-card { border-top: 4px solid var(--yellow); }
.lesson-card { border-top: 4px solid var(--teal); }

.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.course-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.course-card {
    min-height: 320px;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid var(--line);
    border-top: 5px solid var(--navy);
    border-radius: 5px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.course-card:nth-child(3n + 2) { border-top-color: var(--teal); }
.course-card:nth-child(3n) { border-top-color: var(--yellow); }
.course-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.course-card h2, .course-card h3 { margin: 1.2rem 0 .7rem; }
.course-card p { color: var(--muted); }
.course-card .card-action { margin-top: 1.2rem; color: var(--teal-dark); font-weight: 800; }
.progress-block { margin-top: auto; padding-top: 1.2rem; }
.progress-copy { margin-bottom: .45rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .82rem; }
.progress-copy strong { color: var(--navy); }
.progress-track { height: 9px; overflow: hidden; border-radius: 2px; background: #dce5df; }
.progress-track > span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #19a65b); }

.continue-panel {
    padding: clamp(1.35rem, 3vw, 2rem);
    border-left: 6px solid var(--yellow);
    border-radius: 4px;
    background: var(--navy);
    color: var(--white);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow);
}
.continue-panel h2 { margin-bottom: .35rem; color: var(--white); }
.continue-panel p { margin-bottom: .8rem; color: rgba(255, 255, 255, .78); }
.continue-panel .eyebrow { color: var(--yellow); }
.continue-panel .progress-track { max-width: 560px; background: rgba(255, 255, 255, .2); }
.continue-panel small { color: rgba(255, 255, 255, .68); }

.course-page { padding-block: 2.5rem 5rem; }
.course-hero { margin-bottom: 2rem; display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: end; gap: clamp(2rem, 6vw, 5rem); }
.course-hero h1 { margin: .8rem 0; }
.course-hero > div:first-child > p { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.course-progress-card { padding: 1.4rem; border: 1px solid var(--line); border-top: 5px solid var(--teal); border-radius: 5px; background: var(--white); box-shadow: var(--shadow-small); }
.course-progress-card > strong { display: block; margin-bottom: .6rem; color: var(--navy); font-size: 2.5rem; line-height: 1; }
.course-progress-card > small { display: block; margin: .5rem 0 1rem; color: var(--muted); }
.course-progress-card .button + .button, .pricing-card .button + .button { margin-top: .65rem; }
.completion-message { padding: .75rem; border-left: 4px solid var(--teal); background: var(--teal-pale); color: var(--teal-dark); display: block; font-weight: 800; }
.sequence-note { margin-bottom: 1.4rem; padding: .9rem 1rem; border-left: 4px solid var(--yellow); background: var(--yellow-pale); color: #5d4d00; }
.curriculum { display: grid; gap: 1.2rem; }
.module-card { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--white); box-shadow: var(--shadow-small); }
.module-card > header { padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--line); background: #f0f6f2; }
.module-card h2 { margin: .25rem 0; font-size: 1.5rem; }
.module-card header p { margin: .35rem 0 0; color: var(--muted); }
.module-number { color: var(--teal); font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.curriculum-list { display: grid; }
.curriculum-row { min-height: 82px; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
.curriculum-row:last-child { border-bottom: 0; }
.curriculum-row.is-complete { background: #f4faf6; }
.curriculum-row.is-locked { background: #fafbf9; color: var(--muted); }
.curriculum-row > div { display: grid; }
.curriculum-row small { color: var(--muted); }
.lesson-step { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 3px; display: grid; place-items: center; color: var(--navy); font-size: .78rem; font-weight: 850; }
.is-complete .lesson-step { border-color: var(--teal); background: var(--teal); color: var(--white); }
.lock-label, .lock-link { color: var(--muted); font-size: .84rem; font-weight: 750; }
.lock-link { color: var(--navy); }

.empty-state { padding: 2rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; background: rgba(255, 255, 255, .55); }
.empty-large { padding-block: 4rem; }
.empty-large strong { display: block; margin-bottom: .5rem; color: var(--navy); font-size: 1.35rem; }
.empty-large p { max-width: 560px; margin: 0 auto 1.4rem; }

.back-link { display: inline-flex; gap: .45rem; margin-bottom: 1.8rem; color: var(--teal); font-weight: 750; }
.lesson-page, .kit-page { padding-block: 2.5rem 5rem; }
.lesson-header { max-width: 850px; margin-bottom: 2.4rem; }
.lesson-header h1 { margin: .8rem 0; font-size: clamp(2.35rem, 5vw, 4.25rem); }
.lesson-header > p { color: var(--muted); font-size: 1.08rem; }
.tap-hint { width: fit-content; margin-top: 1.4rem; padding: .7rem 1rem; border-left: 4px solid var(--yellow); border-radius: 3px; background: var(--yellow-pale); color: #5d4d00; font-size: .91rem; font-weight: 700; }

.content-hero-media {
    width: 100%;
    max-height: 520px;
    aspect-ratio: 16 / 7;
    margin: -1rem 0 2.5rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--teal-pale);
    box-shadow: var(--shadow-small);
}
.content-hero-media img { width: 100%; height: 100%; display: block; object-fit: cover; }

.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: -1rem 0 2.5rem; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #071329; box-shadow: var(--shadow); }
.content-hero-media + .video-embed { margin-top: 0; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(250px, .9fr); align-items: start; gap: 2.2rem; }
.lesson-copy { padding: clamp(1.6rem, 5vw, 3.7rem); border: 1px solid var(--line); border-top: 5px solid var(--teal); border-radius: 6px; background: var(--white); box-shadow: var(--shadow-small); color: #213d4c; font-size: clamp(1.2rem, 2vw, 1.42rem); line-height: 1.95; }
.lesson-copy p:last-child { margin-bottom: 0; }
.lesson-sidebar { position: sticky; top: 112px; padding: 1.5rem; border-left: 5px solid var(--teal); border-radius: 4px; background: var(--teal-pale); }
.lesson-sidebar strong { display: block; margin-bottom: .45rem; font-size: 1.12rem; }
.lesson-sidebar p { color: var(--ink-soft); font-size: .92rem; }
.sidebar-link { margin-top: .65rem; display: block; }
.lesson-completion-panel { margin-top: 1.2rem; padding: 1.35rem; border: 1px solid #b9d9c6; border-left: 5px solid var(--teal); border-radius: 4px; background: var(--teal-pale); display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; }
.lesson-completion-panel strong { color: var(--navy); font-size: 1.1rem; }
.lesson-completion-panel p { margin: .3rem 0 0; color: var(--ink-soft); }

.interactive-word {
    position: relative;
    padding: 0 .08em;
    border: 0;
    border-bottom: 2px solid var(--yellow);
    background: linear-gradient(180deg, transparent 65%, rgba(255, 223, 0, .3) 65%);
    color: inherit;
    cursor: pointer;
    font-weight: 730;
    line-height: inherit;
}
.interactive-word:hover { background: var(--yellow-pale); }
.interactive-word.is-saved::after { content: "✓"; margin-left: .2rem; color: var(--teal); font-size: .68em; vertical-align: super; }

.word-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.word-card {
    position: relative;
    min-height: 165px;
    padding: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    cursor: pointer;
    text-align: left;
    transition: transform .16s ease, border-color .16s ease;
}
.word-card:hover { transform: translateY(-3px); border-color: var(--teal); }
.word-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--yellow); }
.word-card strong { display: block; margin-bottom: 1.4rem; color: var(--navy); font-size: 1.35rem; line-height: 1.3; }
.word-card > span:not(.saved-indicator) { color: var(--muted); font-size: .86rem; }
.saved-indicator { position: absolute; right: 12px; bottom: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: white; display: none; place-items: center; font-weight: 900; }
.word-card.is-saved .saved-indicator { display: grid; }

.translation-dialog {
    width: min(520px, calc(100% - 30px));
    padding: 1.7rem;
    border: 0;
    border-top: 6px solid var(--teal);
    border-radius: 6px;
    color: var(--ink);
    box-shadow: 0 30px 90px rgba(9, 35, 50, .28);
}
.translation-dialog::backdrop { background: rgba(9, 35, 50, .58); backdrop-filter: blur(3px); }
.translation-dialog[open] { animation: dialog-in .17s ease-out; }
.dialog-head { display: flex; justify-content: space-between; gap: 1rem; }
.dialog-head .eyebrow { margin-top: .35rem; }
.translation-dialog h2 { margin-bottom: .2rem; font-size: 2rem; }
.translation-value { margin-bottom: 1.4rem; color: var(--teal-dark); font-size: 1.32rem; font-weight: 750; }
.translation-extra { padding: .9rem 0; border-top: 1px solid var(--line); }
.translation-extra p { margin: .25rem 0 0; }
.detail-label { color: var(--muted); font-size: .75rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dialog-actions { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .65rem; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); cursor: pointer; font-size: 1.5rem; line-height: 1; }

@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.toast { position: fixed; z-index: 70; right: 22px; bottom: 22px; max-width: min(380px, calc(100% - 44px)); padding: .9rem 1.1rem; border-left: 4px solid var(--yellow); border-radius: 4px; background: var(--navy); color: white; box-shadow: var(--shadow); font-weight: 700; }

.vocabulary-list { display: grid; gap: .85rem; }
.vocabulary-row { padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 5px; background: var(--white); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(150px, .75fr) auto; align-items: center; gap: 1.4rem; }
.vocabulary-row.is-learned { background: #f0f8f5; border-color: #b9dfd1; }
.vocabulary-main .eyebrow { margin-bottom: .15rem; }
.vocabulary-main h2 { margin-bottom: .15rem; font-size: 1.35rem; }
.vocabulary-main p { margin: 0; color: var(--teal-dark); font-weight: 720; }
.vocabulary-main small { color: var(--muted); }
.vocabulary-source { display: grid; }
.vocabulary-source span { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.vocabulary-source strong { font-size: .9rem; }
.vocabulary-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .8rem; }

.flashcard-section { padding: 0 0 5rem; }
.flashcard-stage { width: min(720px, 100%); margin-inline: auto; }
.study-card { min-height: 500px; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); border-top: 7px solid var(--yellow); border-radius: 6px; background: var(--white); box-shadow: var(--shadow); }
.study-card-progress { margin-bottom: 2rem; color: var(--muted); font-size: .82rem; font-weight: 750; text-align: right; }
.study-card-face { min-height: 205px; display: grid; align-content: center; text-align: center; }
.study-card-face h2 { margin-bottom: .7rem; font-size: clamp(2.4rem, 7vw, 4.5rem); }
.flashcard-example { margin: 0 auto; max-width: 560px; color: var(--muted); font-style: italic; }
.study-card > .button { display: flex; margin: 0 auto; }
.study-card-answer { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); text-align: center; }
.study-card-answer > strong { display: block; margin: .3rem 0; color: var(--teal-dark); font-size: 1.6rem; }
.study-card-answer > p { color: var(--muted); }
.rating-prompt { display: block; margin: 1.2rem 0 .65rem; color: var(--ink-soft); font-size: .86rem; font-weight: 750; }
.rating-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.rating-actions .button { min-height: 62px; flex-direction: column; border-color: var(--line-strong); background: var(--paper); }
.rating-actions small { color: var(--muted); font-size: .7rem; font-weight: 600; }
.rating-again:hover { border-color: var(--red); background: var(--red-pale); }
.rating-hard:hover { border-color: #b88a00; background: var(--yellow-pale); }
.rating-good:hover { border-color: var(--teal); background: var(--teal-pale); }

.subscription-page { padding-block: clamp(3.5rem, 8vw, 6rem); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); align-items: center; gap: clamp(2.5rem, 8vw, 7rem); }
.subscription-copy > p { max-width: 680px; color: var(--muted); font-size: 1.1rem; }
.benefit-list { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: .8rem; }
.benefit-list li { position: relative; padding-left: 1.8rem; font-weight: 700; }
.benefit-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 900; }
.pricing-card { padding: clamp(1.5rem, 4vw, 2.4rem); border: 1px solid var(--line); border-top: 7px solid var(--yellow); border-radius: 5px; background: var(--white); box-shadow: var(--shadow); }
.pricing-card h2 { margin-top: 1.2rem; }
.pricing-card > p { color: var(--muted); }
.pricing-card > small { margin-top: .8rem; display: block; color: var(--muted); text-align: center; }
.price-label { margin: .5rem 0 1rem; color: var(--navy); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 850; line-height: 1.1; }
.setup-notice { padding: 1rem; border-left: 4px solid var(--yellow); background: var(--yellow-pale); color: #5d4d00; }

.auth-section { min-height: 700px; padding-block: 4rem; display: grid; place-items: start center; }
.auth-card { width: min(500px, 100%); padding: clamp(1.6rem, 4vw, 2.7rem); border: 1px solid var(--line); border-top: 5px solid var(--teal); border-radius: 6px; background: var(--white); box-shadow: var(--shadow); }
.auth-card h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.auth-switch { margin: 1.4rem 0 0; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--teal); font-weight: 750; }
.google-button { margin-top: 1.4rem; border-color: var(--line-strong); background: var(--white); color: var(--ink); box-shadow: var(--shadow-small); }
.google-button:hover { border-color: var(--navy); background: var(--blue-pale); }
.google-mark { width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: #4285f4; font-weight: 900; }
.auth-divider { margin: 1.25rem 0 -.3rem; display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.stack-form { margin-top: 1.6rem; display: grid; gap: 1rem; }
.stack-form > label:not(.check-row), .field { display: grid; gap: .4rem; color: var(--ink-soft); font-size: .88rem; font-weight: 750; }
.stack-form input, .field input, .field textarea, .field select {
    width: 100%;
    min-height: 47px;
    padding: .72rem .85rem;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    background: var(--white);
    color: var(--ink);
    outline: none;
}
.field textarea { resize: vertical; line-height: 1.55; }
.stack-form input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 132, 61, .12); }
.field > span small, .field > small { color: var(--muted); font-weight: 550; }
.check-row { display: flex; align-items: center; gap: .55rem; color: var(--ink-soft); font-size: .9rem; }

.image-upload-field > input[type="file"] { padding: .55rem; background: var(--paper); cursor: pointer; }
.image-upload-current {
    padding: .85rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--teal);
    border-radius: 4px;
    background: var(--paper);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.image-upload-current img { width: 220px; max-width: 42%; aspect-ratio: 16 / 9; display: block; border-radius: 3px; object-fit: cover; }
.image-remove-option { font-weight: 700; cursor: pointer; }
.image-remove-option input { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--red); }

.flash { margin-top: 1rem; padding: .9rem 1.1rem; border: 1px solid; border-radius: 4px; }
.flash-success { border-color: #abd8c6; background: #e9f7f1; color: #14634f; }
.flash-error { margin-bottom: 1rem; border-color: #efb9be; background: var(--red-pale); color: #8d2f38; }
.flash-error ul { margin-bottom: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stats-grid article { min-height: 150px; padding: 1.35rem; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 5px; background: var(--white); display: flex; flex-direction: column; }
.stats-grid span { color: var(--muted); font-weight: 700; }
.stats-grid strong { margin-top: auto; color: var(--navy); font-size: 2.2rem; line-height: 1.1; }
.stats-grid small { color: var(--muted); }
.admin-choice-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.admin-choice { padding: 1.5rem; border: 1px solid var(--line); border-radius: 5px; background: var(--white); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem; box-shadow: var(--shadow-small); }
.admin-choice h2 { margin: 0 0 .35rem; font-size: 1.25rem; }
.admin-choice p { margin: 0; color: var(--muted); font-size: .92rem; }
.choice-icon { width: 50px; height: 50px; border-radius: 4px; background: var(--teal-pale); color: var(--teal-dark); display: grid; place-items: center; font-weight: 900; }
.choice-icon-yellow { background: var(--yellow-pale); color: #70560d; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--teal-pale); color: var(--ink-soft); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td > strong { display: block; }
.admin-table td > small { display: block; color: var(--muted); }
.admin-title-cell { min-width: 230px; display: flex; align-items: center; gap: .8rem; }
.admin-title-cell strong, .admin-title-cell small { display: block; }
.admin-title-cell small { color: var(--muted); }
.admin-table-thumb { width: 64px; height: 44px; flex: 0 0 auto; border-radius: 3px; object-fit: cover; background: var(--teal-pale); }
.table-actions { text-align: right; white-space: nowrap; }

.admin-editor-section { padding-bottom: 5rem; }
.admin-form-card { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 5px; background: var(--white); box-shadow: var(--shadow-small); }
.form-grid { display: grid; gap: 1rem; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-wide { grid-column: 1 / -1; }
.publish-switch { margin-top: 1.2rem; padding: 1rem; border-radius: 4px; background: var(--teal-pale); display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; }
.publish-switch input { width: 18px; height: 18px; margin-top: .18rem; accent-color: var(--teal); }
.publish-switch span { display: grid; }
.publish-switch small { color: var(--muted); }
.switch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-actions { margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .7rem; }
.subeditor-head { margin: 3rem 0 1.2rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.subeditor-head h2 { margin-bottom: .35rem; }
.subeditor-head p { margin: 0; color: var(--muted); }
.count-pill { white-space: nowrap; }

.add-editor { margin-bottom: 1rem; border-color: #acd9d2 !important; background: #f0faf8 !important; }
.inline-editor, .entry-editor { padding: 1rem; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.inline-editor-grid { display: grid; grid-template-columns: 1.1fr 1.1fr 1.2fr 1.2fr 85px auto; align-items: end; gap: .7rem; }
.field-position input { text-align: center; }
.entry-list { display: grid; gap: .75rem; }
.entry-editor { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .9rem; }
.entry-editor > form:last-child { padding-bottom: .7rem; }
.danger-zone { margin-top: 3rem; padding: 1.2rem; border: 1px solid #efc2c6; border-radius: 4px; background: var(--red-pale); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.danger-zone p { margin: .2rem 0 0; color: #8a555a; }

.module-add-form { margin-bottom: 1rem; border-left: 5px solid var(--yellow); }
.module-form-grid { width: 100%; display: grid; grid-template-columns: 1fr 1.4fr 90px auto; align-items: end; gap: .75rem; }
.module-editor-list { display: grid; gap: 1rem; }
.module-editor { padding: 1.2rem; border: 1px solid var(--line); border-top: 5px solid var(--navy); border-radius: 5px; background: var(--white); box-shadow: var(--shadow-small); }
.module-editor-head { padding-bottom: 1rem; border-bottom: 1px solid var(--line); display: flex; align-items: end; gap: 1rem; }
.module-editor-head > form:first-child { flex: 1; }
.module-lessons { margin: 1rem 0; display: grid; gap: .55rem; }
.module-lesson-row { padding: .8rem; border: 1px solid var(--line); border-left: 4px solid var(--teal); background: var(--paper); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: .8rem; }
.module-lesson-row > div { display: grid; }
.module-lesson-row small { color: var(--muted); }
.position-form { display: flex; align-items: end; gap: .5rem; }
.position-form .field { width: 84px; }
.add-lesson-form { padding: 1rem; background: var(--teal-pale); display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; align-items: end; gap: .75rem; }
.premium-access-form { min-width: 390px; display: grid; grid-template-columns: auto minmax(150px, 1fr) auto; align-items: end; gap: .8rem; }

.site-footer { padding: 1.6rem 0; border-top: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: .86rem; }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-wrap span:first-child { color: var(--navy); font-weight: 800; }

@media (max-width: 1050px) {
    .nav-toggle { display: block; }
    .main-nav { position: absolute; inset: 76px 20px auto; padding: 1rem; border: 1px solid var(--line); border-radius: 4px; background: var(--white); box-shadow: var(--shadow); display: none; flex-direction: column; align-items: stretch; gap: .45rem; }
    .main-nav.is-open { display: flex; }
    .main-nav > a:not(.button) { padding: .65rem; border: 0; border-radius: 3px; }
    .main-nav > a.is-active:not(.button) { background: var(--teal-pale); }
    .account-menu { margin-top: .3rem; padding: .8rem .65rem .2rem; border-top: 1px solid var(--line); border-left: 0; justify-content: space-between; }
    .inline-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inline-editor-grid .button { align-self: end; }
    .word-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .course-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .premium-access-form { min-width: 320px; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .hero-grid, .lesson-layout, .course-hero, .subscription-page { grid-template-columns: 1fr; }
    .hero-grid { gap: 2.5rem; }
    .feature-row, .card-grid, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-row article:last-child { grid-column: 1 / -1; }
    .lesson-sidebar { position: static; }
    .word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vocabulary-row { grid-template-columns: 1fr auto; }
    .vocabulary-source { grid-column: 1; }
    .vocabulary-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; }
    .admin-choice-grid { grid-template-columns: 1fr; }
    .entry-editor { grid-template-columns: 1fr; }
    .entry-editor > form:last-child { padding: 0; }
    .continue-panel { grid-template-columns: 1fr; }
    .course-progress-card { max-width: 480px; }
    .lesson-completion-panel, .module-editor-head { align-items: stretch; flex-direction: column; }
    .module-lesson-row { grid-template-columns: 1fr auto; }
    .module-lesson-row > form:last-child { grid-column: 2; }
    .add-lesson-form { grid-template-columns: 1fr auto; }
    .add-lesson-form > .field:first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
    .shell { width: min(100% - 28px, 1180px); }
    .nav-wrap { min-height: 68px; }
    .main-nav { inset: 68px 14px auto; }
    .brand-mark { width: 35px; height: 35px; }
    .welcome-hero { padding-top: 3.6rem; }
    .hero-copy p { font-size: 1.04rem; }
    .hero-actions .button { width: 100%; }
    .lesson-preview { padding: 1.4rem; }
    .lesson-preview > p { margin: 1.6rem 0; }
    .feature-row, .card-grid, .course-grid, .course-grid-compact, .stats-grid, .two-columns, .inline-editor-grid, .switch-grid, .module-form-grid { grid-template-columns: 1fr; }
    .feature-row article:last-child { grid-column: auto; }
    .feature-row article { padding: 1.3rem; }
    .dashboard-head, .section-heading, .subeditor-head { align-items: stretch; flex-direction: column; }
    .vocabulary-stat { min-width: 0; width: 100%; }
    .section-tinted { width: 100%; margin-inline: 0; border-radius: 0; padding-inline: 14px; }
    .lesson-page, .kit-page { padding-top: 1.6rem; }
    .lesson-copy { padding: 1.35rem; font-size: 1.12rem; line-height: 1.9; }
    .content-hero-media { aspect-ratio: 16 / 9; margin-top: -.5rem; }
    .word-grid { grid-template-columns: 1fr; }
    .word-card { min-height: 130px; }
    .dialog-actions .button { width: 100%; }
    .vocabulary-row { grid-template-columns: 1fr; }
    .vocabulary-actions { grid-column: auto; grid-row: auto; align-items: stretch; }
    .vocabulary-actions .button { width: 100%; }
    .admin-page-head .button, .header-actions, .header-actions .button { width: 100%; }
    .danger-zone, .footer-wrap { align-items: stretch; flex-direction: column; }
    .image-upload-current { align-items: stretch; flex-direction: column; }
    .image-upload-current img { width: 100%; max-width: none; }
    .danger-zone .button { width: 100%; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .continue-panel .button { width: 100%; }
    .curriculum-row { grid-template-columns: 38px 1fr; }
    .curriculum-row > a, .curriculum-row > .lock-label { grid-column: 2; }
    .rating-actions { grid-template-columns: 1fr; }
    .study-card { min-height: 460px; }
    .module-lesson-row, .add-lesson-form, .premium-access-form { min-width: 0; grid-template-columns: 1fr; }
    .module-lesson-row > form:last-child, .add-lesson-form > .field:first-child { grid-column: auto; }
    .position-form { justify-content: space-between; }
    .user-access-table { min-width: 760px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Blog and audio media */
.audio-upload-field { display: grid; gap: .65rem; }
.audio-upload-field > span { font-weight: 750; }
.audio-upload-field audio,
.translation-extra audio,
.flashcard-audio { width: 100%; max-width: 520px; }

.audio-panel {
    margin: 1.25rem 0 2rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--line);
    border-left: 5px solid var(--yellow);
    border-radius: 5px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    display: grid;
    grid-template-columns: minmax(160px, .35fr) minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}
.audio-panel > div { display: grid; gap: .15rem; }
.audio-panel .eyebrow { margin: 0; }
.audio-panel audio { width: 100%; }
.flashcard-audio { margin: .4rem auto 1rem; }

.home-public-section { padding: 1rem 0 4.5rem; }
.home-blog-section { padding-top: 3.8rem; background: #eef6f1; border-top: 1px solid var(--line); }
.public-course-card { min-height: 280px; }
.public-course-card > small { margin-top: auto; color: var(--muted); }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
}
.blog-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.blog-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.blog-card-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--teal-pale); }
.blog-card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease; }
.blog-card:hover .blog-card-cover img { transform: scale(1.025); }
.blog-card-body { flex: 1; padding: 1.35rem; display: flex; flex-direction: column; }
.blog-card-body h2 { margin: 1rem 0 .6rem; font-size: 1.35rem; }
.blog-card-body h2 a { color: var(--navy); }
.blog-card-body p { color: var(--muted); }
.blog-card-body .card-action { margin-top: auto; padding-top: 1rem; color: var(--teal); font-weight: 800; }

.blog-article { max-width: 940px; padding-top: 2.2rem; padding-bottom: 5rem; }
.blog-article-header { max-width: 820px; margin: 2rem 0; }
.blog-article-header h1 { margin: .75rem 0 1rem; font-size: clamp(2.5rem, 6vw, 4.8rem); }
.blog-article-header > p { color: var(--muted); font-size: 1.15rem; line-height: 1.75; }
.blog-hero-image { margin: 1.5rem 0 2rem; overflow: hidden; border-radius: 7px; background: var(--teal-pale); }
.blog-hero-image img { width: 100%; display: block; }
.blog-copy { max-width: 760px; margin: 2rem auto; font-size: 1.12rem; line-height: 1.9; }
.blog-copy p { margin: 0 0 1.45rem; }
.blog-gallery { margin-top: 3rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.blog-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.blog-gallery img { width: 100%; display: block; }
.blog-gallery figcaption { padding: .75rem .9rem; color: var(--muted); font-size: .86rem; }

.admin-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.admin-gallery-card { padding: .9rem; border: 1px solid var(--line); border-radius: 5px; background: var(--white); display: grid; gap: .8rem; }
.admin-gallery-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.gallery-meta-form { display: grid; gap: .65rem; }
.compact-media-preview { margin-bottom: .4rem; }
.pagination-wrap { margin-top: 2rem; }

@media (min-width: 1051px) {
    .inline-editor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .blog-grid, .admin-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .blog-grid, .blog-gallery, .admin-gallery-grid, .audio-panel { grid-template-columns: 1fr; }
    .blog-article { padding-top: 1.5rem; }
    .blog-copy { font-size: 1.05rem; }
}
.pagination-wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .8rem; }
.pagination-status { color: var(--muted); font-size: .9rem; font-weight: 700; }

/* Flashcard navigation and clearer review choices */
.flashcard-nav {
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .8rem;
}
.flashcard-nav-button { min-width: 138px; }
.flashcard-nav-button:first-child { justify-self: start; }
.flashcard-nav-button:last-child { justify-self: end; }
.flashcard-nav-position {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
}
.flashcard-nav-position strong { color: var(--ink); }
.study-card.is-reviewed { border-top-color: var(--teal); }
.study-card.is-reviewed .rating-actions .button:disabled { opacity: .58; cursor: default; }

@media (max-width: 560px) {
    .flashcard-nav { grid-template-columns: 1fr auto 1fr; gap: .35rem; }
    .flashcard-nav-button { min-width: 0; padding-inline: .7rem; font-size: .82rem; }
    .rating-actions { grid-template-columns: 1fr; }
}


/* FIX checkbox login */
.stack-form label.check-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
}

.stack-form label.check-row input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 0 0 18px !important;
}

.stack-form label.check-row span {
    width: auto !important;
    display: inline !important;
    margin: 0 !important;
}
