/* Targeted cabinet cleanup. Public landing styles are intentionally untouched. */

/* Readability */
#appView {
    font-size: 16px;
}

#appView .eyebrow {
    font-size: 12px;
}

#appView .topic-row h3,
#appView .work-card h3,
#appView .admin-card h3 {
    font-size: 16px;
    line-height: 1.35;
}

#appView .topic-row-status,
#appView .topic-section-meta,
#appView .work-card small,
#appView .student-message-card small,
#appView .admin-message-card small,
#appView .prototype-warning {
    font-size: 12px;
    line-height: 1.45;
}

#appView .practice-path-card small,
#appView .game-mode-card > small,
#appView .library-card small,
#appView .constitution-file small,
#appView .game-section-card small {
    font-size: 13px;
    line-height: 1.45;
}

#appView .practice-path-card strong,
#appView .game-mode-card > strong,
#appView .library-card strong,
#appView .constitution-file strong,
#appView .game-section-card > strong {
    line-height: 1.25;
}

#appView .dashboard-sheet > span,
#appView .course-donut span,
#appView .dashboard-progress-stats > div > span:not(.dashboard-legend),
#appView .daily-plan-copy > span,
#appView .daily-plan-copy > small,
#appView .daily-plan-action,
#appView .study-week-day > span,
#appView .study-week-day > strong,
#appView .study-week-day > small,
#appView .schedule-list button > span,
#appView .slot-reels span,
#appView .slot-question > span,
#appView .subject-selector-number,
#appView #practicePage .game-mode-label {
    font-size: 11px;
}

/* Theme checklist: two real navigation controls and one mood illustration. */
#appView #lessonPage .topic-progress-panel {
    grid-template-columns: minmax(220px, .72fr) minmax(360px, 1.28fr) 138px;
    gap: 24px;
    padding: 24px 26px;
    border-radius: 18px;
}

#appView #lessonPage .topic-progress-copy h2 {
    font-size: 25px;
}

#appView .topic-progress-copy > p:last-child {
    font-size: 13px;
    line-height: 1.5;
}

#appView .topic-progress-checklist {
    gap: 9px;
}

#appView .topic-progress-check {
    min-height: 66px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 12px;
}

#appView .topic-progress-check strong {
    font-size: 14px;
    line-height: 1.3;
}

#appView .topic-progress-check small {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
}

#appView .topic-progress-check .topic-progress-action {
    display: block;
    color: var(--wine);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

#appView .topic-progress-check--link:hover:not(:disabled) {
    border-color: var(--blue);
    box-shadow: 0 7px 16px rgba(17, 47, 108, .09);
    transform: translateY(-1px);
}

#appView .topic-progress-check--link:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--blue) 25%, transparent);
    outline-offset: 2px;
}

#appView .topic-progress-check--link:disabled {
    opacity: .62;
}

#appView .topic-progress-mood figcaption {
    font-size: 12px;
    line-height: 1.35;
}

/* Navigation within a theme. */
#appView #lessonPage .lesson-section-tabs {
    top: 84px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
    border-radius: 16px;
}

#appView #lessonPage .lesson-section-tab {
    min-height: 62px;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 11px;
    font-size: 15px;
    line-height: 1.25;
}

#appView #lessonPage .lesson-section-tab-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 8px;
}

#appView #lessonPage .lesson-section-tab i {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    font-size: 11px;
}

#appView #topicTestSection,
#appView #uploadForm {
    scroll-margin-top: 172px;
}

/* Test: compact instructions and an ordinary, non-pinned autosave row. */
#appView #lessonPage .test-instructions {
    margin-bottom: 22px;
    padding: 15px 18px;
    border: 1px solid #c8d4ea;
    border-left: 4px solid var(--wine);
    border-radius: 12px;
    background: var(--blue-soft);
    box-shadow: none;
}

#appView #lessonPage .test-instructions strong {
    margin-bottom: 5px;
    font-size: 15px;
}

#appView #lessonPage .test-instructions p {
    max-width: 900px;
    font-size: 14px;
    line-height: 1.55;
}

#appView #lessonPage .test-question,
#appView #lessonPage .test-result-card {
    border-radius: 16px;
}

#appView #lessonPage .test-question-title,
#appView #lessonPage .test-answer-option,
#appView #lessonPage .test-text-answer,
#appView #lessonPage .test-select-answer {
    font-size: 15px;
}

#appView #lessonPage .test-question-points,
#appView #lessonPage .test-answer-review,
#appView #lessonPage .test-result-card small {
    font-size: 13px;
}

#appView #lessonPage .test-submit-panel {
    position: static !important;
    inset: auto !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#appView #lessonPage .test-submit-panel p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

/* Moderate rounding in the requested cabinet areas. */
#appView .submission-panel,
#appView .teacher-message-panel,
#appView .work-card,
#appView .practice-path-card,
#appView .game-mode-card,
#appView .library-shelf,
#appView .library-file,
#appView .constitution-file {
    border-radius: 16px;
}

/* Library keeps useful authors/source notes but loses file-format badges. */
#appView .library-shelf-heading h2 {
    font-size: 26px;
}

#appView .library-shelf-heading small {
    font-size: 12px;
}

#appView .library-file {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    min-height: 72px;
    padding: 13px 15px;
}

#appView .library-file strong {
    font-size: 14px;
    line-height: 1.35;
}

#appView .library-file small {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}

