/* Source: /css/site-pages.css */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #152033;
    --muted: #5f6f86;
    --surface: #ffffff;
    --surface-alt: #f6f8fc;
    --border: #dfe6f0;
    --success: #15803d;
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--surface-alt);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.7;
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-header-inner,
.site-footer-inner,
.page-shell {
    width: min(var(--max-width), calc(100% - 28px));
    margin: 0 auto;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
}

.site-logo-image {
    display: block;
    width: 280px;
    max-width: 100%;
    height: auto;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 18px;
}

.site-nav a {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--primary);
}

.page-shell {
    padding: 38px 0 60px;
}

.page-hero,
.content-card,
.notice-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(31, 48, 76, 0.06);
}

.page-hero {
    padding: clamp(26px, 5vw, 52px);
    margin-bottom: 18px;
}

.page-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.13;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.content-card {
    padding: clamp(22px, 4vw, 40px);
}

.content-card h2 {
    margin-top: 34px;
    margin-bottom: 8px;
    font-size: 25px;
    line-height: 1.25;
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card h3 {
    margin-top: 24px;
    margin-bottom: 6px;
    font-size: 19px;
}

.content-card p,
.content-card li {
    color: var(--muted);
}

.content-card ul,
.content-card ol {
    padding-left: 22px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.feature-card {
    padding: 18px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.feature-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.feature-card p {
    margin: 0;
    font-size: 14px;
}

.notice-card {
    margin-top: 18px;
    padding: 18px 22px;
}

.notice-card strong {
    color: var(--success);
}

.contact-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.contact-option {
    padding: 18px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.contact-option h3 {
    margin: 0 0 4px;
}

.contact-option p {
    margin: 0;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    color: #fff;
    background: var(--primary);
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
}

.button:hover {
    color: #fff;
    background: var(--primary-dark);
}

.button.secondary {
    color: var(--text);
    background: var(--surface-alt);
    border: 1px solid var(--border);
}

.button.secondary:hover {
    color: var(--primary);
}

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.site-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    padding: 26px 0;
    color: var(--muted);
    font-size: 13px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
}

.last-updated {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 820px) {
    .site-header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .feature-grid,
    .contact-options {
        grid-template-columns: 1fr;
    }

    .site-footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .site-logo-image {
        width: 170px;
    }

    .page-shell {
        padding-top: 22px;
    }

    .page-hero,
    .content-card {
        border-radius: 14px;
    }
}


/* ==========================================================
   v17.8.55 — Theme-safe standalone/site pages
========================================================== */
html[data-theme="dark"]{
    --primary:#6ea0ff;
    --primary-dark:#93b5ff;
    --text:#f1f5f9;
    --muted:#aab8cc;
    --surface:#111827;
    --surface-alt:#0b1120;
    --border:#334155;
    --success:#4ade80;
}
html[data-theme="dark"] body{
    color:var(--text);
    background:var(--surface-alt);
}
html[data-theme="dark"] .page-hero,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .notice-card{
    box-shadow:0 16px 34px rgba(0,0,0,.24);
}
@media (prefers-color-scheme:dark){
    html[data-theme="system"]{
        --primary:#6ea0ff;
        --primary-dark:#93b5ff;
        --text:#f1f5f9;
        --muted:#aab8cc;
        --surface:#111827;
        --surface-alt:#0b1120;
        --border:#334155;
        --success:#4ade80;
    }
    html[data-theme="system"] body{
        color:var(--text);
        background:var(--surface-alt);
    }
    html[data-theme="system"] .page-hero,
    html[data-theme="system"] .content-card,
    html[data-theme="system"] .notice-card{
        box-shadow:0 16px 34px rgba(0,0,0,.24);
    }
}

/* Source: /css/universal-footer-v17.10.21.css */
/* TypingTutor.Online global footer v17.10.21 */
.universal-site-footer{display:block;box-sizing:border-box;width:100%;margin-top:48px;padding:36px clamp(18px,4vw,56px) 24px;color:var(--text-light,#64748b);background:linear-gradient(180deg,#fbfdff 0%,#f6f9fd 100%);border-top:1px solid var(--border,#d9e2ef);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.universal-footer-inner{box-sizing:border-box;width:min(1500px,100%);margin:0 auto}
.universal-footer-main{display:grid;grid-template-columns:minmax(240px,.85fr) minmax(0,2.15fr);gap:clamp(32px,5vw,72px);align-items:start}
.universal-footer-brand{display:grid;gap:9px;max-width:340px;text-align:left}
.universal-footer-home{width:max-content;color:var(--text,#0f172a)!important;font-size:18px;font-weight:850;line-height:1.25;text-decoration:none;letter-spacing:-.01em}
.universal-footer-home:hover,.universal-footer-home:focus-visible{color:var(--primary,#1769ff)!important}
.universal-footer-brand span{color:var(--text-light,#64748b);font-size:13px;font-weight:550;line-height:1.6}
.universal-footer-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px clamp(22px,4vw,54px)}
.universal-footer-group{min-width:0}
.universal-footer-group>strong{display:block;margin:0 0 10px;color:var(--text,#0f172a);font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.universal-footer-group-links{display:grid;gap:8px}
.universal-footer-group-links a{width:max-content;max-width:100%;color:var(--text-light,#64748b);font-size:13px;font-weight:700;line-height:1.45;text-decoration:none;transition:color .16s ease,transform .16s ease}
.universal-footer-group-links a:hover,.universal-footer-group-links a:focus-visible{color:var(--primary,#1769ff);text-decoration:underline;text-underline-offset:3px}
.universal-footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:28px;padding-top:18px;border-top:1px solid color-mix(in srgb,var(--border,#d9e2ef) 82%,transparent);color:var(--text-light,#64748b);font-size:11px;font-weight:600;line-height:1.5}
html[data-theme="dark"] .universal-site-footer{color:#94a3b8;background:#0f172a;border-top-color:#334155}
html[data-theme="dark"] .universal-footer-home,html[data-theme="dark"] .universal-footer-group>strong{color:#f8fafc!important}
html[data-theme="dark"] .universal-footer-brand span,html[data-theme="dark"] .universal-footer-group-links a,html[data-theme="dark"] .universal-footer-bottom{color:#a8b5c7}
html[data-theme="dark"] .universal-footer-bottom{border-top-color:#334155}
html[data-theme="dark"] .universal-footer-home:hover,html[data-theme="dark"] .universal-footer-home:focus-visible,html[data-theme="dark"] .universal-footer-group-links a:hover,html[data-theme="dark"] .universal-footer-group-links a:focus-visible{color:#60a5fa!important}
@media(prefers-color-scheme:dark){html[data-theme="system"] .universal-site-footer{color:#94a3b8;background:#0f172a;border-top-color:#334155}html[data-theme="system"] .universal-footer-home,html[data-theme="system"] .universal-footer-group>strong{color:#f8fafc!important}html[data-theme="system"] .universal-footer-brand span,html[data-theme="system"] .universal-footer-group-links a,html[data-theme="system"] .universal-footer-bottom{color:#a8b5c7}html[data-theme="system"] .universal-footer-bottom{border-top-color:#334155}html[data-theme="system"] .universal-footer-home:hover,html[data-theme="system"] .universal-footer-home:focus-visible,html[data-theme="system"] .universal-footer-group-links a:hover,html[data-theme="system"] .universal-footer-group-links a:focus-visible{color:#60a5fa!important}}
@media(max-width:900px){.universal-site-footer{padding-top:30px}.universal-footer-main{grid-template-columns:1fr;gap:26px}.universal-footer-brand{max-width:620px}.universal-footer-nav{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.universal-site-footer{margin-top:32px;padding:28px 18px 20px}.universal-footer-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 18px}.universal-footer-group:last-child{grid-column:1/-1}.universal-footer-group:last-child .universal-footer-group-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}.universal-footer-group-links a{width:auto;padding:2px 0}.universal-footer-bottom{align-items:flex-start;flex-direction:column;gap:5px;margin-top:24px}}
@media(max-width:390px){.universal-footer-nav{grid-template-columns:1fr}.universal-footer-group:last-child{grid-column:auto}.universal-footer-group:last-child .universal-footer-group-links{grid-template-columns:1fr}}
@media print{.universal-site-footer{display:none!important}}

/* Source: /css/universal-site-header-v17.7.2.css */
/* ==========================================================
   TypingTutor.Online — Universal Site Header v17.7.2
   One complete header for tutor, tests, games, kids, blog,
   certificates, information pages, sitemap, and 404.
========================================================== */

#header,
.test-site-header {
    box-sizing: border-box !important;
    position: relative;
    z-index: 1000;
    width: 100%;
    min-height: 80px;
    padding: max(9px, env(safe-area-inset-top)) 0 9px;
    background: var(--surface, #ffffff);
    border-bottom: 1px solid var(--border, #dbe4f0);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
}

#header .header-inner,
.test-header-inner {
    box-sizing: border-box;
    width: min(1660px, calc(100% - 34px));
    min-height: 60px;
    margin-inline: auto;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(235px, 300px) minmax(0, 1fr) auto;
    gap: clamp(10px, 1.4vw, 24px);
    align-items: center;
}

#header .logo,
.test-logo {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-self: start;
    color: inherit;
    text-decoration: none;
}

#header .site-logo-picture,
.test-logo-stack {
    position: relative;
    display: grid;
    width: min(280px, 100%);
    min-width: 0;
}

#header .site-logo-picture,
#header .site-logo-picture-light,
#header .site-logo-picture-dark,
.test-logo-stack > img {
    grid-area: 1 / 1;
}

#header .site-logo-image,
.test-logo img {
    display: block;
    width: min(280px, 100%);
    height: auto;
    max-height: 60px;
    object-fit: contain;
    object-position: left center;
}

#header .site-logo-picture-dark,
.test-logo-dark {
    display: none !important;
}

html[data-theme="dark"] #header .site-logo-picture-light,
html[data-theme="dark"] .test-logo-light {
    display: none !important;
}

html[data-theme="dark"] #header .site-logo-picture-dark,
html[data-theme="dark"] .test-logo-dark {
    display: block !important;
}

#header .primary-mode-navigation,
.test-nav {
    min-width: 0;
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, .72vw, 12px);
    overflow: visible;
}

#header #modeSwitcher,
#header .mode-switcher-inner,
#header .mode-navigation {
    min-width: 0;
    width: auto;
}

#header .mode-navigation {
    display: flex;
    align-items: center;
    gap: clamp(2px, .72vw, 12px);
}

#header .mode-switcher-heading {
    display: none !important;
}

#header .lesson-home-nav-button,
#header .mode-navigation > .mode-button,
#header .mode-more > summary.mode-button,
.test-nav > a,
.test-nav-more > summary {
    box-sizing: border-box;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 10px clamp(9px, .78vw, 15px);
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text, #172235);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    font: inherit;
    font-size: clamp(12px, .84vw, 15px);
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease,
        border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

#header .mode-button-icon,
#header .lesson-home-nav-icon,
.test-nav .mode-button-icon,
.test-nav-more-menu .mode-button-icon {
    display: inline-flex;
    flex: 0 0 22px;
    width: 22px;
    min-width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 19px;
    font-weight: 400;
    line-height: 22px;
    text-align: center;
}

#header .mode-button-text,
#header .lesson-home-nav-label,
.test-nav .mode-button-text {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

#header .lesson-home-nav-button:hover,
#header .mode-navigation > .mode-button:hover,
#header .mode-more > summary.mode-button:hover,
.test-nav > a:hover,
.test-nav-more > summary:hover,
.test-nav-more[open] > summary {
    color: var(--primary, #1769ff);
    background: var(--surface-alt, #f2f7ff);
    border-color: #dbe8fa;
}

#header .lesson-home-nav-button-active,
#header .mode-navigation > .mode-button-active,
#header .mode-more.mode-more-active > summary,
.test-nav > a[aria-current="page"],
.test-nav > a.mode-button-active,
.test-nav-more.mode-more-active > summary {
    color: #ffffff !important;
    background: linear-gradient(135deg, #246df0, #285ee5) !important;
    border-color: rgba(31, 92, 222, .58) !important;
    box-shadow: 0 10px 24px rgba(47, 103, 246, .24) !important;
}

#header .header-tools,
.test-header-inner > #themeButton {
    justify-self: end;
}

#header #themeButton,
.test-header-inner > #themeButton {
    box-sizing: border-box;
    min-width: 116px;
    min-height: 48px;
    margin: 0;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #246df0, #285ee5);
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: clamp(12px, .84vw, 15px);
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(47, 103, 246, .20);
}

#header #themeButton > span:first-child,
.test-header-inner > #themeButton > span:first-child {
    display: inline-flex;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 19px;
    line-height: 22px;
}

.theme-button-arrow,
.mode-more-chevron {
    font-size: 10px;
    opacity: .8;
}

#header .mode-more,
.test-nav-more {
    position: relative;
    flex: 0 0 auto;
}

#header .mode-more > summary,
.test-nav-more > summary {
    list-style: none;
}

#header .mode-more > summary::-webkit-details-marker,
.test-nav-more > summary::-webkit-details-marker {
    display: none;
}

#header .mode-more-menu,
.test-nav-more-menu {
    box-sizing: border-box;
    position: absolute;
    z-index: 1200;
    top: calc(100% + 10px);
    right: 0;
    width: 244px;
    padding: 8px;
    display: none;
    gap: 4px;
    background: var(--surface-elevated, #ffffff);
    border: 1px solid var(--border, #dbe4f0);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

#header .mode-more[open] .mode-more-menu,
.test-nav-more[open] .test-nav-more-menu {
    display: grid;
}

#header .mode-more-menu .mode-button,
.test-nav-more-menu a,
.test-nav-more-menu button {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    color: var(--text, #172235);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

#header .mode-more-menu .mode-button:hover,
.test-nav-more-menu a:hover,
.test-nav-more-menu button:hover,
.test-nav-more-menu a[aria-current="page"] {
    color: var(--primary, #1769ff);
    background: var(--surface-alt, #f2f7ff);
    border-color: var(--border, #dbe4f0);
}

/* Theme chooser: included here so simple information pages match the app. */
.theme-menu {
    position: fixed;
    z-index: 10050;
    width: 250px;
    padding: 8px;
    background: var(--surface-elevated, #ffffff);
    border: 1px solid var(--border, #dbe4f0);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .22);
}
.theme-menu.hidden { display: none !important; }
.theme-option {
    display: grid;
    grid-template-columns: 36px 1fr 22px;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px;
    color: var(--text, #172235);
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
}
.theme-option:hover,
.theme-option:focus-visible {
    background: var(--surface-alt, #f2f7ff);
    border-color: var(--border, #dbe4f0);
    outline: none;
}
.theme-option-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--surface-alt, #f2f7ff);
    border-radius: 9px;
    font-size: 18px;
}
.theme-option-copy { display: grid; gap: 2px; }
.theme-option-copy strong { color: var(--text, #172235); font-size: 13px; }
.theme-option-copy small { color: var(--text-light, #718096); font-size: 10px; }
.theme-option-check { color: var(--primary, #1769ff); font-weight: 900; opacity: 0; }
.theme-option-selected { background: var(--primary-light, #edf4ff); border-color: var(--border, #dbe4f0); }
.theme-option-selected .theme-option-check { opacity: 1; }

html[data-theme="dark"] #header,
html[data-theme="dark"] .test-site-header {
    background: #101b2e;
    border-color: #40516a;
}
html[data-theme="dark"] #header .lesson-home-nav-button,
html[data-theme="dark"] #header .mode-navigation > .mode-button,
html[data-theme="dark"] #header .mode-more > summary.mode-button,
html[data-theme="dark"] .test-nav > a,
html[data-theme="dark"] .test-nav-more > summary,
html[data-theme="dark"] #header .mode-more-menu .mode-button,
html[data-theme="dark"] .test-nav-more-menu a,
html[data-theme="dark"] .test-nav-more-menu button {
    color: #dce7f7;
}
html[data-theme="dark"] #header .mode-more-menu,
html[data-theme="dark"] .test-nav-more-menu,
html[data-theme="dark"] .theme-menu {
    background: #101b2e;
    border-color: #40516a;
}
html[data-theme="dark"] .theme-option,
html[data-theme="dark"] .theme-option-copy strong { color: #e7eef9; }
html[data-theme="dark"] .theme-option-copy small { color: #9aabc2; }
html[data-theme="dark"] .theme-option-icon,
html[data-theme="dark"] .theme-option:hover,
html[data-theme="dark"] .theme-option:focus-visible,
html[data-theme="dark"] #header .mode-more-menu .mode-button:hover,
html[data-theme="dark"] .test-nav-more-menu a:hover,
html[data-theme="dark"] .test-nav-more-menu button:hover {
    background: #17263c;
    border-color: #304662;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] #header,
    html[data-theme="system"] .test-site-header {
        background: #101b2e;
        border-color: #40516a;
    }
    html[data-theme="system"] #header .site-logo-picture-light,
    html[data-theme="system"] .test-logo-light { display: none !important; }
    html[data-theme="system"] #header .site-logo-picture-dark,
    html[data-theme="system"] .test-logo-dark { display: block !important; }
    html[data-theme="system"] #header .lesson-home-nav-button,
    html[data-theme="system"] #header .mode-navigation > .mode-button,
    html[data-theme="system"] #header .mode-more > summary.mode-button,
    html[data-theme="system"] .test-nav > a,
    html[data-theme="system"] .test-nav-more > summary,
    html[data-theme="system"] #header .mode-more-menu .mode-button,
    html[data-theme="system"] .test-nav-more-menu a,
    html[data-theme="system"] .test-nav-more-menu button { color: #dce7f7; }
    html[data-theme="system"] #header .mode-more-menu,
    html[data-theme="system"] .test-nav-more-menu,
    html[data-theme="system"] .theme-menu {
        background: #101b2e;
        border-color: #40516a;
    }
}

@media (max-width: 1360px) {
    #header .header-inner,
    .test-header-inner {
        grid-template-columns: minmax(205px, 235px) minmax(0, 1fr) auto;
        gap: 8px;
    }
    #header .site-logo-picture,
    #header .site-logo-image,
    .test-logo-stack,
    .test-logo img { width: min(235px, 100%); }
    #header .lesson-home-nav-button,
    #header .mode-navigation > .mode-button,
    #header .mode-more > summary.mode-button,
    .test-nav > a,
    .test-nav-more > summary {
        min-height: 44px;
        padding-inline: 8px;
        gap: 6px;
        font-size: 12px;
    }
    #header #themeButton,
    .test-header-inner > #themeButton {
        min-width: 104px;
        min-height: 44px;
        padding-inline: 11px;
        font-size: 12px;
    }
}

@media (max-width: 1040px) {
    #header,
    .test-site-header {
        min-height: 0;
        padding-top: max(7px, env(safe-area-inset-top));
        padding-bottom: 7px;
    }
    #header .header-inner,
    .test-header-inner {
        width: min(100% - 22px, 1660px);
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
    }
    #header .primary-mode-navigation,
    .test-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: visible;
        padding: 2px 0 3px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    #header .primary-mode-navigation::-webkit-scrollbar,
    .test-nav::-webkit-scrollbar { display: none; }
    #header .header-tools,
    .test-header-inner > #themeButton { grid-column: 2; grid-row: 1; }
    .test-logo { grid-column: 1; grid-row: 1; }
}

@media (max-width: 590px) {
    #header .header-inner,
    .test-header-inner { width: min(100% - 14px, 1660px); }
    #header .site-logo-picture,
    #header .site-logo-image,
    .test-logo-stack,
    .test-logo img { width: min(190px, 100%); }
    #header .lesson-home-nav-button,
    #header .mode-navigation > .mode-button,
    #header .mode-more > summary.mode-button,
    .test-nav > a,
    .test-nav-more > summary {
        min-width: 68px;
        min-height: 44px;
        padding: 7px 8px;
        flex-direction: column;
        gap: 3px;
        font-size: 9px;
    }
    #header .mode-more-chevron,
    .test-nav-more .mode-more-chevron { display: none; }
    #header #themeButton,
    .test-header-inner > #themeButton {
        min-width: 48px;
        min-height: 42px;
        padding: 8px 10px;
    }
    #header #themeButton > span:nth-child(2),
    #header #themeButton > span:last-child,
    .test-header-inner > #themeButton > span:nth-child(2),
    .test-header-inner > #themeButton > span:last-child { display: none; }
}

/* ==========================================================
   v17.10.182 — Reliable mobile More menu
   Explicit JS toggling + fixed viewport panel prevents the menu from
   opening outside the horizontally scrolling navigation in Chrome mobile.
========================================================== */
@media (max-width: 1040px), (pointer: coarse) {
    #header .mode-more-menu,
    .test-nav-more-menu {
        position: fixed !important;
        z-index: 10050 !important;
        top: var(--site-more-top, 118px) !important;
        right: 12px !important;
        bottom: auto !important;
        left: 12px !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(var(--site-more-max-height, 70vh), 480px) !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
        box-shadow: 0 20px 52px rgba(15, 23, 42, .24);
    }

    #header .mode-more[open] > summary.mode-button,
    .test-nav-more[open] > summary {
        color: var(--primary, #1769ff);
        background: var(--surface-alt, #f2f7ff);
        border-color: var(--border, #dbe4f0);
    }
}

/* v17.10.327: readable hover, open and keyboard-focus states in both dark modes. */
html[data-theme="dark"] #header .lesson-home-nav-button:is(:hover,:focus-visible),
html[data-theme="dark"] #header .mode-navigation > .mode-button:is(:hover,:focus-visible),
html[data-theme="dark"] #header .mode-more > summary.mode-button:is(:hover,:focus-visible),
html[data-theme="dark"] #header .mode-more[open] > summary.mode-button,
html[data-theme="dark"] .test-nav > a:is(:hover,:focus-visible),
html[data-theme="dark"] .test-nav-more > summary:is(:hover,:focus-visible),
html[data-theme="dark"] .test-nav-more[open] > summary,
html[data-theme="dark"] #header .mode-more-menu .mode-button:is(:hover,:focus-visible),
html[data-theme="dark"] .test-nav-more-menu a:is(:hover,:focus-visible),
html[data-theme="dark"] .test-nav-more-menu button:is(:hover,:focus-visible) {
    color: #e7eef9;
    background: #213a5f;
    border-color: #526d91;
    text-decoration: none;
}
@media (prefers-color-scheme: dark) {
html[data-theme="system"] #header .lesson-home-nav-button:is(:hover,:focus-visible),
html[data-theme="system"] #header .mode-navigation > .mode-button:is(:hover,:focus-visible),
html[data-theme="system"] #header .mode-more > summary.mode-button:is(:hover,:focus-visible),
html[data-theme="system"] #header .mode-more[open] > summary.mode-button,
html[data-theme="system"] .test-nav > a:is(:hover,:focus-visible),
html[data-theme="system"] .test-nav-more > summary:is(:hover,:focus-visible),
html[data-theme="system"] .test-nav-more[open] > summary,
html[data-theme="system"] #header .mode-more-menu .mode-button:is(:hover,:focus-visible),
html[data-theme="system"] .test-nav-more-menu a:is(:hover,:focus-visible),
html[data-theme="system"] .test-nav-more-menu button:is(:hover,:focus-visible) {
    color: #e7eef9;
    background: #213a5f;
    border-color: #526d91;
    text-decoration: none;
}
}

/* Source: /css/universal-logo-visibility-v17.7.6.css */
/* ==========================================================
   TypingTutor.Online — Universal Logo Visibility v17.7.6

   Nested sections use two theme-aware logo images inside
   .test-logo-stack. Older section styles mixed absolute
   positioning, display switching and opacity switching, which
   could collapse the logo container or hide both images.

   This final stylesheet creates one stable overlapping grid,
   reserves the correct header space and switches only opacity.
========================================================== */

.test-logo {
    box-sizing: border-box !important;
    width: min(280px, 100%) !important;
    min-width: 190px !important;
    min-height: 58px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: visible !important;
}

.test-logo-stack {
    box-sizing: border-box !important;
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    width: 280px !important;
    max-width: 100% !important;
    min-width: 190px !important;
    min-height: 58px !important;
    aspect-ratio: 280 / 58 !important;
    overflow: visible !important;
    isolation: isolate;
}

.test-logo-stack > .test-logo-light,
.test-logo-stack > .test-logo-dark {
    box-sizing: border-box !important;
    grid-area: 1 / 1 !important;
    position: static !important;
    inset: auto !important;
    z-index: 1;
    display: block !important;
    width: 100% !important;
    max-width: 280px !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 58px !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: left center !important;
    pointer-events: none !important;
    transition: opacity .16s ease, visibility .16s ease !important;
}

/* Reliable default, including pages before ThemeManager runs. */
.test-logo-stack > .test-logo-light {
    opacity: 1 !important;
    visibility: visible !important;
}

.test-logo-stack > .test-logo-dark {
    opacity: 0 !important;
    visibility: hidden !important;
}

html[data-theme="light"] .test-logo-stack > .test-logo-light,
html[data-resolved-theme="light"] .test-logo-stack > .test-logo-light {
    opacity: 1 !important;
    visibility: visible !important;
}

html[data-theme="light"] .test-logo-stack > .test-logo-dark,
html[data-resolved-theme="light"] .test-logo-stack > .test-logo-dark {
    opacity: 0 !important;
    visibility: hidden !important;
}

html[data-theme="dark"] .test-logo-stack > .test-logo-light,
html[data-resolved-theme="dark"] .test-logo-stack > .test-logo-light {
    opacity: 0 !important;
    visibility: hidden !important;
}

html[data-theme="dark"] .test-logo-stack > .test-logo-dark,
html[data-resolved-theme="dark"] .test-logo-stack > .test-logo-dark {
    opacity: 1 !important;
    visibility: visible !important;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .test-logo-stack > .test-logo-light {
        opacity: 0 !important;
        visibility: hidden !important;
    }

    html[data-theme="system"] .test-logo-stack > .test-logo-dark {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

@media (prefers-color-scheme: light) {
    html[data-theme="system"] .test-logo-stack > .test-logo-light {
        opacity: 1 !important;
        visibility: visible !important;
    }

    html[data-theme="system"] .test-logo-stack > .test-logo-dark {
        opacity: 0 !important;
        visibility: hidden !important;
    }
}

@media (max-width: 760px) {
    .test-logo {
        width: min(220px, 100%) !important;
        min-width: 165px !important;
        min-height: 46px !important;
    }

    .test-logo-stack {
        width: 220px !important;
        min-width: 165px !important;
        min-height: 46px !important;
    }

    .test-logo-stack > .test-logo-light,
    .test-logo-stack > .test-logo-dark {
        max-width: 220px !important;
        max-height: 46px !important;
    }
}

@media (max-width: 440px) {
    .test-logo {
        width: 178px !important;
        min-width: 150px !important;
        min-height: 37px !important;
    }

    .test-logo-stack {
        width: 178px !important;
        min-width: 150px !important;
        min-height: 37px !important;
    }

    .test-logo-stack > .test-logo-light,
    .test-logo-stack > .test-logo-dark {
        max-width: 178px !important;
        max-height: 37px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .test-logo-stack > .test-logo-light,
    .test-logo-stack > .test-logo-dark {
        transition: none !important;
    }
}

/* Source: /css/universal-selection-v17.7.8.css */
/* ==========================================================
   TypingTutor.Online — high-contrast text selection v17.7.8
   ========================================================== */

/*
 * Use one strong, predictable selection treatment everywhere.
 * White text on saturated blue remains readable on both light and dark
 * surfaces and avoids the pale-selection/white-text conflict seen on blogs.
 */
*::selection {
    color: #ffffff !important;
    background: #075fe4 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

*::-moz-selection {
    color: #ffffff !important;
    background: #075fe4 !important;
    text-shadow: none !important;
}

input::selection,
textarea::selection,
[contenteditable="true"]::selection {
    color: #ffffff !important;
    background: #075fe4 !important;
    -webkit-text-fill-color: #ffffff !important;
}

input::-moz-selection,
textarea::-moz-selection,
[contenteditable="true"]::-moz-selection {
    color: #ffffff !important;
    background: #075fe4 !important;
}

/* Extra contrast for explicit dark mode and System mode on dark devices. */
html[data-theme="dark"] *::selection {
    color: #ffffff !important;
    background: #0057d9 !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="dark"] *::-moz-selection {
    color: #ffffff !important;
    background: #0057d9 !important;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] *::selection {
        color: #ffffff !important;
        background: #0057d9 !important;
        -webkit-text-fill-color: #ffffff !important;
    }

    html[data-theme="system"] *::-moz-selection {
        color: #ffffff !important;
        background: #0057d9 !important;
    }
}

/* Source: /css/global-workspace-v17.8.2.css */
/* ==========================================================
   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,
.lessons-page-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;
    }
}

