/* ==========================================================
   TypingTutor.Online — Global Wide Workspace v17.8.2
   A consistent outer width across the tutor and every public
   section. Reading columns remain intentionally narrower.
========================================================== */

:root {
    --tto-workspace-max: 1500px;
    --tto-workspace-gutter: clamp(14px, 1.7vw, 32px);
    --max-width: var(--tto-workspace-max);
}

/* Main tutor, mode dashboards and progress bars */
.site-shell,
#courseModePanel,
.feature-placeholder,
#statisticsDashboard,
.statistics-course-progress,
.daily-practice-summary,
.settings-dashboard,
.achievements-dashboard,
.more-typing-resources-inner,
.typing-learning-content-inner {
    box-sizing: border-box;
    width: min(
        var(--tto-workspace-max),
        calc(100% - (2 * var(--tto-workspace-gutter)))
    );
    max-width: var(--tto-workspace-max);
    margin-inline: auto;
}

/* Standalone site sections */
.test-page-shell,
.games-shell,
.kids-shell,
.blog-shell,
.certificate-shell,
.share-shell,
.page-shell {
    box-sizing: border-box;
    width: min(
        var(--tto-workspace-max),
        calc(100% - (2 * var(--tto-workspace-gutter)))
    );
    max-width: var(--tto-workspace-max);
    margin-inline: auto;
}

/* Footer follows the same visual edges as the page content. */
.universal-footer-inner,
.site-footer-inner {
    width: min(var(--tto-workspace-max), 100%);
    max-width: var(--tto-workspace-max);
}

/* Align horizontal section navigation with the wider workspace. */
.games-subnav,
.kids-subnav {
    padding-inline: max(
        var(--tto-workspace-gutter),
        calc((100vw - var(--tto-workspace-max)) / 2)
    );
}

/* Keep long-form reading comfortable even inside a wide shell. */
.blog-article,
.blog-article-body,
.page-prose,
.content-prose,
.certificate-faq > p,
.certificate-faq details,
.typing-learning-heading {
    max-width: 980px;
}

/* Wide desktop dashboards benefit from balanced multi-column cards. */
@media (min-width: 1280px) {
    .statistics-summary-grid-complete {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .statistics-ranking-grid,
    .statistics-trend-grid {
        gap: 18px;
    }

    .games-grid,
    .kids-path-grid,
    .kids-feature-grid,
    .kids-test-grid,
    .kids-game-grid,
    .kids-badge-grid {
        gap: 20px;
    }
}

/* Maintain generous but safe gutters on tablets and phones. */
@media (max-width: 900px) {
    :root {
        --tto-workspace-gutter: 11px;
    }
}

@media (max-width: 560px) {
    :root {
        --tto-workspace-gutter: 7px;
    }
}

@media print {
    .certificate-shell,
    .kids-shell,
    .page-shell {
        width: 100% !important;
        max-width: none !important;
    }
}