#appView .library-file > b {
    font-size: 17px;
    white-space: nowrap;
}

/* Trial variants: a calm editorial list, without nested mini-cards. */
#appView #variantsHub .variants-hero {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 32px;
    min-height: 0;
    margin-bottom: 30px;
    padding: 28px 0 30px;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid #b8c6df;
    border-radius: 0;
    background: transparent;
}

#appView #variantsHub .variants-hero::after {
    display: none;
}

#appView #variantsHub .variants-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(48px, 6vw, 70px);
    line-height: .98;
}

#appView #variantsHub .variants-hero p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

#appView #variantsHub .variants-hero-art {
    display: grid;
    width: 180px;
    height: 156px;
    max-width: 100%;
    place-items: center;
    justify-self: end;
    overflow: hidden;
    border: 1px solid #b8c6df;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
    transform: rotate(4deg);
}

#appView #variantsHub .variants-hero-art img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
}

#appView #practiceVariantsShelf {
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#appView #practiceVariantsShelf .practice-variants-groups {
    display: block;
}

#appView #practiceVariantsShelf .practice-variants-group,
#appView #practiceVariantsShelf .practice-variants-group--general {
    padding: 27px 0 24px;
    border: 0;
    border-top: 1px solid #c9d5ed;
    border-radius: 0;
    background: transparent;
}

#appView #practiceVariantsShelf .practice-variants-group:first-child {
    border-top: 0;
}

#appView #practiceVariantsShelf .practice-variants-group h3 {
    margin: 0 0 11px;
    color: var(--blue-dark);
    font-size: 23px;
    line-height: 1.2;
}

#appView #practiceVariantsShelf .variant-list {
    gap: 0;
}

#appView #practiceVariantsShelf .variant-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 66px;
    padding: 14px 2px;
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

#appView #practiceVariantsShelf .variant-row:first-child {
    border-top-color: transparent;
}

#appView #practiceVariantsShelf .variant-row:hover {
    padding-right: 8px;
    padding-left: 8px;
    border-color: color-mix(in srgb, var(--blue) 28%, transparent);
    background: var(--blue-soft);
    box-shadow: none;
    transform: none;
}

#appView #practiceVariantsShelf .variant-row strong {
    font-size: 16px;
}

#appView #practiceVariantsShelf .variant-row > b {
    color: var(--wine);
    font-size: 14px;
    font-weight: 800;
}

/* Constitution hub: contained cover, readable route and aligned resources. */
#appView #constitutionHub .constitution-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: center;
    gap: 38px;
    min-height: 390px;
    margin-bottom: 20px;
    padding: 42px 46px;
    overflow: hidden;
    border: 1px solid #c9d5ed;
    border-top: 6px solid var(--wine);
    border-radius: 22px;
    background:
        radial-gradient(rgba(23, 70, 162, .1) .7px, transparent .7px),
        #fff;
    background-size: 15px 15px, auto;
    color: var(--ink);
    box-shadow: 0 13px 28px rgba(17, 47, 108, .07);
}

#appView #constitutionHub .constitution-hero::after {
    position: absolute;
    right: -80px;
    bottom: -145px;
    width: 390px;
    height: 270px;
    border: 2px solid rgba(141, 37, 54, .14);
    border-radius: 50%;
    content: "";
    transform: rotate(-10deg);
}

#appView #constitutionHub .constitution-hero-tab {
    position: absolute;
    top: 30px;
    left: 46px;
    z-index: 2;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

#appView #constitutionHub .constitution-hero-copy {
    position: relative;
    z-index: 2;
    padding-top: 34px;
}

#appView #constitutionHub .constitution-hero .eyebrow {
    margin-bottom: 13px;
    color: var(--wine);
}

#appView #constitutionHub .constitution-hero h1 {
    max-width: 610px;
    margin: 0 0 16px;
    color: var(--blue-dark);
    font-size: clamp(48px, 5.4vw, 68px);
    line-height: .96;
}

#appView #constitutionHub .constitution-hero-text {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

#appView #constitutionHub .constitution-hero .button {
    margin-top: 24px;
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

#appView #constitutionHub .constitution-hero-art {
    position: relative;
    z-index: 2;
    display: grid;
    width: 290px;
    height: 300px;
    place-items: center;
    justify-self: end;
}

#appView #constitutionHub .constitution-hero-art > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(12px 14px 13px rgba(17, 47, 108, .18));
}

#appView #constitutionHub .constitution-paperclip {
    position: absolute;
    z-index: 3;
    top: 26px;
    right: 16px;
    width: 22px;
    height: 54px;
    border: 3px solid var(--wine);
    border-radius: 13px;
    opacity: .7;
    transform: rotate(13deg);
}

#appView #constitutionHub .constitution-paperclip::after {
    position: absolute;
    top: 5px;
    right: 4px;
    width: 9px;
    height: 37px;
    border: 2px solid var(--wine);
    border-radius: 8px;
    content: "";
}

#appView #constitutionHub .constitution-seal {
    position: absolute;
    z-index: 3;
    right: 4px;
    bottom: 2px;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 14px rgba(17, 47, 108, .12);
}

#appView #constitutionHub .constitution-seal svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--wine);
    stroke-width: 1.6;
}

#appView #constitutionHub .constitution-seal span {
    color: var(--blue-dark);
    font-size: 15px;
    font-weight: 800;
}

