:root {
    --tc-blue: #1f5fae;
    --tc-blue-dark: #174779;
    --tc-blue-soft: #edf6ff;
    --tc-green: #168a5b;
    --tc-green-soft: #eefaf4;
    --tc-orange: #c96a16;
    --tc-orange-soft: #fff6eb;
    --tc-purple: #7753b5;
    --tc-purple-soft: #f5f1ff;
    --tc-red: #b83d49;
    --tc-red-soft: #fff2f3;
    --tc-ink: #1e293b;
    --tc-muted: #617084;
    --tc-line: #dbe4ee;
    --tc-surface: #ffffff;
    --tc-bg: #f6f8fb;
    --tc-radius: 18px;
    --tc-shadow: 0 12px 36px rgba(26, 56, 91, 0.10);
}

.tc-math-lessons-page .entry-content,
.tc-math-lessons-page .site-main,
.tc-math-lessons-page main {
    overflow: visible;
}

.tc-lessons-home,
.tc-grade-lessons,
.tc-lesson-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 64px;
    color: var(--tc-ink);
    box-sizing: border-box;
}

.tc-lessons-home *,
.tc-grade-lessons *,
.tc-single-lesson * {
    box-sizing: border-box;
}

.tc-lessons-hero,
.tc-grade-hero,
.tc-lesson-header {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 40px;
    background: linear-gradient(135deg, #f1f8ff 0%, #ffffff 56%, #edf8f3 100%);
    border: 1px solid #dce8f3;
    box-shadow: var(--tc-shadow);
}

.tc-lessons-hero::after,
.tc-grade-hero::after,
.tc-lesson-header::after {
    content: "";
    position: absolute;
    right: -65px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(31, 95, 174, 0.08);
}

.tc-lessons-eyebrow,
.tc-section-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--tc-blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.tc-lessons-hero h2,
.tc-grade-hero h2,
.tc-lesson-header h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    color: #17324f;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.18;
}

.tc-lessons-hero p,
.tc-grade-hero p,
.tc-lesson-lead {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0;
    color: var(--tc-muted);
    font-size: 18px;
    line-height: 1.75;
}

.tc-grade-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.tc-grade-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 150px;
    padding: 24px;
    border-radius: var(--tc-radius);
    border: 1px solid var(--tc-line);
    background: var(--tc-surface);
    color: var(--tc-ink);
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(32, 58, 86, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tc-grade-card:hover {
    transform: translateY(-3px);
    border-color: #b9d1ea;
    box-shadow: 0 16px 34px rgba(32, 58, 86, .12);
}

.tc-grade-card__number {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--tc-blue-soft);
    color: var(--tc-blue);
    font-size: 30px;
    font-weight: 900;
}

.tc-grade-card--2 .tc-grade-card__number { background: var(--tc-green-soft); color: var(--tc-green); }
.tc-grade-card--3 .tc-grade-card__number { background: var(--tc-orange-soft); color: var(--tc-orange); }
.tc-grade-card--4 .tc-grade-card__number { background: var(--tc-purple-soft); color: var(--tc-purple); }
.tc-grade-card--5 .tc-grade-card__number { background: var(--tc-red-soft); color: var(--tc-red); }

.tc-grade-card__body {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tc-grade-card__body strong {
    font-size: 23px;
    line-height: 1.2;
}

.tc-grade-card__body > span {
    color: var(--tc-muted);
    font-size: 15px;
    line-height: 1.55;
}

.tc-grade-card__body small {
    color: var(--tc-blue);
    font-weight: 700;
}

.tc-grade-card__arrow {
    font-size: 27px;
    color: var(--tc-blue);
}

.tc-lessons-note,
.tc-practice-reminder {
    margin-top: 24px;
    padding: 18px 20px;
    border: 1px solid #cfe1f2;
    border-radius: 14px;
    background: #f4f9ff;
    color: #31465d;
    line-height: 1.65;
}

.tc-lesson-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--tc-muted);
    font-size: 14px;
}

.tc-lesson-breadcrumb a {
    color: var(--tc-blue);
    text-decoration: none;
}

.tc-grade-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.tc-grade-hero__count {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #fff;
    border: 7px solid rgba(31, 95, 174, .12);
    box-shadow: 0 10px 28px rgba(25, 61, 94, .10);
}

.tc-grade-hero__count strong {
    color: var(--tc-blue);
    font-size: 36px;
    line-height: 1;
}

.tc-grade-hero__count span {
    margin-top: 6px;
    color: var(--tc-muted);
    font-size: 13px;
}

.tc-lesson-tools {
    margin: 28px 0 22px;
    padding: 20px;
    border: 1px solid var(--tc-line);
    border-radius: var(--tc-radius);
    background: #fff;
}

.tc-lesson-search input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #cfdbe7;
    border-radius: 12px;
    background: #fff;
    color: var(--tc-ink);
    font-size: 16px;
}

.tc-lesson-search input:focus {
    outline: 3px solid rgba(31, 95, 174, .14);
    border-color: var(--tc-blue);
}

