html[data-theme] body :is(.taskCard, .taskText, .solutionText, .theoryContent, .fipiCondition) { min-width: 0; max-width: 100%; }
html[data-theme] body .contentTableScroll {
    width: 100%; max-width: 100%; min-width: 0;
    overflow-x: auto; overscroll-behavior-inline: contain; margin-block: 1rem;
    scrollbar-width: thin; border: 1px solid var(--note-ink); border-radius: 8px;
}
html[data-theme] body .contentTableScroll table {
    display: table !important; width: max-content !important; min-width: 100%;
    max-width: none !important; margin: 0 !important; table-layout: auto !important;
    border-collapse: collapse;
}
html[data-theme] body .contentTableScroll :is(th, td) {
    min-width: 3.5rem; max-width: 24rem; padding: .6rem .8rem;
    overflow-wrap: normal !important; word-break: normal !important; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
html[data-theme] body .contentTableScroll :is(th, td) :is(p, div, span) {
    white-space: inherit; overflow-wrap: normal !important; word-break: normal !important;
}
html[data-theme] body #progressCalendar { min-width: 0; }
html[data-theme] body #calendarGrid { grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; width: 100%; gap: 5px; }
html[data-theme] body #calendarGrid .calendarCell {
    min-width: 0 !important; width: 100%; box-sizing: border-box; padding: 4px 1px;
    min-height: 55px; height: auto; aspect-ratio: 1; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
}
html[data-theme] body #calendarGrid .calendarDayHead { min-width: 0; font-size: .75rem; padding-inline: 0; }
html[data-theme] body #calendarGrid .calendarCell .taskBadge { font-size: .55rem; white-space: nowrap; margin-top: 3px; }
html[data-theme] body .calendarHeaderRight { min-width: 0; max-width: 100%; flex-wrap: wrap; }
html[data-theme] body .calendarMonthCount { white-space: normal; }
html[data-theme] body #progressCharts .statisticsCard { min-width: 0; }
html[data-theme] body #progressCharts .chartWrapper { height: 290px; min-width: 0; }
@media (max-width: 600px) {
    html[data-theme] body #progressCalendar { padding: 14px; }
    html[data-theme] body #calendarGrid .calendarCell { min-height: 38px; }
    html[data-theme] body #calendarGrid .calendarCell span { font-size: .7rem; }
    html[data-theme] body #calendarGrid .calendarCell .taskBadge { font-size: .43rem; }
    html[data-theme] body #progressCharts .statisticsCard { padding: 18px; }
    html[data-theme] body #progressCharts .chartWrapper { height: 250px; }
}

/* Prose and its illustration must never inherit data-table nowrap rules. */
html[data-theme] body .contentIllustratedProblem { display: block; width: 100%; min-width: 0; max-width: 100%; }
html[data-theme] body .contentIllustrationText { display: block; min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: break-word; }
html[data-theme] body .contentIllustrationText p { white-space: normal; line-height: 1.65; }
html[data-theme] body .contentIllustrationFigure { display: block; min-width: 0; max-width: 100%; margin-block: 16px; }
html[data-theme] body .contentIllustrationFigure img { display: block; width: auto !important; height: auto !important; max-width: 100% !important; max-height: 280px !important; margin: 0 auto !important; object-fit: contain; }