#appView #constitutionHub .constitution-route {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 20px;
    overflow: hidden;
    border: 1px solid #c9d5ed;
    border-radius: 16px;
    background: #fff;
}

#appView #constitutionHub .constitution-route article {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 16px 18px;
    border-right: 1px solid #d9e1ef;
}

#appView #constitutionHub .constitution-route article:last-child {
    border-right: 0;
}

#appView #constitutionHub .constitution-route article > span {
    color: var(--wine);
    font-size: 17px;
    font-weight: 800;
}

#appView #constitutionHub .constitution-route strong,
#appView #constitutionHub .constitution-route small {
    display: block;
}

#appView #constitutionHub .constitution-route strong {
    color: var(--blue-dark);
    font-size: 15px;
    line-height: 1.3;
}

#appView #constitutionHub .constitution-route small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

#appView #constitutionHub .constitution-files {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

#appView #constitutionHub .constitution-file {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 220px;
    grid-template-rows: 52px auto 1fr auto;
    align-content: start;
    padding: 22px;
    overflow: hidden;
    border: 1px solid #c9d5ed;
    border-top: 5px solid var(--blue);
    border-radius: 16px;
    background:
        radial-gradient(rgba(23, 70, 162, .08) .65px, transparent .65px),
        #fff;
    background-size: 15px 15px, auto;
    color: var(--ink);
    font: inherit;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(17, 47, 108, .06);
    cursor: pointer;
}

#appView #constitutionHub .constitution-file:nth-child(2) {
    border-top-color: var(--wine);
}

#appView #constitutionHub .constitution-file:hover {
    border-color: var(--blue);
    box-shadow: 0 13px 26px rgba(17, 47, 108, .1);
    transform: translateY(-2px);
}

#appView #constitutionHub .constitution-file > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid #c1cde4;
    border-radius: 13px;
    background: var(--blue-soft);
    color: var(--blue);
}

#appView #constitutionHub .constitution-file > span svg {
    width: 27px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

#appView #constitutionHub .constitution-file em {
    margin-top: 14px;
    color: var(--wine);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

#appView #constitutionHub .constitution-file strong {
    margin: 7px 30px 9px 0;
    color: var(--blue-dark);
    font-size: 19px;
    line-height: 1.25;
}

#appView #constitutionHub .constitution-file small {
    align-self: end;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

#appView #constitutionHub .constitution-file > b {
    position: absolute;
    right: 20px;
    bottom: 18px;
    color: var(--wine);
    font-size: 20px;
}

/* Dark theme corrections for the newly simplified surfaces. */
html[data-theme="dark"] #appView #lessonPage .test-instructions {
    border-color: #405575;
    border-left-color: var(--wine);
    background: #172b49;
    color: var(--ink);
}

html[data-theme="dark"] #appView #lessonPage .test-submit-panel {
    border-top-color: #405575;
    background: transparent;
}

html[data-theme="dark"] #appView #variantsHub .variants-hero {
    border-bottom-color: #405575;
    background: transparent;
}

html[data-theme="dark"] #appView #variantsHub .variants-hero-art {
    border-color: #405575;
    background: #182944;
}

/* Test review: unmistakable result colors and a short learning note. */
#appView #lessonPage .test-answer-option.is-correct-answer,
#appView #lessonPage .test-text-answer.is-correct,
#appView #lessonPage .test-select-answer.is-correct {
    border-color: #4f9b6c;
    background: #edf8f1;
    color: #185c36;
    box-shadow: inset 4px 0 0 #2e8150;
}

#appView #lessonPage .test-answer-option.is-selected-wrong,
#appView #lessonPage .test-text-answer.is-wrong,
#appView #lessonPage .test-select-answer.is-wrong {
    border-color: #c86678;
    background: #fff0f3;
    color: #8f263a;
    box-shadow: inset 4px 0 0 #a9364c;
}

#appView #lessonPage .test-answer-review.is-correct {
    border-color: #71ad87;
    background: #edf8f1;
    color: #185c36;
}

#appView #lessonPage .test-answer-review.is-wrong {
    border-color: #d58a98;
    background: #fff0f3;
    color: #8f263a;
}

#appView #lessonPage .test-answer-review > div {
    display: grid;
    gap: 5px;
}

#appView #lessonPage .test-answer-review span {
    font-size: 14px;
    font-weight: 750;
}

#appView #lessonPage .test-answer-review .test-correct-answer {
    color: #216f43;
}

#appView #lessonPage .test-answer-review small {
    color: #5e3a42;
    font-size: 13px;
    line-height: 1.5;
}

html[data-theme="dark"] #appView #lessonPage .test-answer-option.is-correct-answer,
html[data-theme="dark"] #appView #lessonPage .test-text-answer.is-correct,
html[data-theme="dark"] #appView #lessonPage .test-select-answer.is-correct,
html[data-theme="dark"] #appView #lessonPage .test-answer-review.is-correct {
    border-color: #4f9b6c;
    background: #183b2a;
    color: #d9f5e4;
    box-shadow: inset 4px 0 0 #58a976;
}

html[data-theme="dark"] #appView #lessonPage .test-answer-option.is-selected-wrong,
html[data-theme="dark"] #appView #lessonPage .test-text-answer.is-wrong,
html[data-theme="dark"] #appView #lessonPage .test-select-answer.is-wrong,
html[data-theme="dark"] #appView #lessonPage .test-answer-review.is-wrong {
    border-color: #b85b70;
    background: #47202b;
    color: #ffe0e6;
    box-shadow: inset 4px 0 0 #c76579;
}