.tc-topic-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.tc-topic-filters button {
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid #d6e1ec;
    border-radius: 999px;
    background: #f8fafc;
    color: #40536a;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.tc-topic-filters button:hover,
.tc-topic-filters button.is-active {
    border-color: var(--tc-blue);
    background: var(--tc-blue);
    color: #fff;
}

.tc-topic-group {
    margin-top: 28px;
}

.tc-topic-group > h3 {
    margin: 0 0 14px;
    padding-left: 13px;
    border-left: 5px solid var(--tc-blue);
    color: #203b58;
    font-size: 25px;
}

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

.tc-lesson-card {
    min-width: 0;
}

.tc-lesson-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 220px;
    padding: 22px;
    border: 1px solid var(--tc-line);
    border-radius: 16px;
    background: #fff;
    color: var(--tc-ink);
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(32, 58, 86, .06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tc-lesson-card a:hover {
    transform: translateY(-3px);
    border-color: #b6cde4;
    box-shadow: 0 13px 30px rgba(32, 58, 86, .11);
}

.tc-lesson-card__order {
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--tc-blue-soft);
    color: var(--tc-blue);
    font-size: 12px;
    font-weight: 800;
}

.tc-lesson-card h4 {
    margin: 0 0 10px;
    color: #1e3854;
    font-size: 20px;
    line-height: 1.35;
}

.tc-lesson-card p {
    margin: 0 0 18px;
    color: var(--tc-muted);
    font-size: 14px;
    line-height: 1.6;
}

.tc-lesson-card__link {
    margin-top: auto;
    color: var(--tc-blue);
    font-weight: 800;
}

.tc-no-lessons,
.tc-empty-state {
    padding: 30px;
    border: 1px dashed #bdccdb;
    border-radius: var(--tc-radius);
    background: #fff;
    text-align: center;
    color: var(--tc-muted);
}

.tc-single-lesson {
    background: var(--tc-bg);
    padding: 1px 0 48px;
}

.tc-lesson-article {
    margin: 0;
}

.tc-lesson-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.tc-lesson-header__main {
    position: relative;
    z-index: 1;
}

.tc-lesson-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tc-lesson-header__meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    border: 1px solid rgba(49, 91, 133, .15);
    color: #3d5873;
    font-size: 13px;
    font-weight: 750;
}

.tc-print-lesson {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #bfd0e2;
    border-radius: 12px;
    background: #fff;
    color: var(--tc-blue-dark);
    cursor: pointer;
    font-weight: 800;
}

.tc-print-lesson:hover {
    border-color: var(--tc-blue);
    color: var(--tc-blue);
}

.tc-lesson-featured {
    margin: 22px 0 0;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: var(--tc-shadow);
}

.tc-lesson-featured img {
    display: block;
    width: 100%;
    height: auto;
}

.tc-lesson-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    margin-top: 26px;
}

.tc-lesson-sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--tc-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(32, 58, 86, .06);
}

.admin-bar .tc-lesson-sidebar {
    top: 56px;
}

.tc-lesson-sidebar strong {
    margin-bottom: 8px;
    color: #1f3853;
}

.tc-lesson-sidebar a {
    padding: 9px 10px;
    border-radius: 9px;
    color: #51657a;
    text-decoration: none;
    font-size: 14px;
}

.tc-lesson-sidebar a:hover {
    background: var(--tc-blue-soft);
    color: var(--tc-blue);
}

.tc-lesson-content {
    min-width: 0;
}

.tc-lesson-section {
    scroll-margin-top: 30px;
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid var(--tc-line);
    border-radius: var(--tc-radius);
    background: #fff;
    box-shadow: 0 7px 24px rgba(32, 58, 86, .06);
}

.tc-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e6edf4;
}

.tc-section-number {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--tc-blue);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.tc-section-heading .tc-section-kicker {
    margin: 0 0 2px;
    font-size: 11px;
}

.tc-section-heading h2 {
    margin: 0;
    color: #203b58;
    font-size: 27px;
    line-height: 1.25;
}

.tc-section-objectives .tc-section-number { background: var(--tc-green); }
.tc-section-examples .tc-section-number { background: var(--tc-orange); }
.tc-section-application .tc-section-number { background: var(--tc-purple); }
.tc-section-self-practice .tc-section-number { background: var(--tc-red); }

.tc-objective-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tc-objective-list li {
    position: relative;
    padding: 11px 14px 11px 42px;
    border-radius: 12px;
    background: var(--tc-green-soft);
    color: #285743;
    line-height: 1.55;
}

.tc-objective-list li::before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 10px;
    color: var(--tc-green);
    font-weight: 900;
}

.tc-prose {
    color: #2f4154;
    font-size: 17px;
    line-height: 1.8;
}

.tc-prose > :first-child { margin-top: 0; }
.tc-prose > :last-child { margin-bottom: 0; }

.tc-prose h3,
.tc-prose h4 {
    margin: 24px 0 10px;
    color: #1d3d5c;
    line-height: 1.35;
}

.tc-prose h3 { font-size: 22px; }
.tc-prose h4 { font-size: 19px; }

.tc-prose p {
    margin: 0 0 14px;
}

.tc-prose ul,
.tc-prose ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.tc-prose li {
    margin: 6px 0;
}

.tc-prose strong {
    color: #193a5b;
}

.tc-prose blockquote,
.tc-prose .tc-remember {
    margin: 18px 0;
    padding: 16px 18px;
    border-left: 5px solid var(--tc-blue);
    border-radius: 0 12px 12px 0;
    background: var(--tc-blue-soft);
    color: #294967;
}

.tc-prose table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    background: #fff;
}

.tc-prose th,
.tc-prose td {
    padding: 11px 13px;
    border: 1px solid #d7e2ec;
    text-align: left;
}

.tc-prose th {
    background: #eef5fb;
    color: #244462;
}

.tc-prose code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eef3f8;
    color: #183d61;
}

.tc-solution-box,
.tc-answer-box {
    margin-top: 20px;
    border: 1px solid #d6e2ec;
    border-radius: 14px;
    background: #f9fbfd;
    overflow: hidden;
}

.tc-solution-box summary,
.tc-answer-box summary {
    padding: 15px 18px;
    cursor: pointer;
    color: #234868;
    font-weight: 850;
    list-style-position: inside;
}

.tc-solution-box[open] summary,
.tc-answer-box[open] summary {
    border-bottom: 1px solid #dce6ef;
    background: #eef6fd;
}

