/* ============================================================
   2026-09-29 — Education-style infrastructure replica for Typing
   Layout mirrors Education; teal identity and Typing content stay intact.
   ============================================================ */
:root{
  --tb-warm-bg:#f8f2eb;
  --tb-warm-surface:#fffdfb;
  --tb-warm-border:#eadfd4;
  --tb-warm-muted:#8c8178;
  --tb-sidebar-w:240px;
  --tb-topbar-h:57px;
  --primary:#0f8f83;
  --primary-dark:#0f766e;
  --header-bg:#0f766e;
}
body{background:var(--tb-warm-bg);color:#1f2524;}
body.theme-dark{--tb-warm-bg:#171b1a;--tb-warm-surface:#202625;--tb-warm-border:#38403e;--tb-warm-muted:#a8b0ad;--surface:#202625;--bg:#171b1a;--text:#eef4f2;--muted:#a7b2af;--border:#3a4542;background:var(--tb-warm-bg);color:var(--text)}
body.theme-dark .card,body.theme-dark .stat-card,body.theme-dark table,body.theme-dark .price-card,body.theme-dark .set-card,body.theme-dark .settings-profile-card{background:#202625;color:#eef4f2}
body.theme-dark th{background:#27302e;color:#bac5c2}

/* Public desktop header */
.tb-public-header{height:64px;padding:.58rem 1.1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#fffdfb;color:#1f2524;border-bottom:1px solid var(--tb-warm-border);box-shadow:0 2px 12px rgba(38,31,25,.04);position:sticky;top:0;z-index:70}
.tb-shell-brand{display:flex;align-items:center;gap:.58rem;color:inherit;text-decoration:none;font-weight:850;letter-spacing:-.02em}.tb-shell-brand img{width:42px!important;height:42px!important;max-width:42px!important;object-fit:contain}.tb-shell-brand strong{font-size:1.08rem}.tb-public-header #main-nav{display:flex;align-items:center;gap:.55rem}.tb-public-header #main-nav a{color:#6f6a65;text-decoration:none;font-size:.86rem;font-weight:700;padding:.45rem .55rem;border-radius:9px}.tb-public-header #main-nav a:hover{background:#f3eee9;color:#17201e}
.tb-mobile-header{display:none}

/* Authenticated desktop shell — exact Education rhythm */
.desktop-sidebar{display:none;position:fixed!important;left:0!important;top:0!important;bottom:0!important;z-index:95!important;width:var(--tb-sidebar-w)!important;padding:0!important;background:#fffdfb!important;border-right:1px solid var(--tb-warm-border)!important;box-shadow:none!important;overflow:hidden!important;flex-direction:column!important}
.desktop-side-brand{height:68px;display:flex;align-items:center;gap:.6rem;padding:.75rem 1rem;border-bottom:1px solid var(--tb-warm-border);color:#1e2624;text-decoration:none;font-size:1rem;font-weight:900}.desktop-side-brand img{width:40px!important;height:40px!important;max-width:40px!important;object-fit:contain}.desktop-side-brand:hover{background:#fbf8f5}
.desktop-sidebar-links{display:flex!important;flex:1;flex-direction:column!important;gap:.12rem!important;padding:.72rem .55rem 1rem!important;overflow-y:auto!important}
.side-label{padding:.72rem .48rem .3rem!important;font-size:.65rem!important;line-height:1!important;letter-spacing:.09em!important;color:#8c8178!important;font-weight:850!important;text-transform:uppercase!important}
.desktop-side-link{display:flex!important;align-items:center!important;gap:.62rem!important;min-height:43px!important;padding:.56rem .7rem!important;border-radius:11px!important;color:#80776f!important;text-decoration:none!important;font-size:.81rem!important;font-weight:760!important;box-shadow:none!important}
.desktop-side-link span{width:20px!important;text-align:center!important;font-size:.92rem!important}.desktop-side-link b{font-weight:760!important}.desktop-side-link:hover{background:#f3efea!important;color:#20302c!important}.desktop-side-link.active{background:var(--primary)!important;color:#fff!important;box-shadow:0 7px 15px rgba(15,143,131,.19)!important}
.desktop-sidebar-account{margin-top:auto!important;padding:.65rem .7rem!important;border-top:1px solid var(--tb-warm-border)!important;background:#fffdfb!important}
.desktop-side-user{display:grid!important;grid-template-columns:minmax(0,1fr) 38px!important;align-items:center!important;gap:.45rem!important;padding:.25rem .05rem!important}.desktop-side-avatar{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;border-radius:50%!important;background:linear-gradient(135deg,#0f766e,#14b8a6)!important;color:#fff!important;font-weight:900!important;font-size:.76rem!important;border:2px solid #fff!important;box-shadow:0 4px 10px rgba(15,118,110,.17)!important}.desktop-side-user>div{display:flex!important;min-width:0!important;flex-direction:column!important}.desktop-side-user strong{font-size:.72rem!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.desktop-side-user small{font-size:.64rem!important;color:#93877d!important}.side-theme-btn{width:36px!important;height:36px!important;display:grid!important;place-items:center!important;padding:0!important;border:0!important;border-radius:50%!important;background:#fff!important;box-shadow:0 4px 14px rgba(35,29,24,.06)!important;cursor:pointer!important}
.tb-desktop-topbar{display:none;position:fixed;left:var(--tb-sidebar-w);right:0;top:0;height:var(--tb-topbar-h);z-index:90;align-items:center;justify-content:space-between;padding:0 1.12rem;background:rgba(248,242,235,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--tb-warm-border)}.tb-desktop-topbar>strong{font-size:.95rem;color:#2c2a28}.tb-top-actions{display:flex;align-items:center;gap:.5rem}.tb-top-icon{width:42px;height:38px;border:1px solid var(--tb-warm-border);border-radius:11px;background:#fffdfb;cursor:pointer;font-size:.9rem;box-shadow:0 3px 10px rgba(37,29,24,.03)}

@media(min-width:900px){
  body.tb-authenticated:not([data-page="test"]) .desktop-sidebar{display:flex!important}
  body.tb-authenticated:not([data-page="test"]) .tb-desktop-topbar{display:flex!important}
  body.tb-authenticated:not([data-page="test"]) .tb-public-header{display:none!important}
  body.tb-authenticated:not([data-page="test"]) .page-shell{margin-left:var(--tb-sidebar-w)!important;padding-top:var(--tb-topbar-h)!important;min-height:100vh!important}
  body.tb-authenticated:not([data-page="test"]) #site-footer{display:none!important}
}

/* Page content cards adopt Education's warm, spacious surface treatment. */
body.tb-authenticated:not([data-page="test"]) .section{max-width:1180px!important;padding:1.15rem 1.2rem 2rem!important;margin:0 auto!important}
body.tb-authenticated .section-title{text-align:left!important;font-size:1.25rem!important;letter-spacing:-.02em!important;margin-bottom:.22rem!important}
body.tb-authenticated .section-sub{text-align:left!important;margin:0 0 1rem!important;color:#8d8177!important;max-width:none!important}
body.tb-authenticated .card,body.tb-authenticated .stat-card,body.tb-authenticated table,body.tb-authenticated .price-card{background:#fffdfb;border-color:var(--tb-warm-border);box-shadow:0 3px 14px rgba(55,42,31,.035)}
body.tb-authenticated .card:hover{box-shadow:0 10px 24px rgba(39,31,24,.08)}
body.tb-authenticated th{background:#f3ece5;color:#80766d}

/* Mobile header + left drawer like Education */
.mobile-header-actions{display:flex;align-items:center;gap:.35rem;margin-left:auto}.mobile-account-button{min-height:38px;padding:.42rem .64rem;border:1px solid #bcded8;border-radius:10px;background:#fff;color:#0f766e;font:inherit;font-size:.72rem;font-weight:850;cursor:pointer}.mobile-account-button.signed-in{background:var(--primary);border-color:var(--primary);color:#fff}.mobile-menu-toggle{width:40px;height:40px;padding:9px 8px;border:1px solid #c8dfda;border-radius:10px;background:#eef8f6;display:flex;flex-direction:column;justify-content:center;gap:4px;cursor:pointer}.mobile-menu-toggle span{display:block;width:100%;height:2px;border-radius:2px;background:#0f766e}
.mobile-nav-backdrop{display:none}.mobile-nav-drawer{position:absolute;left:0!important;right:auto!important;top:0;width:64vw!important;min-width:232px!important;max-width:310px!important;height:100%;min-height:100dvh;padding:.85rem!important;background:#fffdfb!important;color:#282c2b;box-shadow:14px 0 34px rgba(28,24,21,.2)!important;overflow-y:auto;transform:translateX(-102%)!important;transition:transform .24s ease!important}.mobile-nav-backdrop.open .mobile-nav-drawer{transform:translateX(0)!important}.mobile-nav-backdrop{position:fixed!important;inset:0!important;z-index:500!important;background:rgba(20,24,23,0)!important;visibility:hidden!important;pointer-events:none!important;transition:background-color .22s ease,visibility 0s linear .24s!important}.mobile-nav-backdrop.open{display:block!important;background:rgba(20,24,23,.48)!important;visibility:visible!important;pointer-events:auto!important;transition-delay:0s!important}.mobile-drawer-head{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:.1rem 0 .8rem!important;border-bottom:1px solid var(--tb-warm-border)!important}.drawer-brand{display:flex;align-items:center;gap:.46rem;color:#1d2926;text-decoration:none;font-size:.9rem}.drawer-brand img{width:36px!important;height:36px!important;object-fit:contain}.mobile-drawer-close{width:40px;height:40px;border:0;border-radius:10px;background:#f2ece6;color:#4a4a45;font-size:1.45rem;cursor:pointer}.mobile-drawer-links{display:flex!important;width:100%!important;flex-direction:column!important;gap:.16rem!important;padding:.55rem 0!important}.drawer-section-label{padding:.68rem .62rem .25rem;color:#958a80;font-size:.62rem;font-weight:850;letter-spacing:.08em}.mobile-drawer-links a{display:flex!important;align-items:center!important;gap:.48rem!important;min-height:44px!important;padding:.58rem .7rem!important;border-radius:10px!important;color:#756c65!important;text-decoration:none!important;font-size:.8rem!important;font-weight:750!important}.mobile-drawer-links a span{width:21px;text-align:center}.mobile-drawer-links a.active{background:var(--primary)!important;color:#fff!important;box-shadow:none!important}.mobile-drawer-account{display:flex!important;flex-direction:column!important;gap:.35rem!important;padding-top:.7rem!important;border-top:1px solid var(--tb-warm-border)!important}.mobile-drawer-user{display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;align-items:center!important;gap:.55rem!important;padding:.25rem .2rem .55rem!important}.mobile-drawer-user>div{display:flex;min-width:0;flex-direction:column}.mobile-drawer-user strong,.mobile-drawer-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-drawer-user small{font-size:.65rem;color:#93877d}.mobile-drawer-account a,.mobile-drawer-account button{display:flex;align-items:center;min-height:42px;width:100%;padding:.56rem .65rem;border:1px solid var(--tb-warm-border);border-radius:10px;background:#fffdfb;color:#5f5954;font:inherit;font-size:.75rem;font-weight:730;text-align:left;text-decoration:none;cursor:pointer}.mobile-drawer-account .mobile-drawer-login{justify-content:center;background:var(--primary);border-color:var(--primary);color:#fff}

@media(max-width:899px){
  .tb-public-header{display:none!important}.tb-mobile-header{display:flex;height:58px;align-items:center;justify-content:space-between;padding:.45rem .72rem;background:#fffdfb;border-bottom:1px solid var(--tb-warm-border);position:sticky;top:0;z-index:80;box-shadow:0 2px 10px rgba(38,31,25,.035)}.tb-mobile-header .tb-shell-brand img{width:38px!important;height:38px!important}.tb-mobile-header .tb-shell-brand strong{font-size:.98rem}
  body.tb-authenticated:not([data-page="test"]) .page-shell{padding-top:0!important;margin-left:0!important}
  body.tb-authenticated:not([data-page="test"]) #site-footer{display:none!important}
  .desktop-sidebar,.tb-desktop-topbar{display:none!important}
  .section{padding:1rem .78rem 1.6rem!important}.section-title{font-size:1.25rem!important}.section-sub{font-size:.82rem!important}
  .grid{grid-template-columns:1fr!important;gap:.65rem!important}.card{border-radius:15px!important;padding:.9rem!important}
}

/* Focused test shell remains compact but uses same header language. */
body[data-page="test"] .tb-public-header{display:none!important}body[data-page="test"] .tb-mobile-header{display:flex!important}body[data-page="test"] .tb-testbar-shell{padding:.45rem .65rem;background:#fffdfb;border-bottom:1px solid var(--tb-warm-border)}body[data-page="test"] #test-bar{border-radius:12px;background:linear-gradient(120deg,#0f766e,#0d9488);padding:.52rem .7rem}

/* Education-style login/signup/recovery experience, same working IDs/logic. */
#auth-modal{padding:1rem!important;background:rgba(28,33,31,.56)!important}.auth-replica-modal{width:min(920px,96vw)!important;max-width:920px!important;max-height:min(92vh,780px)!important;padding:0!important;display:grid!important;grid-template-columns:42% 58%!important;overflow:hidden!important;border-radius:22px!important;border:1px solid var(--tb-warm-border)!important;background:#fffdfb!important;box-shadow:0 26px 80px rgba(25,22,20,.25)!important}.auth-replica-modal.registration-mode{width:min(1040px,96vw)!important;max-width:1040px!important}.auth-replica-modal .close-modal{z-index:4;top:.8rem;right:.8rem;width:40px;height:40px;border-radius:11px;background:rgba(255,255,255,.92);display:grid;place-items:center}.auth-replica-art{position:relative;min-height:560px;padding:1.7rem;display:flex;flex-direction:column;justify-content:space-between;background:linear-gradient(150deg,#0f766e 0%,#0f8f83 58%,#14b8a6 100%);color:#fff;overflow:hidden}.auth-replica-art::after{content:"";position:absolute;width:290px;height:290px;border-radius:50%;right:-120px;bottom:-95px;background:rgba(255,255,255,.08)}.auth-replica-brand{position:relative;z-index:1;display:flex;align-items:center;gap:.65rem;color:#fff;text-decoration:none;font-size:1rem}.auth-replica-brand img{width:58px!important;height:58px!important;object-fit:contain;border-radius:15px;background:rgba(255,255,255,.94);padding:3px}.auth-replica-copy{position:relative;z-index:1;margin-bottom:2.2rem}.auth-replica-copy>span{font-size:.65rem;letter-spacing:.12em;font-weight:900;opacity:.86}.auth-replica-copy h2{font-size:2rem!important;line-height:1.12;color:#fff;margin:.45rem 0 .72rem}.auth-replica-copy p{font-size:.88rem;line-height:1.6;max-width:34ch;opacity:.9}.auth-replica-points{display:grid;gap:.42rem;margin-top:1.1rem}.auth-replica-points b{font-size:.74rem;font-weight:760}.auth-replica-main{padding:2.15rem 2rem;overflow-y:auto;align-self:stretch;display:flex;flex-direction:column;justify-content:center}.auth-replica-main h2{font-size:1.5rem;margin-bottom:.3rem}.auth-replica-main .sub{color:#8b8077!important;line-height:1.5}.auth-replica-main .form-group label{font-size:.77rem}.auth-replica-main .form-group input,.auth-replica-main .form-group select,.auth-replica-main .form-group textarea{min-height:45px;border:1.3px solid #dfd5cc;border-radius:10px;background:#fff}.auth-replica-main .btn-primary{background:var(--primary)}.auth-replica-main .auth-switch{font-size:.82rem}.auth-replica-main .registration-grid{gap:0 .8rem}
@media(max-width:760px){#auth-modal{align-items:flex-end!important;padding:0!important}.auth-replica-modal,.auth-replica-modal.registration-mode{width:100%!important;max-width:none!important;max-height:94dvh!important;grid-template-columns:1fr!important;border-radius:20px 20px 0 0!important}.auth-replica-art{display:none!important}.auth-replica-main{padding:1.45rem 1rem 1.2rem!important;justify-content:flex-start!important}.auth-replica-modal .close-modal{top:.65rem;right:.65rem}.registration-grid{grid-template-columns:1fr!important}}

/* Confirm popup follows same card language. */
#confirm-modal .modal{border:1px solid var(--tb-warm-border)!important;border-radius:18px!important;background:#fffdfb!important}

/* Shared student profile popup visually matches Education modal while logic stays unchanged. */
.tb-profile-overlay{background:rgba(28,33,31,.56)!important}.tb-profile-modal{border-color:var(--tb-warm-border)!important;border-radius:20px!important;background:#fffdfb!important;box-shadow:0 24px 72px rgba(25,22,20,.24)!important}.tb-profile-modal header{background:#fffdfb!important;border-bottom-color:var(--tb-warm-border)!important}.tb-profile-modal form{background:#fffdfb!important}.tb-profile-grid input,.tb-profile-grid select{background:#fff!important;border-color:#dfd5cc!important;border-radius:10px!important}.tb-verify-panel{background:#f7f2ec!important;border-color:#e6dbd1!important}.tb-profile-actions .btn-primary{background:var(--primary)!important}
.tb-profile-modal header{position:static!important;top:auto!important;z-index:auto!important;color:#1f2524!important;box-shadow:none!important;flex-wrap:nowrap!important}.tb-profile-modal header h2{color:#1f2524!important}.theme-dark .tb-profile-modal,.theme-dark .tb-profile-modal header,.theme-dark .tb-profile-modal form{background:#202625!important;color:#eef4f2!important}.theme-dark .tb-profile-modal header h2{color:#eef4f2!important}.theme-dark .tb-profile-grid input,.theme-dark .tb-profile-grid select{background:#171b1a!important;color:#eef4f2!important;border-color:#3a4542!important}.theme-dark .tb-verify-panel{background:#171b1a!important;border-color:#3a4542!important}

/* 2026-09-29 navigation refinement */
.desktop-sidebar{transition:transform .22s ease!important}
.tb-desktop-topbar,body.tb-authenticated:not([data-page="test"]) .page-shell{transition:left .22s ease,margin-left .22s ease!important}
.desktop-side-profile{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:.55rem;width:100%;min-width:0;padding:.25rem .1rem;border:0;border-radius:10px;background:transparent;color:inherit;text-align:left;cursor:pointer}
.desktop-side-profile:hover{background:#f5f0eb}.desktop-side-profile-copy{display:flex;min-width:0;flex-direction:column}.desktop-side-profile-copy strong{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.desktop-side-profile-copy small{font-size:.62rem;color:#93877d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-drawer-profile{display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;align-items:center!important;gap:.55rem!important;width:100%!important;padding:.34rem .2rem .58rem!important;border:0!important;background:transparent!important;color:inherit!important;text-align:left!important;cursor:pointer!important}
.mobile-drawer-profile-copy{display:flex;min-width:0;flex-direction:column}.mobile-drawer-profile-copy strong,.mobile-drawer-profile-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-drawer-profile-copy small{font-size:.64rem;color:#93877d}
.top-hamburger{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0 11px!important}.top-hamburger span{display:block;width:18px;height:2px;border-radius:2px;background:#0f766e}
@media(min-width:900px){
  body.tb-authenticated.tb-sidebar-collapsed:not([data-page="test"]) .desktop-sidebar{transform:translateX(-102%)!important}
  body.tb-authenticated.tb-sidebar-collapsed:not([data-page="test"]) .tb-desktop-topbar{left:0!important}
  body.tb-authenticated.tb-sidebar-collapsed:not([data-page="test"]) .page-shell{margin-left:0!important}
}
.theme-dark .desktop-side-profile:hover{background:#27302e}.theme-dark .desktop-side-profile-copy small,.theme-dark .mobile-drawer-profile-copy small{color:#a9b1af}.theme-dark .top-hamburger span{background:#d5e9e5}


/* 2026-09-29 — right-side navigation + account grouping */
.desktop-side-link.tb-side-action,.mobile-drawer-link.tb-side-action{
  width:100%!important;border:0!important;background:transparent!important;font:inherit!important;text-align:left!important;cursor:pointer!important;
}
.desktop-side-link.tb-side-action:hover{background:#f3efea!important;color:#20302c!important}
.mobile-drawer-link.tb-side-action:hover{background:#f3efea!important;color:#20302c!important}
@media(min-width:900px){
  body.tb-authenticated:not([data-page="test"]) .desktop-sidebar{
    left:auto!important;right:0!important;border-right:0!important;border-left:1px solid var(--tb-warm-border)!important;
  }
  body.tb-authenticated:not([data-page="test"]) .tb-desktop-topbar{
    left:0!important;right:var(--tb-sidebar-w)!important;
  }
  body.tb-authenticated:not([data-page="test"]) .page-shell{
    margin-left:0!important;margin-right:var(--tb-sidebar-w)!important;
  }
  body.tb-authenticated.tb-sidebar-collapsed:not([data-page="test"]) .desktop-sidebar{
    transform:translateX(102%)!important;
  }
  body.tb-authenticated.tb-sidebar-collapsed:not([data-page="test"]) .tb-desktop-topbar{
    left:0!important;right:0!important;
  }
  body.tb-authenticated.tb-sidebar-collapsed:not([data-page="test"]) .page-shell{
    margin-left:0!important;margin-right:0!important;
  }
}
.mobile-nav-drawer{
  left:auto!important;right:0!important;
  transform:translateX(102%)!important;
  box-shadow:-14px 0 34px rgba(28,24,21,.2)!important;
}
.mobile-nav-backdrop.open .mobile-nav-drawer{transform:translateX(0)!important}

/* 2026-09-29 — branding stays permanently on the left, never inside the right navigation drawer */
.tb-top-left{display:flex;align-items:center;gap:1rem;min-width:0}
.tb-desktop-brand{flex:0 0 auto;padding-right:1rem;border-right:1px solid var(--tb-warm-border)}
.tb-desktop-brand img{width:38px!important;height:38px!important;max-width:38px!important}
.tb-desktop-brand strong{font-size:1rem!important}
.tb-page-title{font-size:.95rem;color:#2c2a28;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desktop-side-brand,.drawer-brand{display:none!important}
.desktop-sidebar-links{padding-top:.8rem!important}
.mobile-drawer-title{font-size:.82rem;font-weight:900;letter-spacing:.06em;color:#746b64;text-transform:uppercase}
@media(max-width:899px){
  .tb-mobile-header .tb-shell-brand{display:flex!important}
}
@media(max-width:460px){
  .tb-mobile-header .tb-shell-brand strong{font-size:.9rem!important}
}

/* 2026-09-29 — compact Typing label under permanent Targetblasters branding */
.tb-shell-brand .tb-brand-copy{display:flex;flex-direction:column;justify-content:center;line-height:1.02;gap:.12rem}
.tb-shell-brand .tb-brand-copy strong{display:block}
.tb-shell-brand .tb-brand-copy small{display:block;font-size:.58rem;font-weight:850;letter-spacing:.13em;text-transform:uppercase;color:var(--primary,#0f8f83);opacity:.95}
.tb-desktop-brand .tb-brand-copy small{font-size:.55rem}
@media(max-width:460px){.tb-mobile-header .tb-brand-copy small{font-size:.52rem;letter-spacing:.11em}}