html[data-theme="dark"] #appView #lessonPage .test-answer-review.is-wrong small {
    color: #f2c9d2;
}

html[data-theme="dark"] #appView #lessonPage .test-answer-review .test-correct-answer {
    color: #9fddb5;
}

html[data-theme="dark"] #appView #practiceVariantsShelf,
html[data-theme="dark"] #appView #practiceVariantsShelf .practice-variants-group,
html[data-theme="dark"] #appView #practiceVariantsShelf .variant-row {
    background: transparent;
    box-shadow: none;
}

html[data-theme="dark"] #appView #practiceVariantsShelf .practice-variants-group {
    border-top-color: #344b6b;
}

html[data-theme="dark"] #appView #practiceVariantsShelf .variant-row {
    border-top-color: #2c405e;
}

html[data-theme="dark"] #appView #practiceVariantsShelf .variant-row:hover {
    background: #1b3155;
}

html[data-theme="dark"] #appView #constitutionHub .constitution-hero,
html[data-theme="dark"] #appView #constitutionHub .constitution-route,
html[data-theme="dark"] #appView #constitutionHub .constitution-file {
    border-color: #344b6b;
    background:
        radial-gradient(rgba(143, 178, 245, .1) .7px, transparent .7px),
        #111f35;
    color: var(--ink);
    box-shadow: 0 13px 28px rgba(0, 0, 0, .16);
}

html[data-theme="dark"] #appView #constitutionHub .constitution-hero {
    border-top-color: var(--wine);
}

html[data-theme="dark"] #appView #constitutionHub .constitution-hero-text,
html[data-theme="dark"] #appView #constitutionHub .constitution-route small,
html[data-theme="dark"] #appView #constitutionHub .constitution-file small {
    color: var(--muted);
}

html[data-theme="dark"] #appView #constitutionHub .constitution-route article {
    border-right-color: #344b6b;
}

html[data-theme="dark"] #appView #constitutionHub .constitution-file:nth-child(2) {
    border-top-color: var(--wine);
}

html[data-theme="dark"] #appView #constitutionHub .constitution-file > span {
    border-color: #405575;
    background: #172b49;
}

html[data-theme="dark"] #appView #constitutionHub .constitution-seal {
    background: #172b49;
}

@media (max-width: 1024px) {
    #appView #lessonPage .topic-progress-panel {
        grid-template-columns: minmax(210px, .75fr) minmax(320px, 1.25fr) 112px;
        gap: 19px;
        padding: 22px;
    }

    #appView .topic-progress-mood > span {
        width: 92px;
        height: 92px;
    }

    #appView #constitutionHub .constitution-hero {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 26px;
        padding: 36px 38px;
    }

    #appView #constitutionHub .constitution-hero-tab {
        left: 38px;
    }

    #appView #constitutionHub .constitution-hero-art {
        width: 250px;
        height: 270px;
    }
}

@media (max-width: 768px) {
    #appView #lessonPage .topic-progress-panel {
        grid-template-columns: minmax(0, 1fr) 100px;
    }

    #appView .topic-progress-checklist {
        grid-column: 1 / -1;
    }

    #appView .topic-progress-mood {
        grid-column: 2;
        grid-row: 1;
    }

    #appView #lessonPage .lesson-section-tab {
        min-width: 0;
        padding: 8px 10px;
        font-size: 14px;
    }

    #appView #lessonPage .lesson-section-tab-icon {
        display: none;
    }

    #appView #variantsHub .variants-hero {
        grid-template-columns: minmax(0, 1fr) 150px;
        gap: 22px;
    }

    #appView #variantsHub .variants-hero-art {
        width: 145px;
        height: 132px;
    }

    #appView #constitutionHub .constitution-hero {
        grid-template-columns: minmax(0, 1fr) 210px;
        gap: 20px;
        min-height: 350px;
        padding: 32px 28px;
    }

    #appView #constitutionHub .constitution-hero-tab {
        top: 24px;
        left: 28px;
    }

    #appView #constitutionHub .constitution-hero h1 {
        font-size: 48px;
    }

    #appView #constitutionHub .constitution-hero-art {
        width: 205px;
        height: 230px;
    }

    #appView #constitutionHub .constitution-route {
        grid-template-columns: 1fr;
    }

    #appView #constitutionHub .constitution-route article {
        min-height: 72px;
        border-right: 0;
        border-bottom: 1px solid #d9e1ef;
    }

    #appView #constitutionHub .constitution-route article:last-child {
        border-bottom: 0;
    }

    html[data-theme="dark"] #appView #constitutionHub .constitution-route article {
        border-bottom-color: #344b6b;
    }

    #appView #constitutionHub .constitution-files {
        grid-template-columns: 1fr;
    }

    #appView #constitutionHub .constitution-file {
        min-height: 190px;
    }
}

