:root {
  --navy-950: #0d2742;
  --navy-900: #102f4f;
  --navy-800: #173d62;
  --ink: #173454;
  --ink-soft: #5e7690;
  --blue: #247ee5;
  --blue-dark: #1466c5;
  --blue-soft: #e8f3ff;
  --teal: #1bb8a2;
  --teal-soft: #e6f8f4;
  --yellow: #f7bf3f;
  --yellow-soft: #fff6d8;
  --red: #ec6a72;
  --red-soft: #fff0f1;
  --green: #27b56f;
  --green-soft: #eaf9f1;
  --canvas: #edf5fb;
  --canvas-deep: #e4f0f8;
  --surface: #ffffff;
  --stroke: #dce9f2;
  --shadow: 0 18px 46px rgba(37, 77, 112, .07);
  --shadow-small: 0 8px 24px rgba(37, 77, 112, .08);
  --radius: 18px;
  --radius-small: 12px;
  --sidebar-width: 226px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { border: 0; }
button, a, input, select, textarea { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(36, 126, 229, .32);
  outline-offset: 3px;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.skip-link {
  position: fixed; z-index: 100; top: 12px; left: 12px; transform: translateY(-150%);
  padding: 10px 14px; border-radius: 10px; color: #fff; background: var(--blue);
}
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar-width);
  display: flex; flex-direction: column; padding: 24px 13px 18px;
  color: rgba(255,255,255,.78); background: var(--navy-900);
  box-shadow: 10px 0 32px rgba(16,47,79,.09);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 9px 27px; color: #fff; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 auto; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-copy { display: grid; gap: 0; font-size: 17px; line-height: 1.03; letter-spacing: -.03em; }
.brand-copy strong { font-weight: 760; }
.brand-copy span { font-weight: 520; color: rgba(255,255,255,.82); }
.sidebar-nav { display: grid; gap: 5px; }
.nav-link, .sidebar-utility {
  width: 100%; min-height: 43px; display: flex; align-items: center; gap: 12px;
  padding: 0 13px; border-radius: 12px; color: inherit; background: transparent;
  font-size: 13px; font-weight: 550; text-align: left; cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav-link:hover, .sidebar-utility:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; background: linear-gradient(100deg, #2c83e6, #236dcc); box-shadow: 0 8px 18px rgba(13, 83, 168, .25); }
.nav-icon { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nav-icon svg, [data-icon] svg { width: 100%; height: 100%; }
.sidebar-bottom { display: grid; gap: 5px; margin-top: auto; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-utility { min-height: 42px; padding-left: 11px; font-size: 12px; }

.main-area { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar {
  height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0 34px; color: var(--ink); background: rgba(237,245,251,.9);
}
.topbar-left, .topbar-actions, .profile-trigger { display: flex; align-items: center; }
.topbar-left { gap: 12px; }
.topbar-title-wrap { display: none; }
.topbar-kicker { color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.topbar-title { display: none; }
.topbar-actions { gap: 18px; }
.header-icon-btn {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 11px; color: var(--ink); background: transparent; cursor: pointer;
}
.header-icon-btn:hover { background: var(--surface); box-shadow: var(--shadow-small); }
.header-icon-btn svg { width: 21px; height: 21px; }
.notification-dot {
  position: absolute; top: 1px; right: 0; min-width: 14px; height: 14px; padding: 0 3px;
  display: grid; place-items: center; border: 2px solid var(--canvas); border-radius: 99px;
  color: #fff; background: var(--red); font-size: 8px; font-weight: 800;
}
.profile-trigger { gap: 9px; padding: 4px 0 4px 5px; color: var(--ink); background: transparent; cursor: pointer; text-align: left; }
.profile-trigger-copy { display: grid; gap: 0; min-width: 86px; }
.profile-trigger-copy strong { font-size: 12px; font-weight: 750; }
.profile-trigger-copy small { color: var(--ink-soft); font-size: 10px; }
.dashboard-mode #topbar-child { display: none; }
.profile-trigger .chevron { width: 14px; height: 14px; color: var(--ink-soft); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #57b8d5, #246ca9); font-weight: 780; }
.avatar-small { width: 34px; height: 34px; font-size: 13px; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(29, 94, 133, .16); }
.mobile-menu { display: none; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: var(--ink); background: var(--surface); cursor: pointer; }
.mobile-menu svg { width: 20px; height: 20px; }
.content-wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 6px 34px 52px; }
#content:focus { outline: none; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 19px; }
.page-head-copy { min-width: 0; }
.eyebrow { display: none; }
.page-title { margin: 0; color: var(--navy-900); font-size: clamp(26px, 2.2vw, 34px); line-height: 1.08; font-weight: 800; letter-spacing: -.045em; }
.page-subtitle { display: none; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 7px; padding: 0; border: 0; color: var(--blue-dark); background: transparent; font-size: 12px; font-weight: 680; cursor: pointer; }
.back-link svg { width: 16px; height: 16px; }

.card { border: 1px solid rgba(218,231,241,.9); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card.pad { padding: 22px; }
.muted { color: var(--ink-soft); }
.tiny { font-size: 11px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 13px; color: var(--navy-900); font-size: 16px; line-height: 1.2; font-weight: 780; letter-spacing: -.025em; }
.section-title small { color: var(--ink-soft); font-size: 11px; font-weight: 530; }
.section-link { padding: 0; border: 0; color: var(--blue-dark); background: transparent; font-size: 11px; font-weight: 720; cursor: pointer; }
.section-link:hover { color: var(--navy-900); }

.btn {
  min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 15px; border: 1px solid var(--stroke); border-radius: 10px;
  color: var(--ink); background: #fff; font-size: 12px; font-weight: 720; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(28,83,126,.1); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { border-color: var(--blue); color: #fff; background: var(--blue); box-shadow: 0 8px 17px rgba(36,126,229,.2); }
.btn.primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.btn.secondary { border-color: #c8e2f5; color: var(--blue-dark); background: var(--blue-soft); }
.btn.ghost { border-color: transparent; color: var(--ink-soft); background: transparent; }
.btn.ghost:hover { color: var(--ink); background: var(--canvas); box-shadow: none; }
.btn.small { min-height: 33px; padding: 0 11px; font-size: 11px; }
.btn.full { width: 100%; }

.hero-card {
  position: relative; min-height: 240px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 44%);
  overflow: hidden; border: 0; background: #dff2fa;
}
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding: 31px 34px; }
.hero-card .eyebrow { color: #168e91; }
.hero-title { max-width: 530px; margin: 0; color: var(--navy-900); font-size: clamp(27px, 3.1vw, 43px); line-height: .98; font-weight: 820; letter-spacing: -.06em; }
.hero-description { max-width: 470px; margin: 13px 0 20px; color: #52728a; font-size: 14px; }
.hero-visual { position: relative; min-height: 240px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-visual::before { content: ""; position: absolute; width: 300px; height: 220px; right: 36px; bottom: -72px; border-radius: 50%; background: rgba(255,255,255,.42); filter: blur(1px); }
.hero-visual img { position: relative; z-index: 1; width: 100%; height: 100%; max-width: 470px; object-fit: contain; -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 100%); mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 100%); }
.hero-tag { position: absolute; z-index: 2; left: 25px; top: 31px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.75); border-radius: 9px; color: var(--navy-900); background: rgba(255,255,255,.75); box-shadow: var(--shadow-small); font-size: 10px; font-weight: 750; }
.hero-tag svg { width: 15px; height: 15px; color: var(--teal); }

.dashboard-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.dashboard-intro h1 { margin: 0; color: var(--navy-900); font-size: clamp(26px, 2.2vw, 35px); line-height: 1.04; font-weight: 810; letter-spacing: -.05em; }
.dashboard-intro p { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; }
.child-chip { display: flex; align-items: center; gap: 9px; padding: 7px 11px 7px 7px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.7); }
.child-chip .avatar { width: 30px; height: 30px; font-size: 12px; }
.child-chip-copy { display: grid; gap: 0; }
.child-chip-copy strong { font-size: 11px; }
.child-chip-copy span { color: var(--ink-soft); font-size: 10px; }
.dashboard-grid { display: grid; gap: 18px; }
.dashboard-summary { display: grid; grid-template-columns: 1.05fr 1.4fr .95fr; gap: 15px; }
.summary-card { min-height: 144px; padding: 20px; }
.summary-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 11px; font-weight: 620; }
.summary-label .summary-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); }
.summary-label .summary-icon svg { width: 17px; height: 17px; }
.balance-value { display: flex; align-items: baseline; gap: 7px; margin-top: 14px; color: var(--navy-900); }
.balance-value strong { font-size: 35px; line-height: 1; letter-spacing: -.06em; }
.balance-value span { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.summary-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 10px; }
.summary-foot a { color: var(--blue-dark); font-weight: 690; cursor: pointer; }
.progress-card .progress-row { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: 14px; }
.progress-card .progress-row strong { color: var(--navy-900); font-size: 25px; line-height: 1; letter-spacing: -.05em; }
.progress-card .progress-row span { color: var(--ink-soft); font-size: 10px; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #edf2f6; }
.progress-track > i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.progress-card .progress-track { margin-top: 13px; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 7px; color: var(--ink-soft); font-size: 10px; }
.subscription-card { background: #f1fbf7; }
.subscription-card .status-line { display: flex; align-items: center; gap: 7px; margin-top: 13px; color: var(--navy-900); font-size: 16px; font-weight: 760; }
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(39,181,111,.12); }
.status-dot.off { background: var(--red); box-shadow: 0 0 0 4px rgba(236,106,114,.12); }
.subscription-card p { margin: 7px 0 11px; color: var(--ink-soft); font-size: 10px; }

.subjects-section { margin-top: 23px; }
.subject-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.subject-card { position: relative; min-height: 146px; padding: 17px 16px 15px; overflow: hidden; border: 1px solid transparent; border-radius: 15px; color: var(--ink); background: var(--blue-soft); text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.subject-card:hover { transform: translateY(-2px); border-color: rgba(36,126,229,.2); box-shadow: var(--shadow-small); }
.subject-card .subject-icon { width: 39px; height: 39px; display: grid; place-items: center; margin-bottom: 17px; color: var(--blue); }
.subject-card .subject-icon svg { width: 36px; height: 36px; }
.subject-card h3 { margin: 0; color: var(--navy-900); font-size: 13px; font-weight: 770; letter-spacing: -.02em; }
.subject-card p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; }
.subject-card .subject-arrow { position: absolute; right: 13px; bottom: 12px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-dark); background: rgba(255,255,255,.82); }
.subject-card .subject-arrow svg { width: 14px; height: 14px; }
.subject-card.pink { background: #fff0f2; }
.subject-card.pink .subject-icon { color: #e96c7e; }
.subject-card.green { background: #e9f8f0; }
.subject-card.green .subject-icon { color: #2eaf73; }
.subject-card.yellow { background: #fff7df; }
.subject-card.yellow .subject-icon { color: #e4a925; }
.subject-card.purple { background: #f1edff; }
.subject-card.purple .subject-icon { color: #8862d9; }

.dashboard-lower { display: grid; grid-template-columns: 1.25fr .75fr; gap: 15px; margin-top: 22px; }
.activity-card, .quick-card { padding: 20px; }
.activity-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.activity-table th { padding: 0 0 10px; color: var(--ink-soft); font-size: 10px; font-weight: 600; text-align: left; }
.activity-table td { padding: 10px 0; border-top: 1px solid #edf2f6; vertical-align: middle; }
.activity-table td:first-child { color: var(--ink-soft); font-size: 10px; white-space: nowrap; }
.activity-table td:nth-child(2) { font-weight: 650; }
.points-up { color: var(--green); font-weight: 760; }
.points-down { color: var(--red); font-weight: 760; }
.quick-list { display: grid; }
.quick-item { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid #edf2f6; cursor: pointer; }
.quick-item:first-child { padding-top: 2px; border-top: 0; }
.quick-item:last-child { padding-bottom: 0; }
.quick-item-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--blue); background: var(--blue-soft); }
.quick-item-icon svg { width: 17px; height: 17px; }
.quick-item-copy { min-width: 0; flex: 1; }
.quick-item-copy strong { display: block; color: var(--navy-900); font-size: 11px; }
.quick-item-copy span { display: block; margin-top: 1px; color: var(--ink-soft); font-size: 10px; }
.quick-item > svg { width: 14px; height: 14px; color: #9ab0c1; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.search-box { position: relative; min-width: 220px; }
.search-box svg { position: absolute; top: 50%; left: 12px; width: 17px; height: 17px; color: #83a1b5; transform: translateY(-50%); }
.search-box input { width: 100%; height: 40px; padding: 0 13px 0 37px; border: 1px solid var(--stroke); border-radius: 10px; color: var(--ink); background: var(--surface); font-size: 12px; }
.search-box input::placeholder { color: #9bb0bf; }
.search-box input:focus { border-color: #8dc3ed; box-shadow: 0 0 0 3px rgba(36,126,229,.1); }
.select-control, .field-input, .field-select { height: 40px; padding: 0 12px; border: 1px solid var(--stroke); border-radius: 10px; color: var(--ink); background: #fff; font-size: 12px; }
.select-control:focus, .field-input:focus, .field-select:focus { border-color: #8dc3ed; box-shadow: 0 0 0 3px rgba(36,126,229,.1); }
.subject-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.subject-tile { min-height: 170px; position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 19px; overflow: hidden; border: 1px solid transparent; border-radius: 16px; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.subject-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-small); }
.subject-tile .tile-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 22px; color: var(--blue); }
.subject-tile .tile-icon svg { width: 49px; height: 49px; }
.subject-tile h3 { margin: 0; color: var(--navy-900); font-size: 15px; font-weight: 790; letter-spacing: -.03em; }
.subject-tile p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; }
.subject-tile .tile-meta { display: flex; align-items: center; gap: 4px; margin-top: auto; color: var(--ink-soft); font-size: 10px; }
.subject-tile .tile-meta svg { width: 14px; height: 14px; }
.tile-arrow { position: absolute; right: 14px; bottom: 14px; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.8); }
.tile-arrow svg { width: 14px; height: 14px; }
.subject-tile.blue { background: #e7f3ff; }
.subject-tile.pink { background: #fff0f2; }
.subject-tile.pink .tile-icon { color: #e56b80; }
.subject-tile.green { background: #e9f8f0; }
.subject-tile.green .tile-icon { color: #2ca675; }
.subject-tile.yellow { background: #fff6df; }
.subject-tile.yellow .tile-icon { color: #dda622; }
.subject-tile.purple { background: #f1edff; }
.subject-tile.purple .tile-icon { color: #825fd0; }
.subject-tile.aqua { background: #e9f8fa; }
.subject-tile.aqua .tile-icon { color: #38aeb7; }
.subject-tile.lilac { background: #f4efff; }
.subject-tile.lilac .tile-icon { color: #7b66d1; }
.subject-tile.mint { background: #e9f8f2; }
.subject-tile.mint .tile-icon { color: #35b18b; }
.subject-banner { grid-column: span 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 170px; padding: 22px 25px; overflow: hidden; border-radius: 16px; background: #deeffb; }
.subject-banner-copy { max-width: 270px; }
.subject-banner h3 { margin: 0; color: var(--navy-900); font-size: 19px; line-height: 1.05; letter-spacing: -.04em; }
.subject-banner p { margin: 8px 0 15px; color: var(--ink-soft); font-size: 11px; }
.subject-banner-art { width: 160px; align-self: stretch; display: flex; align-items: end; justify-content: center; overflow: hidden; }
.subject-banner-art img { width: 190px; height: 170px; object-fit: contain; mix-blend-mode: multiply; }

.tests-layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); gap: 17px; align-items: start; }
.filter-card { padding: 18px 16px; }
.filter-section { padding: 15px 0; border-top: 1px solid #edf2f6; }
.filter-section:first-child { padding-top: 0; border-top: 0; }
.filter-label { display: block; margin-bottom: 10px; color: var(--navy-900); font-size: 11px; font-weight: 760; }
.filter-list { display: grid; gap: 8px; }
.filter-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 11px; cursor: pointer; }
.filter-option.active { color: var(--navy-900); font-weight: 720; }
.filter-option input { accent-color: var(--blue); }
.filter-option em { color: #9aacb8; font-style: normal; font-size: 10px; }
.test-content { min-width: 0; }
.test-content-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 11px; }
.test-content-head h2 { margin: 0; color: var(--navy-900); font-size: 18px; letter-spacing: -.035em; }
.test-content-head span { color: var(--ink-soft); font-size: 11px; }
.test-list { display: grid; gap: 10px; }
.test-row { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; align-items: center; gap: 13px; min-height: 86px; padding: 13px; }
.test-row-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 13px; color: var(--blue); background: var(--blue-soft); }
.test-row-icon svg { width: 27px; height: 27px; }
.test-row-copy { min-width: 0; }
.test-row-copy h3 { margin: 0; color: var(--navy-900); font-size: 13px; font-weight: 780; }
.test-row-copy p { margin: 2px 0 7px; color: var(--ink-soft); font-size: 10px; }
.test-meta { display: flex; flex-wrap: wrap; gap: 11px; color: var(--ink-soft); font-size: 10px; }
.test-meta span { display: inline-flex; align-items: center; gap: 4px; }
.test-meta svg { width: 13px; height: 13px; }
.test-row .test-action { min-width: 115px; }
.passed-action { display: grid; gap: 1px; min-width: 112px; min-height: 42px; padding: 7px 12px; border-radius: 10px; color: var(--green); background: var(--green-soft); text-align: left; cursor: pointer; }
.passed-action strong { font-size: 11px; }
.passed-action small { color: #57977a; font-size: 10px; }
.empty { display: grid; justify-items: center; gap: 9px; padding: 54px 22px; border: 1px dashed #bdd4e5; border-radius: var(--radius); color: var(--ink-soft); background: rgba(255,255,255,.5); text-align: center; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--blue); background: var(--blue-soft); }
.empty-icon svg { width: 24px; height: 24px; }
.empty strong { color: var(--navy-900); font-size: 14px; }
.empty p { max-width: 360px; margin: 0; font-size: 11px; }

.quiz-head { display: flex; align-items: end; justify-content: space-between; gap: 17px; margin-bottom: 17px; }
.quiz-head h1 { margin: 0; color: var(--navy-900); font-size: clamp(24px, 2vw, 31px); letter-spacing: -.05em; }
.quiz-head p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 16px; align-items: start; }
.question-card { display: flex; flex-direction: column; min-height: 430px; padding: 27px 28px; }
.question-progress { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 25px; color: var(--ink-soft); font-size: 11px; }
.question-progress strong { color: var(--blue-dark); font-weight: 780; }
.question-progress-track { height: 7px; flex: 1; overflow: hidden; border-radius: 99px; background: #ecf2f6; }
.question-progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.question-number { display: inline-grid; place-items: center; width: 34px; height: 26px; margin-bottom: 16px; border-radius: 8px; color: var(--blue-dark); background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.question-card h2 { max-width: 650px; margin: 0; color: var(--navy-900); font-size: clamp(22px, 2.1vw, 31px); line-height: 1.12; letter-spacing: -.045em; }
.answer-input-wrap { max-width: 510px; margin-top: 28px; }
.answer-input-wrap label { display: block; margin-bottom: 7px; color: var(--navy-900); font-size: 11px; font-weight: 720; }
.answer-input { width: 100%; height: 56px; padding: 0 17px; border: 2px solid #d7e6ef; border-radius: 13px; color: var(--navy-900); background: #fbfdff; font-size: 20px; font-weight: 720; }
.answer-input::placeholder { color: #b9cbd7; font-size: 13px; font-weight: 540; }
.answer-input:focus { border-color: #7ab6e7; box-shadow: 0 0 0 4px rgba(36,126,229,.1); }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 31px; }
.quiz-side { display: grid; gap: 14px; }
.timer-card, .progress-side-card, .question-nav-card { padding: 17px; }
.timer-card { background: #fff8eb; }
.timer-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.timer-title { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.timer-title svg { width: 18px; height: 18px; color: var(--yellow); }
.timer-value { margin-top: 7px; color: var(--navy-900); font-size: 28px; line-height: 1; font-weight: 810; letter-spacing: -.05em; }
.timer-card.is-danger .timer-title svg, .timer-card.is-danger .timer-value { color: var(--red); }
.timer-track { height: 6px; margin-top: 13px; overflow: hidden; border-radius: 99px; background: #f4e8d1; }
.timer-track i { display: block; height: 100%; border-radius: inherit; background: var(--yellow); transition: width 1s linear; }
.timer-card.is-danger .timer-track i { background: var(--red); }
.pause-pill { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 8px; color: var(--blue-dark); background: var(--blue-soft); font-size: 10px; font-weight: 750; }
.pause-pill svg { width: 13px; height: 13px; }
.side-card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; color: var(--navy-900); font-size: 12px; font-weight: 780; }
.side-card-title span { color: var(--ink-soft); font-size: 10px; font-weight: 560; }
.progress-side-card .progress-track { margin: 9px 0 0; }
.progress-side-card .progress-meta { margin-top: 6px; }
.question-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.question-nav button { height: 33px; border: 1px solid transparent; border-radius: 9px; color: var(--ink-soft); background: #f3f7fa; font-size: 11px; font-weight: 740; cursor: pointer; }
.question-nav button:hover { border-color: #a7cde9; color: var(--blue-dark); }
.question-nav button.current { border-color: var(--blue); color: var(--blue-dark); background: var(--blue-soft); }
.question-nav button.done { color: var(--green); background: var(--green-soft); }
.question-nav button.done.current { border-color: var(--green); }
.tip-card { padding: 15px 17px; border-radius: var(--radius); color: #4d7285; background: #e9f7f6; }
.tip-card strong { display: flex; align-items: center; gap: 7px; color: var(--navy-900); font-size: 11px; }
.tip-card strong svg { width: 17px; height: 17px; color: var(--yellow); }
.tip-card p { margin: 7px 0 0; font-size: 10px; }

.result-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 16px; align-items: start; }
.result-main { padding: 25px; }
.result-hero { display: grid; grid-template-columns: 170px minmax(0,1fr); align-items: center; gap: 25px; padding: 12px 0 25px; border-bottom: 1px solid #edf2f6; }
.score-ring { position: relative; width: 148px; height: 148px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score) * 1%), #e9f0f3 0); }
.score-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.score-ring-copy { position: relative; z-index: 1; display: grid; justify-items: center; }
.score-ring-copy strong { color: var(--navy-900); font-size: 30px; line-height: 1; letter-spacing: -.07em; }
.score-ring-copy span { margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.result-copy h2 { margin: 0; color: var(--navy-900); font-size: 27px; line-height: 1.05; letter-spacing: -.05em; }
.result-copy p { max-width: 430px; margin: 9px 0 13px; color: var(--ink-soft); font-size: 12px; }
.result-callout { display: inline-flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; color: #277653; background: var(--green-soft); font-size: 11px; font-weight: 680; }
.result-callout svg { width: 15px; height: 15px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.result-celebration { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 118px; margin-top: 24px; padding: 16px 21px; overflow: hidden; border-radius: 14px; background: #e8f4fc; }
.result-celebration div { display: grid; gap: 5px; max-width: 420px; }
.result-celebration strong { color: var(--navy-900); font-size: 16px; line-height: 1.15; letter-spacing: -.035em; }
.result-celebration span { color: var(--ink-soft); font-size: 11px; }
.result-celebration img { width: 220px; height: 115px; flex: 0 0 auto; object-fit: contain; -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 73%); mask-image: radial-gradient(ellipse at center, #000 45%, transparent 73%); }
.result-side { display: grid; gap: 14px; }
.stat-list-card, .reward-card, .next-card { padding: 18px; }
.stat-list { display: grid; }
.stat-line { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 11px 0; border-top: 1px solid #edf2f6; font-size: 11px; }
.stat-line:first-child { border-top: 0; padding-top: 0; }
.stat-line:last-child { padding-bottom: 0; }
.stat-name { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.stat-name svg { width: 15px; height: 15px; color: var(--blue); }
.stat-line strong { color: var(--navy-900); font-size: 11px; }
.reward-card { position: relative; overflow: hidden; background: var(--yellow-soft); }
.reward-card h3 { margin: 0; color: var(--navy-900); font-size: 13px; }
.reward-value { display: flex; align-items: center; gap: 8px; margin-top: 11px; color: #bd8012; }
.reward-value svg { width: 28px; height: 28px; }
.reward-value strong { font-size: 22px; letter-spacing: -.05em; }
.reward-card p { margin: 5px 0 0; color: #94773a; font-size: 10px; }
.achievement-art { display: none; }
.next-card h3 { margin: 0 0 7px; color: var(--navy-900); font-size: 13px; }
.next-list { display: grid; }
.next-link { display: flex; align-items: center; gap: 8px; padding: 9px 0; border: 0; border-top: 1px solid #edf2f6; color: var(--blue-dark); background: transparent; font-size: 11px; font-weight: 680; cursor: pointer; }
.next-link svg:last-child { width: 14px; height: 14px; margin-left: auto; color: #9ab0c1; }
.next-link svg:first-child { width: 16px; height: 16px; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 12px; }
.review-tabs { display: flex; gap: 17px; border-bottom: 1px solid var(--stroke); }
.review-tab { padding: 0 0 9px; color: var(--ink-soft); background: transparent; font-size: 11px; font-weight: 680; cursor: pointer; }
.review-tab.active { margin-bottom: -1px; border-bottom: 2px solid var(--blue); color: var(--blue-dark); }
.review-list { display: grid; gap: 11px; }
.review-item { padding: 17px; }
.review-item-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.review-number { display: inline-flex; align-items: center; gap: 7px; color: var(--navy-900); font-size: 11px; font-weight: 780; }
.review-number b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--red); font-size: 10px; }
.review-number b.good { background: var(--green); }
.review-topic { color: var(--ink-soft); font-size: 10px; }
.review-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(200px,.8fr); gap: 20px; }
.review-question { margin: 0 0 10px; color: var(--navy-900); font-size: 13px; font-weight: 760; }
.answer-compare { display: grid; gap: 5px; }
.answer-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 31px; padding: 0 10px; border: 1px solid #e2edf3; border-radius: 8px; color: var(--ink-soft); background: #fbfdff; font-size: 10px; }
.answer-line strong { color: var(--navy-900); font-size: 11px; }
.answer-line.user-wrong { border-color: #f0b0b5; color: var(--red); background: var(--red-soft); }
.answer-line.user-wrong strong { color: #c44b56; }
.answer-line.correct { border-color: #b5e6c9; color: var(--green); background: var(--green-soft); }
.answer-line.correct strong { color: #208454; }
.explanation { padding: 12px 13px; border-left: 3px solid var(--teal); border-radius: 0 9px 9px 0; background: #f1faf9; }
.explanation strong { display: block; margin-bottom: 4px; color: var(--navy-900); font-size: 10px; }
.explanation p { margin: 0; color: #527883; font-size: 10px; line-height: 1.5; }

.history-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 15px; align-items: start; }
.history-card { padding: 21px; }
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.mini-stat { padding: 16px; border-radius: 13px; background: #f6fafc; }
.mini-stat span { color: var(--ink-soft); font-size: 10px; }
.mini-stat strong { display: block; margin-top: 5px; color: var(--navy-900); font-size: 22px; line-height: 1; letter-spacing: -.05em; }
.history-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.history-table th { padding: 0 0 9px; color: var(--ink-soft); font-size: 10px; font-weight: 600; text-align: left; }
.history-table td { padding: 11px 0; border-top: 1px solid #edf2f6; }
.history-table td:nth-child(2) { font-weight: 700; }
.history-table td:last-child { text-align: right; }
.result-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 690; }
.result-badge svg { width: 13px; height: 13px; }
.points-card { padding: 21px; background: #fff9e9; }
.points-card .balance-value { margin-top: 10px; }
.points-card .balance-value strong { font-size: 40px; }
.points-card p { margin: 7px 0 17px; color: #907a4c; font-size: 11px; }
.points-rule { display: grid; gap: 8px; margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(217,177,79,.28); }
.points-rule div { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #7e6b44; font-size: 11px; }
.points-rule strong { color: #a56c09; }
.points-history { margin-top: 15px; }
.points-history-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid #edf2f6; }
.points-history-row-copy { display: grid; gap: 2px; min-width: 0; }
.points-history-row-copy strong { overflow: hidden; color: var(--navy-900); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.points-history-row-copy span { color: var(--ink-soft); font-size: 10px; }
.points-history-row > strong { color: var(--green); font-size: 12px; }

.field { display: grid; gap: 6px; }
.field label { color: var(--navy-900); font-size: 11px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; color: var(--blue-dark); background: var(--blue-soft); font-size: 10px; font-weight: 720; }
.badge.green { color: #1f8b55; background: var(--green-soft); }
.badge.yellow { color: #9c6b09; background: var(--yellow-soft); }

.modal-root[hidden], .switcher-panel[hidden] { display: none; }
.modal-root { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(10,37,63,.48); backdrop-filter: blur(3px); }
.modal-dialog { position: relative; z-index: 1; width: min(100%, 470px); max-height: min(680px, calc(100vh - 44px)); overflow: auto; padding: 25px; border: 1px solid rgba(255,255,255,.58); border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(9,36,61,.25); }
.modal-dialog h2 { margin: 0; color: var(--navy-900); font-size: 20px; line-height: 1.1; letter-spacing: -.04em; }
.modal-dialog p { margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; }
.modal-icon-big { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.modal-close { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--ink-soft); background: var(--canvas); cursor: pointer; }
.modal-close svg { width: 16px; height: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; }
.help-list { display: grid; gap: 8px; margin-top: 17px; }
.help-list div { display: flex; align-items: start; gap: 9px; padding: 10px; border-radius: 10px; background: #f6fafc; color: var(--ink-soft); font-size: 11px; }
.help-list svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--blue); }
.toast-region { position: fixed; z-index: 120; right: 24px; bottom: 100px; display: grid; gap: 9px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 220px; max-width: 340px; padding: 12px 14px; border: 1px solid #bfe6d1; border-radius: 11px; color: #1e704a; background: #f1fcf6; box-shadow: var(--shadow-small); font-size: 11px; font-weight: 650; animation: toast-in .22s ease-out both; }
.toast svg { width: 17px; height: 17px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.layout-switcher { position: fixed; z-index: 50; right: 26px; bottom: 24px; }
.switcher-toggle { width: 58px; height: 58px; display: grid; place-items: center; border: 4px solid rgba(255,255,255,.88); border-radius: 50%; color: #fff; background: var(--blue); box-shadow: 0 14px 30px rgba(36,126,229,.28); cursor: pointer; transition: transform .18s ease, background .18s ease; }
.switcher-toggle:hover { transform: translateY(-2px); background: var(--blue-dark); }
.switcher-toggle [data-icon] { width: 23px; height: 23px; display: grid; place-items: center; line-height: 0; }
.switcher-toggle svg { display: block; width: 23px; height: 23px; }
.switcher-panel { position: absolute; right: 0; bottom: 69px; width: 238px; max-height: min(530px, calc(100vh - 125px)); overflow: auto; padding: 9px; border: 1px solid var(--stroke); border-radius: 14px; background: rgba(255,255,255,.97); box-shadow: 0 18px 50px rgba(22,64,98,.19); }
.switcher-label { padding: 7px 9px 6px; color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.switcher-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; border-radius: 9px; color: var(--ink); background: transparent; text-align: left; font-size: 11px; font-weight: 640; cursor: pointer; }
.switcher-item:hover, .switcher-item.current { color: var(--blue-dark); background: var(--blue-soft); }
.switcher-item svg { width: 15px; height: 15px; color: #93aaba; }
.switcher-item.current svg { color: var(--blue); }

.public-mode .sidebar, .public-mode .topbar { display: none; }
.public-mode .main-area { margin-left: 0; }
.public-mode .content-wrap { max-width: 1280px; padding: 30px 40px 60px; }

@media (max-width: 1220px) {
  .content-wrap { padding-right: 24px; padding-left: 24px; }
  .topbar { padding-right: 24px; padding-left: 24px; }
  .subject-card { min-height: 138px; }
  .subject-card .subject-icon { margin-bottom: 12px; }
  .hero-title { font-size: 35px; }
}
@media (max-width: 1050px) {
  :root { --sidebar-width: 82px; }
  .sidebar { padding-right: 10px; padding-left: 10px; }
  .brand { justify-content: center; padding-right: 0; padding-left: 0; }
  .brand-copy, .nav-link > span:last-child, .sidebar-utility > span:last-child { display: none; }
  .nav-link, .sidebar-utility { justify-content: center; padding: 0; }
  .dashboard-summary { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .dashboard-lower, .history-grid { grid-template-columns: 1fr; }
  .subject-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .subject-banner { grid-column: span 3; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 0px; }
  .sidebar { display: none; }
  .main-area { margin-left: 0; }
  .topbar { height: 67px; padding: 0 16px; }
  .mobile-menu { display: grid; }
  .profile-trigger-copy, .profile-trigger .chevron { display: none; }
  .topbar-actions { gap: 7px; }
  .content-wrap { padding: 8px 16px 40px; }
  .dashboard-intro { align-items: start; flex-direction: column; }
  .hero-card { grid-template-columns: 1fr; min-height: 430px; }
  .hero-copy { padding: 27px 24px 10px; }
  .hero-visual { min-height: 210px; }
  .hero-visual img { max-height: 230px; }
  .dashboard-summary, .subject-cards, .subject-grid, .stats-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-summary { gap: 10px; }
  .summary-card { min-height: 130px; padding: 16px; }
  .subject-card { min-height: 132px; }
  .subject-banner { grid-column: span 2; }
  .toolbar, .page-head, .test-content-head, .quiz-head { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .tests-layout, .quiz-layout, .result-layout { grid-template-columns: 1fr; }
  .filter-card { order: 2; }
  .quiz-side, .result-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tip-card { grid-column: span 2; }
  .result-hero { grid-template-columns: 130px minmax(0,1fr); gap: 15px; }
  .score-ring { width: 124px; height: 124px; }
  .score-ring-copy strong { font-size: 25px; }
  .review-grid { grid-template-columns: 1fr; gap: 12px; }
  .layout-switcher { right: 15px; bottom: 15px; }
  .toast-region { right: 15px; bottom: 88px; left: 15px; }
  .toast { min-width: 0; }
}
@media (max-width: 500px) {
  .dashboard-summary, .subject-cards, .subject-grid, .stats-strip { grid-template-columns: 1fr; }
  .subject-banner { grid-column: span 1; }
  .subject-banner-art { width: 115px; }
  .test-row { grid-template-columns: 42px minmax(0,1fr); }
  .test-row-icon { width: 42px; height: 42px; }
  .test-row .test-action { grid-column: 2; justify-self: start; }
  .quiz-side, .result-side { grid-template-columns: 1fr; }
  .tip-card { grid-column: span 1; }
  .result-hero { grid-template-columns: 1fr; justify-items: start; }
  .result-celebration img { width: 150px; height: 90px; }
  .question-card { padding: 21px 18px; }
  .question-actions { flex-wrap: wrap; }
  .question-actions .btn { flex: 1; }
  .modal-dialog { padding: 21px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.hero-description,
.hero-tag,
.pause-pill,
.tip-card,
.result-copy > p,
.points-card p { display: none; }

.test-coming {
  display: inline-flex;
  min-width: 115px;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

/* Keep secondary copy out of the way on compact screens and cards. */
.quick-item-copy > span,
.x-auth-aside .x-auth-quote > p,
.x-qr-card .x-badge,
.x-admin-panel .x-panel-head > div > p,
.x-value-card > span:last-child,
.x-pricing-band p {
  display: none;
}