.tc-solution-box > .tc-prose,
.tc-answer-box > .tc-prose {
    padding: 18px;
}

.tc-answer-box {
    border-color: #efcbd0;
    background: #fffafb;
}

.tc-answer-box[open] summary {
    border-bottom-color: #f0d7da;
    background: var(--tc-red-soft);
}

.tc-practice-reminder {
    margin: 0 0 20px;
    border-color: #f0d9ae;
    background: #fff9ec;
    color: #6c5122;
}

.tc-lesson-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.tc-lesson-navigation a {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 96px;
    padding: 18px;
    border: 1px solid var(--tc-line);
    border-radius: 15px;
    background: #fff;
    color: #1f3f5e;
    text-decoration: none;
}

.tc-lesson-navigation a:hover {
    border-color: #b9cfe3;
    box-shadow: 0 8px 22px rgba(32, 58, 86, .08);
}

.tc-lesson-navigation a span {
    color: var(--tc-blue);
    font-size: 13px;
    font-weight: 800;
}

.tc-lesson-navigation__next {
    text-align: right;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[hidden] { display: none !important; }

@media (max-width: 900px) {
    .tc-lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tc-lesson-layout { grid-template-columns: 1fr; }
    .tc-lesson-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tc-lesson-sidebar strong { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .tc-lessons-home,
    .tc-grade-lessons,
    .tc-lesson-shell {
        width: min(100% - 20px, 1180px);
        margin-top: 18px;
    }

    .tc-lessons-hero,
    .tc-grade-hero,
    .tc-lesson-header {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .tc-lessons-hero p,
    .tc-grade-hero p,
    .tc-lesson-lead { font-size: 16px; }

    .tc-grade-grid,
    .tc-lesson-grid { grid-template-columns: 1fr; }

    .tc-grade-card {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        min-height: 0;
        padding: 18px;
    }

    .tc-grade-card__number {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        font-size: 25px;
    }

    .tc-grade-card__body strong { font-size: 20px; }

    .tc-grade-hero,
    .tc-lesson-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .tc-grade-hero__count {
        width: 92px;
        height: 92px;
        flex-basis: 92px;
    }

    .tc-grade-hero__count strong { font-size: 29px; }

    .tc-lesson-card a { min-height: 0; }
    .tc-lesson-tools { padding: 14px; }
    .tc-topic-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .tc-topic-filters button { flex: 0 0 auto; }

    .tc-lesson-sidebar {
        display: flex;
        overflow-x: auto;
        flex-direction: row;
        align-items: center;
        padding: 12px;
    }
    .tc-lesson-sidebar strong { flex: 0 0 auto; margin: 0; }
    .tc-lesson-sidebar a { flex: 0 0 auto; white-space: nowrap; }

    .tc-lesson-section { padding: 20px 16px; }
    .tc-section-heading { align-items: flex-start; }
    .tc-section-heading h2 { font-size: 23px; }
    .tc-prose { font-size: 16px; }

    .tc-lesson-navigation { grid-template-columns: 1fr; }
    .tc-lesson-navigation__next { text-align: left; }
}

@media print {
    body.tc-math-lessons-page header,
    body.tc-math-lessons-page footer,
    body.tc-math-lessons-page .site-header,
    body.tc-math-lessons-page .site-footer,
    .tc-lesson-breadcrumb,
    .tc-lesson-sidebar,
    .tc-print-lesson,
    .tc-lesson-navigation {
        display: none !important;
    }

    .tc-single-lesson,
    .tc-lesson-shell {
        width: 100%;
        margin: 0;
        padding: 0;
        background: #fff;
    }

    .tc-lesson-header,
    .tc-lesson-section {
        box-shadow: none;
        break-inside: avoid;
    }

    .tc-lesson-layout { display: block; }
    .tc-solution-box,
    .tc-answer-box { display: none; }
}

/* Curriculum map: version 2.1 */
.tc-grade-progress {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 132px;
    min-height: 104px;
    padding: 16px;
    border: 1px solid rgba(31, 95, 174, .16);
    border-radius: 18px;
    background: rgba(255,255,255,.78);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.tc-grade-progress strong {
    color: var(--tc-blue-dark);
    font-size: 27px;
    line-height: 1;
}

.tc-grade-progress span {
    margin-top: 8px;
    color: var(--tc-muted);
    font-size: 13px;
    font-weight: 700;
}

.tc-curriculum-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 26px 0 12px;
    padding: 16px;
    border: 1px solid var(--tc-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(32,58,86,.05);
}

.tc-curriculum-tools .tc-lesson-search {
    flex: 1 1 520px;
    margin: 0;
}

.tc-curriculum-tools .tc-lesson-search input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #cbd8e6;
    border-radius: 11px;
    background: #fff;
    color: var(--tc-ink);
    font-size: 16px;
}

.tc-semester-jump {
    display: flex;
    gap: 8px;
}

.tc-semester-jump a {
    display: inline-flex;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid #bfd3e7;
    border-radius: 10px;
    align-items: center;
    color: var(--tc-blue-dark);
    background: var(--tc-blue-soft);
    font-weight: 800;
    text-decoration: none !important;
}

.tc-semester-jump a:hover {
    border-color: var(--tc-blue);
    background: #e2f0ff;
}

.tc-curriculum-status-note {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 22px;
}

.tc-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.tc-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tc-status--ready {
    color: #087344;
    background: #eaf8f0;
}

.tc-status--ready::before { background: #16945c; }
.tc-status--pending {
    color: #6c7480;
    background: #f1f3f5;
}
.tc-status--pending::before { background: #9da5af; }

.tc-curriculum-semesters {
    display: grid;
    gap: 32px;
}

.tc-semester-section {
    scroll-margin-top: 28px;
    border: 1px solid var(--tc-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(32,58,86,.07);
    overflow: hidden;
}

.tc-semester-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    border-bottom: 1px solid #dfe8f1;
    background: linear-gradient(135deg, #eef7ff, #f9fcff);
}

.tc-semester-section:nth-child(2) .tc-semester-heading {
    background: linear-gradient(135deg, #eefaf4, #fbfffd);
}

.tc-semester-heading span {
    display: block;
    margin-bottom: 3px;
    color: var(--tc-muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tc-semester-heading h3 {
    margin: 0;
    color: #17324f;
    font-size: clamp(25px, 3vw, 34px);
}

.tc-semester-heading small {
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 999px;
    color: var(--tc-blue-dark);
    background: #fff;
    border: 1px solid #ceddec;
    font-weight: 800;
}

.tc-curriculum-units {
    display: grid;
    gap: 0;
}

.tc-curriculum-unit {
    padding: 25px 28px 28px;
    border-bottom: 1px solid #e5ecf3;
}

.tc-curriculum-unit:last-child { border-bottom: 0; }

.tc-curriculum-unit h4 {
    margin: 0 0 15px;
    padding-left: 13px;
    border-left: 4px solid var(--tc-blue);
    color: #17324f;
    font-size: 20px;
    line-height: 1.35;
}

.tc-semester-section:nth-child(2) .tc-curriculum-unit h4 {
    border-left-color: var(--tc-green);
}

.tc-curriculum-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 24px;
}

.tc-curriculum-item {
    min-width: 0;
}

.tc-curriculum-item > a,
.tc-curriculum-item__disabled {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 47px;
    padding: 8px 9px;
    border-radius: 10px;
    align-items: center;
    gap: 9px;
    color: #1d563b;
    text-decoration: none !important;
    transition: background .18s ease, transform .18s ease;
}

.tc-curriculum-item > a:hover {
    background: #eff9f4;
    transform: translateX(2px);
}

.tc-curriculum-item__number {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #17603e;
    background: #eaf8f0;
    font-size: 12px;
    font-weight: 900;
}

.tc-curriculum-item__title {
    min-width: 0;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.38;
}

.tc-curriculum-item__state {
    display: inline-grid;
    place-items: center;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    color: #fff;
    background: #16945c;
    font-size: 12px;
    font-weight: 900;
}

.tc-curriculum-item__disabled {
    color: #5e6875;
    background: #fafbfc;
}

.tc-curriculum-item__disabled .tc-curriculum-item__number {
    color: #69727e;
    background: #edf0f3;
}

.tc-curriculum-item__disabled small {
    color: #929aa4;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.tc-no-lessons {
    padding: 22px;
    border: 1px dashed #bbc9d8;
    border-radius: 14px;
    text-align: center;
    color: var(--tc-muted);
    background: #fff;
}

@media (max-width: 760px) {
    .tc-curriculum-tools,
    .tc-semester-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .tc-semester-jump {
        width: 100%;
    }

    .tc-semester-jump a {
        flex: 1 1 50%;
        justify-content: center;
    }

    .tc-grade-progress {
        flex-basis: auto;
        width: 100%;
        min-height: 78px;
    }

    .tc-semester-heading,
    .tc-curriculum-unit {
        padding-left: 17px;
        padding-right: 17px;
    }

    .tc-curriculum-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .tc-curriculum-item > a,
    .tc-curriculum-item__disabled {
        grid-template-columns: 30px minmax(0, 1fr);
        padding: 9px 6px;
    }

    .tc-curriculum-item__state,
    .tc-curriculum-item__disabled small {
        grid-column: 2;
        justify-self: start;
    }

    .tc-curriculum-item__state {
        display: none;
    }
}

/* Phép đặt tính theo cột dọc */
.tc-operation-set {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 18px;
    margin: 18px 0;
}

.tc-vertical-operation,
.tc-long-division-wrap {
    display: inline-block;
    max-width: 100%;
    padding: 14px 18px;
    border: 1px solid #d8e4dd;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(25, 91, 60, .06);
    vertical-align: top;
}

.tc-vertical-operation pre,
.tc-long-division__work {
    overflow: visible;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    color: #17211c;
    background: transparent;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .04em;
    text-align: left;
    white-space: pre;
}

.tc-long-division-wrap {
    min-width: 220px;
}

.tc-long-division__conversion {
    margin: 0 0 12px;
    padding: 9px 11px;
    border-radius: 8px;
    color: #315243;
    background: #f0f8f4;
    font-size: 14px;
    line-height: 1.5;
}

.tc-long-division {
    display: inline-grid;
    grid-template-columns: auto minmax(74px, auto);
    align-items: start;
    color: #17211c;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.25;
}

.tc-long-division__left {
    min-width: 88px;
    padding-right: 10px;
    text-align: right;
}

.tc-long-division__dividend {
    min-height: 1.25em;
    white-space: nowrap;
}

.tc-long-division__right {
    min-width: 74px;
    border-left: 2px solid currentColor;
    text-align: left;
}

.tc-long-division__divisor {
    min-height: 1.25em;
    padding: 0 7px 3px;
    border-bottom: 2px solid currentColor;
    white-space: nowrap;
}

.tc-long-division__quotient {
    min-height: 1.4em;
    padding: 4px 7px 0;
    white-space: nowrap;
}

.tc-long-division__right small {
    display: block;
    padding: 7px 7px 0;
    color: #5e6c64;
    font-family: var(--tc-font, inherit);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.tc-long-division__work {
    margin-top: 1px;
    font-size: inherit;
    line-height: 1.25;
    text-align: right;
}

.tc-long-division__blank {
    min-height: 2.5em;
}

/* Phân số HTML, không phụ thuộc thư viện bên ngoài */
.tc-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    min-width: 1.25em;
    margin: 0 .12em;
    vertical-align: -.55em;
    line-height: 1.05;
    text-align: center;
}

.tc-frac__top {
    padding: 0 .12em .08em;
    border-bottom: 1.5px solid currentColor;
}

.tc-frac__bottom {
    padding: .08em .12em 0;
}

.tc-math-formula {
    display: inline-block;
    padding: 0 .12em;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.08em;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .tc-operation-set {
        gap: 12px;
    }

    .tc-vertical-operation,
    .tc-long-division-wrap {
        padding: 11px 13px;
    }

    .tc-vertical-operation pre,
    .tc-long-division {
        font-size: 22px;
    }
}

@media print {
    .tc-vertical-operation,
    .tc-long-division-wrap {
        break-inside: avoid;
        box-shadow: none;
    }
}

/* KNTT 1.0: labels and worked solutions */
.tc-example,.tc-worked-solution,.tc-exercise,.tc-answer-item{margin:0 0 18px}.tc-example>p:first-child,.tc-worked-solution>p:first-child,.tc-exercise>p:first-child,.tc-answer-item>p:first-child{margin-top:0}.tc-worked-solution p,.tc-example p{margin:8px 0;line-height:1.75}.tc-operation-set{margin:14px 0 16px}.tc-data-table{border-collapse:collapse;width:100%;margin:14px 0}.tc-data-table th,.tc-data-table td{border:1px solid #d9dee7;padding:10px;text-align:center}.tc-data-table th{background:#f6f8fb}.tc-prose strong{font-weight:700}.tc-vertical-operation pre{font-size:clamp(20px,3vw,30px);line-height:1.28}.tc-long-division{font-size:clamp(18px,2.5vw,26px)}

/* Trang danh sách bài học dạng gọn: version 1.1.2 */
.tc-grade-lessons.tc-curriculum-page {
    margin-top: 8px;
}

.tc-grade-overview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    overflow: hidden;
    padding: 18px 22px;
    border: 1px solid #dce8f3;
    border-radius: 16px;
    background: linear-gradient(135deg, #f1f8ff 0%, #ffffff 62%, #edf8f3 100%);
    box-shadow: 0 7px 22px rgba(26, 56, 91, .07);
}

.tc-grade-overview::after {
    content: "";
    position: absolute;
    right: -46px;
    top: -82px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(31, 95, 174, .06);
    pointer-events: none;
}

.tc-grade-overview__main {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.tc-grade-overview .tc-lessons-eyebrow {
    margin-bottom: 3px;
    font-size: 12px;
}

.tc-grade-overview h2 {
    margin: 0 0 5px;
    color: #17324f;
    font-size: clamp(23px, 2.2vw, 30px);
    line-height: 1.2;
}

.tc-grade-overview p {
    max-width: 900px;
    margin: 0;
    color: var(--tc-muted);
    font-size: 15px;
    line-height: 1.55;
}

.tc-grade-overview .tc-grade-progress {
    flex: 0 0 112px;
    width: 112px;
    min-height: 72px;
    padding: 10px;
    border-radius: 14px;
}

.tc-grade-overview .tc-grade-progress strong {
    font-size: 23px;
}

.tc-grade-overview .tc-grade-progress span {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.3;
}

.tc-grade-lessons .tc-curriculum-tools {
    gap: 10px;
    margin: 10px 0 12px;
    padding: 9px 10px;
    border-radius: 13px;
    box-shadow: 0 4px 14px rgba(32,58,86,.04);
}

.tc-grade-lessons .tc-curriculum-tools .tc-lesson-search input {
    min-height: 40px;
    padding: 7px 12px;
    font-size: 15px;
}

.tc-grade-lessons .tc-semester-jump a {
    min-height: 38px;
    padding: 7px 13px;
    font-size: 14px;
}

.tc-grade-lessons .tc-curriculum-status-note {
    margin: 5px 0 12px;
}

.tc-grade-lessons .tc-status {
    padding: 4px 8px;
    font-size: 12px;
}

.tc-grade-lessons .tc-curriculum-semesters {
    gap: 20px;
}

.tc-grade-lessons .tc-semester-section {
    border-radius: 17px;
    box-shadow: 0 7px 22px rgba(32,58,86,.055);
}

.tc-grade-lessons .tc-semester-heading {
    padding: 13px 20px;
}

.tc-grade-lessons .tc-semester-heading span {
    margin-bottom: 1px;
    font-size: 11px;
}

.tc-grade-lessons .tc-semester-heading h3 {
    font-size: clamp(22px, 2.2vw, 27px);
}

.tc-grade-lessons .tc-semester-heading small {
    padding: 6px 9px;
    font-size: 12px;
}

.tc-grade-lessons .tc-curriculum-unit {
    padding: 14px 20px 16px;
}

.tc-grade-lessons .tc-curriculum-unit h4 {
    margin-bottom: 7px;
    padding-left: 10px;
    border-left-width: 3px;
    font-size: 18px;
    line-height: 1.3;
}

.tc-grade-lessons .tc-curriculum-grid {
    gap: 2px 18px;
}

.tc-grade-lessons .tc-curriculum-item > a,
.tc-grade-lessons .tc-curriculum-item__disabled {
    min-height: 39px;
    padding: 5px 6px;
    gap: 7px;
    border-radius: 8px;
}

.tc-grade-lessons .tc-curriculum-item__number {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    font-size: 11px;
}

.tc-grade-lessons .tc-curriculum-item__title {
    font-size: 15px;
    line-height: 1.3;
}

.tc-grade-lessons .tc-curriculum-item__state {
    width: 21px;
    height: 21px;
    font-size: 11px;
}

@media (min-width: 1500px) {
    .tc-grade-lessons .tc-curriculum-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .tc-grade-lessons.tc-curriculum-page {
        width: min(100% - 20px, 1180px);
        margin-top: 5px;
    }

    .tc-grade-overview {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .tc-grade-overview h2 {
        font-size: 23px;
    }

    .tc-grade-overview p {
        font-size: 14px;
        line-height: 1.5;
    }

    .tc-grade-overview .tc-grade-progress {
        width: auto;
        min-height: 54px;
        flex-basis: auto;
        flex-direction: row;
        gap: 7px;
    }

    .tc-grade-overview .tc-grade-progress span {
        margin-top: 0;
    }

    .tc-grade-lessons .tc-curriculum-tools {
        margin-top: 8px;
        padding: 8px;
    }

    .tc-grade-lessons .tc-semester-heading {
        gap: 7px;
        padding: 11px 14px;
    }

    .tc-grade-lessons .tc-semester-heading small {
        align-self: flex-start;
    }

    .tc-grade-lessons .tc-curriculum-unit {
        padding: 12px 13px 14px;
    }

    .tc-grade-lessons .tc-curriculum-unit h4 {
        font-size: 17px;
    }
}

/* Trang từng bài học dạng gọn: version 1.1.3 */
.tc-single-lesson .tc-lesson-shell {
    margin-top: 10px;
    margin-bottom: 42px;
}

.tc-single-lesson .tc-lesson-breadcrumb {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.tc-single-lesson .tc-lesson-header {
    align-items: center;
    gap: 18px;
    padding: 17px 22px;
    border-radius: 16px;
    box-shadow: 0 7px 22px rgba(26, 56, 91, .07);
}

.tc-single-lesson .tc-lesson-header::after {
    right: -54px;
    top: -96px;
    width: 185px;
    height: 185px;
}

.tc-single-lesson .tc-lesson-header__main {
    min-width: 0;
}

.tc-single-lesson .tc-lesson-header__meta {
    gap: 6px;
    margin-bottom: 7px;
}

.tc-single-lesson .tc-lesson-header__meta span {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
}

.tc-single-lesson .tc-lesson-header h1 {
    margin-bottom: 5px;
    font-size: clamp(28px, 3vw, 39px);
    line-height: 1.15;
}

.tc-single-lesson .tc-lesson-lead {
    max-width: none;
    font-size: 15px;
    line-height: 1.5;
}

.tc-single-lesson .tc-print-lesson {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 10px;
    font-size: 13px;
}

.tc-single-lesson .tc-lesson-featured {
    margin-top: 12px;
    border-radius: 14px;
}

.tc-single-lesson .tc-lesson-layout {
    display: block;
    margin-top: 10px;
}

.tc-single-lesson .tc-lesson-sidebar {
    position: sticky;
    z-index: 20;
    top: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;
    overflow-x: auto;
    margin-bottom: 10px;
    padding: 7px 9px;
    border-radius: 12px;
    white-space: nowrap;
    scrollbar-width: thin;
}

.admin-bar .tc-single-lesson .tc-lesson-sidebar {
    top: 40px;
}

.tc-single-lesson .tc-lesson-sidebar strong {
    flex: 0 0 auto;
    margin: 0 5px 0 0;
    padding-right: 9px;
    border-right: 1px solid var(--tc-line);
    font-size: 13px;
}

.tc-single-lesson .tc-lesson-sidebar a {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.25;
}

.tc-single-lesson .tc-lesson-section {
    scroll-margin-top: 70px;
    margin-bottom: 12px;
    padding: 18px 22px;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(32, 58, 86, .045);
}

.tc-single-lesson .tc-section-heading {
    gap: 11px;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.tc-single-lesson .tc-section-number {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 17px;
}

.tc-single-lesson .tc-section-heading .tc-section-kicker {
    font-size: 10px;
    line-height: 1.2;
}

.tc-single-lesson .tc-section-heading h2 {
    font-size: 22px;
    line-height: 1.2;
}

.tc-single-lesson .tc-objective-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.tc-single-lesson .tc-objective-list li {
    padding: 9px 10px 9px 34px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.tc-single-lesson .tc-objective-list li::before {
    left: 11px;
    top: 8px;
}

.tc-single-lesson .tc-prose {
    font-size: 16px;
    line-height: 1.7;
}

.tc-single-lesson .tc-prose p {
    margin-bottom: 10px;
}

.tc-single-lesson .tc-prose h3,
.tc-single-lesson .tc-prose h4 {
    margin-top: 18px;
    margin-bottom: 8px;
}

.tc-single-lesson .tc-prose h3 { font-size: 20px; }
.tc-single-lesson .tc-prose h4 { font-size: 18px; }

.tc-single-lesson .tc-prose ul,
.tc-single-lesson .tc-prose ol {
    margin-bottom: 12px;
}

.tc-single-lesson .tc-prose li {
    margin: 4px 0;
}

.tc-single-lesson .tc-example,
.tc-single-lesson .tc-worked-solution,
.tc-single-lesson .tc-exercise,
.tc-single-lesson .tc-answer-item {
    margin-bottom: 13px;
}

.tc-single-lesson .tc-solution-box,
.tc-single-lesson .tc-answer-box {
    margin-top: 13px;
    border-radius: 11px;
}

.tc-single-lesson .tc-solution-box summary,
.tc-single-lesson .tc-answer-box summary {
    padding: 11px 14px;
    font-size: 14px;
}

.tc-single-lesson .tc-solution-box > .tc-prose,
.tc-single-lesson .tc-answer-box > .tc-prose {
    padding: 14px;
}

.tc-single-lesson .tc-practice-reminder {
    margin-bottom: 12px;
    padding: 12px 14px;
    font-size: 14px;
}

.tc-single-lesson .tc-lesson-navigation {
    gap: 10px;
    margin-top: 13px;
}

.tc-single-lesson .tc-lesson-navigation a {
    min-height: 72px;
    padding: 13px 15px;
    border-radius: 12px;
}

@media (max-width: 900px) {
    .tc-single-lesson .tc-objective-list {
        grid-template-columns: 1fr;
    }

    .tc-single-lesson .tc-lesson-sidebar {
        position: static;
    }
}

@media (max-width: 700px) {
    .tc-single-lesson .tc-lesson-shell {
        margin-top: 5px;
    }

    .tc-single-lesson .tc-lesson-breadcrumb {
        margin-bottom: 6px;
        font-size: 12px;
    }

    .tc-single-lesson .tc-lesson-header {
        gap: 10px;
        padding: 14px 15px;
    }

    .tc-single-lesson .tc-lesson-header h1 {
        font-size: 27px;
    }

    .tc-single-lesson .tc-lesson-lead {
        font-size: 14px;
        line-height: 1.45;
    }

    .tc-single-lesson .tc-print-lesson {
        min-height: 35px;
    }

    .tc-single-lesson .tc-lesson-sidebar {
        margin-bottom: 8px;
        padding: 6px 7px;
    }

    .tc-single-lesson .tc-lesson-sidebar strong {
        display: none;
    }

    .tc-single-lesson .tc-lesson-sidebar a {
        padding: 6px 8px;
        font-size: 12px;
    }

    .tc-single-lesson .tc-lesson-section {
        margin-bottom: 9px;
        padding: 15px 14px;
    }

    .tc-single-lesson .tc-section-heading {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .tc-single-lesson .tc-section-heading h2 {
        font-size: 21px;
    }

    .tc-single-lesson .tc-prose {
        font-size: 16px;
        line-height: 1.65;
    }
}


/* =========================================================
 * Mobile UX patch — v1.3.2
 * - Sửa lỗi flex-basis làm khối tìm kiếm cao ~520px trên mobile.
 * - Đưa danh sách bài học lên sớm hơn trong màn hình đầu tiên.
 * - Thu gọn trang danh sách và trang bài học nhưng vẫn dễ chạm/đọc.
 * ========================================================= */
@media (max-width: 760px) {
    /* Trang Page của WordPress đã có tiêu đề trong khối plugin, tránh H1 theme quá lớn/lặp. */
    body.tc-math-lessons-page.page article.page > .entry-header,
    body.tc-math-lessons-page.page .entry-title,
    body.tc-math-lessons-page.page .page-title {
        display: none !important;
    }

    body.tc-math-lessons-page.page .entry-content {
        margin-top: 0 !important;
    }

    /* Trang danh sách theo khối lớp */
    .tc-grade-lessons.tc-curriculum-page {
        width: calc(100% - 16px);
        margin: 7px auto 34px;
    }

    .tc-grade-overview {
        gap: 7px;
        padding: 12px 13px;
        border-radius: 14px;
        box-shadow: 0 4px 14px rgba(26, 56, 91, .06);
    }

    .tc-grade-overview::after {
        right: -28px;
        top: -44px;
        width: 104px;
        height: 104px;
    }

    .tc-grade-overview .tc-lessons-eyebrow {
        margin-bottom: 2px;
        font-size: 10px;
        line-height: 1.3;
    }

    .tc-grade-overview h2 {
        margin-bottom: 3px;
        font-size: 20px;
        line-height: 1.2;
    }

    .tc-grade-overview p {
        display: -webkit-box;
        overflow: hidden;
        margin: 0;
        font-size: 13px;
        line-height: 1.42;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .tc-grade-overview .tc-grade-progress {
        display: flex;
        width: 100%;
        min-height: 38px;
        padding: 6px 9px;
        border-radius: 10px;
        flex: 0 0 auto;
        flex-direction: row;
        gap: 7px;
    }

    .tc-grade-overview .tc-grade-progress strong {
        font-size: 20px;
        line-height: 1;
    }

    .tc-grade-overview .tc-grade-progress span {
        margin: 0;
        font-size: 11px;
        line-height: 1.2;
    }

    /* QUAN TRỌNG: label tìm kiếm trước đây flex: 1 1 520px.
       Khi cha chuyển thành column, 520px trở thành chiều cao của item. */
    .tc-grade-lessons .tc-curriculum-tools {
        display: grid !important;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        margin: 7px 0 10px;
        padding: 7px;
        border-radius: 12px;
    }

    .tc-grade-lessons .tc-curriculum-tools .tc-lesson-search {
        display: block;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        flex: 0 0 auto !important;
    }

    .tc-grade-lessons .tc-curriculum-tools .tc-lesson-search input {
        display: block;
        width: 100%;
        height: 42px;
        min-height: 42px;
        padding: 7px 11px;
        border-radius: 10px;
        font-size: 14px;
        line-height: 1.2;
    }

    .tc-grade-lessons .tc-semester-jump {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .tc-grade-lessons .tc-semester-jump a {
        width: 100%;
        min-height: 36px;
        padding: 6px 8px;
        justify-content: center;
        border-radius: 9px;
        font-size: 13px;
    }

    .tc-grade-lessons .tc-curriculum-semesters {
        gap: 14px;
    }

    .tc-grade-lessons .tc-semester-section {
        border-radius: 13px;
        box-shadow: 0 4px 14px rgba(32, 58, 86, .05);
    }

    .tc-grade-lessons .tc-semester-heading {
        display: flex;
        padding: 10px 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .tc-grade-lessons .tc-semester-heading span {
        font-size: 9px;
    }

    .tc-grade-lessons .tc-semester-heading h3 {
        font-size: 20px;
        line-height: 1.15;
    }

    .tc-grade-lessons .tc-semester-heading small {
        max-width: 126px;
        padding: 5px 7px;
        font-size: 10px;
        line-height: 1.2;
        text-align: center;
    }

    .tc-grade-lessons .tc-curriculum-unit {
        padding: 10px 11px 12px;
    }

    .tc-grade-lessons .tc-curriculum-unit h4 {
        margin-bottom: 5px;
        padding-left: 8px;
        font-size: 16px;
        line-height: 1.28;
    }

    .tc-grade-lessons .tc-curriculum-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    .tc-grade-lessons .tc-curriculum-item > a,
    .tc-grade-lessons .tc-curriculum-item__disabled {
        min-height: 38px;
        padding: 5px 3px;
        grid-template-columns: 25px minmax(0, 1fr);
        gap: 7px;
        border-radius: 7px;
    }

    .tc-grade-lessons .tc-curriculum-item__number {
        width: 25px;
        height: 25px;
        border-radius: 7px;
        font-size: 10px;
    }

    .tc-grade-lessons .tc-curriculum-item__title {
        font-size: 14px;
        line-height: 1.32;
    }

    .tc-grade-lessons .tc-curriculum-item__state {
        display: none;
    }

    /* Trang từng bài */
    .tc-single-lesson .tc-lesson-shell {
        width: calc(100% - 16px);
        margin: 5px auto 30px;
    }

    .tc-single-lesson .tc-lesson-breadcrumb {
        overflow-x: auto;
        margin-bottom: 5px;
        padding-bottom: 2px;
        flex-wrap: nowrap;
        font-size: 11px;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .tc-single-lesson .tc-lesson-breadcrumb::-webkit-scrollbar {
        display: none;
    }

    .tc-single-lesson .tc-lesson-header {
        display: block;
        padding: 12px 13px;
        border-radius: 13px;
    }

    .tc-single-lesson .tc-lesson-header__meta {
        overflow-x: auto;
        padding-bottom: 2px;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .tc-single-lesson .tc-lesson-header__meta::-webkit-scrollbar {
        display: none;
    }

    .tc-single-lesson .tc-lesson-header__meta span {
        flex: 0 0 auto;
        padding: 4px 7px;
        font-size: 10px;
    }

    .tc-single-lesson .tc-lesson-header h1 {
        margin-bottom: 4px;
        font-size: 24px;
        line-height: 1.18;
    }

    .tc-single-lesson .tc-lesson-lead {
        font-size: 13px;
        line-height: 1.42;
    }

    .tc-single-lesson .tc-print-lesson {
        display: none;
    }

    .tc-single-lesson .tc-lesson-sidebar {
        gap: 2px;
        overflow-x: auto;
        margin: 7px 0;
        padding: 5px;
        border-radius: 10px;
        scrollbar-width: none;
    }

    .tc-single-lesson .tc-lesson-sidebar::-webkit-scrollbar {
        display: none;
    }

    .tc-single-lesson .tc-lesson-sidebar a {
        padding: 6px 7px;
        font-size: 11px;
    }

    .tc-single-lesson .tc-lesson-section {
        margin-bottom: 8px;
        padding: 13px 11px;
        border-radius: 12px;
    }

    .tc-single-lesson .tc-section-heading {
        gap: 8px;
        margin-bottom: 8px;
        padding-bottom: 7px;
    }

    .tc-single-lesson .tc-section-number {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
        border-radius: 9px;
        font-size: 15px;
    }

    .tc-single-lesson .tc-section-heading h2 {
        font-size: 19px;
        line-height: 1.2;
    }

    .tc-single-lesson .tc-prose {
        font-size: 15px;
        line-height: 1.62;
        overflow-wrap: anywhere;
    }

    .tc-single-lesson .tc-objective-list li {
        padding: 8px 9px 8px 31px;
        font-size: 13px;
        line-height: 1.4;
    }

    .tc-single-lesson .tc-solution-box summary,
    .tc-single-lesson .tc-answer-box summary {
        min-height: 42px;
        padding: 10px 12px;
        font-size: 13px;
    }

    .tc-single-lesson .tc-solution-box > .tc-prose,
    .tc-single-lesson .tc-answer-box > .tc-prose {
        padding: 11px;
    }

    .tc-single-lesson .tc-lesson-navigation {
        grid-template-columns: 1fr;
    }

    .tc-single-lesson .tc-lesson-navigation a {
        min-height: 58px;
        padding: 10px 11px;
    }

    /* Công thức, bảng và đặt tính không làm tràn ngang màn hình. */
    .tc-single-lesson .tc-operation-set {
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 10px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .tc-single-lesson .tc-vertical-operation,
    .tc-single-lesson .tc-long-division-wrap {
        flex: 0 0 auto;
        max-width: none;
        padding: 9px 11px;
    }

    .tc-single-lesson .tc-vertical-operation pre,
    .tc-single-lesson .tc-long-division {
        font-size: 20px;
    }

    .tc-single-lesson .tc-data-table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tc-single-lesson .tc-math-formula {
        max-width: 100%;
        overflow-x: auto;
        vertical-align: middle;
    }
}

@media (max-width: 390px) {
    .tc-grade-overview h2 {
        font-size: 19px;
    }

    .tc-grade-overview p {
        font-size: 12.5px;
    }

    .tc-grade-lessons .tc-semester-heading h3 {
        font-size: 18px;
    }

    .tc-grade-lessons .tc-semester-heading small {
        max-width: 112px;
        font-size: 9px;
    }

    .tc-grade-lessons .tc-curriculum-item__title {
        font-size: 13.5px;
    }

    .tc-single-lesson .tc-lesson-header h1 {
        font-size: 22px;
    }
}