@media (max-width: 560px) {
    #appView #lessonPage .topic-progress-panel {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    #appView .topic-progress-mood {
        grid-column: 1;
        grid-row: auto;
        grid-template-columns: 76px minmax(0, 1fr);
        align-items: center;
        justify-items: start;
        text-align: left;
    }

    #appView .topic-progress-mood > span {
        width: 72px;
        height: 72px;
    }

    #appView .topic-progress-mood figcaption {
        max-width: none;
    }

    #appView .topic-progress-check {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    #appView .topic-progress-check .topic-progress-action {
        grid-column: 2;
    }

    #appView #lessonPage .lesson-section-tabs {
        top: 70px;
        gap: 4px;
        padding: 5px;
    }

    #appView #lessonPage .lesson-section-tab {
        min-height: 58px;
        padding: 7px 6px;
        font-size: 13px;
        text-align: center;
    }

    #appView #lessonPage .lesson-section-tab i {
        display: none;
    }

    #appView #topicTestSection,
    #appView #uploadForm {
        scroll-margin-top: 146px;
    }

    #appView #lessonPage .test-submit-panel {
        align-items: stretch;
        flex-direction: column;
    }

    #appView #variantsHub .variants-hero {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-top: 22px;
    }

    #appView #variantsHub .variants-hero h1 {
        font-size: 46px;
    }

    #appView #variantsHub .variants-hero-art {
        width: 140px;
        height: 126px;
        justify-self: start;
    }

    #appView #practiceVariantsShelf .practice-variants-group h3 {
        font-size: 20px;
    }

    #appView #practiceVariantsShelf .variant-row {
        gap: 12px;
    }

    #appView #practiceVariantsShelf .variant-row strong {
        font-size: 15px;
    }

    #appView #practiceVariantsShelf .variant-row > b {
        font-size: 13px;
    }

    #appView #constitutionHub .constitution-hero {
        grid-template-columns: 1fr;
        gap: 12px;
        min-height: 0;
        padding: 26px 24px 24px;
    }

    #appView #constitutionHub .constitution-hero-tab {
        position: static;
        grid-column: 1;
        grid-row: 1;
    }

    #appView #constitutionHub .constitution-hero-copy {
        grid-row: 2;
        padding-top: 0;
    }

    #appView #constitutionHub .constitution-hero .eyebrow {
        margin-bottom: 10px;
    }

    #appView #constitutionHub .constitution-hero h1 {
        max-width: 300px;
        font-size: 42px;
    }

    #appView #constitutionHub .constitution-hero-text {
        font-size: 14px;
    }

    #appView #constitutionHub .constitution-hero-art {
        grid-row: 3;
        width: 180px;
        height: 190px;
        justify-self: center;
    }

    #appView #constitutionHub .constitution-paperclip {
        top: 15px;
        right: 4px;
        transform: scale(.8) rotate(13deg);
    }

    #appView #constitutionHub .constitution-seal {
        width: 58px;
        height: 58px;
    }

    #appView #constitutionHub .constitution-route article {
        padding: 15px 16px;
    }

    #appView #constitutionHub .constitution-file {
        min-height: 205px;
        padding: 20px;
    }
}

/* Focused visual edit: fewer template-like containers, same structure and character. */
#appView .dashboard-intro,
#appView .dashboard-progress-overview,
#appView .study-checklist,
#appView .course-schedule,
#appView .oral-slot,
#appView .subjects-hero,
#appView #worksPage .works-heading,
#appView #practicePage .practice-heading,
#appView #practicePage .games-hero,
#appView #practicePage .library-hero,
#appView #practicePage .constitution-hero,
#appView #constitutionHub .constitution-hero {
    border-radius: 14px;
}

#appView .dashboard-intro::after,
#appView .dashboard-progress-overview::before,
#appView .dashboard-progress-overview::after,
#appView .subjects-hero::after,
#appView .subject-selector-card::after,
#appView #worksPage .works-heading::after,
#appView .oral-slot::after,
#appView #constitutionHub .constitution-hero::after {
    display: none;
}

#appView .subjects-hero-visual > svg {
    display: none;
}

/* Progress remains the main colour block; its details no longer look like cards inside a card. */
#appView .dashboard-progress-overview {
    padding: 34px 38px;
    box-shadow: 0 12px 28px rgba(17, 47, 108, .14);
}

#appView .dashboard-progress-stats {
    gap: 0;
}

#appView .dashboard-progress-stats > div {
    padding: 11px 2px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    border-radius: 0;
    background: transparent;
}

#appView .dashboard-progress-stats > div:last-child {
    border-bottom: 0;
}

#appView .dashboard-progress-stats > div > span:not(.dashboard-legend),
#appView .dashboard-progress-stats strong {
    font-size: 13px;
}

#appView .dashboard-progress-character {
    border-radius: 12px;
}

#appView .dashboard-progress-character img {
    border-radius: 8px;
}

#appView .dashboard-progress-character .isaac-panel-outline {
    display: none;
}

/* Course schedule reads as one navigable list instead of four nested cards. */
#appView .schedule-list {
    gap: 0;
    border-top: 1px solid var(--line);
}

#appView .schedule-list button {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 67px;
    padding: 10px 2px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#appView .schedule-list button:hover {
    padding-right: 8px;
    padding-left: 8px;
    border-color: var(--line);
    background: var(--wine-soft);
}

#appView .schedule-list button b {
    display: none;
}

#appView .oral-slot {
    box-shadow: 0 12px 28px rgba(17, 47, 108, .15);
}

#appView .slot-question {
    border-radius: 10px;
}

/* Subject switches stay prominent; the topic list becomes a calm editorial list. */
#appView .subjects-hero {
    min-height: 220px;
    box-shadow: 0 10px 24px rgba(21, 49, 103, .06);
}

#appView .subject-selector-card {
    grid-template-columns: 48px 64px minmax(0, 1fr);
    min-height: 138px;
    border-radius: 12px;
    box-shadow: none;
}

