/* Base44-inspired dashboard theme for Competitive Exam AI.
   Layered on top of the existing app styles to preserve all routes and workflows. */
:root{
  --bg:#fbfbfd;
  --surface:#ffffff;
  --ink:#171b2c;
  --muted:#6d7690;
  --line:#e5e7ef;
  --brand:#4030ad;
  --brand-2:#4a3bc5;
  --accent:#6b5ce7;
  --accent-soft:#f0edff;
  --info-soft:#f1efff;
  --shadow:0 8px 26px rgba(26,31,61,.065);
  --radius:18px;
  --serif:var(--sans);
  color-scheme:light;
}
:root[data-theme="light"]{
  --bg:#fbfbfd;--surface:#fff;--ink:#171b2c;--muted:#6d7690;--line:#e5e7ef;
  --brand:#4030ad;--brand-2:#4a3bc5;--accent:#6b5ce7;--accent-soft:#f0edff;
  --info-soft:#f1efff;--shadow:0 8px 26px rgba(26,31,61,.065);color-scheme:light;
}
:root[data-theme="dark"]{
  --bg:#0d1020;--surface:#15182a;--ink:#edf0ff;--muted:#a8aec7;--line:#2a2e46;
  --brand:#a69bff;--brand-2:#b6adff;--accent:#9b8cff;--accent-soft:#292443;
  --info-soft:#24213f;--shadow:0 8px 26px rgba(0,0,0,.22);color-scheme:dark;
}
html,body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
h1,h2,h3{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;letter-spacing:-.035em}
a{color:var(--brand-2)}
.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn.accent{background:#f4f2ff;border-color:#e0dcff;color:#392b9f}
.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
.nav.on{background:#f0eff8;color:#3427a5}
.nav:hover{background:#f7f6fc}
.card{border-color:var(--line);border-radius:18px;box-shadow:0 5px 18px rgba(24,29,58,.045);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.side{width:273px;min-width:273px;padding:.15rem .18rem .8rem;background:var(--surface);border-right:1px solid #e4e5eb;gap:.4rem}
.shell{grid-template-columns:273px minmax(0,1fr);background:var(--bg)}
.side .brand{padding:.15rem .05rem 2.75rem;gap:.7rem;color:#171b2c}
.side .brand svg{width:36px;height:36px;flex:none}
.side .brand .brand-copy,.side .brand span{min-width:0}
.side .brand b{font-family:inherit;font-size:1.03rem;letter-spacing:-.035em;font-weight:750;display:block;color:#151727;line-height:1.2}
.side .brand small{display:block;color:#67708a;font-family:inherit;font-size:.67rem;line-height:1.4;font-weight:600;letter-spacing:.16em;margin-top:.15rem}
.side-nav{min-height:48px;margin:0 .02rem;padding:.65rem .8rem;border-radius:15px;font-weight:500;color:#52607a;gap:.8rem}
.side-nav svg{width:20px;height:20px;color:#66728e}
.side-nav.on{background:#f0eff8;color:#3023a6;font-weight:650}
.side-nav.on svg{color:#4232bd}
.side-nav:not(.on):hover{background:#f5f6f9;color:#172b4d}
.side-foot{margin-top:auto;padding:.08rem .02rem 0;border:0}
.sidebar-profile{display:flex;align-items:center;gap:.45rem;width:100%;padding:.55rem .65rem;border:1px solid #e7e8ef;border-radius:18px;background:#fafafd;color:var(--ink)}
.sidebar-profile-main{display:flex;align-items:center;gap:.6rem;flex:1;min-width:0;text-decoration:none;color:inherit}
.sidebar-logout{display:grid;place-items:center;flex:none;width:32px;height:32px;padding:0;border:0;border-radius:9px;background:transparent;color:#66728e;cursor:pointer}
.sidebar-logout:hover{background:#f0eff8;color:#3023a6}
.sidebar-logout svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sidebar-avatar{width:40px;height:40px;display:grid;place-items:center;flex:none;border-radius:50%;background:linear-gradient(140deg,#3c2eae,#8c446d);color:#fff;font-weight:800}
.sidebar-user-copy{display:flex;flex:1;flex-direction:column;min-width:0}
.sidebar-user-copy b{font-size:.82rem;color:#171a29;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-user-copy small{font-size:.68rem;color:#78809a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root[data-theme="dark"] .side{border-right-color:var(--line)}
:root[data-theme="dark"] .side .brand b,
:root[data-theme="dark"] .side .brand{color:var(--ink)}
:root[data-theme="dark"] .side .brand small,
:root[data-theme="dark"] .sidebar-user-copy b,
:root[data-theme="dark"] .sidebar-user-copy small{color:var(--muted)}
:root[data-theme="dark"] .sidebar-profile{background:#191d32;border-color:var(--line)}
:root[data-theme="dark"] .side-nav:not(.on):hover,
:root[data-theme="dark"] .sidebar-logout:hover{background:#24213f;color:var(--brand-2)}
.top{background:var(--surface);border-bottom:1px solid var(--line)}
.page{max-width:none;width:100%;margin:0;padding:42px clamp(26px,6vw,104px) 62px}
.dashboard.stack>*+*{margin-top:1.4rem}
.dashboard-hero{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;min-height:393px;padding:36px;border:0;border-radius:28px;color:#fff;background:linear-gradient(112deg,#3434b5 0%,#4a359d 54%,#525cae 100%);box-shadow:none}
.dash-hero-orb{position:absolute;z-index:-1;right:-55px;top:-72px;width:235px;height:235px;border-radius:50%;background:rgba(255,255,255,.12);pointer-events:none}
.dashboard-hero>*:not(.dash-hero-orb){position:relative;z-index:1}
.dash-hero-badges{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin:0 0 .75rem}
.dash-hero-badge{display:inline-flex;align-items:center;gap:.35rem;min-height:28px;padding:.3rem .8rem;border-radius:999px;background:rgba(255,255,255,.18);color:#fff;font-size:.75rem;font-weight:750;letter-spacing:.055em;line-height:1.25}
.dash-hero-badge svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8}
.dash-target-badge{background:rgba(255,255,255,.13);font-size:.72rem;letter-spacing:0;font-weight:650}
.dashboard-hero .dash-hero-title{margin:.45rem 0 .2rem;color:#fff;font-size:clamp(2rem,2.45vw,2.65rem);font-weight:650;line-height:1.14;letter-spacing:-.045em}
.dashboard-hero .dash-hero-prompt{margin:0 0 .55rem;color:#fff;font-size:clamp(1.8rem,2.2vw,2.35rem);font-weight:620;line-height:1.18;letter-spacing:-.04em}
.dash-hero-copy{max-width:740px;color:rgba(255,255,255,.88);font-size:1rem;line-height:1.55;margin:0 0 1.05rem}
.dash-hero-actions{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;margin:0 0 .9rem}
.dash-hero-actions .btn{min-height:48px;padding:.75rem 1.1rem;border-radius:999px;font-weight:650;white-space:nowrap;text-decoration:none}
.dash-primary-action{background:#fff;border-color:#fff;color:#3327a4}
.dash-primary-action:hover{background:#f7f5ff;border-color:#f7f5ff;color:#2c218c}
.dash-secondary-action{background:transparent;border:1px solid rgba(255,255,255,.3);color:#fff}
.dash-secondary-action:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.65);color:#fff}
.dash-ai-action svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}
.dash-goal{width:min(100%,435px);margin-top:auto;padding-top:.1rem}
.dash-goal-heading{display:flex;justify-content:space-between;align-items:center;gap:.8rem;font-size:.82rem;color:rgba(255,255,255,.9);margin-bottom:.55rem}
.dash-goal-heading>span{display:inline-flex;align-items:center;gap:.4rem}
.dash-goal-heading svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}
.dash-goal-heading b{font-weight:650;color:#fff;white-space:nowrap}
.dash-goal-track{height:9px;background:rgba(255,255,255,.22);border-radius:999px;overflow:hidden}
.dash-goal-track span{display:block;height:100%;min-width:0;border-radius:999px;background:#fff;transition:width .25s ease}
.dash-exam-picker{display:grid;gap:.6rem}
.dash-exam-picker-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.dash-section-kicker{font-size:.75rem;line-height:1.3;font-weight:800;letter-spacing:.16em;color:#65708b}
.dash-inline-link{font-size:.82rem;font-weight:650;color:#2f259f;text-decoration:none}
.dash-inline-link:hover{text-decoration:underline}
.dash-exam-chiprow{display:flex;flex-wrap:wrap;gap:.55rem}
.dash-exam-chip{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:.45rem .9rem;border:1px solid #e1e4eb;border-radius:999px;background:#fff;color:#536079;font-size:.8rem;font-weight:550;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}
.dash-exam-chip:hover{border-color:#b8b1f5;background:#f8f7ff}
.dash-exam-chip.selected{background:#13a4df;border-color:#13a4df;color:#fff;box-shadow:0 3px 8px rgba(19,164,223,.17)}
.dash-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.dash-stat{min-width:0;min-height:161px;padding:22px 22px 20px;border:1px solid #e4e6ee;border-radius:19px;background:#fff;box-shadow:0 5px 14px rgba(20,27,54,.045);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.dash-stat-top{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:1.05rem}
.dash-stat-label{font-size:.72rem;letter-spacing:.13em;font-weight:800;color:#6e7891}
.dash-stat-icon{width:38px;height:38px;display:grid;place-items:center;flex:none;border-radius:13px;background:#f4f4fa;color:#4d40bd}
.dash-stat-icon svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8}
.dash-stat-value{display:block;color:#171b2c;font:500 2.05rem/1.05 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:-.045em}
.dash-stat-caption{display:block;margin-top:.4rem;color:#77809a;font-size:.82rem}
.dash-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:stretch}
.dash-panel{min-width:0;padding:23px;border:1px solid #e5e7ef;border-radius:19px;background:#fff;box-shadow:0 5px 14px rgba(20,27,54,.04)}
.dash-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}
.dash-panel-head h2{margin:0 0 .25rem;color:#171b2c;font-size:1.17rem;font-weight:650;letter-spacing:-.035em}
.dash-panel-head p{margin:0;color:#74809a;font-size:.84rem}
.dash-recommend-row{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:.75rem;align-items:center;padding:16px;border:1px solid #e7e8f0;border-radius:15px;background:#fff}
.dash-recommend-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:#f0efff;color:#4536b8}
.dash-recommend-icon svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.8}
.dash-recommend-copy{min-width:0}
.dash-recommend-copy b{display:block;color:#171b2c;font-size:.96rem;line-height:1.35}
.dash-recommend-copy p{margin:.24rem 0 .45rem;color:#71809a;font-size:.81rem;line-height:1.45}
.dash-recommend-meta{display:flex;gap:.6rem;flex-wrap:wrap;color:#8a91a5;font-size:.7rem}
.dash-recommend-cta{white-space:nowrap;min-height:39px;padding:.5rem .8rem;border:0;border-radius:11px;background:#f1efff;color:#3426a4;font-size:.8rem}
.dash-recommend-cta:hover{background:#e6e2ff}
.dash-panel-foot{display:flex;gap:1.1rem;flex-wrap:wrap;margin-top:1rem;padding-top:.85rem;border-top:1px solid #f0f0f5}
.dash-secondary-link{color:#4a3bc5;text-decoration:none;font-size:.8rem;font-weight:650}
.dash-secondary-link:hover{text-decoration:underline}
.dash-focus-list{display:grid;gap:.4rem}
.dash-focus-row{display:grid;grid-template-columns:9px minmax(0,1fr) auto;align-items:center;gap:.7rem;padding:.8rem .2rem;border-bottom:1px solid #f0f0f5}
.dash-focus-row:last-child{border-bottom:0}
.dash-focus-dot{width:8px;height:8px;border-radius:50%;background:#7465df;box-shadow:0 0 0 4px #f0efff}
.dash-focus-copy{min-width:0}
.dash-focus-copy b{display:block;font-size:.88rem;color:#202339}
.dash-focus-copy small{display:block;margin-top:.14rem;color:#7b849b;font-size:.76rem}
.dash-text-action{border:0;background:transparent;color:#4031b0;font-size:.78rem;font-weight:650;cursor:pointer;padding:.4rem}
.dash-empty-focus{display:flex;align-items:flex-start;gap:.8rem;padding:1rem;border:1px solid #e4e5ed;border-radius:15px;background:#fcfcfe;color:#6a738b;font-size:.87rem;line-height:1.5}
.dash-empty-focus .dash-empty-icon{width:28px;height:28px;display:grid;place-items:center;flex:none;border-radius:9px;background:#f0efff;color:#4c3dc1}
.dash-empty-focus svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8}
.dash-empty-focus b{color:#5c6780;font-weight:550}
.dash-empty-focus p{display:inline;margin:0 .25rem 0 0}
.dash-empty-focus .dash-inline-link{white-space:nowrap}
.dash-recent-panel{margin-top:1.4rem}
.dash-recent-list{display:grid;gap:0}
.dash-recent-row{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:.8rem .1rem;color:inherit;text-decoration:none;border-bottom:1px solid #f0f0f5}
.dash-recent-row:last-child{border-bottom:0}
.dash-recent-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:#f0efff;color:#4938ba}
.dash-recent-mark svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8}
.dash-recent-copy b,.dash-recent-copy small{display:block}
.dash-recent-copy b{font-size:.88rem}
.dash-recent-copy small{font-size:.75rem;color:#8189a0}
.dash-recent-score{font-weight:750;color:#4938ba;font-size:.85rem}
:root[data-theme="dark"] .dashboard-hero{background:linear-gradient(112deg,#24265e 0%,#372b73 54%,#354c82 100%)}
:root[data-theme="dark"] .dash-stat,
:root[data-theme="dark"] .dash-panel{background:var(--surface);border-color:var(--line)}
:root[data-theme="dark"] .dash-stat-value,
:root[data-theme="dark"] .dash-panel-head h2,
:root[data-theme="dark"] .dash-recommend-copy b,
:root[data-theme="dark"] .dash-focus-copy b{color:var(--ink)}
:root[data-theme="dark"] .dash-recommend-row,
:root[data-theme="dark"] .dash-empty-focus{background:#171a2e;border-color:var(--line)}
:root[data-theme="dark"] .dash-stat-caption,
:root[data-theme="dark"] .dash-panel-head p,
:root[data-theme="dark"] .dash-recommend-copy p,
:root[data-theme="dark"] .dash-focus-copy small{color:var(--muted)}
@media (min-width:821px){
  .shell:has(.dashboard)>.main>.top{display:none}
}
@media (max-width:1250px) and (min-width:821px){
  .side{width:252px;min-width:252px}
  .shell{grid-template-columns:252px minmax(0,1fr)}
  .page{padding:30px clamp(24px,4vw,52px) 52px}
  .dash-stat-grid{gap:12px}
  .dash-stat{padding:18px}
  .dash-recommend-row{grid-template-columns:36px minmax(0,1fr);gap:.65rem}
  .dash-recommend-cta{grid-column:2;justify-self:start}
}
@media (max-width:820px){
  .side{width:min(273px,86vw);min-width:0;display:none}
  .shell{grid-template-columns:minmax(0,1fr)}
  .page{padding:16px 14px calc(94px + env(safe-area-inset-bottom))}
  .dashboard.stack>*+*{margin-top:1rem}
  .dashboard-hero{min-height:0;padding:23px 20px;border-radius:22px}
  .dashboard-hero .dash-hero-title{font-size:clamp(1.75rem,6vw,2.2rem);line-height:1.17}
  .dashboard-hero .dash-hero-prompt{font-size:clamp(1.55rem,5.5vw,1.95rem)}
  .dash-hero-copy{font-size:.92rem}
  .dash-hero-actions{gap:.5rem}
  .dash-hero-actions .btn{min-height:44px;padding:.65rem .85rem;font-size:.84rem}
  .dash-goal{padding-top:.25rem}
  .dash-exam-chiprow{gap:.45rem}
  .dash-exam-chip{min-height:36px;padding:.4rem .72rem}
  .dash-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .dash-stat{min-height:140px;padding:15px}
  .dash-stat-top{align-items:flex-start;margin-bottom:.8rem}
  .dash-stat-label{font-size:.65rem;letter-spacing:.09em}
  .dash-stat-icon{width:32px;height:32px;border-radius:10px}
  .dash-stat-value{font-size:1.65rem}
  .dash-stat-caption{font-size:.75rem}
  .dash-columns{grid-template-columns:minmax(0,1fr);gap:12px}
  .dash-panel{padding:17px}
  .dash-panel-head h2{font-size:1.08rem}
  .dash-panel-head p{font-size:.79rem}
  .dash-recommend-row{grid-template-columns:36px minmax(0,1fr);padding:12px}
  .dash-recommend-icon{width:36px;height:36px}
  .dash-recommend-cta{grid-column:2;justify-self:start}
  .dash-empty-focus{padding:.8rem}
}
@media (max-width:430px){
  .dash-hero-badges{gap:.35rem}
  .dash-hero-badge{font-size:.66rem;padding:.3rem .58rem}
  .dashboard-hero .dash-hero-title{font-size:1.65rem}
  .dashboard-hero .dash-hero-prompt{font-size:1.45rem}
  .dash-hero-actions{width:100%;display:grid;grid-template-columns:1fr}
  .dash-hero-actions .btn{width:100%}
  .dash-exam-picker-head{align-items:flex-start;flex-direction:column;gap:.3rem}
  .dash-stat{min-height:125px;padding:13px}
  .dash-stat-value{font-size:1.5rem}
  .dash-focus-row{grid-template-columns:8px minmax(0,1fr);gap:.55rem}
  .dash-text-action{grid-column:2;justify-self:start;padding:.25rem 0}
}


/* Smooth, keyboard-friendly interactions and resilient responsive polish */
:where(.side-nav,.dash-exam-chip,.dash-hero-actions .btn,.dash-recommend-cta,.dash-text-action,.dash-inline-link,.dash-secondary-link,.sidebar-profile,.dash-recent-row){
  transition:background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.dash-stat:hover,.dash-panel:hover{
  border-color:#d9d6f5;
  box-shadow:0 10px 26px rgba(42,37,103,.075);
}
.dash-stat:hover{transform:translateY(-2px)}
.dash-recommend-row{transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}
.dash-recommend-row:hover{border-color:#d8d3f8;background:#fdfcff;box-shadow:0 4px 14px rgba(54,44,134,.045)}
.dash-exam-chip:focus-visible,.dash-hero-actions .btn:focus-visible,.dash-recommend-cta:focus-visible,
.side-nav:focus-visible,.dash-text-action:focus-visible{
  outline:3px solid #a9a0ff;outline-offset:3px;
}
.dash-hero-copy{max-width:720px}
.dash-hero-orb{background:rgba(255,255,255,.105)}
.dash-primary-action{box-shadow:0 2px 0 rgba(18,17,66,.06)}
.dash-primary-action:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(23,20,85,.15)}
.dash-secondary-action:hover{transform:translateY(-1px)}
.dash-stat-icon,.dash-recommend-icon,.dash-recent-mark{transition:transform .18s ease,background-color .18s ease}
.dash-stat:hover .dash-stat-icon{transform:scale(1.04)}
.dash-recent-row:hover{background:#fbfaff}
:root[data-theme="dark"] .dash-recommend-row:hover,
:root[data-theme="dark"] .dash-recent-row:hover{background:#1c1d34}
:root[data-theme="dark"] .dash-stat:hover,
:root[data-theme="dark"] .dash-panel:hover{border-color:#45406d;box-shadow:0 10px 26px rgba(0,0,0,.18)}
:root[data-theme="dark"] .sidebar-profile{background:var(--surface);border-color:var(--line)}
:root[data-theme="dark"] .sidebar-user-copy b{color:var(--ink)}
:root[data-theme="dark"] .dash-exam-chip{background:var(--surface);color:var(--muted);border-color:var(--line)}
:root[data-theme="dark"] .dash-exam-chip.selected{background:#3b8fb9;border-color:#3b8fb9;color:#fff}
@media (max-width:1100px) and (min-width:821px){
  .page{padding-left:clamp(22px,3vw,36px);padding-right:clamp(22px,3vw,36px)}
  .dashboard-hero{padding:30px;min-height:360px}
  .dash-hero-title{font-size:2rem}
  .dash-hero-prompt{font-size:1.8rem}
}
@media (max-width:820px){
  .top{box-shadow:0 3px 12px rgba(28,30,70,.025)}
  .dash-stat:hover,.dash-panel:hover{transform:none}
  .dash-panel-foot{gap:.8rem}
}
@media (prefers-reduced-motion:reduce){
  :where(.side-nav,.dash-exam-chip,.dash-hero-actions .btn,.dash-recommend-cta,.dash-text-action,.dash-inline-link,.dash-secondary-link,.sidebar-profile,.dash-recent-row,.dash-stat,.dash-panel,.dash-recommend-row,.dash-stat-icon,.dash-recommend-icon,.dash-recent-mark){
    transition:none!important;
  }
  .dash-stat:hover,.dash-panel:hover,.dash-primary-action:hover,.dash-secondary-action:hover{transform:none}
}


/* Mobile navigation drawer: retain the desktop sidebar design on narrow screens */
.mobile-menu-toggle{display:none;flex:none;position:relative;z-index:75;font-size:1.25rem;color:#3e31ad}
.mobile-nav-scrim{display:none}
@media (max-width:820px){
  .mobile-menu-toggle{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#f3f1ff;border-color:#e6e2ff;color:#4030ad}
  .top{display:flex!important;align-items:center;gap:.55rem;padding:.6rem .7rem;min-height:60px}
  .top-brand{display:block;flex:0 1 auto;min-width:0}
  .top-brand .brand{display:flex;align-items:center;gap:.45rem;min-width:0;font-size:.88rem}
  .top-brand .brand svg{width:31px;height:31px;flex:none}
  .top-brand .brand span{display:none}
  .top form{flex:1 1 70px;min-width:40px;max-width:none}
  .top input{min-width:40px;width:100%;padding:.58rem .65rem;font-size:14px}
  .top .iconbtn:not(.mobile-menu-toggle){width:38px;height:38px;flex:none}
  .profile-mini{flex:none}
  .mobile-nav-scrim{display:block;position:fixed;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:rgba(13,16,36,.48);backdrop-filter:blur(2px);opacity:0;visibility:hidden;pointer-events:none;z-index:69;transition:opacity .2s ease,visibility .2s ease}
  .mobile-nav-scrim.is-open{opacity:1;visibility:visible;pointer-events:auto}
  .side#mobileSideNav{
    display:flex!important;position:fixed!important;inset:0 auto 0 0;width:min(300px,86vw);max-width:86vw;height:100vh;height:100dvh;overflow-y:auto;overscroll-behavior:contain;
    padding:1rem .7rem calc(1rem + env(safe-area-inset-bottom));gap:.25rem;background:var(--surface);
    border-right:1px solid var(--line);box-shadow:18px 0 55px rgba(14,18,47,.17);z-index:70;
    transform:translateX(-105%);visibility:hidden;pointer-events:none;
    transition:transform .24s cubic-bezier(.2,.75,.25,1),visibility .24s;
  }
  .side#mobileSideNav.mobile-open{transform:translateX(0);visibility:visible;pointer-events:auto}
  .side#mobileSideNav .brand{padding:.35rem .35rem 1.05rem;gap:.62rem}
  .side#mobileSideNav .side-nav{min-height:45px;flex:none}
  .side#mobileSideNav .side-foot{margin-top:auto;flex:none}
  .bottom{z-index:55}
  .page{padding-top:15px}
}
@media (max-width:520px){
  .top{gap:.4rem;padding:.55rem .55rem}
  .mobile-menu-toggle{width:38px;height:38px}
  .top-brand .brand svg{width:29px;height:29px}
  .top form{flex:1 1 50px}
  .top input{padding:.55rem .5rem;font-size:13px}
  .top .iconbtn:not(.mobile-menu-toggle){width:36px;height:36px}
  .profile-mini .avatar{width:32px;height:32px}
}
@media (prefers-reduced-motion:reduce){
  .mobile-nav-scrim,.side#mobileSideNav{transition:none!important}
}


/* Whole-app responsive pass: dashboard, forms, practice, tests, tutor and progress */
html{scroll-padding-top:72px}
body{overflow-x:clip}
#app,.shell,.main,#page{min-width:0;max-width:100%}
img,svg,video,canvas{max-width:100%}
:where(.card,.grid,.grid>*,.stack,.row,.split,.chat,.list,.md,.sol,.q-text){min-width:0}
:where(input,select,textarea,button,.btn,.chip,.exam,.opt){max-width:100%}
.row>*{min-width:0}
.grid{align-items:stretch}
.grid>*{overflow-wrap:anywhere}
.opt{white-space:normal;overflow-wrap:anywhere;line-height:1.45}
.opt .k{flex:none}
input[type="checkbox"],input[type="radio"]{width:auto;min-height:auto;accent-color:var(--brand-2)}
textarea{resize:vertical}
.md img{height:auto}
pre,code{max-width:100%;overflow-wrap:anywhere;white-space:pre-wrap}
table{max-width:100%}
@media (min-width:1101px){
  .page{width:100%;max-width:1600px;margin-inline:auto;padding:34px clamp(28px,3.6vw,64px) 64px}
  .top{padding-inline:clamp(20px,2.5vw,40px)}
  .dashboard.stack>*+*{margin-top:1.45rem}
}
@media (min-width:821px) and (max-width:1100px){
  .shell{grid-template-columns:252px minmax(0,1fr)}
  .side{width:252px}
  .page{padding:26px clamp(18px,2.5vw,30px) 56px}
  .dash-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-columns{grid-template-columns:minmax(0,1fr)}
  .dashboard-hero{min-height:340px;padding:28px}
  .dash-recommend-row{grid-template-columns:38px minmax(0,1fr)}
  .dash-recommend-cta{grid-column:2;justify-self:start}
  .top form{min-width:0}
  .profile-mini-text{max-width:96px}
  .split{grid-template-columns:minmax(0,1fr) 210px}
}
@media (min-width:561px) and (max-width:820px){
  .grid.g2,.g2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .grid.g3,.g3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .split{grid-template-columns:minmax(0,1fr)!important}
  .page{padding-inline:clamp(16px,3.2vw,26px)}
}
@media (max-width:820px){
  body{min-width:320px}
  .top{width:100%;min-width:0}
  .top form{min-width:0}
  .top input{width:100%;min-width:0;font-size:16px}
  .page{min-width:0;overflow-x:clip}
  .page h1,.page h2,.page h3,.page p,.page a,.page label{overflow-wrap:anywhere}
  .row{flex-wrap:wrap}
  .row>*{max-width:100%}
  .card,.dash-panel,.dash-stat{min-width:0}
  .chat .msg{max-width:100%;overflow-wrap:anywhere}
  .q-text{font-size:1rem;line-height:1.55;overflow-wrap:anywhere}
  .opt{width:100%;align-items:flex-start;padding:.72rem}
  .sol{overflow-wrap:anywhere}
  .auth{width:100%;min-height:100svh;padding:16px}
  .auth .card{width:100%;max-width:440px}
  .examgrid{width:100%;max-width:100%}
  .exam{min-width:0;overflow-wrap:anywhere}
  .chips{gap:.45rem}
  .chip{white-space:normal}
  .list>*{min-width:0}
  table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  th,td{white-space:normal;overflow-wrap:anywhere}
  .hero,.dashboard-hero{max-width:100%}
  .bottom{padding-left:max(.15rem,env(safe-area-inset-left));padding-right:max(.15rem,env(safe-area-inset-right))}
}
@media (max-width:560px){
  .page{padding-left:12px;padding-right:12px}
  .grid.g2,.g2,.grid.g3,.g3{grid-template-columns:minmax(0,1fr)!important}
  .row.between{align-items:flex-start}
  .row.between>*{max-width:100%}
  .dash-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-stat{padding:13px;min-width:0}
  .dash-stat-label{letter-spacing:.05em;overflow-wrap:anywhere}
  .dash-panel-head{flex-wrap:wrap}
  .dash-panel-head>*{min-width:0}
  .dash-recommend-row{min-width:0}
  .dash-recommend-meta{gap:.3rem .55rem}
  .dash-recent-row{grid-template-columns:32px minmax(0,1fr) auto;gap:.5rem}
  .dash-recent-mark{width:31px;height:31px}
  .auth{padding:12px}
  .auth .card{padding:18px}
  .steps{gap:4px}
  .btn{max-width:100%;overflow-wrap:anywhere}
  .row .btn{flex:0 1 auto}
  .top-brand .brand{font-size:.85rem}
  .top input{font-size:16px;padding:.55rem .55rem}
  .sidebar-note{font-size:.7rem}
  .bottom .nav{white-space:normal}
}
@media (max-width:360px){
  .page{padding-left:9px;padding-right:9px}
  .top{gap:.3rem;padding-inline:.45rem}
  .top-brand .brand svg{width:25px;height:25px}
  .mobile-menu-toggle{width:36px;height:36px}
  .top .iconbtn:not(.mobile-menu-toggle){width:34px;height:34px}
  .profile-mini .avatar{width:29px;height:29px}
  .dash-stat{padding:11px}
  .dash-stat-value{font-size:1.35rem}
  .bottom .nav{font-size:.62rem;padding-inline:0}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}


/* Final responsive refinement: coherent desktop, tablet and phone layouts */
html{scroll-padding-top:76px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-width:320px;max-width:100%;overflow-x:clip}
#app,.shell,.main,#page,.page{min-width:0;max-width:100%}
.shell{min-height:100vh;min-height:100dvh;grid-template-columns:273px minmax(0,1fr)}
.side{width:273px;min-width:273px;min-height:100vh;min-height:100dvh;align-self:start}
.main{min-width:0;width:100%;overflow-x:clip}
.page{width:100%;max-width:1600px;margin-inline:auto}
img,video,canvas,iframe{max-width:100%;height:auto}
.grid,.g2,.g3,.split{min-width:0}
.grid>* ,.g2>* ,.g3>* ,.split>*{min-width:0}
.row>*{min-width:0}
input,select,textarea,button,.btn,.chip,.opt{max-width:100%}
textarea{resize:vertical}
.opt,.q-text,.md,.sol,.msg,.dash-recommend-copy,.dash-focus-copy,.dash-recent-copy{overflow-wrap:anywhere}
table{max-width:100%}
pre,code{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
:root[data-theme="dark"] .top{border-color:var(--line)}
@media (min-width:1500px){
  .page{padding-left:clamp(42px,4vw,78px);padding-right:clamp(42px,4vw,78px)}
  .dash-stat-grid{gap:18px}
  .dash-columns{gap:22px}
}
@media (min-width:1101px){
  .shell{grid-template-columns:273px minmax(0,1fr)}
  .side{width:273px}
  .page{padding-top:34px;padding-bottom:64px}
}
@media (min-width:821px) and (max-width:1100px){
  .shell{grid-template-columns:245px minmax(0,1fr)}
  .side{width:245px;min-width:245px}
  .side .brand{padding-bottom:1.5rem}
  .page{padding:24px clamp(16px,2.4vw,28px) 54px}
  .top{padding-inline:16px;gap:.5rem}
  .top form{flex:1 1 100px;min-width:0}
  .top input{min-width:0}
  .profile-mini-text{max-width:86px}
  .dash-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .dash-columns{grid-template-columns:minmax(0,1fr);gap:14px}
  .dashboard-hero{min-height:320px;padding:26px}
  .dash-hero-title{font-size:2rem}
  .dash-hero-prompt{font-size:1.75rem}
  .dash-recommend-row{grid-template-columns:38px minmax(0,1fr);gap:.65rem}
  .dash-recommend-cta{grid-column:2;justify-self:start;white-space:normal}
  .g3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .split{grid-template-columns:minmax(0,1fr)}
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:820px){
  body{padding-bottom:0;min-width:320px}
  .shell{display:block;width:100%;min-height:100vh;min-height:100dvh}
  .side{width:min(300px,86vw);min-width:0}
  .main{width:100%;max-width:100%;overflow-x:clip}
  .top{position:sticky;top:0;z-index:30;width:100%;min-width:0;gap:.45rem;padding:.55rem .65rem}
  .top-brand{min-width:0;flex:0 1 auto}
  .top-brand .brand{min-width:0;gap:.4rem}
  .top-brand .brand svg{flex:none}
  .top form{min-width:0;max-width:none;flex:1 1 100px}
  .top input{width:100%;min-width:0;font-size:16px;padding:.58rem .65rem}
  .top-exam{display:none}
  .profile-mini{flex:none}
  .page{width:100%;max-width:100%;padding:clamp(14px,3vw,24px);padding-bottom:calc(88px + env(safe-area-inset-bottom));overflow-x:clip}
  .page h1{font-size:clamp(1.35rem,3.3vw,1.75rem);line-height:1.2}
  .page h2{font-size:clamp(1.1rem,2.8vw,1.35rem)}
  .row{flex-wrap:wrap}
  .row.between{align-items:flex-start}
  .row>*{max-width:100%}
  .grid.g2,.g2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .grid.g3,.g3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .split{grid-template-columns:minmax(0,1fr)!important}
  .dash-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-columns{grid-template-columns:minmax(0,1fr)}
  .dash-stat{min-width:0}
  .dash-recommend-row{grid-template-columns:36px minmax(0,1fr);gap:.65rem}
  .dash-recommend-cta{grid-column:2;justify-self:start;white-space:normal}
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .examgrid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:48vh;overflow:auto}
  .chat .msg{max-width:100%;min-width:0}
  .bottom{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;left:0;right:0;bottom:0;z-index:55;background:var(--surface);padding:.25rem max(.15rem,env(safe-area-inset-right)) calc(.25rem + env(safe-area-inset-bottom)) max(.15rem,env(safe-area-inset-left));border-top:1px solid var(--line)}
  .bottom .nav{min-width:0;min-height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.16rem;padding:.3rem .08rem;font-size:clamp(.62rem,2.4vw,.76rem);line-height:1.1;text-align:center;overflow-wrap:anywhere}
  .bottom .nav svg{width:19px;height:19px;flex:none}
  #toast{bottom:calc(78px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px)}
  table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  th,td{white-space:normal;overflow-wrap:anywhere}
  .auth{min-height:100vh;min-height:100dvh;width:100%;padding:clamp(12px,3vw,20px)}
  .auth .card{width:100%;max-width:440px}
  .btn,button,.chip,.exam,.opt{touch-action:manipulation}
}
@media (min-width:561px) and (max-width:820px){
  .page{padding-inline:clamp(18px,3vw,28px)}
  .grid.g2,.g2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .grid.g3,.g3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .examgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-panel{padding:20px}
  .dashboard-hero{padding:26px;min-height:0}
  .dash-hero-title{font-size:clamp(1.8rem,4vw,2.3rem)}
}
@media (max-width:560px){
  .top{gap:.35rem;padding:.5rem .5rem}
  .mobile-menu-toggle{width:38px;height:38px;flex:none}
  .top-brand .brand svg{width:29px;height:29px}
  .top form{flex:1 1 45px}
  .top input{padding:.56rem .5rem;font-size:16px}
  .top .iconbtn:not(.mobile-menu-toggle){width:36px;height:36px;flex:none}
  .profile-mini{padding:0}
  .profile-mini .avatar{width:32px;height:32px}
  .page{padding:12px;padding-bottom:calc(86px + env(safe-area-inset-bottom))}
  .grid.g2,.g2,.grid.g3,.g3{grid-template-columns:minmax(0,1fr)!important}
  .dash-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-columns{grid-template-columns:minmax(0,1fr)}
  .dash-stat{padding:12px;min-height:118px}
  .dash-stat-value{font-size:1.45rem}
  .dash-stat-label{font-size:.63rem;letter-spacing:.04em}
  .dash-stat-caption{font-size:.73rem}
  .dash-panel{padding:14px}
  .dash-panel-head{gap:.5rem;flex-wrap:wrap}
  .dash-recommend-row{grid-template-columns:32px minmax(0,1fr);padding:11px}
  .dash-recommend-icon{width:32px;height:32px}
  .dash-focus-row{grid-template-columns:8px minmax(0,1fr);gap:.55rem}
  .dash-text-action{grid-column:2;justify-self:start}
  .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .quick-item{min-width:0;padding:.55rem;gap:.45rem}
  .quick-item b{font-size:.85rem}
  .quick-item small{display:none}
  .examgrid{grid-template-columns:minmax(0,1fr);max-height:none;overflow:visible}
  .card{padding:14px;border-radius:14px}
  .btn{padding:.58rem .8rem;overflow-wrap:anywhere}
  .btn.sm{padding:.4rem .58rem;font-size:.82rem}
  .opt{padding:.68rem}
  .msg{padding:.65rem .75rem}
  .empty{padding:1.35rem .7rem}
  .list>*{padding:.6rem 0}
  .bottom .nav{min-height:51px}
}
@media (max-width:380px){
  .top{gap:.25rem;padding-inline:.4rem}
  .top-brand .brand svg{width:26px;height:26px}
  .mobile-menu-toggle{width:35px;height:35px}
  .top .iconbtn:not(.mobile-menu-toggle){width:34px;height:34px}
  .profile-mini .avatar{width:29px;height:29px}
  .page{padding-inline:9px}
  .bottom .nav{font-size:.6rem;letter-spacing:-.01em}
  .dash-stat{padding:10px}
  .dash-stat-value{font-size:1.3rem}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .dash-stat:hover,.dash-panel:hover,.dash-primary-action:hover,.dash-secondary-action:hover{transform:none}
}


/* Consistent Base44-inspired visual system across every application page */
:root{
  --cea-page-bg:#fbfbfd;
  --cea-card-bg:#ffffff;
  --cea-card-border:#e5e7ef;
  --cea-text:#171b2c;
  --cea-muted:#6d7690;
  --cea-purple:#4030ad;
  --cea-purple-soft:#f0eff8;
}
:root[data-theme="dark"]{
  --cea-page-bg:#0d1020;
  --cea-card-bg:#15182a;
  --cea-card-border:#2a2e46;
  --cea-text:#edf0ff;
  --cea-muted:#a8aec7;
  --cea-purple:#a69bff;
  --cea-purple-soft:#24213f;
}
body,.shell,.main{background:var(--cea-page-bg)}
.page{color:var(--cea-text)}
.page>h1,.page .stack>h1,.page h1:not(.dash-hero-title){
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--cea-text);font-size:clamp(1.45rem,2vw,1.8rem);font-weight:680;line-height:1.2;letter-spacing:-.04em;margin:0 0 .2rem;
}
.page h2,.page h3,.page h4{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;letter-spacing:-.025em}
.page p{line-height:1.55}
:where(.page .card,.page .panel,.page .stat,.page .sol,.page .opt,.page .exam,.page .empty){
  border-color:var(--cea-card-border);
}
.page .card:not(.dashboard-hero):not(.dash-panel):not(.dash-stat){
  background:var(--cea-card-bg);
  border-color:var(--cea-card-border);
  border-radius:17px;
  box-shadow:0 4px 16px rgba(24,29,58,.035);
}
:root[data-theme="dark"] .page .card:not(.dashboard-hero):not(.dash-panel):not(.dash-stat){
  background:var(--cea-card-bg);border-color:var(--cea-card-border);box-shadow:0 5px 18px rgba(0,0,0,.14);
}
.page .btn{
  border-radius:11px;min-height:42px;font-weight:620;letter-spacing:-.01em;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease;
}
.page .btn.primary{background:#4030ad;border-color:#4030ad;color:#fff}
.page .btn.primary:hover{background:#34269a;border-color:#34269a;box-shadow:0 4px 12px rgba(64,48,173,.18);transform:translateY(-1px)}
.page .btn:not(.primary):not(.accent):hover{background:#f7f6fc;border-color:#d9d5fa;color:#34269a}
:root[data-theme="dark"] .page .btn.primary{background:#6557d4;border-color:#6557d4;color:#fff}
:root[data-theme="dark"] .page .btn:not(.primary):not(.accent):hover{background:#24213f;border-color:#45406d;color:#c9c2ff}
.page .chips{gap:.5rem}
.page .chip{
  min-height:38px;padding:.45rem .85rem;border:1px solid var(--cea-card-border);
  background:var(--cea-card-bg);color:var(--cea-muted);border-radius:999px;font-weight:570;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}
.page .chip:hover{border-color:#c9c4f5;color:var(--cea-purple)}
.page .chip.on{background:#4030ad;border-color:#4030ad;color:#fff}
:root[data-theme="dark"] .page .chip.on{background:#6255d1;border-color:#6255d1;color:#fff}
.page input:not([type="checkbox"]):not([type="radio"]),.page select,.page textarea{
  background:var(--cea-card-bg);border-color:var(--cea-card-border);border-radius:11px;color:var(--cea-text);
  box-shadow:none;min-height:44px;
}
.page input:focus,.page select:focus,.page textarea:focus{
  border-color:#a6a0ed;outline:3px solid rgba(105,89,218,.12);outline-offset:0;
}
.page label{font-weight:620;color:var(--cea-text)}
.page .info{border:1px solid #e4e0ff;border-radius:12px;background:#f8f7ff;color:#5347a8}
.page .note{border-radius:12px}
:root[data-theme="dark"] .page .info{background:#201d3a;border-color:#38305d;color:#c9c2ff}
.page .opt{
  background:var(--cea-card-bg);border-radius:13px;border-color:var(--cea-card-border);
  padding:.8rem .9rem;line-height:1.48;
}
.page .opt:hover{border-color:#aaa3ef}
.page .opt.sel{background:#f0efff;border-color:#6759ce}
:root[data-theme="dark"] .page .opt.sel{background:#24213f;border-color:#8275ef}
.page .q-text{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:1.08rem;line-height:1.65;color:var(--cea-text)}
.page .sol{border-radius:0 12px 12px 0}
.page .msg{line-height:1.6;border-radius:15px}
.page .msg.user{background:#4030ad;color:#fff}
.page .msg.assistant{background:var(--cea-card-bg);border-color:var(--cea-card-border)}
:root[data-theme="dark"] .page .msg.user{background:#6255d1;color:#fff}
.page .list>*+*{border-top-color:var(--cea-card-border)}
.page table{font-size:.9rem}
.page th{font-weight:700;color:var(--cea-muted);background:var(--cea-page-bg)}
.page td,.page th{padding:.7rem .8rem;border-bottom-color:var(--cea-card-border)}
.page .badge{font-weight:650;letter-spacing:0}
.page a:not(.btn):not(.nav):not(.dash-secondary-link):not(.dash-recommend-cta){text-underline-offset:3px}
.page :focus-visible{outline-color:#9f96f0}
@media (min-width:821px){
  .shell{grid-template-columns:273px minmax(0,1fr)}
  .page{padding-top:34px}
}
@media (max-width:820px){
  .page>h1,.page .stack>h1,.page h1:not(.dash-hero-title){font-size:1.48rem}
  .page .chips{gap:.4rem}
  .page .chip{min-height:40px}
  .page .btn{min-height:44px}
  .page .card:not(.dashboard-hero):not(.dash-panel):not(.dash-stat){border-radius:15px}
  .page .q-text{font-size:1rem}
}
@media (prefers-reduced-motion:reduce){
  .page .btn,.page .chip{transition:none!important}
}


/* Competitive Exam AI — original Mock Test Arena identity */
.mock-brand-hero{position:relative;overflow:hidden;border-radius:22px;padding:clamp(1.25rem,3vw,2.1rem);color:#fff;background:radial-gradient(circle at 88% 8%,rgba(255,199,87,.3),transparent 29%),linear-gradient(125deg,#171449 0%,#3530a5 52%,#673b91 100%);box-shadow:0 18px 45px rgba(43,35,123,.2)}
.mock-brand-hero:after{content:"";position:absolute;width:230px;height:230px;border:1px solid rgba(255,255,255,.15);border-radius:50%;right:-75px;bottom:-155px;box-shadow:0 0 0 25px rgba(255,255,255,.035),0 0 0 52px rgba(255,255,255,.025);pointer-events:none}
.mock-brand-lockup{display:flex;align-items:center;gap:.6rem;font-size:.77rem;letter-spacing:.12em;font-weight:850;color:#e4e5ff}
.mock-brand-lockup svg{width:38px;height:38px;filter:drop-shadow(0 3px 8px rgba(0,0,0,.18))}
.mock-hero-copy{position:relative;z-index:1;max-width:720px;margin-top:1.8rem}
.mock-eyebrow{font-size:.73rem;letter-spacing:.15em;font-weight:800;color:#ffd98a}
.mock-brand-hero h1{font-family:var(--sans);font-size:clamp(2rem,5vw,3.15rem);letter-spacing:-.045em;line-height:1.05;margin:.55rem 0 .7rem;color:#fff}
.mock-brand-hero p{color:rgba(255,255,255,.82);max-width:560px;font-size:1rem}
.mock-promise-row{display:flex;gap:.55rem;flex-wrap:wrap;margin-top:1.15rem}
.mock-promise-row span{border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.09);border-radius:999px;padding:.38rem .7rem;font-size:.8rem;font-weight:650}
.mock-section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:.25rem 0 .8rem}
.mock-section-heading h2{font-family:var(--sans);font-size:1.18rem;letter-spacing:-.025em;margin:0}
.mock-section-heading p{font-size:.88rem;margin:.15rem 0 0}
.mock-hub>.card{border-radius:16px}
.mock-hub .mock-history{padding:1.2rem}
.mock-hub .mock-history .mock-section-heading{margin-bottom:.2rem}
@media(max-width:600px){.mock-brand-hero{border-radius:17px;padding:1.15rem}.mock-hero-copy{margin-top:1.35rem}.mock-brand-lockup{font-size:.68rem}.mock-promise-row{gap:.35rem}.mock-promise-row span{font-size:.73rem;padding:.35rem .55rem}.mock-section-heading{align-items:flex-start}}


/* Device-aware finishing pass: compact phone layout, balanced tablet grid, roomy desktop workspace. */
:where(.page .card,.page .dash-panel,.page .mock-brand-hero,.page .dashboard-hero){min-width:0}
:where(.page .row,.page .row.between){min-width:0}
.page .row>*{min-width:0}
.page .btn,.page button,.page .chip{overflow-wrap:anywhere}
.page .split{align-items:start;gap:1rem}
.page .split>*{min-width:0}
.page .test-palette-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem}
.page .test-palette-summary>div{min-width:0}
.page .test-palette-summary b,.page .test-palette-summary span{overflow-wrap:anywhere}
.page .pal{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:.4rem}
.page .pal button{min-width:0;min-height:38px}
.page .result-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}
.page .mock-hub form{min-width:0}
.page .mock-hub input,.page .mock-hub select{width:100%;min-width:0}
.page table{border-collapse:separate;border-spacing:0}
.page :where(input,select,textarea){font-size:16px}
@media (min-width:1440px){
  .shell{grid-template-columns:286px minmax(0,1fr)}
  .side{width:286px;min-width:286px}
  .page{max-width:1680px;padding-inline:clamp(42px,4vw,76px)}
  .dashboard.stack{max-width:1480px}
  .dashboard-hero{padding:42px}
  .dash-stat-grid{gap:1rem}
}
@media (min-width:821px){
  .page .split{grid-template-columns:minmax(0,1fr) minmax(260px,320px)}
  .page .test-palette-summary{gap:.65rem}
  .page .pal{grid-template-columns:repeat(6,minmax(0,1fr))}
}
@media (min-width:561px) and (max-width:820px){
  .page .split{grid-template-columns:minmax(0,1fr)!important}
  .page .pal{grid-template-columns:repeat(10,minmax(0,1fr))}
  .page .result-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page .mock-brand-hero{padding:1.5rem}
  .page .mock-hero-copy{margin-top:1.4rem}
}
@media (max-width:560px){
  .page{padding-top:12px}
  .page .split{grid-template-columns:minmax(0,1fr)!important;gap:.7rem}
  .page .split>.card{padding:12px}
  .page .test-palette-summary{gap:.35rem}
  .page .test-palette-summary>div{padding:.5rem .35rem}
  .page .test-palette-summary b{font-size:1rem}
  .page .test-palette-summary span{font-size:.68rem;line-height:1.25}
  .page .pal{grid-template-columns:repeat(6,minmax(0,1fr));gap:.35rem}
  .page .pal button{min-height:40px}
  .page .result-metrics{grid-template-columns:minmax(0,1fr)}
  .page .mock-section-heading{align-items:flex-start}
  .page .mock-section-heading>.badge{max-width:100%;white-space:normal}
  .page .mock-history .row.between{align-items:flex-start}
  .page .mock-history .row.between>*{min-width:0;max-width:100%}
  .page .dashboard-hero{padding:20px;border-radius:20px}
  .page .dash-hero-actions{width:100%}
  .page .dash-hero-actions .btn{flex:1 1 100%;justify-content:center;text-align:center}
  .page .dash-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page .dash-stat{min-width:0}
  .page .dash-panel-head{align-items:flex-start}
  .page .dash-recent-row{grid-template-columns:32px minmax(0,1fr);gap:.55rem}
  .page .dash-recent-row>*:last-child{grid-column:2;justify-self:start}
  .page .q-text{font-size:1rem;line-height:1.6}
  .page .opt{gap:.65rem}
  .page .btn{max-width:100%;white-space:normal}
  .page .top .badge{display:none}
}
@media (max-width:360px){
  .page .pal{grid-template-columns:repeat(5,minmax(0,1fr))}
  .page .test-palette-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .page .test-palette-summary span{font-size:.62rem}
  .page .mock-promise-row span{font-size:.68rem}
  .page .dash-stat-value{font-size:1.2rem}
}
@media (orientation:landscape) and (max-height:520px) and (max-width:900px){
  .bottom{position:sticky}
  .page{padding-bottom:18px}
  .page .dashboard-hero{min-height:0}
}
@media (prefers-reduced-motion:reduce){
  .page .btn,.page .chip{scroll-behavior:auto}
}


/* Premium light refresh — visual-only overrides; preserve existing routes and hooks. */
:root:not([data-theme="dark"]),:root[data-theme="light"]{
  --bg:#f4f7fc;--surface:#fff;--ink:#14213d;--muted:#64748b;--line:#e2eaf5;
  --brand:#145ee8;--brand-2:#0757d8;--accent:#0ea5e9;--accent-soft:#eaf4ff;
  --info-soft:#edf5ff;--shadow:0 8px 28px rgba(24,57,110,.055);
}
:root:not([data-theme="dark"]) body{background:#f4f7fc}
:root:not([data-theme="dark"]) .shell{background:linear-gradient(145deg,#f7faff 0%,#f1f6fd 100%)}
:root:not([data-theme="dark"]) .side{background:rgba(255,255,255,.94);border-right-color:#e4ebf5;box-shadow:4px 0 24px rgba(28,58,101,.025)}
:root:not([data-theme="dark"]) .side-nav{border-radius:12px;transition:background .18s ease,color .18s ease,transform .18s ease}
:root:not([data-theme="dark"]) .side-nav.on{background:linear-gradient(110deg,#1765f5,#347cf8);color:#fff;box-shadow:0 6px 14px rgba(25,100,238,.19)}
:root:not([data-theme="dark"]) .side-nav.on svg{color:#fff}
:root:not([data-theme="dark"]) .side-nav:not(.on):hover{background:#edf4ff;color:#124fc1;transform:translateX(2px)}
:root:not([data-theme="dark"]) .top{background:rgba(255,255,255,.92);border-bottom-color:#e4ebf5;backdrop-filter:blur(14px)}
:root:not([data-theme="dark"]) .page{padding-top:30px}
:root:not([data-theme="dark"]) .dashboard.stack>*+*{margin-top:1.15rem}
:root:not([data-theme="dark"]) .dashboard-hero{min-height:330px;padding:clamp(24px,3vw,38px);border-radius:24px;background:radial-gradient(ellipse at 88% 0%,rgba(34,211,238,.22),transparent 32%),linear-gradient(115deg,#0b1d43 0%,#0c3e83 55%,#1169ba 100%);box-shadow:0 16px 36px rgba(12,54,112,.15)}
:root:not([data-theme="dark"]) .dashboard-hero:after{content:"";position:absolute;z-index:-1;right:-70px;bottom:-180px;width:350px;height:350px;border:1px solid rgba(255,255,255,.16);border-radius:50%;box-shadow:0 0 0 32px rgba(255,255,255,.035),0 0 0 68px rgba(255,255,255,.025);pointer-events:none}
:root:not([data-theme="dark"]) .dashboard-hero .dash-hero-title{font-weight:780;letter-spacing:-.05em}
:root:not([data-theme="dark"]) .dash-primary-action{color:#1159d9;box-shadow:0 5px 14px rgba(3,22,60,.12)}
:root:not([data-theme="dark"]) .dash-primary-action:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(3,22,60,.18)}
:root:not([data-theme="dark"]) .card,:root:not([data-theme="dark"]) .dash-panel{border-color:#e3ebf6;border-radius:17px;box-shadow:0 5px 18px rgba(30,65,120,.035)}
:root:not([data-theme="dark"]) .card:hover{border-color:#d0def2;box-shadow:0 10px 25px rgba(30,65,120,.075)}
:root:not([data-theme="dark"]) .dash-section-kicker{color:#64748b;letter-spacing:.12em}
:root:not([data-theme="dark"]) .dash-inline-link{color:#0757d8}
:root:not([data-theme="dark"]) .btn.primary{background:linear-gradient(110deg,#1765f5,#347cf8);border-color:#1765f5;box-shadow:0 4px 12px rgba(23,101,245,.14)}
:root:not([data-theme="dark"]) .chip.on{background:#1765f5;border-color:#1765f5}
:root:not([data-theme="dark"]) .page :where(input,select,textarea){border-color:#dce5f1;border-radius:11px;background:#fff}
:root:not([data-theme="dark"]) .page :where(input,select,textarea):focus{border-color:#6ba2ff;box-shadow:0 0 0 3px rgba(37,99,235,.11);outline:0}
:root:not([data-theme="dark"]) .page :focus-visible{outline:3px solid rgba(37,99,235,.55);outline-offset:2px}
:root:not([data-theme="dark"]) .sidebar-profile{background:#f8faff;border-color:#e3ebf6}
:root:not([data-theme="dark"]) .sidebar-avatar{background:linear-gradient(145deg,#155eef,#06a6d8)}
@media(min-width:821px){
  :root:not([data-theme="dark"]) .page{padding-inline:clamp(24px,3.5vw,64px)}
  :root:not([data-theme="dark"]) .shell{grid-template-columns:260px minmax(0,1fr)}
  :root:not([data-theme="dark"]) .side{width:260px;min-width:260px}
}
@media(max-width:820px){
  :root:not([data-theme="dark"]) .page{padding-top:18px}
  :root:not([data-theme="dark"]) .dashboard-hero{min-height:0}
}
@media(prefers-reduced-motion:reduce){
  :root:not([data-theme="dark"]) .side-nav,:root:not([data-theme="dark"]) .card,:root:not([data-theme="dark"]) .btn{transition:none!important}
}


/* Advanced premium light experience: restrained glass, layered light, and motion.
   Visual-only overrides; existing selectors, routes, and app behavior stay intact. */
:root:not([data-theme="dark"]){
  --bg:#f3f7ff;--surface:rgba(255,255,255,.92);--ink:#13213b;--muted:#61718b;
  --line:rgba(206,220,241,.82);--brand:#155eef;--brand-2:#0b55d8;
  --accent:#0891b2;--accent-soft:#e7f7ff;--info-soft:#eef5ff;
  --shadow:0 12px 34px rgba(32,70,132,.075);
}
:root:not([data-theme="dark"]) body{
  background:
    radial-gradient(ellipse at 8% 0%,rgba(116,167,255,.13),transparent 31rem),
    radial-gradient(ellipse at 100% 14%,rgba(94,234,212,.12),transparent 28rem),
    #f3f7ff;
}
:root:not([data-theme="dark"]) .shell{
  background:linear-gradient(135deg,rgba(248,251,255,.96),rgba(239,246,255,.94));
}
:root:not([data-theme="dark"]) .side{
  background:rgba(255,255,255,.76);border-right:1px solid rgba(210,224,244,.85);
  box-shadow:8px 0 34px rgba(33,65,116,.035);backdrop-filter:blur(18px);
}
:root:not([data-theme="dark"]) .top{
  background:rgba(255,255,255,.72);border-bottom:1px solid rgba(210,224,244,.75);
  backdrop-filter:blur(18px) saturate(145%);
}
:root:not([data-theme="dark"]) .page{padding-top:28px}
:root:not([data-theme="dark"]) .dashboard.stack>*+*{margin-top:1.2rem}
:root:not([data-theme="dark"]) .side-nav{
  border:1px solid transparent;border-radius:13px;
  transition:background .22s ease,color .22s ease,transform .22s ease,box-shadow .22s ease;
}
:root:not([data-theme="dark"]) .side-nav.on{
  color:#fff;background:linear-gradient(115deg,#145eef,#3b82f6);
  box-shadow:0 8px 19px rgba(21,94,239,.2);
}
:root:not([data-theme="dark"]) .side-nav.on svg{color:#fff}
:root:not([data-theme="dark"]) .side-nav:not(.on):hover{
  transform:translateX(3px);background:rgba(230,240,255,.88);color:#124fc1;
  border-color:rgba(197,218,249,.8);
}
:root:not([data-theme="dark"]) .dashboard-hero{
  min-height:345px;padding:clamp(25px,3.1vw,42px);border:1px solid rgba(255,255,255,.2);
  border-radius:27px;isolation:isolate;
  background:
    radial-gradient(ellipse at 88% 12%,rgba(45,212,191,.24),transparent 29%),
    radial-gradient(ellipse at 68% 100%,rgba(59,130,246,.34),transparent 38%),
    linear-gradient(118deg,#0b1b3a 0%,#103e80 56%,#1168a8 100%);
  box-shadow:0 20px 48px rgba(12,52,108,.19),inset 0 1px 0 rgba(255,255,255,.15);
}
:root:not([data-theme="dark"]) .dashboard-hero:before{
  content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;opacity:.48;
  background:linear-gradient(115deg,transparent 40%,rgba(255,255,255,.075) 58%,transparent 75%);
  transform:translateX(-12%);animation:cea-glass-sheen 12s ease-in-out infinite;
}
:root:not([data-theme="dark"]) .dashboard-hero:after{
  content:"";position:absolute;z-index:-1;right:-95px;top:-150px;width:360px;height:360px;
  border:1px solid rgba(255,255,255,.2);border-radius:50%;
  box-shadow:0 0 0 28px rgba(255,255,255,.045),0 0 0 60px rgba(255,255,255,.028),
  0 0 0 100px rgba(255,255,255,.018);pointer-events:none;
}
:root:not([data-theme="dark"]) .dashboard-hero .dash-hero-title{
  font-weight:790;letter-spacing:-.052em;text-shadow:0 2px 22px rgba(2,16,45,.12);
}
:root:not([data-theme="dark"]) .dash-hero-badge{
  border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.12);
  backdrop-filter:blur(10px);
}
:root:not([data-theme="dark"]) .dash-primary-action{
  color:#1259dc;box-shadow:0 8px 20px rgba(1,15,40,.18);
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}
:root:not([data-theme="dark"]) .dash-primary-action:hover{
  transform:translateY(-2px);box-shadow:0 12px 24px rgba(1,15,40,.23);
}
:root:not([data-theme="dark"]) .card,
:root:not([data-theme="dark"]) .dash-panel{
  border:1px solid rgba(210,224,244,.9);border-radius:19px;
  background:rgba(255,255,255,.84);
  box-shadow:0 7px 24px rgba(31,66,121,.045),inset 0 1px 0 rgba(255,255,255,.9);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease,background .22s ease;
}
:root:not([data-theme="dark"]) .card:hover{
  transform:translateY(-3px);border-color:rgba(143,181,240,.8);
  background:rgba(255,255,255,.97);box-shadow:0 14px 30px rgba(31,66,121,.09);
}
:root:not([data-theme="dark"]) .dash-stat{
  background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(246,250,255,.87));
  border-color:rgba(209,224,245,.92);
}
:root:not([data-theme="dark"]) .dash-section-kicker{color:#64748b;letter-spacing:.13em}
:root:not([data-theme="dark"]) .dash-inline-link{color:#0757d8}
:root:not([data-theme="dark"]) .btn.primary{
  background:linear-gradient(115deg,#155eef,#347cf8);border-color:#155eef;
  box-shadow:0 5px 14px rgba(21,94,239,.16);
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
}
:root:not([data-theme="dark"]) .btn.primary:hover{
  transform:translateY(-1px);box-shadow:0 9px 20px rgba(21,94,239,.22);filter:saturate(1.08);
}
:root:not([data-theme="dark"]) .chip.on{background:#155eef;border-color:#155eef}
:root:not([data-theme="dark"]) .sidebar-profile{
  background:rgba(248,251,255,.82);border-color:rgba(210,224,244,.9);
  backdrop-filter:blur(12px);
}
:root:not([data-theme="dark"]) .sidebar-avatar{background:linear-gradient(145deg,#155eef,#06a6c9);box-shadow:0 4px 12px rgba(21,94,239,.2)}
:root:not([data-theme="dark"]) .page :where(input,select,textarea){
  border-color:#d9e4f3;border-radius:12px;background:rgba(255,255,255,.92);
  transition:border-color .18s ease,box-shadow .18s ease;
}
:root:not([data-theme="dark"]) .page :where(input,select,textarea):focus{
  border-color:#75a5ff;box-shadow:0 0 0 4px rgba(37,99,235,.11);outline:0;
}
:root:not([data-theme="dark"]) .page :focus-visible{outline:3px solid rgba(37,99,235,.6);outline-offset:3px}
@keyframes cea-glass-sheen{
  0%,100%{transform:translateX(-12%);opacity:.25}
  50%{transform:translateX(12%);opacity:.7}
}
@keyframes cea-enter{
  from{opacity:0;transform:translateY(7px)}
  to{opacity:1;transform:translateY(0)}
}
@media(min-width:821px){
  :root:not([data-theme="dark"]) .shell{grid-template-columns:260px minmax(0,1fr)}
  :root:not([data-theme="dark"]) .side{width:260px;min-width:260px}
  :root:not([data-theme="dark"]) .page{padding-inline:clamp(24px,3.4vw,62px)}
}
@media(max-width:820px){
  :root:not([data-theme="dark"]) .page{padding-top:17px}
  :root:not([data-theme="dark"]) .dashboard-hero{min-height:0;border-radius:21px}
  :root:not([data-theme="dark"]) .card:hover{transform:none}
}
@media(prefers-reduced-motion:reduce){
  :root:not([data-theme="dark"]) *,
  :root:not([data-theme="dark"]) *::before,
  :root:not([data-theme="dark"]) *::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    scroll-behavior:auto!important;transition-duration:.01ms!important;
  }
}


/* Mobile-first premium polish: touch comfort, safe areas, and compact glass on small screens. */
@media (max-width:820px){
  :root:not([data-theme="dark"]) .side,
  :root:not([data-theme="dark"]) .top{
    -webkit-backdrop-filter:blur(12px) saturate(135%);
    backdrop-filter:blur(12px) saturate(135%);
  }
  :root:not([data-theme="dark"]) .page{
    width:100%;min-width:0;padding:16px 14px calc(26px + env(safe-area-inset-bottom));
  }
  :root:not([data-theme="dark"]) .dashboard.stack>*+*{margin-top:14px}
  :root:not([data-theme="dark"]) .dashboard-hero{
    padding:23px 20px;border-radius:22px;overflow:hidden;
    box-shadow:0 14px 32px rgba(12,52,108,.15),inset 0 1px 0 rgba(255,255,255,.14);
  }
  :root:not([data-theme="dark"]) .dashboard-hero:after{
    right:-170px;top:-110px;width:300px;height:300px;
    box-shadow:0 0 0 22px rgba(255,255,255,.035),0 0 0 48px rgba(255,255,255,.02);
  }
  :root:not([data-theme="dark"]) .dashboard-hero .dash-hero-title{
    font-size:clamp(1.65rem,7vw,2.35rem);line-height:1.12;max-width:16ch;
  }
  :root:not([data-theme="dark"]) .card,
  :root:not([data-theme="dark"]) .dash-panel{
    min-width:0;border-radius:16px;box-shadow:0 5px 16px rgba(30,65,120,.045);
  }
  :root:not([data-theme="dark"]) .page :where(button,.btn,[role="button"]){
    min-height:42px;touch-action:manipulation;
  }
  :root:not([data-theme="dark"]) .page :where(input,select,textarea){
    max-width:100%;font-size:16px;
  }
  :root:not([data-theme="dark"]) .page :where(.grid,.stats-grid,.dashboard-grid){
    grid-template-columns:minmax(0,1fr);
  }
  :root:not([data-theme="dark"]) .page :where(.tabs,.chips,.filter-row){
    max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;scrollbar-width:thin;
  }
  :root:not([data-theme="dark"]) .page :where(.tabs,.chips,.filter-row)>*{flex-shrink:0}
  :root:not([data-theme="dark"]) .page :where(table){display:block;max-width:100%;overflow-x:auto}
}
@media (max-width:480px){
  :root:not([data-theme="dark"]) .page{padding-inline:12px}
  :root:not([data-theme="dark"]) .dashboard-hero{padding:20px 17px;border-radius:19px}
  :root:not([data-theme="dark"]) .dashboard-hero .dash-hero-title{letter-spacing:-.04em}
  :root:not([data-theme="dark"]) .dash-primary-action{width:100%;justify-content:center}
  :root:not([data-theme="dark"]) .page :where(.card,.dash-panel){padding:14px}
  :root:not([data-theme="dark"]) .page :where(.btn){max-width:100%;white-space:normal}
  :root:not([data-theme="dark"]) .page :where(.dash-stat-value){font-size:clamp(1.2rem,5vw,1.7rem)}
}
@media (hover:none) and (pointer:coarse){
  :root:not([data-theme="dark"]) .side-nav:not(.on):hover,
  :root:not([data-theme="dark"]) .card:hover,
  :root:not([data-theme="dark"]) .dash-primary-action:hover{transform:none}
}
@media (prefers-reduced-motion:reduce){
  :root:not([data-theme="dark"]) .dashboard-hero:before{animation:none!important}
}