#appView .subject-selector-card:hover {
    box-shadow: 0 8px 18px rgba(23, 70, 162, .08);
    transform: translateY(-1px);
}

#appView .subject-selector-card.is-active {
    border-color: var(--blue-dark);
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    color: #fff;
}

#appView .subject-selector-card.is-active > strong,
#appView .subject-selector-card.is-active > small {
    color: #fff;
}

#appView .subject-selector-card > b {
    display: none;
}

#appView .subject-selector-number,
#appView .subject-selector-icon,
#appView .topic-row-number {
    border-radius: 9px;
}

#appView .topic-list {
    gap: 0;
    border-top: 1px solid var(--line);
}

#appView .topic-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    min-height: 78px;
    padding: 15px 8px;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

#appView .topic-row::before {
    display: none;
}

#appView .topic-row:hover {
    padding-right: 14px;
    padding-left: 14px;
    border-color: var(--line);
    background: var(--blue-soft);
    box-shadow: none;
    transform: none;
}

#appView .topic-row-status {
    border-radius: 8px;
}

#appView .topic-row-arrow {
    display: none;
}

/* Works: keep the illustration, remove the oversized empty-state card around it. */
#appView #worksPage .works-heading {
    background: linear-gradient(145deg, var(--blue-soft), #ffffff 62%);
    box-shadow: 0 10px 24px rgba(21, 49, 103, .06);
}

#appView #worksPage .works-heading-character {
    border-radius: 11px;
}

#appView #worksPage .empty-state--works {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 34px;
    min-height: 300px;
    padding: 34px 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#appView #worksPage .empty-state--works .eyebrow {
    display: none;
}

#appView #worksPage .empty-state--works h2 {
    font-size: clamp(28px, 3.2vw, 40px);
}

#appView #worksPage .empty-works-visual {
    width: 168px;
    height: 188px;
    border-radius: 10px;
    box-shadow: 7px 8px 0 var(--wine-soft);
}

#appView #worksPage .empty-works-visual svg {
    width: 108px;
}

#appView .teacher-message-panel,
#appView .teacher-message-form,
#appView .work-card,
#appView .student-message-card {
    border-radius: 12px;
}

/* Additional practice: useful navigation tiles remain, decorative numbering/arrows do not. */
#appView #practicePage .practice-heading,
#appView #practicePage .games-hero,
#appView #practicePage .library-hero,
#appView #practicePage .constitution-hero {
    box-shadow: 0 10px 24px rgba(21, 49, 103, .06);
}

#appView #practicePage .practice-heading-character,
#appView #practicePage .games-hero-visual,
#appView #practicePage .library-hero-icon {
    border-radius: 11px;
}

#appView #practicePage .practice-path-card {
    grid-template-rows: 112px 1fr;
    min-height: 270px;
    padding: 24px;
    border-radius: 12px;
    box-shadow: none;
}

#appView #practicePage .practice-path-card:hover {
    box-shadow: 0 8px 18px rgba(23, 70, 162, .08);
    transform: translateY(-1px);
}

#appView #practicePage .practice-path-number,
#appView #practicePage .practice-path-card > b {
    display: none;
}

#appView #practicePage .practice-path-icon {
    align-self: start;
    border-radius: 10px;
    box-shadow: none;
}

#appView #practicePage .practice-path-card > span:nth-of-type(3) {
    align-self: end;
}

#appView #practicePage .game-mode-card {
    min-height: 225px;
    padding: 22px;
    border-radius: 12px;
    box-shadow: none;
}

#appView #practicePage .game-mode-card:hover {
    box-shadow: 0 8px 18px rgba(23, 70, 162, .08);
    transform: translateY(-1px);
}

#appView #practicePage .game-mode-label {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

#appView #practicePage .game-mode-card > strong {
    max-width: 75%;
    margin-top: 84px;
}

#appView #practicePage .game-mode-art,
#appView #practicePage .game-mode-card:nth-child(even) .game-mode-art {
    top: 52px;
    right: 20px;
    width: 86px;
    height: 70px;
    padding: 9px;
    border-radius: 9px;
    box-shadow: none;
    transform: none;
}

#appView #practicePage .game-mode-art img {
    max-width: 60px;
    max-height: 46px;
}

#appView #constitutionHub .constitution-route,
#appView #constitutionHub .constitution-file {
    border-radius: 12px;
}

#appView #constitutionHub .constitution-hero-tab,
#appView #constitutionHub .constitution-file > b {
    display: none;
}

#appView #constitutionHub .constitution-hero-copy {
    padding-top: 0;
}

html[data-theme="dark"] #appView .schedule-list button:hover,
html[data-theme="dark"] #appView .topic-row:hover {
    background: #1b3155;
}

html[data-theme="dark"] #appView #worksPage .empty-state--works {
    border-color: #344b6b;
    background: transparent;
}

html[data-theme="dark"] #appView #worksPage .works-heading {
    background:
        radial-gradient(rgba(126, 166, 235, .16) .7px, transparent .7px),
        #12213a;
    background-size: 15px 15px, auto;
}

html[data-theme="dark"] #appView #constitutionHub .constitution-file {
    background: transparent !important;
    color: var(--ink);
    box-shadow: none;
}

html[data-theme="dark"] #appView #constitutionHub .constitution-file strong {
    color: var(--blue-dark);
}

html[data-theme="dark"] #appView #constitutionHub .constitution-file small {
    color: var(--muted);
}

@media (max-width: 768px) {
    #appView .dashboard-progress-overview {
        padding: 28px 24px;
    }

    #appView .subject-selector-card {
        grid-template-columns: 44px 56px minmax(0, 1fr);
    }

    #appView #worksPage .empty-state--works {
        grid-template-columns: 138px minmax(0, 1fr);
        gap: 24px;
    }

    #appView #worksPage .empty-works-visual {
        width: 132px;
        height: 150px;
    }
}

@media (max-width: 560px) {
    #appView .topic-row {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 12px;
    }

    #appView .topic-row-status {
        grid-column: 2;
        justify-self: start;
    }

    #appView #worksPage .empty-state--works {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    #appView #worksPage .empty-works-visual {
        width: 128px;
        height: 142px;
    }

    #appView #practicePage .practice-path-card {
        grid-template-columns: 74px minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: center;
        gap: 18px;
        min-height: 138px;
        padding: 20px;
    }

    #appView #practicePage .practice-path-icon {
        width: 68px;
        height: 78px;
        padding: 7px;
    }

    #appView #practicePage .practice-path-card > span:nth-of-type(3) {
        align-self: center;
    }

    #appView #practicePage .game-mode-card > strong,
    #appView #practicePage .game-mode-card > small {
        max-width: 70%;
    }
}

/* Browser-sized cabinet shell. The public landing page is not affected. */
#appView {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    overflow-x: clip;
}

#appView .app-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

#appView .app-main,
#appView .page-container {
    width: 100%;
    min-width: 0;
}

#appView .page-container {
    overflow-x: clip;
}

#appView .page {
    width: min(1240px, calc(100% - 64px));
}

#appView .sidebar {
    top: 0;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    min-height: calc(76px + env(safe-area-inset-top, 0px));
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* Safari can repaint nested sticky translucent panels on different subpixels
   while scrolling. Stable compositor layers prevent that visible jitter. */
#appView .sidebar,
#appView #lessonPage .lesson-section-tabs {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

#appView .sidebar {
    -webkit-transform: translate3d(0, 0, 0) !important;
    transform: translate3d(0, 0, 0) !important;
}

#appView #lessonPage .lesson-section-tab {
    transition: border-color 160ms ease, background-color 160ms ease,
        color 160ms ease, box-shadow 160ms ease;
}

html[data-theme="dark"] #appView .sidebar {
    background: #0d192b;
}

@media (max-width: 900px) {
    #appView .page {
        width: min(100% - 32px, 1240px);
        padding-top: 34px;
    }

    #appView .sidebar,
    body.menu-open #appView .sidebar {
        padding-top: max(8px, env(safe-area-inset-top, 0px));
    }

    /* Keep the topic tabs below the two-row fixed cabinet navigation. */
    #appView #lessonPage .lesson-section-tabs {
        top: calc(112px + env(safe-area-inset-top, 0px));
    }
}

@media (max-width: 560px) {
    #appView .page {
        width: min(100% - 24px, 1240px);
        padding-top: 26px;
    }
}

/* Login consent and legal navigation */
.login-consent-panel {
    display: grid;
    gap: 11px;
    margin-top: 20px;
    padding: 16px 18px;
    border: 1px solid #ccd6e7;
    border-left: 4px solid var(--blue);
    border-radius: 10px;
    background: #f7f9fd;
}

.login-check {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer;
}

.login-check input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--blue);
}

.login-check a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.cabinet-legal {
    display: flex;
    width: min(1240px, calc(100% - 64px));
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    margin: 0 auto;
    padding: 22px 0 30px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.cabinet-legal strong {
    color: var(--ink);
    font-size: 13px;
}

.cabinet-legal a {
    color: var(--blue-dark);
    text-decoration: none;
}

.cabinet-legal a:hover,
.cabinet-legal a:focus-visible {
    color: var(--wine);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cabinet-legal--login {
    width: min(560px, 100%);
    justify-content: center;
    margin-top: 24px;
    padding: 18px 0 0;
    text-align: center;
}

/* Test corrections */
#appView #lessonPage .test-corrections {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 2px solid var(--blue-dark);
}

#appView #lessonPage .test-corrections-heading {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

#appView #lessonPage .test-corrections-heading img {
    display: block;
    width: 150px;
    aspect-ratio: 465 / 262;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 6px 7px 0 var(--wine-soft);
    transform: rotate(-2deg);
}

#appView #lessonPage .test-corrections-heading h3 {
    margin: 2px 0 7px;
    color: var(--blue-dark);
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.05;
}

#appView #lessonPage .test-corrections-heading p:last-child {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

#appView #lessonPage .test-correction-list {
    display: grid;
    gap: 18px;
}

#appView #lessonPage .test-correction-card {
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

#appView #lessonPage .test-correction-card:first-child {
    border-top: 0;
}

#appView #lessonPage .test-correction-card.is-corrected {
    border-left: 4px solid #2f7a51;
    padding-left: 18px;
}

#appView #lessonPage .test-correction-card.is-still-wrong {
    border-left: 4px solid var(--wine);
    padding-left: 18px;
}

#appView #lessonPage .test-correction-card > span {
    display: block;
    margin-bottom: 8px;
    color: var(--wine);
    font-size: 13px;
    font-weight: 800;
}

#appView #lessonPage .test-correction-card > p {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.55;
    white-space: pre-line;
}

#appView #lessonPage .test-correction-control {
    display: grid;
    gap: 9px;
}

#appView #lessonPage .test-correction-control > input[type="text"],
#appView #lessonPage .test-correction-control > select {
    width: min(520px, 100%);
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #aebbd0;
    border-radius: 8px;
    background: var(--paper-light);
    color: var(--ink);
    font: inherit;
}

#appView #lessonPage .test-correction-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.45;
}

#appView #lessonPage .test-correction-option input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--blue);
}

#appView #lessonPage .test-correction-result {
    display: block;
    min-height: 20px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 800;
}

#appView #lessonPage .is-corrected .test-correction-result {
    color: #23643f;
}

#appView #lessonPage .is-still-wrong .test-correction-result {
    color: var(--wine);
}

#appView #lessonPage .test-correction-comment {
    max-width: 760px;
    margin-top: 24px;
}

#appView #lessonPage .test-correction-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

#appView #lessonPage #testCorrectionStatus {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

html[data-theme="dark"] .login-consent-panel {
    border-color: #415778;
    background: #172944;
}

html[data-theme="dark"] .login-check,
html[data-theme="dark"] .cabinet-legal strong,
html[data-theme="dark"] #appView #lessonPage .test-correction-card > p {
    color: #f4f7fc;
}

html[data-theme="dark"] .cabinet-legal {
    border-color: #344b6b;
}

html[data-theme="dark"] .cabinet-legal a,
html[data-theme="dark"] .login-check a {
    color: #a9c5ff;
}

html[data-theme="dark"] #appView #lessonPage .test-corrections {
    border-color: #789ee8;
}

html[data-theme="dark"] #appView #lessonPage .test-corrections-heading h3 {
    color: #dbe7ff;
}

html[data-theme="dark"] #appView #lessonPage .test-correction-control > input[type="text"],
html[data-theme="dark"] #appView #lessonPage .test-correction-control > select {
    border-color: #4c6383;
    background: #162842;
    color: #f4f7fc;
}

html[data-theme="dark"] #appView #lessonPage .is-corrected .test-correction-result {
    color: #9bd4ae;
}

html[data-theme="dark"] #appView #lessonPage .is-still-wrong .test-correction-result {
    color: #ffbac5;
}

@media (max-width: 900px) {
    .cabinet-legal {
        width: min(100% - 32px, 1240px);
    }
}

@media (max-width: 560px) {
    .cabinet-legal {
        width: min(100% - 24px, 1240px);
        align-items: flex-start;
        flex-direction: column;
    }

    .cabinet-legal--login {
        align-items: center;
    }

    #appView #lessonPage .test-corrections-heading {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #appView #lessonPage .test-corrections-heading img {
        width: 132px;
    }
}

/* Test tables from Google Forms are rendered as real text instead of screenshots. */
#appView #lessonPage .test-question-transcription {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(220px, .9fr);
    gap: 0;
    margin: 0 0 22px 62px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--paper-light) 88%, var(--blue-soft));
}

#appView #lessonPage .test-question-transcription.is-single {
    grid-template-columns: 1fr;
}

#appView #lessonPage .test-transcription-column {
    min-width: 0;
}

#appView #lessonPage .test-transcription-column + .test-transcription-column {
    border-left: 1px solid var(--line);
}

#appView #lessonPage .test-transcription-column > strong {
    display: block;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--blue-dark);
    font-size: 13px;
    line-height: 1.3;
}

#appView #lessonPage .test-transcription-column > div {
    display: grid;
    gap: 0;
}

#appView #lessonPage .test-transcription-column p {
    margin: 0;
    padding: 10px 14px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
}

#appView #lessonPage .test-transcription-column p + p {
    border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

#appView #lessonPage .test-question-figure {
    width: fit-content;
    max-width: calc(100% - 62px);
    margin: 0 0 22px 62px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

#appView #lessonPage .test-question-figure .test-question-image {
    max-width: 100%;
    margin: 0;
}

/* The variants tile no longer jumps against the cursor on hover. */
#appView #practicePage .practice-path-card[data-practice-view="variantsHub"] {
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

#appView #practicePage .practice-path-card[data-practice-view="variantsHub"]:hover,
#appView #practicePage .practice-path-card[data-practice-view="variantsHub"]:focus-visible {
    transform: none;
}

html[data-theme="dark"] #appView #lessonPage .test-question-transcription {
    border-color: #405575;
    background: #162842;
}

html[data-theme="dark"] #appView #lessonPage .test-transcription-column + .test-transcription-column,
html[data-theme="dark"] #appView #lessonPage .test-transcription-column > strong,
html[data-theme="dark"] #appView #lessonPage .test-transcription-column p + p {
    border-color: #405575;
}

html[data-theme="dark"] #appView #lessonPage .test-transcription-column > strong {
    color: #dbe7ff;
}

html[data-theme="dark"] #appView #lessonPage .test-question-figure {
    border-color: #405575;
    background: #13233b;
}

html[data-theme="dark"] #appView #lessonPage .test-question-image--diagram {
    filter: invert(.88) hue-rotate(180deg) saturate(.9);
}

@media (max-width: 760px) {
    #appView #lessonPage .test-question-transcription {
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    #appView #lessonPage .test-transcription-column + .test-transcription-column {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    #appView #lessonPage .test-question-figure {
        max-width: 100%;
        margin-left: 0;
    }
}
