/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(public/fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(public/fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(public/fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(public/fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(public/fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(public/fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(public/fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(public/fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(public/fonts/source-serif-4-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(public/fonts/source-serif-4-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(public/fonts/source-serif-4-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(public/fonts/source-serif-4-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(public/fonts/source-serif-4-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(public/fonts/source-serif-4-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(public/fonts/source-serif-4-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(public/fonts/source-serif-4-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(public/fonts/source-serif-4-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(public/fonts/source-serif-4-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(public/fonts/source-serif-4-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(public/fonts/source-serif-4-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f6fbff;
  --surface: #ffffff;
  --surface-2: #edf6ff;
  --ink: #132033;
  --muted: #5f6f83;
  --line: #d8e5f0;
  --green: #008b8f;
  --green-dark: #14213d;
  --green-soft: #dff8f5;
  --coral: #f15b4a;
  --coral-soft: #ffe8e3;
  --gold: #f4b942;
  --gold-soft: #fff3cc;
  --blue: #3366d6;
  --blue-soft: #e3ecff;
  --violet: #6c5ce7;
  --violet-soft: #eeeaff;
  --mint: #2fbf71;
  --orange: #ff8a3d;
  --orange-soft: #fff0e5;
  --pink: #ec4899;
  --pink-soft: #ffe8f4;
  --lime: #84cc16;
  --lime-soft: #effbd7;
  --sky: #0ea5e9;
  --sky-soft: #e0f5ff;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 46px rgba(19, 32, 51, 0.12);
  --shadow-soft: 0 10px 28px rgba(19, 32, 51, 0.07);
  --shadow-card: 0 16px 38px rgba(19, 32, 51, 0.08);
  --press-shadow: 0 6px 16px rgba(19, 32, 51, 0.12);
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

[hidden] {
  display: none !important;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip; /* Clip horizontal overflow without trapping sticky navigation. */
  max-width: 100%;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, .13), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(244, 185, 66, .13), transparent 28rem),
    linear-gradient(180deg, #f8fcff 0%, var(--paper) 48%, #eef6fb 100%);
}
body.auth-restoring {
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  background: #14213d;
}
body.auth-restoring .app-shell {
  opacity: 0;
  pointer-events: none;
}
.boot-splash {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 200;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 28%, rgba(14, 165, 233, .22), transparent 22rem),
    radial-gradient(circle at 72% 70%, rgba(244, 185, 66, .18), transparent 20rem),
    linear-gradient(165deg, #17294b 0%, #14213d 48%, #0c172c 100%);
  transition: opacity .45s ease, visibility .45s ease;
}
.boot-splash.boot-splash-exit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-splash-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
}
.boot-logo-loader {
  position: relative;
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
}
.boot-progress-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(rgba(255, 255, 255, .16) 0deg 360deg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .16),
    0 18px 48px rgba(0, 0, 0, .26);
  transition: background .35s ease;
}
.boot-progress-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #14213d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.boot-splash-mark {
  width: 92px;
  height: 92px;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffd875, var(--gold));
  color: #132033;
  font: 700 52px/1 "Source Serif 4", serif;
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .18),
    0 18px 42px rgba(0, 0, 0, .28),
    0 0 48px rgba(244, 185, 66, .28);
  animation: boot-splash-rise .9s cubic-bezier(.22, 1, .36, 1) both;
}
.boot-splash-mark.logo-mark {
  background: transparent;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
}
.boot-splash-mark.logo-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.auth-progress-overlay {
  z-index: 240;
  background:
    radial-gradient(circle at 25% 24%, rgba(14, 165, 233, .26), transparent 23rem),
    radial-gradient(circle at 76% 72%, rgba(47, 191, 113, .2), transparent 22rem),
    linear-gradient(165deg, rgba(23, 41, 75, .98) 0%, rgba(20, 33, 61, .98) 48%, rgba(12, 23, 44, .98) 100%);
}
.boot-splash-title {
  color: white;
  font: 700 22px/1.15 "Source Serif 4", serif;
  letter-spacing: -.02em;
  animation: boot-splash-fade .7s ease .28s both;
}
.boot-splash-tip {
  margin: 0;
  max-width: 34ch;
  color: rgba(220, 234, 250, .78);
  font: 500 13px/1.45 "DM Sans", sans-serif;
  animation: boot-splash-fade .7s ease .36s both;
}
.boot-progress {
  width: min(260px, 72vw);
  display: grid;
  margin-top: 4px;
  animation: boot-splash-fade .6s ease .45s both;
}
.boot-progress-label {
  color: rgba(232, 242, 255, .78);
  font: 500 12px/1.3 "DM Sans", sans-serif;
  letter-spacing: .02em;
}
@keyframes boot-splash-rise {
  from { opacity: 0; transform: scale(.82) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes boot-splash-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a, input, select, textarea { touch-action: manipulation; }
button,
a.button,
.nav-item,
.icon-button,
.choice,
.diagnostic-choice,
.question-number,
.adaptive-mode-card,
.archive-card,
.toc-item,
.tei-hotspot-button,
.tei-multi-option,
.tei-chip,
.tei-drop-slot,
.tei-table-hotspot-row,
.theme-card,
.access-method-card {
  -webkit-tap-highlight-color: transparent;
}
.button.is-pressing:not(:disabled),
.icon-button.is-pressing:not(:disabled),
.nav-item.is-pressing,
.choice.is-pressing:not(:disabled),
.diagnostic-choice.is-pressing:not(:disabled),
.question-number.is-pressing,
.adaptive-mode-card.is-pressing,
.archive-card.is-pressing,
.toc-item.is-pressing,
.tei-hotspot-button.is-pressing,
.tei-multi-option.is-pressing,
.tei-chip.is-pressing,
.tei-drop-slot.is-pressing,
.theme-card.is-pressing,
.access-method-card.is-pressing {
  transform: translateY(1px) scale(.988);
  filter: saturate(1.05);
  box-shadow: var(--press-shadow);
}
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
body.public-landing-mode .app-shell { display: block; }
body.public-landing-mode .sidebar,
body.public-landing-mode .topbar,
body.public-landing-mode .session-meter,
body.public-landing-mode .atmosphere-tip,
body.public-landing-mode .scroll-progress { display: none; }
body.public-landing-mode .view { max-width: none; padding: 0; }
body.public-landing-mode main { min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100dvh;
  padding: 18px 14px 12px;
  background:
    radial-gradient(circle at 18% 8%, rgba(14, 165, 233, .22), transparent 17rem),
    radial-gradient(circle at 80% 88%, rgba(244, 185, 66, .16), transparent 15rem),
    linear-gradient(180deg, #17294b 0%, #111c35 62%, #0c172c 100%);
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 20;
  pointer-events: auto;
  box-shadow: 14px 0 38px rgba(19, 32, 51, .15);
  transition: transform .22s ease;
  overflow: hidden;
}
.sidebar-scrim { position: fixed; inset: 0; z-index: 900; background: rgba(5, 18, 32, .42); backdrop-filter: none; -webkit-backdrop-filter: none; opacity: 0; pointer-events: none; touch-action: none; -webkit-tap-highlight-color: transparent; transition: opacity .18s ease; }
.brand { display: flex; align-items: center; gap: 12px; width: 100%; padding: 2px 8px 16px; border: 0; border-bottom: 1px solid rgba(255,255,255,.13); flex-shrink: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; appearance: none; -webkit-appearance: none; }
.brand:hover { color: #fff; }
.brand:focus-visible { outline: 3px solid rgba(125, 211, 252, .82); outline-offset: 4px; border-radius: 18px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; background: linear-gradient(135deg, #ffd875, var(--gold)); color: #132033; font: 700 24px/1 "Source Serif 4", serif; border-radius: 13px; box-shadow: 0 10px 22px rgba(244,185,66,.25); overflow: hidden; }
.brand-mark.logo-mark { background: transparent; }
.brand-mark.logo-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand span { font-size: 11px; color: #bcd8f2; margin-top: 2px; }
.main-nav {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.22) transparent;
  padding-bottom: 8px;
}
.nav-section-label { margin: 14px 10px 4px; color: rgba(213, 232, 250, .66); font-size: 10px; font-weight: 800; letter-spacing: .115em; text-transform: uppercase; }
.nav-section-label:first-child { margin-top: 0; }
.nav-item { position: relative; border: 1px solid transparent; background: transparent; color: #d8e7fb; min-height: 42px; padding: 0 11px; display: flex; align-items: center; gap: 11px; text-align: left; border-radius: 12px; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.nav-item svg { width: 18px; color: #85e0dc; transition: transform .16s ease; }
.main-nav .nav-item:nth-child(1) svg { color: var(--sky); }
.main-nav .nav-item:nth-child(2) svg { color: var(--lime); }
.main-nav .nav-item:nth-child(3) svg { color: var(--gold); }
.main-nav .nav-item:nth-child(4) svg { color: var(--violet); }
.main-nav .nav-item:nth-child(5) svg { color: var(--orange); }
.main-nav .nav-item:nth-child(6) svg { color: var(--pink); }
.main-nav .nav-item:nth-child(7) svg { color: var(--violet); }
.main-nav .nav-item:nth-child(8) svg { color: var(--mint); }
.main-nav .nav-item:nth-child(9) svg { color: var(--sky); }
.nav-item b { margin-left: auto; border-radius: 999px; min-width: 28px; padding: 2px 6px; font-size: 11px; background: rgba(255,255,255,.14); text-align: center; }
.nav-item:hover { color: white; background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.09); transform: translateX(2px); }
.nav-item:hover svg { transform: scale(1.06); }
.nav-item.active { color: white; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.16); box-shadow: inset 3px 0 0 var(--gold), 0 10px 22px rgba(0,0,0,.10); }
.nav-item.active svg { color: white; }
.nav-item:focus-visible, .button:focus-visible, .icon-button:focus-visible, .choice:focus-visible, .toc-item:focus-visible { outline: 3px solid rgba(14, 165, 233, .34); outline-offset: 2px; }
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
  padding: 14px 2px 4px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .18) 55%);
  border-top: 1px solid rgba(255, 255, 255, .07);
  z-index: 3;
}
.sidebar-dock {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.access-state {
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  gap: 9px;
  align-items: center;
  border-radius: 0;
  color: #eef6ff;
  cursor: pointer;
}
.access-state strong, .access-state small { display: block; }
.access-state strong { font-size: 12px; color: #f7fbff; }
.access-state small { color: rgba(191, 217, 242, .82); font-size: 10px; margin-top: 2px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(214,167,46,.17); flex-shrink: 0; }
.status-dot.redeemed { background: #67d59f; box-shadow: 0 0 0 4px rgba(103,213,159,.17); }
main { min-width: 0; }
.topbar { min-height: 74px; padding: 0 28px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 72%, var(--surface)); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); box-shadow: 0 8px 24px rgba(19,32,51,.045); }
.topbar-context { min-width: 160px; display: grid; gap: 2px; padding-right: 4px; }
.topbar-context span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.topbar-context strong { font-size: 17px; letter-spacing: -.02em; }
.search-box { flex: 1; max-width: 660px; display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 8px 22px rgba(19,32,51,.045); transition: border-color .16s ease, box-shadow .16s ease; }
.search-box:focus-within { border-color: rgba(51,102,214,.58); box-shadow: 0 0 0 4px rgba(51,102,214,.10), 0 10px 24px rgba(19,32,51,.065); }
.search-box svg { width: 17px; color: var(--muted); }
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); }
kbd { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 5px; font-size: 10px; border-radius: 6px; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; border-radius: 13px; box-shadow: 0 8px 20px rgba(19,32,51,.04); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.icon-button:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); transform: translateY(-1px); box-shadow: 0 12px 24px rgba(19,32,51,.08); }
.icon-button svg { width: 18px; }
.mobile-menu { display: none; }
.profile-badge { margin-left: auto; display: flex; align-items: center; gap: 9px; min-width: 150px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.profile-badge > #profile-initials { width: 32px; height: 32px; display: grid; place-items: center; background: var(--gold-soft); color: #7a5410; font-weight: 700; font-size: 12px; border-radius: 50%; }
.profile-badge > span[hidden] { display: none; }
.profile-badge strong, .profile-badge small { display: block; }
.profile-badge strong { font-size: 12px; }
.profile-badge small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.book-preview-gallery { min-width: 0; display: grid; grid-template-columns: repeat(5, minmax(74px, 1fr)); gap: 8px; }
.book-page-thumb { margin: 0; min-width: 0; padding: 7px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 22px rgba(19,32,51,.07); }
.book-page-thumb img { display: block; width: 100%; aspect-ratio: 8.5 / 11; object-fit: cover; object-position: top; border: 1px solid #edf2f7; background: white; border-radius: 5px; }
.book-page-thumb figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.3; }
.book-page-thumb figcaption span { display: block; color: var(--blue); }
.book-preview-copy { max-width: 760px; }
.book-preview-copy h2 { margin: 8px 0 12px; }
.book-preview-copy p { color: var(--muted); max-width: 68ch; }
.trust-page { min-height: 100vh; background: var(--surface-2); color: var(--ink); }
.trust-page header, .trust-page main, .trust-page footer { width: min(880px, calc(100% - 32px)); margin: 0 auto; }
.trust-page header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.trust-page main { padding: 52px 0 64px; }
.trust-page h1 { font-family: var(--serif); font-size: clamp(34px, 6vw, 58px); line-height: 1.02; margin: 10px 0 18px; }
.trust-page .trust-intro { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 68ch; }
.trust-section { padding: 26px 0; border-top: 1px solid var(--line); }
.trust-section h2 { margin: 0 0 10px; font-size: 22px; }
.trust-section p, .trust-section li { color: var(--muted); line-height: 1.65; }
.trust-page footer { padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); }
.view { display: none; padding: 32px; max-width: 1440px; margin: 0 auto; }
.view.active { display: block; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.eyebrow { color: var(--blue); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.eyebrow.light { color: #9fe5e1; }
h1, h2, h3 { font-family: "Source Serif 4", serif; margin: 0; letter-spacing: 0; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 23px; }
h3 { font-size: 17px; }
p { line-height: 1.55; }
.muted { color: var(--muted); }
.button { min-height: 44px; padding: 0 16px; border: 1px solid var(--blue); background: linear-gradient(180deg, #3b73e6, var(--blue)); color: white; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 800; border-radius: 12px; box-shadow: 0 10px 20px rgba(51,102,214,.18); transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { background: #2554bd; transform: translateY(-1px); box-shadow: 0 12px 24px rgba(51,102,214,.23); }
.button:active:not(:disabled) { transform: translateY(1px) scale(.988); box-shadow: var(--press-shadow); }
.button:disabled { cursor: not-allowed; opacity: .5; filter: grayscale(.08); box-shadow: none; }
.button.secondary { color: var(--blue); background: var(--surface); box-shadow: none; border-color: var(--line); }
.button.secondary:hover { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.button.coral { background: linear-gradient(180deg, #ff7a68, var(--coral)); border-color: var(--coral); box-shadow: 0 12px 24px color-mix(in srgb, var(--coral) 28%, transparent); }
.button.coral:hover { background: #d94c3d; box-shadow: 0 14px 28px color-mix(in srgb, var(--coral) 32%, transparent); }
.button.small { min-height: 36px; padding: 0 10px; font-size: 12px; }
.button svg { width: 16px; }
.action-cluster { display: flex; gap: 8px; flex-wrap: wrap; }
.dashboard-hero { min-height: 280px; display: grid; grid-template-columns: minmax(0, 1fr) 240px; background: linear-gradient(135deg, #17294b 0%, #101b33 68%, #0b1426 100%); color: white; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.10); border-bottom: 6px solid var(--gold); }
.dashboard-hero-copy { padding: 38px; align-self: center; }
.dashboard-hero h1 { max-width: 620px; }
.dashboard-hero p { color: #d5e8fa; max-width: 620px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 21px; }
.dashboard-hero .button.secondary { border-color: rgba(255,255,255,.5); background: transparent; color: white; }
.public-trust-row { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; max-width: 760px; }
.public-trust-row a { color: #cfefff; font-size: 13px; font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(207,239,255,.5); }
.public-trust-row a:hover { color: white; border-bottom-color: white; }
.book-owner-note { margin-top: 18px; font-size: 14px !important; color: #ffe49a !important; }
.public-book-cover { width: 290px; aspect-ratio: 8.5 / 11; object-fit: cover; box-shadow: 0 20px 46px rgba(0,0,0,.28); border: 3px solid rgba(255,255,255,.28); border-radius: 8px; justify-self: end; }
.public-section { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 10px; }
.section-heading { margin-bottom: 20px; }
.section-heading p { max-width: 760px; }
.public-about-card { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px; background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-card); }
.public-about-photo { margin: 0; overflow: hidden; border: 1px solid #d6e4f3; border-radius: 18px; background: linear-gradient(160deg, #dcebf8 0%, #eef5fb 55%, #d3e3f2 100%); box-shadow: 0 16px 32px rgba(19,32,51,.10); }
.public-about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; }
.public-about-copy h2 { margin: 6px 0 10px; max-width: 760px; font-size: clamp(28px, 3vw, 40px); line-height: 1.06; }
.public-about-copy p { max-width: 800px; color: var(--muted); font-size: 16px; }
.public-about-copy p strong { color: var(--ink); }
.public-about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.diagnostic-section { padding-top: 52px; }
.diagnostic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.diagnostic-question-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.diagnostic-question { min-width: 0; padding: 17px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 8px; box-shadow: 0 10px 24px rgba(19,32,51,.05); }
.diagnostic-question:nth-child(3n+2) { border-top-color: var(--coral); }
.diagnostic-question:nth-child(3n+3) { border-top-color: var(--gold); }
.diagnostic-question.is-correct { border-color: #8bd6b1; border-top-color: var(--mint); }
.diagnostic-question.is-incorrect { border-color: #f1b3aa; border-top-color: var(--coral); }
.diagnostic-question-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.diagnostic-question-head span { font-weight: 800; }
.diagnostic-question-head small { color: var(--muted); }
.diagnostic-question-head .tag { min-height: 22px; }
.diagnostic-result { margin-left: auto; padding: 3px 8px; font-size: 11px; font-weight: 800; border-radius: 999px; }
.diagnostic-result.correct { color: #0d6f42; background: var(--green-soft); }
.diagnostic-result.incorrect { color: #9a3228; background: var(--coral-soft); }
.diagnostic-question p { margin: 0 0 12px; }
.diagnostic-question .native-visual, .daily-warmup .native-visual { margin: 8px 0 14px; }
.diagnostic-question .native-visual img, .daily-warmup .native-visual img { max-height: 240px; }
.diagnostic-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.diagnostic-choice { position: relative; min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 9px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); text-align: left; border-radius: 8px; overflow: visible; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease; }
.diagnostic-choice span { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue); background: var(--blue-soft); font-weight: 800; border-radius: 6px; }
.diagnostic-choice b { min-width: 0; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.diagnostic-choice:hover, .diagnostic-choice.selected { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.diagnostic-choice.selected { box-shadow: 0 0 0 3px rgba(51,102,214,.10), var(--shadow-soft); }
.diagnostic-choice.correct { border-color: #16a34a; background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%); box-shadow: 0 12px 28px rgba(34, 197, 94, .24), inset 0 0 0 1px rgba(22, 163, 74, .18); }
.diagnostic-choice.correct span { color: white; background: #16a34a; }
.diagnostic-choice.correct-pop { animation: correct-pop .42s ease-out; }
.diagnostic-choice.incorrect { border-color: #ec9d92; background: var(--coral-soft); }
.diagnostic-choice.incorrect span { color: white; background: var(--coral); }
.diagnostic-grid-answer { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.diagnostic-grid-answer .text-input { width: 100%; }
.diagnostic-report { position: sticky; top: 20px; padding: 20px; background: var(--green-dark); color: white; border-radius: 8px; box-shadow: var(--shadow); }
.diagnostic-report .eyebrow { color: #9fe5e1; }
.diagnostic-report > strong { display: block; margin: 14px 0 4px; font: 800 48px/1 "Source Serif 4", serif; color: var(--gold); }
.diagnostic-report h3 { font-size: 24px; }
.diagnostic-report p { color: #d5e8fa; }
.diagnostic-report .button.secondary { color: white; border-color: rgba(255,255,255,.42); background: transparent; }
.diagnostic-report .button.secondary:hover { background: rgba(255,255,255,.12); }
.diagnostic-meter { height: 10px; margin: 18px 0; background: rgba(255,255,255,.16); overflow: hidden; border-radius: 999px; }
.diagnostic-meter div { height: 100%; background: var(--gold); }
.diagnostic-topic-list { display: grid; gap: 9px; margin: 18px 0; }
.diagnostic-topic-row { display: grid; grid-template-columns: 1fr auto; gap: 7px 10px; align-items: center; font-size: 12px; }
.diagnostic-topic-row span { color: #e2effb; }
.diagnostic-topic-row b { color: var(--gold); }
.diagnostic-topic-row .progress-track { grid-column: 1 / -1; height: 6px; background: rgba(255,255,255,.16); }
.daily-warmup { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; padding: 24px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-top: 4px solid var(--violet); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.daily-warmup h2 { margin-bottom: 8px; }
.daily-warmup aside { display: grid; align-content: start; gap: 10px; padding: 16px; background: linear-gradient(180deg, #f7fbff, #edf6ff); border: 1px solid var(--line); border-radius: var(--radius); }
.daily-warmup aside strong, .daily-warmup aside span { display: block; }
.daily-warmup aside span { color: var(--muted); font-size: 12px; }
.warmup-stars { display: grid; gap: 5px; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.warmup-stars small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.star-rating { display: inline-flex; gap: 2px; align-items: center; color: #cbd5e1; font-size: 21px; line-height: 1; }
.star-rating .filled { color: #8a5f0c; text-shadow: 0 1px 0 rgba(0,0,0,.08); }
.star-rating.interactive { gap: 3px; }
.star-button { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #cbd5e1; cursor: pointer; font: inherit; border-radius: 6px; }
.star-button:hover, .star-button:focus-visible { color: #8a5f0c; background: rgba(255, 190, 11, .16); outline: none; }
.star-button.filled { color: #8a5f0c; }
.warmup-result { margin-top: 14px; padding: 13px; border-radius: 8px; }
.warmup-result.correct { background: var(--green-soft); color: var(--green-dark); }
.warmup-result.incorrect { background: var(--coral-soft); color: #7e2e25; }
.warmup-result p { margin: 7px 0 0; }
.diagnostic-launch-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; background: linear-gradient(135deg, #ffffff, #f4f8ff); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.diagnostic-launch-card h2 { margin: 5px 0 8px; }
.diagnostic-launch-card p { max-width: 720px; margin: 0; }
.tei-feature { display: grid; grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr); gap: 24px; align-items: center; padding: 24px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.tei-copy h2 { margin: 6px 0 10px; }
.tei-copy p { max-width: 620px; }
.tei-item-list { display: grid; gap: 9px; margin: 16px 0 20px; }
.tei-item-list span { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
.tei-item-list svg { width: 17px; color: var(--blue); }
.tei-preview-card { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tei-preview-card img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: white; }
.steps-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.step-card, .included-card { background: rgba(255,255,255,.96); border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: transform .16s ease, box-shadow .16s ease; }
.step-card:hover, .included-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.step-card:nth-child(2), .included-card:nth-child(2) { border-top-color: var(--coral); }
.step-card:nth-child(3), .included-card:nth-child(3) { border-top-color: var(--gold); }
.step-card:nth-child(4), .included-card:nth-child(4) { border-top-color: var(--green); }
.step-card:nth-child(5), .included-card:nth-child(5) { border-top-color: var(--violet); }
.included-card:nth-child(6) { border-top-color: var(--pink); }
.step-card b { width: 30px; height: 30px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); margin-bottom: 12px; border-radius: 8px; }
.step-card:nth-child(2) b { background: var(--coral-soft); color: var(--coral); }
.step-card:nth-child(3) b { background: var(--gold-soft); color: #7a5410; }
.step-card:nth-child(4) b { background: var(--green-soft); color: var(--green); }
.step-card:nth-child(5) b { background: var(--violet-soft); color: var(--violet); }
.step-card p, .included-card p { color: var(--muted); margin: 0; }
.included-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.included-card h3 { font-size: 17px; margin-bottom: 8px; }
.professional-feature-section { padding-top: 52px; }
.feature-proof-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.feature-proof-card { min-width: 0; display: grid; grid-template-columns: 42px 1fr; gap: 13px; align-items: start; padding: 18px; background: linear-gradient(180deg, white, #fbfdff); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: transform .16s ease, box-shadow .16s ease; }
.feature-proof-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.feature-proof-card span { width: 42px; height: 42px; display: grid; place-items: center; color: var(--green-dark); background: #eef7ff; border: 1px solid #d9e8f7; border-radius: 12px; }
.feature-proof-card span svg { width: 20px; }
.feature-proof-card h3 { margin: 0 0 5px; font-size: 18px; font-family: "DM Sans", sans-serif; letter-spacing: -.01em; }
.feature-proof-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.feature-proof-card:nth-child(3) { background: linear-gradient(135deg, #f8fbff, #eff8f7); border-color: #cfe6e4; }
.feature-proof-card:nth-child(3) span { color: var(--green); background: var(--green-soft); border-color: #bde7e2; }
.parent-trust { width: min(1160px, calc(100% - 40px)); margin: 32px auto 46px; padding: 20px; border: 1px solid var(--line); background: linear-gradient(135deg, #f8fbff, #eef8f7); display: flex; justify-content: space-between; gap: 20px; align-items: center; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.public-footer { display: contents; }
.parent-trust p { margin: 6px 0 0; color: var(--muted); max-width: 720px; }
.trust-links { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.trust-links a, .trust-links .text-button { display: inline-flex; align-items: center; min-height: 32px; margin: 0; font-size: 13px; color: var(--green); }
.public-disclaimer { width: min(1160px, calc(100% - 40px)); margin: -30px auto 42px; color: var(--muted); font-size: 13px; }
.public-legal { width: min(1160px, calc(100% - 40px)); margin: -30px auto 46px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.public-legal details { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 14px 16px; }
.public-legal summary { cursor: pointer; font-weight: 700; color: var(--green-dark); }
.public-legal p { color: var(--muted); margin: 10px 0 0; font-size: 13px; }
.crawler-parent-section { padding-top: 28px; }
.footer-trust-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.footer-trust-links a { color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(42, 157, 143, .35); }
.footer-trust-links a:hover { color: var(--green-dark); border-bottom-color: currentColor; }
.tool-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tool-preview-card { min-width: 0; padding: 16px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: transform .16s ease, box-shadow .16s ease; }
.tool-preview-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.tool-preview-card:nth-child(2) { border-top-color: var(--coral); }
.tool-preview-card:nth-child(3) { border-top-color: var(--gold); }
.tool-preview-card:nth-child(4) { border-top-color: var(--green); }
.tool-preview-card h3 { margin: 14px 0 6px; font-size: 18px; }
.tool-preview-card p { margin: 0; color: var(--muted); font-size: 13px; }
.tool-screen { min-height: 178px; padding: 12px; background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.screen-bar { display: flex; gap: 5px; margin-bottom: 12px; }
.screen-bar span { width: 8px; height: 8px; background: #d6e2ed; border-radius: 50%; }
.screen-bar span:nth-child(1) { background: var(--coral); }
.screen-bar span:nth-child(2) { background: var(--gold); }
.screen-bar span:nth-child(3) { background: var(--green); }
.hint-bubble { width: fit-content; max-width: 92%; margin: 7px 0; padding: 8px 10px; color: var(--ink); background: var(--blue-soft); border-radius: 12px 12px 12px 3px; font-size: 11px; font-weight: 700; line-height: 1.35; }
.hint-bubble.student { margin-left: auto; color: #7e2e25; background: var(--coral-soft); border-radius: 12px 12px 3px 12px; }
.hint-bubble.wide { max-width: none; background: var(--green-soft); color: var(--green-dark); }
.mistake-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 9px 0; padding: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; }
.mistake-row span { color: var(--coral); font-weight: 800; }
.mini-progress, .diag-topic i { display: block; height: 8px; background: #e8eef4; border-radius: 999px; overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.diagnostic-screen strong { display: block; margin: 4px 0 12px; font: 800 38px/1 "Source Serif 4", serif; color: var(--gold); }
.diag-topic { display: grid; gap: 5px; margin: 10px 0; color: var(--muted); font-size: 11px; font-weight: 800; }
.diag-topic i::before { content: ""; display: block; height: 100%; width: var(--fill, 70%); background: var(--blue); border-radius: inherit; }
.tei-chip-row { display: flex; gap: 8px; margin: 9px 0; flex-wrap: wrap; }
.tei-chip-row span { padding: 7px 8px; color: var(--blue); background: var(--blue-soft); border-radius: 999px; font-size: 11px; font-weight: 800; }
.graph-preview { position: relative; height: 62px; margin-top: 12px; background-image: linear-gradient(#dfe7ef 1px, transparent 1px), linear-gradient(90deg, #dfe7ef 1px, transparent 1px); background-size: 20px 20px; border: 1px solid var(--line); border-radius: 8px; }
.graph-preview i { position: absolute; width: 10px; height: 10px; background: var(--coral); border: 2px solid white; border-radius: 50%; box-shadow: 0 2px 7px rgba(19,32,51,.22); }
.graph-preview i:nth-child(1) { left: 28px; bottom: 14px; }
.graph-preview i:nth-child(2) { right: 38px; top: 14px; }
.graph-preview b { position: absolute; left: 32px; right: 42px; top: 34px; height: 3px; background: var(--green); transform: rotate(-18deg); border-radius: 999px; transform-origin: left center; }
.landing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.landing-card { background: rgba(255,255,255,.96); border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.landing-card h2 { font-size: 18px; margin-bottom: 8px; }
.landing-card p { color: var(--muted); margin: 0; }
.landing-footer-note { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.book-cover { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-left: 1px solid rgba(255,255,255,.2); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 26px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 18px; min-height: 118px; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.metric-card:nth-child(2) { border-top-color: var(--coral); }
.metric-card:nth-child(3) { border-top-color: var(--gold); }
.metric-card:nth-child(4) { border-top-color: var(--green); }
.metric-card span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.metric-card strong { display: block; margin-top: 8px; font: 700 28px/1 "Source Serif 4", serif; }
.metric-card:nth-child(1) strong { color: var(--blue); }
.metric-card:nth-child(2) strong { color: var(--coral); }
.metric-card:nth-child(3) strong { color: #9b6b10; }
.metric-card:nth-child(4) strong { color: var(--green); }
.metric-card small { display: block; color: var(--muted); margin-top: 9px; font-size: 11px; }
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.admin-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
.admin-table th, .admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); }
.admin-table tr:last-child td { border-bottom: 0; }
.instructor-panel { margin: 20px 0; }
.instructor-panel .panel-header h2 { margin: 0 0 3px; }
.instructor-panel .panel-header small { display: block; }
.instructor-panel .panel-body { padding: 18px; }
.instructor-pages, .instructor-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.instructor-pages { margin-top: 14px; }
.instructor-pages > div { display: flex; gap: 8px; }
.instructor-detail { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.instructor-detail h3 { margin: 5px 0; font-family: "Source Serif 4", serif; font-size: 26px; }
.instructor-detail h4 { margin: 22px 0 10px; }
.instructor-detail-heading p { margin: 0; }
.instructor-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.instructor-summary > div { padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.instructor-summary small { display: block; color: var(--muted); }
.instructor-summary strong { display: block; font-size: 24px; margin-top: 4px; }
.instructor-tests { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .instructor-summary { grid-template-columns: 1fr; } }
.split-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, .8fr); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden; }
.panel-header { min-height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); }
.panel-header h2 { margin: 0; color: var(--ink); }
.panel-body { padding: 18px; }
.topic-row { display: grid; grid-template-columns: 145px 1fr 42px; gap: 12px; align-items: center; margin: 14px 0; font-size: 12px; }
.progress-track { height: 7px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); }
.topic-row:nth-child(3n+2) .progress-fill { background: var(--pink); }
.topic-row:nth-child(3n+3) .progress-fill { background: var(--green); }
.activity-list, .test-list, .review-list { display: grid; }
.activity-row, .test-row, .review-row { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.activity-row:last-child, .test-row:last-child, .review-row:last-child { border-bottom: 0; }
.activity-icon { width: 34px; height: 34px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: 0 0 auto; border-radius: 8px; }
.activity-row:nth-child(4n+2) .activity-icon { background: var(--orange-soft); color: var(--orange); }
.activity-row:nth-child(4n+3) .activity-icon { background: var(--pink-soft); color: var(--pink); }
.activity-row:nth-child(4n+4) .activity-icon { background: var(--lime-soft); color: #568a0e; }
.activity-icon svg { width: 17px; }
.activity-row strong, .activity-row small { display: block; }
.activity-row strong { font-size: 12px; }
.activity-row small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.book-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; }
.book-reader-stack { min-width: 0; }
.toc-list { display: grid; }
.toc-item { border: 0; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 47px; padding: 0 14px; text-align: left; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.toc-item:hover { background: var(--blue-soft); color: var(--blue); }
.toc-item-test { font-weight: 650; }
.watermarked-document { position: relative; min-width: 0; overflow: hidden; }
.pdf-frame { width: 100%; height: calc(100vh - 160px); min-height: 620px; border: 1px solid var(--line); background: #dfe7e3; }
.mobile-book-reader { display: grid; gap: 12px; }
.book-mobile-intro { display: flex; align-items: center; gap: 9px; padding: 12px 14px; color: #174b41; background: linear-gradient(180deg, #effdf8, #e5f7ff); border: 1px solid var(--line); border-radius: 14px; font-size: 13px; font-weight: 750; }
.book-mobile-intro svg { width: 18px; color: var(--green); flex: 0 0 auto; }
.book-mobile-toolbar { display: grid; gap: 10px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 24px rgba(19,32,51,.055); }
.book-page-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.book-page-controls label { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; color: var(--muted); font-weight: 800; }
.book-page-controls .text-input { width: 76px; min-height: 38px; padding: 6px 8px; text-align: center; font-weight: 900; color: var(--ink); }
.mobile-pdf-stage { position: relative; min-height: 360px; padding: 10px; display: grid; justify-items: center; align-items: start; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; isolation: isolate; background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.86), rgba(238,246,251,.92) 42%, rgba(218,232,242,.95)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(255,255,255,.42); }
#book-page-canvas { display: block; width: 100%; max-width: 860px; height: auto; background: white; border-radius: 4px; box-shadow: 0 16px 34px rgba(19,32,51,.18); user-select: none; -webkit-user-select: none; transform: translateX(var(--book-swipe-x, 0)); transition: transform .18s ease, opacity .18s ease, filter .18s ease; }
.mobile-pdf-stage.is-swiping #book-page-canvas { transition: none; }
.mobile-pdf-stage.is-loading #book-page-canvas { opacity: .52; filter: saturate(.9); }
.book-page-tap-zone { position: sticky; top: 0; z-index: 4; align-self: stretch; min-height: 360px; width: min(104px, 18%); margin-bottom: -360px; border: 0; color: rgba(20,62,96,.68); background: transparent; display: grid; place-items: center; cursor: pointer; opacity: .36; transition: opacity .16s ease, background .16s ease, transform .16s ease; }
.book-page-tap-zone svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 8px rgba(255,255,255,.75)); }
.book-page-tap-zone.left { justify-self: start; background: linear-gradient(90deg, rgba(255,255,255,.54), rgba(255,255,255,0)); }
.book-page-tap-zone.right { justify-self: end; background: linear-gradient(270deg, rgba(255,255,255,.54), rgba(255,255,255,0)); }
.book-page-tap-zone:hover, .book-page-tap-zone:focus-visible { opacity: 1; background-color: rgba(255,255,255,.12); transform: scale(1.01); }
.book-swipe-hint { position: sticky; bottom: 12px; z-index: 5; justify-self: center; display: inline-flex; align-items: center; gap: 7px; margin-top: -42px; padding: 8px 12px; border: 1px solid rgba(139,172,196,.46); border-radius: 999px; color: #31536c; background: rgba(255,255,255,.86); box-shadow: 0 8px 22px rgba(19,32,51,.13); font-size: 12px; font-weight: 800; backdrop-filter: blur(8px); pointer-events: none; }
.mobile-watermark { font-size: 10px; opacity: .14; }
.book-reader-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 2px 0; }
.book-reader-status { color: var(--muted); font-size: 12px; font-weight: 750; }
.book-reader-status.error { color: #b91c1c; }
.protected-inline-note { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; color: var(--green-dark); background: var(--green-soft); border: 1px solid #bde7d7; border-radius: 999px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.protected-inline-note svg { width: 15px; }
.document-watermark { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; color: rgba(24, 54, 46, .10); font-size: 14px; font-weight: 700; overflow: hidden; transform: rotate(-28deg); text-align: center; }
.archive-note { margin: 0 0 18px; padding: 16px 18px; border: 1px solid #bee7df; border-left: 6px solid var(--green); background: linear-gradient(90deg, var(--green-soft), white); display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.archive-note strong { color: var(--green-dark); flex: 0 0 auto; }
.archive-note span { color: var(--muted); }
.archive-section { margin-bottom: 20px; }
.archive-grid { padding: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.archive-card { min-height: 154px; padding: 17px; border: 1px solid var(--line); border-top: 5px solid var(--blue); background: var(--surface); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.archive-card:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: var(--shadow-card); }
.archive-card:nth-child(4n+2) { border-top-color: var(--coral); }
.archive-card:nth-child(4n+3) { border-top-color: var(--gold); }
.archive-card:nth-child(4n+4) { border-top-color: var(--violet); }
.archive-year { width: fit-content; min-height: 24px; padding: 3px 8px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; }
.archive-card:nth-child(4n+2) .archive-year { color: var(--coral); background: var(--coral-soft); }
.archive-card:nth-child(4n+3) .archive-year { color: #7a5410; background: var(--gold-soft); }
.archive-card:nth-child(4n+4) .archive-year { color: var(--violet); background: var(--violet-soft); }
.archive-card strong { font-size: 15px; line-height: 1.3; }
.archive-card small { color: var(--muted); line-height: 1.45; }
.archive-card em { margin-top: auto; color: var(--green); font-style: normal; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.archive-card em svg { width: 14px; }
.cutoff-section { overflow: hidden; }
.cutoff-intro { padding: 0 18px 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.cutoff-intro p { margin: 0 0 8px; max-width: 92ch; }
.cutoff-scroll-hint { margin: -4px 18px 12px; display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 12px; font-weight: 800; }
.cutoff-scroll-hint svg { width: 15px; }
.cutoff-table-wrap { margin: 0 18px 14px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.cutoff-table { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 12px; }
.cutoff-table caption { padding: 10px 12px; color: var(--muted); text-align: left; font-weight: 700; background: var(--surface-2); }
.cutoff-table th, .cutoff-table td { padding: 10px 9px; border: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.cutoff-table thead th { color: var(--green-dark); background: #eefbf8; font-weight: 800; }
.cutoff-table th:first-child { position: sticky; left: 0; z-index: 1; min-width: 260px; text-align: left; background: white; box-shadow: 8px 0 12px rgba(19, 32, 51, .04); }
.cutoff-table thead th:first-child { z-index: 2; background: #eefbf8; }
.cutoff-table tbody tr:nth-child(even) td, .cutoff-table tbody tr:nth-child(even) th { background-color: #fbfdff; }
.cutoff-table .cutoff-na { color: var(--muted); font-style: italic; }
.cutoff-mobile-list { display: none; padding: 0 18px 14px; }
.cutoff-mobile-card { background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 20px rgba(19,32,51,.045); overflow: hidden; }
.cutoff-mobile-card + .cutoff-mobile-card { margin-top: 10px; }
.cutoff-mobile-card summary { min-height: 56px; padding: 12px 14px; display: grid; gap: 4px; cursor: pointer; list-style: none; }
.cutoff-mobile-card summary::-webkit-details-marker { display: none; }
.cutoff-mobile-card summary span { font-weight: 800; line-height: 1.25; }
.cutoff-mobile-card summary b { color: var(--blue); font-size: 12px; }
.cutoff-mobile-years { padding: 0 14px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cutoff-mobile-years span { padding: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.cutoff-mobile-years em, .cutoff-mobile-years strong { display: block; font-style: normal; }
.cutoff-mobile-years em { color: var(--muted); font-size: 11px; }
.cutoff-mobile-years strong { margin-top: 2px; color: var(--green-dark); font-size: 15px; font-variant-numeric: tabular-nums; }
.cutoff-sources { padding: 0 18px 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.cutoff-sources a { color: var(--blue); font-weight: 700; text-decoration: none; }
.cutoff-sources a:hover { text-decoration: underline; }
.about-layout { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 20px; }
.about-photo-card { margin: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.about-photo-card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; }
.about-copy .panel-body { padding: 28px; }
.about-copy h2 { font-size: 30px; margin: 8px 0 12px; }
.about-copy p { color: var(--muted); font-size: 16px; max-width: 760px; }
.about-copy p strong { color: var(--ink); }
.about-note { margin-top: 10px; border-left: 6px solid var(--gold); }
.about-note h2 { margin-top: 6px; }
.about-note p { max-width: 860px; color: var(--muted); margin-bottom: 0; }
.practice-toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: end; margin-bottom: 16px; }
.filter-field { display: grid; gap: 5px; min-width: min(220px, 100%); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.filter-field .select { min-height: 44px; text-transform: none; letter-spacing: 0; }
.filter-count, .adaptive-pool-count { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 800; }
.adaptive-pool-count strong { color: var(--blue); font-size: 18px; }
.adaptive-banner { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.adaptive-banner.bridge-active { border-top-color: var(--green); background: linear-gradient(135deg, #ffffff, #f2fbfa); }
.adaptive-banner h2 { margin-top: 5px; }
.adaptive-banner p { margin: 6px 0 0; max-width: 720px; }
.adaptive-control-panel { margin-bottom: 18px; padding: 20px; background: linear-gradient(135deg, #ffffff, #f6fbff); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.adaptive-control-panel h2 { margin: 5px 0 6px; }
.adaptive-mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.adaptive-mode-card { text-align: left; display: grid; gap: 7px; align-content: start; min-height: 142px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.adaptive-mode-card:hover { transform: translateY(-2px); border-color: #bcd0ff; box-shadow: 0 12px 24px rgba(19,32,51,.08); }
.adaptive-mode-card.active { border-color: var(--blue); background: #f4f8ff; box-shadow: inset 0 0 0 1px rgba(49,96,221,.16); }
.adaptive-mode-card span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 11px; }
.adaptive-mode-card svg { width: 19px; }
.adaptive-mode-card strong { font-size: 15px; }
.adaptive-mode-card small { color: var(--muted); line-height: 1.45; }
.adaptive-picker-row { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 220px)) minmax(160px, auto); gap: 12px; align-items: end; }
.adaptive-picker-row label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.adaptive-picker-row select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-transform: none; letter-spacing: 0; }
.adaptive-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.adaptive-stats span { min-width: 104px; padding: 9px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; text-align: center; }
.adaptive-stats strong { display: block; color: var(--orange); font: 700 19px/1.05 "Source Serif 4", serif; overflow-wrap: anywhere; }
.adaptive-path-insights { display: grid; grid-template-columns: 1.25fr .9fr 1fr; gap: 12px; margin: 0 0 16px; }
.adaptive-path-insights article { min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.adaptive-path-insights h3 { margin: 5px 0 8px; font-size: 17px; overflow-wrap: anywhere; }
.adaptive-path-insights p { margin: 0; font-size: 13px; line-height: 1.5; }
.adaptive-priority-list { display: grid; gap: 8px; margin-top: 8px; }
.adaptive-priority-list span { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.adaptive-priority-list strong { font-size: 13px; }
.adaptive-priority-list small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.adaptive-intro-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.adaptive-intro-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.adaptive-intro-card:nth-child(2) { border-top-color: var(--blue); }
.adaptive-intro-card:nth-child(3) { border-top-color: var(--violet); }
.adaptive-intro-card > span { width: 42px; height: 42px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 12px; }
.adaptive-intro-card:nth-child(2) > span { color: var(--blue); background: var(--blue-soft); }
.adaptive-intro-card:nth-child(3) > span { color: var(--violet); background: var(--violet-soft); }
.adaptive-intro-card svg { width: 20px; }
.adaptive-intro-card h2 { margin: 13px 0 7px; }
.adaptive-intro-card p { margin: 0; color: var(--muted); font-size: 13px; }
.adaptive-learning-layout .question-panel.is-bridge { border-top-color: var(--green); background: linear-gradient(180deg, white, #f8fffd); }
.adaptive-inline-visual svg { width: min(100%, 440px); height: auto; display: block; margin: 0 auto; }
.adaptive-example-section { margin: 18px 0; }
.adaptive-example-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.adaptive-example-card { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.adaptive-example-card h3 { margin: 0 0 10px; font-size: 16px; }
.adaptive-example-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.adaptive-skill-map { margin-top: 18px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden; }
.adaptive-topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.adaptive-topic-row { padding: 14px 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.adaptive-topic-row:nth-child(odd) { border-right: 1px solid var(--line); }
.adaptive-topic-row strong, .adaptive-topic-row small { display: block; }
.adaptive-topic-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.adaptive-topic-meter { height: 8px; display: block; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.adaptive-topic-meter b { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--blue)); }
.select, .text-input { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; border-radius: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.select:focus, .text-input:focus { outline: none; border-color: rgba(51,102,214,.58); box-shadow: 0 0 0 4px rgba(51,102,214,.10); }
.practice-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 18px; }
.question-panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--blue); padding: 26px; min-height: 560px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.exam-tool-strip {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px -8px 20px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,245,249,.92));
  box-shadow: inset 0 -1px 0 rgba(15,23,42,.04), 0 8px 18px rgba(15,23,42,.06);
}
.exam-tool-group { display: inline-flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); }
.exam-tool-button,
.highlight-swatch {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  color: var(--muted);
  font: 800 12px/1 var(--sans);
  cursor: pointer;
}
.exam-tool-button:last-child,
.highlight-swatch:last-child { border-right: 0; }
.exam-tool-button svg { width: 17px; height: 17px; }
.exam-tool-button.active,
.highlight-swatch.active {
  background: linear-gradient(180deg, #4b5563, #1f2937);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.exam-tool-button.compact { border: 1px solid var(--line); border-radius: 11px; }
.highlight-swatch span {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  background: white;
}
.highlight-swatch.clear span {
  position: relative;
  overflow: hidden;
}
.highlight-swatch.clear span::after {
  content: "";
  position: absolute;
  inset: 6px -3px auto;
  height: 4px;
  background: #b91c1c;
  transform: rotate(-45deg);
}
.highlight-swatch.blue span { background: rgba(96,165,250,.62); border-color: #93c5fd; }
.highlight-swatch.pink span { background: rgba(244,114,182,.58); border-color: #f9a8d4; }
.selection-highlight-popover {
  position: fixed;
  z-index: 2200;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15,23,42,.22);
  touch-action: manipulation;
}
.selection-highlight-popover[hidden] { display: none; }
.selection-highlight-popover .highlight-swatch {
  min-height: 44px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: #1f2937;
}
.selection-highlight-popover .highlight-swatch:last-child { border-right: 0; }
.selection-highlight-popover .highlight-swatch:active {
  transform: translateY(1px);
}
.tool-status { color: var(--muted); font-size: 12px; font-weight: 800; }
.study-notepad {
  display: none;
  position: absolute;
  top: 82px;
  right: 24px;
  width: min(420px, calc(100% - 48px));
  z-index: 30;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.18);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15,23,42,.22);
}
.study-notepad.open { display: block; }
.study-notepad-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  background: linear-gradient(180deg, #f8fafc, #e5e7eb);
  border-bottom: 1px solid #d1d5db;
  color: #4b5563;
}
.study-notepad textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 0;
  padding: 14px;
  color: #111827;
  background: #ffffff;
  font: 16px/1.5 ui-sans-serif, system-ui, sans-serif;
}
.study-notepad textarea:focus { outline: 3px solid rgba(59,130,246,.2); outline-offset: -3px; }
.question-workspace-surface { position: relative; }
.question-content-layer { position: relative; z-index: 2; }
.scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: none;
}
.question-workspace-surface.tool-pencil .scratch-canvas { pointer-events: auto; cursor: crosshair; }
.student-highlight.blue { background: rgba(96,165,250,.42); box-shadow: 0 0 0 2px rgba(96,165,250,.14); border-radius: 3px; }
.student-highlight.pink { background: rgba(244,114,182,.38); box-shadow: 0 0 0 2px rgba(244,114,182,.12); border-radius: 3px; }
.question-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 19px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px; font-size: 10px; font-weight: 700; color: var(--blue); background: var(--blue-soft); text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--blue) 22%, transparent); }
.tag.coral { color: var(--coral); background: var(--coral-soft); border-color: color-mix(in srgb, var(--coral) 22%, transparent); }
.tag.attempt-tag { color: var(--violet); background: var(--violet-soft); gap: 5px; border-color: color-mix(in srgb, var(--violet) 22%, transparent); }
.tag.attempt-tag svg { width: 12px; }
.question-meta .tag:nth-child(2) { color: var(--orange); background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 22%, transparent); }
.question-meta .tag:nth-child(3) { color: var(--violet); background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 22%, transparent); }
.question-meta .tag.format-tag, .diagnostic-question-head .tag.format-tag { color: var(--green); background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 22%, transparent); }
.question-meta .tag.diagram-tag, .diagnostic-question-head .tag.diagram-tag { gap: 4px; color: var(--violet); background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 22%, transparent); }
.tag.diagram-tag svg { width: 12px; }
.question-stem { font-family: "Source Serif 4", serif; font-size: 21px; line-height: 1.55; margin: 0 0 23px; }
.choice-list { display: grid; gap: 9px; }
.choice { position: relative; width: 100%; min-height: 50px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; padding: 10px 12px; display: grid; grid-template-columns: 30px 1fr; align-items: center; border-radius: 13px; overflow: visible; transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease; }
.choice:hover {
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 55%, var(--surface));
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.choice:hover, .choice.selected { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-1px); }
.choice:focus-visible { outline: 3px solid rgba(51, 102, 214, .34); outline-offset: 2px; }
.choice:nth-child(2):hover, .choice:nth-child(2).selected { border-color: var(--violet); background: var(--violet-soft); }
.choice:nth-child(3):hover, .choice:nth-child(3).selected { border-color: var(--orange); background: var(--orange-soft); }
.choice:nth-child(4):hover, .choice:nth-child(4).selected { border-color: var(--pink); background: var(--pink-soft); }
.choice.correct { border-color: #16a34a; background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%); box-shadow: 0 14px 30px rgba(34, 197, 94, .28), inset 0 0 0 1px rgba(22, 163, 74, .18); }
.choice.correct .choice-label { color: #047857; }
.choice.correct-pop { animation: correct-pop .42s ease-out; }
.choice-confetti { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; z-index: 4; animation: choice-confetti-pop .85s ease-out forwards; }
.choice.eliminated { opacity: .62; background: linear-gradient(180deg, rgba(248,250,252,.9), rgba(226,232,240,.82)); }
.choice.eliminated::after {
  content: "";
  position: absolute;
  left: 46px;
  right: 14px;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--coral) 78%, #111);
  transform: rotate(-2deg);
  pointer-events: none;
}
.choice.eliminated .choice-label { color: var(--coral); }
.choice.incorrect { border-color: var(--coral); background: var(--coral-soft); }
.choice.incorrect:disabled { opacity: .78; }
.choice-label { font-weight: 700; color: var(--blue); }
@keyframes correct-pop {
  0% { transform: scale(1); }
  42% { transform: scale(1.025); }
  100% { transform: scale(1); }
}
@keyframes choice-confetti-pop {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.65) rotate(0deg); }
  74% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.05) rotate(var(--spin)); }
}
.question-actions { margin-top: 22px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.coach-panel { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--gold); min-height: 560px; display: flex; flex-direction: column; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.coach-messages { padding: 17px; display: grid; gap: 12px; flex: 1; align-content: start; }
.message { padding: 12px; background: var(--surface-2); font-size: 12px; line-height: 1.55; border-radius: 13px; }
.message.user { background: var(--green-soft); margin-left: 28px; }
.coach-actions { padding: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.test-list { gap: 0; }
.test-row { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; padding: 15px 18px; }
.test-letter { width: 42px; height: 42px; display: grid; place-items: center; background: var(--blue); color: white; font: 700 20px/1 "Source Serif 4", serif; border-radius: 8px; box-shadow: 0 9px 18px rgba(51,102,214,.18); }
.test-row:nth-child(3n+2) .test-letter { background: var(--coral); box-shadow: 0 9px 18px rgba(241,91,74,.18); }
.test-row:nth-child(3n+3) .test-letter { background: var(--green); box-shadow: 0 9px 18px rgba(0,139,143,.18); }
.test-row:nth-child(4n+4) .test-letter { background: var(--violet); box-shadow: 0 9px 18px rgba(108,92,231,.18); }
.test-row strong, .test-row small { display: block; }
.test-row small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.test-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.exam-upgrade { margin-top: 18px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 4px solid var(--gold); }
.exam-upgrade h2, .exam-upgrade p { margin: 4px 0 0; }
.free-exam-row .test-letter { background: var(--violet); box-shadow: 0 9px 18px rgba(108,92,231,.18); font-size: 16px; }
.exam-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.exam-status { display: flex; align-items: center; gap: 14px; }
.exam-status > span { color: var(--muted); font-size: 12px; }
.exam-status > strong { min-width: 104px; padding: 9px 11px; background: var(--ink); color: white; text-align: center; font-variant-numeric: tabular-nums; }
.exam-status > strong.urgent { background: var(--coral); }
.exam-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.exam-navigator { position: sticky; top: 86px; }
.question-grid { padding: 12px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.question-number { aspect-ratio: 1; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 700; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.question-number { border-radius: 6px; }
.question-number:hover, .question-number.active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); box-shadow: 0 8px 18px rgba(51,102,214,.12); }
.question-number:hover { transform: translateY(-1px); }
.question-number.answered { background: var(--green-soft); border-color: #88d7ce; }
.question-number.flagged { box-shadow: inset 0 -3px var(--gold); }
.question-grid .question-number:nth-child(5n+2).active { border-color: var(--coral); color: var(--coral); background: var(--coral-soft); }
.question-grid .question-number:nth-child(5n+3).active { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.question-grid .question-number:nth-child(5n+4).active { border-color: var(--violet); color: var(--violet); background: var(--violet-soft); }
.question-grid .question-number:nth-child(5n+5).active { border-color: var(--pink); color: var(--pink); background: var(--pink-soft); }
.exam-question { min-height: 650px; }
.flag-tag { border: 0; cursor: pointer; margin-left: auto; }
.flag-tag svg { width: 12px; }
.flag-tag.on { background: #f7edc9; color: #775b0e; }
.bookmark-tag { border: 0; cursor: pointer; margin-left: auto; }
.bookmark-tag svg { width: 12px; }
.bookmark-tag.on { background: #f7edc9; color: #775b0e; }
.native-visual { margin: 8px 0 26px; display: grid; place-items: center; overflow: auto; }
.native-visual img { display: block; width: auto; max-width: min(100%, 720px); max-height: 560px; min-height: 80px; object-fit: contain; background: #ffffff; border-radius: 6px; }
body.theme-dark .native-visual img[src*=".svg"],
body[data-theme="midnight"] .native-visual img[src*=".svg"],
body[data-theme="forest"] .native-visual img[src*=".svg"],
body[data-theme="ocean"] .native-visual img[src*=".svg"],
body[data-theme="graphite"] .native-visual img[src*=".svg"] {
  filter: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.18);
}
.exam-review-list { display: grid; gap: 16px; }
.review-question { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--coral); padding: 22px; border-radius: 8px; }
.answer-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.answer-comparison span { padding: 11px; background: var(--surface-2); color: var(--muted); font-size: 11px; }
.answer-comparison strong { display: block; margin-top: 4px; color: var(--ink); font-size: 15px; }
.exam-metrics { grid-template-columns: repeat(4, minmax(0,1fr)); }
.readiness-preview-section { scroll-margin-top: 88px; }
.readiness-report { margin: 0 0 20px; overflow: hidden; border: 1px solid rgba(32,108,153,.18); box-shadow: 0 24px 70px rgba(14,44,70,.12); }
.readiness-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px; background: radial-gradient(circle at 92% 12%, rgba(255,206,77,.26), transparent 30%), linear-gradient(135deg, #102f48, #103f51 65%, #115247); color: white; }
.readiness-hero h2 { margin-top: 6px; font-size: 30px; }
.readiness-hero p { color: #d5e8fa; max-width: 680px; margin-bottom: 0; }
.readiness-hero .eyebrow { color: #9fe5e1; }
.readiness-hero > strong { flex: 0 0 auto; font: 800 54px/1 "Source Serif 4", serif; color: var(--gold); }
.readiness-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #ffffff, #f8fbff); }
.readiness-summary-grid article { padding: 18px 20px; border-right: 1px solid var(--line); display: grid; gap: 5px; }
.readiness-summary-grid article:last-child { border-right: 0; }
.readiness-summary-grid span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.readiness-summary-grid strong { color: var(--ink); font-size: 18px; line-height: 1.2; }
.readiness-summary-grid small { color: var(--muted); font-size: 12px; }
.readiness-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); gap: 20px; padding: 20px; }
.readiness-body h3 { margin-bottom: 12px; }
.readiness-topic-list { display: grid; gap: 10px; margin-top: 12px; }
.readiness-topic-row { display: grid; grid-template-columns: 1fr auto auto; gap: 7px 12px; align-items: center; font-size: 13px; }
.readiness-topic-row b { color: var(--blue); }
.readiness-topic-row em { justify-self: end; color: var(--green-dark); background: rgba(93,220,173,.15); border: 1px solid rgba(93,220,173,.28); border-radius: 999px; padding: 3px 8px; font-style: normal; font-size: 11px; font-weight: 850; }
.readiness-topic-row .progress-track { grid-column: 1 / -1; height: 7px; }
.readiness-patterns { display: grid; gap: 9px; margin: 0 0 14px 18px; padding: 0; color: var(--ink); }
.readiness-patterns li { padding-left: 3px; line-height: 1.45; }
.parent-summary-box { padding: 14px; border: 1px solid rgba(247,98,104,.16); border-radius: 18px; background: linear-gradient(135deg, rgba(255,247,237,.86), rgba(255,255,255,.92)); }
.parent-summary-box strong { display: block; margin-bottom: 5px; color: var(--coral-dark); }
.parent-summary-box p { margin: 0; color: var(--muted); }
.sample-report .readiness-hero { background: radial-gradient(circle at 88% 0%, rgba(255,206,77,.25), transparent 28%), linear-gradient(135deg, #12324c, #2d315c 54%, #143f50); }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.study-plan-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.study-plan-grid article { padding: 14px; border-right: 1px solid var(--line); min-height: 112px; }
.study-plan-grid article:last-child { border-right: 0; }
.study-plan-grid strong, .study-plan-grid span { display: block; }
.study-plan-grid strong { color: var(--coral); margin-bottom: 7px; }
.study-plan-grid span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.empty-state { min-height: 250px; padding: 38px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line); background: var(--surface); border-radius: 8px; }
.empty-state.compact { min-height: 170px; padding: 20px; }
.empty-state svg { width: 36px; color: var(--muted); margin-bottom: 12px; }
.access-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.redeem-form { max-width: 520px; display: grid; gap: 12px; }
.access-method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.access-method-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.9)); box-shadow: var(--shadow-soft); }
.access-method-card h3, .access-method-card p { margin: 0; }
.access-method-card .button { margin-top: auto; justify-content: center; }
.method-kicker { display: inline-flex; align-items: center; gap: 7px; width: max-content; padding: 6px 10px; border-radius: 999px; background: rgba(37,99,235,.1); color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.method-kicker svg { width: 15px; height: 15px; }
.price-line { font-family: "Fraunces", serif; font-size: clamp(36px, 7vw, 52px); line-height: .95; color: var(--ink); font-weight: 900; letter-spacing: -.05em; }
.online-access-card { border-color: rgba(249,115,22,.32); background: radial-gradient(circle at 15% 0%, rgba(254,215,170,.55), transparent 36%), linear-gradient(180deg, #fffaf3, rgba(255,255,255,.92)); }
.online-access-card .method-kicker { background: rgba(249,115,22,.13); color: #c2410c; }
.support-code-panel { margin-top: 16px; max-width: 720px; border: 1px dashed rgba(100,116,139,.5); border-radius: 14px; padding: 12px 14px; background: rgba(248,250,252,.72); }
.support-code-panel summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--muted); }
.support-code-panel summary svg { width: 17px; height: 17px; }
.support-code-panel .redeem-form { margin-top: 12px; max-width: 560px; }
.unlock-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 4px; }
.unlock-options > div { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.unlock-options p { margin: 5px 0 0; font-size: 12px; }
.retail-access-form { max-width: 520px; display: grid; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.primary-unlock-form { margin-top: 0; margin-bottom: 24px; padding: 16px; border: 1px solid rgba(14, 165, 162, .28); border-radius: 14px; background: linear-gradient(180deg, rgba(14, 165, 162, .08), rgba(255,255,255,.72)); }
.retail-access-form h3, .retail-access-form p { margin: 0; }
.retail-access-form textarea { resize: vertical; min-height: 84px; }
.redeem-code { font-family: ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.qr-preview { min-height: 310px; background: white; border: 1px solid var(--line); border-top: 4px solid var(--gold); padding: 22px; text-align: center; border-radius: 8px; }
.qr-grid { margin: 17px auto; width: 180px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; background: white; border: 10px solid white; box-shadow: 0 0 0 1px var(--line); }
.qr-grid i { background: var(--ink); }
.qr-grid i.off { background: white; }
.grid-answer { display: grid; gap: 8px; max-width: 340px; color: var(--muted); font-size: 12px; }
.tei-answer-card { position: relative; display: grid; gap: 14px; padding: 16px; border: 1px solid rgba(59, 99, 246, .22); border-radius: 14px; background: linear-gradient(180deg, #ffffff, #f7fbff); overflow: hidden; }
.tei-answer-card.correct-pop { border-color: rgba(34, 197, 94, .7); background: linear-gradient(180deg, #f0fdf4, #ffffff); box-shadow: 0 0 0 4px rgba(34, 197, 94, .12), 0 16px 34px rgba(34, 197, 94, .13); }
.tei-answer-head { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.tei-answer-head > span { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); background: #eaf0ff; border-radius: 10px; flex: 0 0 auto; }
.tei-answer-head strong, .tei-answer-head small { display: block; }
.tei-answer-head small { margin-top: 2px; color: var(--muted); line-height: 1.35; }
.tei-sentence { display: grid; gap: 12px; }
.tei-prompt-blank { display: inline-block; min-width: 3.2em; height: .92em; margin: 0 .12em; border-bottom: 2px solid currentColor; vertical-align: -0.05em; }
.tei-inline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tei-inline-grid label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 700; }
.tei-select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.tei-hotspot-visual, .tei-graph-wrap, .tei-drag-area, .tei-multi-select, .tei-match-pairs, .tei-table-entry, .tei-interval-select { display: grid; gap: 10px; }
.tei-hotspot-visual svg, .tei-graph-wrap svg { width: 100%; max-width: 520px; justify-self: center; border: 1px solid var(--line); border-radius: 12px; background: white; }
.tei-hotspot-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tei-hotspot-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.tei-hotspot-button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue) 42%, var(--line)); background: var(--blue-soft); }
.tei-hotspot-button.selected { border-color: var(--blue); background: #eaf0ff; color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 99, 246, .12); }
.tei-frequency-table { width: min(100%, 360px); margin: 0 auto; border-collapse: collapse; background: white; }
.tei-frequency-table th, .tei-frequency-table td { border: 1px solid #111; padding: 10px; text-align: center; }
.tei-frequency-table th { font-family: var(--serif); font-size: 18px; }
.tei-frequency-table .target-row { background: #f8fbff; }
.tei-frequency-table .tei-hotspot-button { min-width: 58px; border-radius: 10px; }
.tei-table-title { margin: 0 auto 4px; color: var(--muted); font-weight: 800; text-align: center; }
.generic-table-hotspot .tei-frequency-table { width: min(100%, 500px); }
.generic-table-hotspot .tei-frequency-table th { background: #f8fafc; font-size: 16px; }
.generic-table-hotspot .tei-frequency-table td { min-width: 70px; }
.generic-table-hotspot .tei-table-hotspot-row { cursor: pointer; touch-action: manipulation; }
.generic-table-hotspot .tei-table-hotspot-row td { transition: background .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease; }
.generic-table-hotspot .tei-table-hotspot-row:hover td,
.generic-table-hotspot .tei-table-hotspot-row:focus-visible td { background: #eff6ff; }
.generic-table-hotspot .tei-table-hotspot-row.is-pressing td { background: #dbeafe; box-shadow: inset 0 0 0 2px rgba(59, 99, 246, .18); }
.generic-table-hotspot .tei-table-hotspot-row.selected td {
  background: #eaf0ff;
  color: var(--blue);
  box-shadow: inset 0 0 0 2px rgba(59, 99, 246, .28);
  font-weight: 800;
}
.generic-number-line-hotspot svg { max-width: 560px; }
.tei-graph-point { cursor: pointer; transition: r .12s ease, fill .12s ease, stroke .12s ease; }
.tei-graph-point:hover { stroke: var(--blue); fill: #eaf0ff; }
.tei-selected-value { margin: 0; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.tei-drop-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tei-drop-slot { min-height: 82px; padding: 10px; display: grid; gap: 6px; align-content: center; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); text-align: center; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease; }
.tei-drop-slot:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue) 44%, var(--line)); background: #f5f9ff; }
.tei-drop-slot.filled { border-style: solid; border-color: var(--blue); background: #eef4ff; }
.tei-drop-slot small { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
.tei-chip-bank { display: flex; gap: 8px; flex-wrap: wrap; }
.tei-chip { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 800; cursor: grab; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.tei-chip:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue) 38%, var(--line)); background: #f8fbff; box-shadow: var(--shadow-soft); }
.tei-chip.used { opacity: .42; cursor: default; }
.tei-answer-breakdown { margin: 4px 0 0; padding-left: 1.2rem; display: grid; gap: 3px; }
.tei-answer-breakdown li { padding-left: 2px; }
.answer-value { font-weight: 800; }
.tei-multi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.tei-multi-option { min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 800; text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.tei-multi-option:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--blue) 38%, var(--line)); background: #f8fbff; }
.tei-multi-option.selected { border-color: var(--blue); background: #eaf0ff; color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 99, 246, .12); }
.tei-numberline-multi svg, .tei-interval-select svg { width: 100%; max-width: 560px; justify-self: center; border: 1px solid var(--line); border-radius: 12px; background: white; }
.tei-match-pairs { grid-template-columns: 1fr; }
.tei-match-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, .8fr); gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.tei-match-row > span { font-weight: 800; color: var(--ink); }
.tei-entry-table { width: min(100%, 560px); }
.tei-table-input { min-width: 82px; max-width: 150px; text-align: center; margin: 0 auto; }
.tei-interval-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 520px; width: 100%; justify-self: center; }
.tei-interval-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; }
.tei-two-point-graph .tei-graph-point.selected { filter: drop-shadow(0 0 5px rgba(59, 99, 246, .35)); }
.small-note { font-size: 12px; margin: 0; }
.attempt-history { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-top: -2px; }
.attempt-history b { color: var(--coral); background: var(--coral-soft); border: 1px solid rgba(192, 91, 74, .25); padding: 2px 7px; border-radius: 999px; }
.link-tag { text-decoration: none; }
.review-copy { flex: 1; min-width: 0; }
.review-copy strong, .review-copy small { display: block; }
.review-copy small { color: var(--muted); margin-top: 3px; font-size: 11px; }
.review-copy p { margin: 8px 0 0; font-size: 12px; }
.note-block { margin-top: 22px; background: var(--gold-soft); border-left: 3px solid var(--gold); }
.note-block p { margin-bottom: 0; }
.success-banner { display: flex; gap: 13px; padding: 16px; margin-bottom: 18px; background: var(--green-soft); color: var(--green-dark); }
.success-banner svg { width: 26px; flex: 0 0 auto; }
.success-banner p { margin: 4px 0 0; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.google-button { justify-content: center; }
.form-stack { display: grid; gap: 14px; }
.form-stack label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.form-stack .text-input { width: 100%; }
.consent-check { grid-template-columns: auto 1fr; align-items: start; line-height: 1.45; }
.consent-check input { margin-top: 3px; }
.sign-out-button { margin-top: 18px; }
.setup-list { max-width: 760px; }
.setup-list code { background: var(--surface-2); padding: 2px 5px; }
.coach-compose { padding: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.coach-compose textarea { width: 100%; min-height: 86px; padding: 10px; resize: vertical; }
.coach-access-note { padding: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.text-button { display: block; margin-top: 9px; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 10px; text-decoration: underline; }
.code-output { display: grid; gap: 7px; max-height: 370px; overflow: auto; }
.code-output code { padding: 8px 10px; background: var(--surface-2); font-family: ui-monospace, monospace; font-size: 12px; }
.admin-editor { margin-top: 20px; }
.inline-form { display: flex; align-items: end; gap: 10px; }
.inline-form label { display: grid; flex: 1; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.question-edit-form { margin-top: 20px; }
.question-edit-form textarea { min-height: 110px; padding: 10px; resize: vertical; }
.editor-placeholder { margin: 18px 0 4px; }
.choice:disabled { cursor: default; color: inherit; }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 340px; padding: 12px 14px; color: white; background: var(--ink); box-shadow: var(--shadow); transform: translateY(12px); opacity: 0; pointer-events: none; transition: .2s ease; z-index: 50; font-size: 12px; }
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
@media (max-width: 1040px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; width: min(86vw, 292px); max-width: 292px; height: 100dvh; transform: translateX(-104%); z-index: 1000; overflow: hidden; will-change: transform; touch-action: pan-y; filter: none; opacity: 1; }
  .sidebar.open { transform: translateX(0); }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .brand div:last-child, .nav-item span, .access-state div, .sidebar-bottom .nav-item span { display: block; }
  .brand { justify-content: flex-start; padding-inline: 7px; }
  .nav-item { justify-content: flex-start; padding: 0 10px; min-height: 48px; }
  .nav-item b { position: static; margin-left: auto; }
  .access-state { justify-content: flex-start; }
  .mobile-menu { display: grid; }
  .topbar-context { min-width: 124px; }
  .topbar-context strong { font-size: 15px; }
  .book-layout { grid-template-columns: 1fr; }
  .book-toc-panel .toc-list { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
  .book-toc-panel .toc-item { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; }
  .pdf-desktop-document { display: none; }
  .mobile-book-reader { display: grid; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split-layout, .practice-layout { grid-template-columns: 1fr; }
  .tei-inline-grid, .tei-drop-slots, .tei-multi-grid, .tei-match-row, .tei-interval-grid { grid-template-columns: 1fr; }
  .exam-layout { grid-template-columns: 1fr; }
  .exam-navigator { position: static; }
  .question-grid { grid-template-columns: repeat(5, minmax(40px, 1fr)); }
  .coach-panel { min-height: 420px; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-note { display: grid; }
  .about-layout { grid-template-columns: 1fr; }
  .about-photo-card { max-width: 420px; }
  .diagnostic-layout { grid-template-columns: 1fr; }
  .tei-feature { grid-template-columns: 1fr; }
  .tool-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-proof-grid { grid-template-columns: 1fr; }
  .feature-proof-card:nth-child(3) { grid-column: auto; }
  .adaptive-intro-grid { grid-template-columns: 1fr; }
  .adaptive-path-insights { grid-template-columns: 1fr; }
  .adaptive-mode-grid, .adaptive-example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adaptive-picker-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adaptive-topic-list { grid-template-columns: 1fr; }
  .adaptive-topic-row:nth-child(odd) { border-right: 0; }
  .adaptive-banner { align-items: flex-start; flex-direction: column; }
  .adaptive-stats { justify-content: flex-start; }
  .diagnostic-report { position: static; }
  .readiness-body { grid-template-columns: 1fr; }
  .readiness-summary-grid { grid-template-columns: 1fr; }
  .readiness-summary-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .readiness-summary-grid article:last-child { border-bottom: 0; }
  .study-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .study-plan-grid article { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .topbar { padding: 0 12px; min-height: 66px; }
  .topbar-context { min-width: 0; flex: 1; }
  .topbar-context span { font-size: 9px; }
  .topbar-context strong { font-size: 14px; }
  .profile-badge, kbd { display: none; }
  .view { padding: 18px 12px; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .dashboard-hero-copy { padding: 24px 18px; }
  .book-cover { display: none; }
  .book-preview-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-grid { grid-template-columns: 1fr; }
  .public-book-cover { width: min(240px, 70vw); justify-self: start; }
  .steps-grid, .included-grid, .diagnostic-question-grid { grid-template-columns: 1fr; }
  .tool-preview-grid { grid-template-columns: 1fr; }
  .diagnostic-choices { grid-template-columns: 1fr; }
  .daily-warmup { grid-template-columns: 1fr; padding: 17px; }
  .diagnostic-launch-card { align-items: flex-start; flex-direction: column; padding: 17px; }
  .practice-toolbar { display: grid; grid-template-columns: 1fr; }
  .filter-field { min-width: 0; }
  .tei-feature { padding: 17px; }
  .tei-preview-card img { max-height: 430px; }
  .adaptive-stats span { flex: 1 1 112px; }
  .adaptive-path-insights { grid-template-columns: 1fr; }
  .adaptive-mode-grid, .adaptive-example-grid { grid-template-columns: 1fr; }
  .adaptive-picker-row { grid-template-columns: 1fr; }
  .adaptive-mode-card { min-height: 0; }
  .public-section, .parent-trust, .public-legal, .public-disclaimer { width: min(100% - 28px, 1160px); }
  .trust-links { gap: 0 18px; }
  .trust-links a, .trust-links .text-button { min-height: 44px; }
  .public-about-card { grid-template-columns: 1fr; padding: 16px; }
  .public-about-photo { max-width: 280px; }
  .public-about-copy h2 { font-size: 28px; }
  .parent-trust { display: grid; }
  .public-legal { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .book-layout, .access-layout, .auth-layout, .unlock-options, .access-method-grid { grid-template-columns: 1fr; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .pdf-frame { min-height: 520px; height: 70vh; }
  .book-mobile-toolbar { padding: 10px; }
  .book-page-controls { display: grid; grid-template-columns: 1fr 1.35fr 1fr; align-items: center; }
  .book-page-controls .button { width: 100%; justify-content: center; }
  .book-page-controls label { grid-column: 1 / -1; grid-row: 1; }
  .mobile-pdf-stage { margin-inline: -6px; padding: 7px; border-radius: 12px; }
  .book-page-tap-zone { width: 20%; min-height: 330px; margin-bottom: -330px; opacity: .24; }
  .book-swipe-hint { font-size: 11px; bottom: 9px; }
  .book-reader-footer { align-items: stretch; flex-direction: column; }
  .book-reader-footer .button { justify-content: center; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 29px; }
  .question-panel { padding: 18px; }
  .exam-tool-strip {
    margin: -4px -4px 16px;
    padding: 8px;
    gap: 8px;
  }
  .exam-tool-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .highlighter-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exam-tool-button,
  .highlight-swatch {
    min-height: 44px;
    padding: 0 8px;
    font-size: 11px;
  }
  .exam-tool-button.compact {
    width: 100%;
    border-radius: 11px;
  }
  .study-notepad {
    top: 74px;
    right: 12px;
    width: calc(100% - 24px);
  }
  .study-notepad textarea { min-height: 220px; }
  .question-stem { font-size: 18px; }
  .test-list {
    gap: 10px;
    padding: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .test-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 24px rgba(19, 32, 51, .06);
  }
  .test-letter { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; }
  .test-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-content: stretch;
  }
  .test-actions .button {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
  .test-actions .button.secondary {
    min-height: 44px;
  }
  .exam-upgrade { align-items: flex-start; flex-direction: column; }
  .exam-topbar, .exam-status { align-items: flex-start; flex-direction: column; }
  .exam-status { width: 100%; }
  .archive-grid { grid-template-columns: 1fr; }
  .cutoff-table-wrap { display: none; }
  .cutoff-scroll-hint { color: var(--muted); }
  .cutoff-mobile-list { display: grid; }
  .cutoff-mobile-years { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-copy .panel-body { padding: 22px 18px; }
  .about-copy h2 { font-size: 24px; }
  .about-photo-card { max-width: none; }
  .exam-status .button { width: 100%; }
  .exam-layout { gap: 12px; }
  .exam-navigator { order: 2; position: static; top: auto; z-index: auto; }
  .exam-question { order: 1; min-height: 0; }
  .question-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 56px;
    align-items: stretch;
    gap: 10px;
    max-height: 232px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .free-exam-layout .exam-tool-strip { display: none; }
  .question-number {
    width: 100%;
    height: 56px;
    min-height: 56px;
    aspect-ratio: auto;
    font-size: 14px;
  }
  .exam-metrics { grid-template-columns: 1fr 1fr; }
  .readiness-hero { align-items: flex-start; flex-direction: column; }
  .readiness-hero > strong { font-size: 44px; }
  .readiness-topic-row { grid-template-columns: 1fr auto; }
  .readiness-topic-row em { grid-column: 1 / -1; justify-self: start; }
  .study-plan-grid { grid-template-columns: 1fr; }
  .study-plan-grid article { border-right: 0; }
  .answer-comparison { grid-template-columns: 1fr; }
  .toc-list { display: grid; gap: 8px; }
  .toc-item {
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(19, 32, 51, .04);
  }
  .toc-item-test {
    background: linear-gradient(180deg, #ffffff, #f3f8ff);
    border-color: rgba(51, 102, 214, .28);
  }
}

@media (hover: none), (pointer: coarse) {
  .button,
  .icon-button,
  .nav-item,
  .choice,
  .toc-item,
  .question-number,
  .select,
  .text-input,
  .archive-card,
  .test-actions .button,
  .coach-actions .button {
    min-height: 44px;
  }
  .choice:hover,
  .diagnostic-choice:hover,
  .icon-button:hover,
  .question-number:hover,
  .tei-chip:hover,
  .tei-drop-slot:hover,
  .tei-hotspot-button:hover,
  .tei-multi-option:hover,
  .archive-card:hover,
  .button:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .icon-button,
  .nav-item,
  .choice,
  .diagnostic-choice,
  .question-number,
  .adaptive-mode-card,
  .archive-card,
  .toc-item,
  .tei-hotspot-button,
  .tei-multi-option,
  .tei-chip,
  .tei-drop-slot,
  .tei-graph-point {
    transition: none !important;
  }
  .button.is-pressing,
  .icon-button.is-pressing,
  .nav-item.is-pressing,
  .choice.is-pressing,
  .diagnostic-choice.is-pressing,
  .question-number.is-pressing,
  .adaptive-mode-card.is-pressing,
  .archive-card.is-pressing,
  .toc-item.is-pressing,
  .tei-hotspot-button.is-pressing,
  .tei-multi-option.is-pressing,
  .tei-chip.is-pressing,
  .tei-drop-slot.is-pressing {
    transform: none !important;
  }
}

/* —— Professional app chrome —— */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 300;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  transform: translateY(0);
  box-shadow: var(--shadow);
}
.view h1[tabindex="-1"]:focus,
.view[tabindex="-1"]:focus {
  outline: none;
}
.network-banner {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 650;
  color: #7a3b08;
  background: linear-gradient(180deg, #fff4d6, #ffe8b0);
  border-bottom: 1px solid #f0d48a;
}
.session-meter {
  margin: 4px 4px 10px;
  padding: 11px 12px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.session-meter-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #d8e7fb;
}
.session-meter-copy small {
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #9fb8d4;
}
.session-meter-copy strong {
  font: 700 15px/1 "DM Sans", sans-serif;
  color: #f7fbff;
  font-variant-numeric: tabular-nums;
}
.session-meter-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.session-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67d59f, #7dd3fc);
  transition: width .6s ease;
}
.scroll-progress {
  position: sticky;
  top: 0;
  z-index: 35;
  height: 3px;
  background: transparent;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), #3b82f6);
  transition: width .08s linear;
}
.continue-ribbon {
  display: grid;
  gap: 4px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(51, 102, 214, .18);
  background:
    linear-gradient(120deg, rgba(255, 216, 117, .16), transparent 42%),
    linear-gradient(180deg, #ffffff, #f4f9ff);
  box-shadow: var(--shadow-soft);
}
.continue-ribbon small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.continue-ribbon strong {
  font: 700 15px/1.35 "Source Serif 4", serif;
  color: var(--ink);
}
.focus-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 70%, var(--surface));
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.focus-chip[hidden] { display: none !important; }
.focus-chip small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
}
.focus-chip strong {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.focus-chip-stop {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.study-rhythm {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--gold) 14%, transparent), transparent 42%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
}
.study-rhythm-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.study-rhythm-stats div {
  display: grid;
  gap: 4px;
}
.study-rhythm-stats small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.study-rhythm-stats strong {
  font: 700 22px/1.1 "Source Serif 4", serif;
  color: var(--ink);
}
.heat-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.heat-day {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.heat-day.level-1 { background: color-mix(in srgb, var(--sky) 28%, var(--surface)); color: var(--ink); }
.heat-day.level-2 { background: color-mix(in srgb, var(--blue) 42%, var(--surface)); color: white; border-color: transparent; }
.heat-day.level-3 { background: color-mix(in srgb, var(--green) 55%, var(--blue)); color: white; border-color: transparent; }
.study-rhythm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 720px) {
  .study-rhythm-stats { grid-template-columns: 1fr; }
}
.home-quiet {
  display: grid;
  gap: 20px;
  max-width: 860px;
}
.home-quiet-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 4px 2px 2px;
}
.home-quiet-head h1 {
  margin: 6px 0 8px;
  font: 700 36px/1.12 "Source Serif 4", serif;
  color: var(--ink);
  letter-spacing: -.025em;
}
.home-quiet-head .muted {
  margin: 0;
  max-width: 40ch;
  font-size: 15px;
}
.home-quiet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.home-strip {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.home-strip-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.home-strip-stats small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.home-strip-stats strong {
  display: block;
  margin-top: 4px;
  font: 700 22px/1 "Source Serif 4", serif;
  color: var(--ink);
}
.heat-week.compact .heat-day {
  min-height: 10px;
  border-radius: 999px;
}
.home-more {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.home-more > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 700;
}
.home-more > summary::-webkit-details-marker { display: none; }
.home-more > summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.home-more-grid {
  margin: 0;
  padding: 0 16px 16px;
}
.home-more .panel {
  box-shadow: none;
}
.mistake-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.mistake-summary > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.mistake-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mistake-summary strong {
  display: block;
  margin-top: 6px;
  font: 700 28px/1 "Source Serif 4", serif;
  color: var(--ink);
}
.mistake-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.mistake-topic-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  border-top: 4px solid var(--coral);
}
.mistake-topic-card.tone-1 { border-top-color: var(--blue); }
.mistake-topic-card.tone-2 { border-top-color: var(--gold); }
.mistake-topic-card.tone-3 { border-top-color: var(--green); }
.mistake-topic-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}
.mistake-topic-card > header strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}
.mistake-topic-card > header small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.mistake-count-pill {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--coral-soft);
  color: var(--coral);
  font-weight: 800;
}
.mistake-topic-card.tone-1 .mistake-count-pill { background: var(--blue-soft); color: var(--blue); }
.mistake-topic-card.tone-2 .mistake-count-pill { background: var(--gold-soft); color: #9b6b10; }
.mistake-topic-card.tone-3 .mistake-count-pill { background: var(--green-soft); color: var(--green); }
.mistake-item-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 14px;
}
.mistake-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.mistake-item.due {
  border-color: color-mix(in srgb, var(--coral) 35%, var(--line));
  box-shadow: inset 3px 0 0 var(--coral);
}
.mistake-item-copy strong,
.mistake-item-copy small {
  display: block;
}
.mistake-item-copy strong { color: var(--ink); font-size: 14px; }
.mistake-item-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.mistake-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 18rem),
    var(--surface);
}
.mistake-empty-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 4px;
}
.mistake-empty-mark svg { width: 26px; height: 26px; }
.mistake-empty h2 { margin: 0; color: var(--ink); }
.mistake-empty .muted { max-width: 46ch; margin: 0; }
body.theme-dark .bookmark-tag.on,
body.theme-dark .flag-tag.on {
  background: var(--gold-soft);
  color: var(--gold);
}
body.theme-dark .mastery-ring .track { stroke: var(--line); }
body.theme-dark .mistake-topic-card.tone-2 .mistake-count-pill,
body.theme-dark .metric-card:nth-child(3) strong {
  color: var(--gold);
}
body.theme-dark .next-best {
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--green) 16%, transparent), transparent 40%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
}
@media (max-width: 900px) {
  .home-quiet-head { flex-direction: column; align-items: start; }
  .home-strip-stats,
  .mistake-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mistake-map-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home-strip-stats { grid-template-columns: 1fr 1fr; }
}
.mastery-ring-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f7fbff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.mastery-ring {
  width: 72px;
  height: 72px;
}
.mastery-ring circle {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.mastery-ring .track { stroke: #e5eef8; }
.mastery-ring .value {
  stroke: url(#mastery-grad);
  stroke: #3b73e6;
  transition: stroke-dashoffset .7s ease;
}
.mastery-ring-copy small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mastery-ring-copy strong {
  display: block;
  font: 700 22px/1.1 "Source Serif 4", serif;
  color: var(--ink);
}
.mastery-ring-copy span {
  color: var(--muted);
  font-size: 13px;
}
.dashboard-greeting {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.dashboard-hero .dashboard-greeting {
  color: rgba(213, 232, 250, .9);
}
.studio-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: rgba(197, 217, 239, .88);
}
.studio-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67d59f;
  box-shadow: 0 0 0 3px rgba(103, 213, 159, .18);
  flex-shrink: 0;
}
.studio-status-dot.offline {
  background: #f4b942;
  box-shadow: 0 0 0 3px rgba(244, 185, 66, .18);
}
.studio-status small {
  font-size: 11px;
  color: rgba(197, 217, 239, .88);
}
.settings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  align-content: start;
}
.settings-card h2 {
  margin: 0;
  font: 700 17px/1.25 "Source Serif 4", serif;
}
.settings-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.settings-option {
  display: grid;
  gap: 6px;
}
.settings-option label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.settings-toggle span {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
}
.settings-toggle small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.settings-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.next-best {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--green) 12%, transparent), transparent 42%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-card);
}
.next-best small {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.next-best strong {
  font: 700 22px/1.25 "Source Serif 4", serif;
  color: var(--ink);
  letter-spacing: -.01em;
}
.next-best p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 54ch;
}
.next-best-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 6px;
}
.next-best-actions .text-button {
  color: var(--muted);
  font-weight: 650;
}
.next-best-actions .text-button:hover {
  color: var(--blue);
}
.parent-snapshot {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
}
body.text-size-large {
  font-size: 17px;
}
body.text-size-xlarge {
  font-size: 18px;
}
body.text-size-large .view,
body.text-size-xlarge .view {
  line-height: 1.55;
}
body.high-contrast {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #222222;
  --line: #111111;
}
body.high-contrast .sidebar {
  background: #000814;
}
body.calm-mode .boot-splash-mark,
body.calm-mode .view.active,
body.calm-mode .choice-confetti,
body.calm-mode .skeleton-line {
  animation: none !important;
}
body.calm-mode .scroll-progress {
  display: none !important;
}
body.compact-nav .nav-item {
  min-height: 36px;
}
body.compact-nav .nav-section-label {
  margin-top: 8px;
}
body.compact-nav .session-meter {
  display: none;
}
body.compact-nav .atmosphere-tip {
  display: none;
}
@media (max-width: 1040px) {
  .settings-grid { grid-template-columns: 1fr; }
}
.command-palette,
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: start center;
  padding: 12vh 16px 24px;
  background: rgba(8, 16, 30, .52);
  backdrop-filter: blur(6px);
}
.command-palette[hidden],
.app-modal[hidden] {
  display: none !important;
}
.command-palette-card,
.app-modal-card {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.command-palette-header,
.app-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}
.command-palette-card .text-input {
  width: calc(100% - 32px);
  margin: 0 16px 12px;
}
.command-palette-results {
  max-height: min(48vh, 420px);
  overflow: auto;
  padding: 0 8px 12px;
}
.command-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.command-item:hover,
.command-item.active {
  background: var(--blue-soft);
  color: var(--blue);
}
.command-item small {
  color: var(--muted);
  font-size: 11px;
}
.app-modal-card {
  padding-bottom: 16px;
}
.app-modal-card > p {
  margin: 0;
  padding: 4px 18px 16px;
}
.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px;
}
.shortcuts-grid {
  display: grid;
  gap: 10px;
  padding: 4px 18px 8px;
}
.shortcuts-grid > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.shortcuts-grid span {
  margin-left: auto;
  color: var(--ink);
}
.skeleton-stack {
  display: grid;
  gap: 10px;
  padding: 8px 0;
}
.skeleton-line {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8eef5 0%, #f7fafc 45%, #e8eef5 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.skeleton-line.wide { width: 100%; }
.skeleton-line.mid { width: 72%; }
.skeleton-line.short { width: 44%; }
@keyframes skeleton-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
body.exam-focus-mode .sidebar,
body.exam-focus-mode .sidebar-scrim,
body.exam-focus-mode .studio-status,
body.exam-focus-mode .session-meter,
body.exam-focus-mode .atmosphere-tip,
body.exam-focus-mode #command-palette-button,
body.exam-focus-mode #settings-topbar-button,
body.exam-focus-mode .profile-badge {
  display: none !important;
}
body.exam-focus-mode .app-shell {
  grid-template-columns: 1fr;
}
body.exam-focus-mode .topbar {
  min-height: 58px;
}
body.exam-focus-mode .view {
  max-width: 1080px;
}
.view.active {
  animation: view-enter .28s ease both;
}
@keyframes view-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.settings-grid-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-card-span {
  grid-column: 1 / -1;
}
.theme-swatch-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.theme-swatch {
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: left;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.theme-swatch:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--blue) 55%, var(--line));
  box-shadow: var(--shadow-soft);
}
.theme-swatch.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent), var(--shadow-soft);
}
.theme-swatch-colors {
  display: flex;
  gap: 6px;
}
.theme-swatch-colors i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.theme-swatch strong {
  font-size: 14px;
}
.theme-swatch small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}
.atmosphere-tip {
  margin: 10px 2px 0;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, .18);
  color: #e8f2ff;
  display: grid;
  gap: 3px;
  flex: 0 0 auto;
}
.atmosphere-tip small {
  color: rgba(158, 196, 232, .9);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.atmosphere-tip strong {
  font-size: 11px;
  font-weight: 550;
  line-height: 1.35;
  color: rgba(244, 248, 255, .88);
}
body.rich-atmosphere::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--sky) 28%, transparent), transparent 28rem),
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 24rem),
    radial-gradient(circle at 70% 78%, color-mix(in srgb, var(--green) 18%, transparent), transparent 26rem);
  opacity: .55;
  animation: atmosphere-drift 18s ease-in-out infinite alternate;
}
body.rich-atmosphere .app-shell {
  position: relative;
  z-index: auto;
}
body.rich-atmosphere .boot-splash {
  position: fixed;
  z-index: 200;
}
@keyframes atmosphere-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1.2%, 0) scale(1.04); }
}
body.calm-mode.rich-atmosphere::before,
body.calm-mode .atmosphere-tip {
  animation: none !important;
}
body.calm-mode.rich-atmosphere::before {
  opacity: .28;
}

/* Theme packs */
html[data-theme="midnight"],
body[data-theme="midnight"] {
  color-scheme: dark;
  --paper: #0b1220;
  --surface: #121a2b;
  --surface-2: #182338;
  --ink: #e8eef8;
  --muted: #9aabc4;
  --line: #2a3a55;
  --green: #3dd6c6;
  --green-dark: #7dd3fc;
  --green-soft: #12363a;
  --coral: #fb7185;
  --coral-soft: #3a1d28;
  --gold: #f4b942;
  --gold-soft: #3a3018;
  --blue: #7dd3fc;
  --blue-soft: #173247;
  --violet: #a5b4fc;
  --violet-soft: #232845;
  --mint: #34d399;
  --orange: #fb923c;
  --orange-soft: #3a2718;
  --pink: #f472b6;
  --pink-soft: #3a1f30;
  --lime: #a3e635;
  --lime-soft: #2a3518;
  --sky: #38bdf8;
  --sky-soft: #163246;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 16px 38px rgba(0, 0, 0, 0.32);
}
html[data-theme="forest"],
body[data-theme="forest"] {
  color-scheme: dark;
  --paper: #0f1a14;
  --surface: #15241c;
  --surface-2: #1b2e24;
  --ink: #e7f5ec;
  --muted: #9bb5a6;
  --line: #2a4336;
  --green: #3dd6c6;
  --green-dark: #c6f6d5;
  --green-soft: #1a3a32;
  --coral: #f87171;
  --coral-soft: #3a2222;
  --gold: #d9f99d;
  --gold-soft: #2f3a1c;
  --blue: #5eead4;
  --blue-soft: #17352f;
  --violet: #86efac;
  --violet-soft: #1f3328;
  --mint: #4ade80;
  --orange: #fbbf24;
  --orange-soft: #3a3018;
  --pink: #fda4af;
  --pink-soft: #3a2328;
  --lime: #bef264;
  --lime-soft: #2c3818;
  --sky: #5eead4;
  --sky-soft: #16352f;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.26);
  --shadow-card: 0 16px 38px rgba(0, 0, 0, 0.3);
}
html[data-theme="ocean"],
body[data-theme="ocean"] {
  color-scheme: dark;
  --paper: #0c1924;
  --surface: #122433;
  --surface-2: #173041;
  --ink: #e6f2fa;
  --muted: #94a3b8;
  --line: #274356;
  --green: #2dd4bf;
  --green-dark: #bae6fd;
  --green-soft: #14363a;
  --coral: #fb7185;
  --coral-soft: #3a1f28;
  --gold: #fcd34d;
  --gold-soft: #3a3016;
  --blue: #38bdf8;
  --blue-soft: #15374a;
  --violet: #7dd3fc;
  --violet-soft: #1a3345;
  --mint: #34d399;
  --orange: #fdba74;
  --orange-soft: #3a2818;
  --pink: #f9a8d4;
  --pink-soft: #3a2232;
  --lime: #a3e635;
  --lime-soft: #2b3518;
  --sky: #7dd3fc;
  --sky-soft: #16384a;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.44);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 16px 38px rgba(0, 0, 0, 0.32);
}
html[data-theme="graphite"],
body[data-theme="graphite"] {
  color-scheme: dark;
  --paper: #121417;
  --surface: #1a1d22;
  --surface-2: #22262c;
  --ink: #eef0f3;
  --muted: #a1a8b3;
  --line: #333940;
  --green: #34d399;
  --green-dark: #e5e7eb;
  --green-soft: #1a3028;
  --coral: #f87171;
  --coral-soft: #3a2224;
  --gold: #fbbf24;
  --gold-soft: #3a3016;
  --blue: #93c5fd;
  --blue-soft: #1d2a3a;
  --violet: #cbd5e1;
  --violet-soft: #262b33;
  --mint: #4ade80;
  --orange: #fb923c;
  --orange-soft: #3a2718;
  --pink: #f472b6;
  --pink-soft: #3a2230;
  --lime: #a3e635;
  --lime-soft: #2b3218;
  --sky: #7dd3fc;
  --sky-soft: #1a2c38;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 16px 38px rgba(0, 0, 0, 0.34);
}
html[data-theme="dawn"],
body[data-theme="dawn"] {
  color-scheme: light;
  --paper: #eef3f8;
  --surface: #ffffff;
  --surface-2: #e4eef5;
  --ink: #123044;
  --muted: #4b6070;
  --line: #c9d9e6;
  --green: #0f766e;
  --green-dark: #115e59;
  --green-soft: #d7f3ef;
  --coral: #e11d48;
  --coral-soft: #ffe4ea;
  --gold: #0ea5e9;
  --gold-soft: #dff4ff;
  --blue: #0369a1;
  --blue-soft: #dcebff;
  --violet: #0f766e;
  --violet-soft: #ddf5f1;
  --mint: #059669;
  --orange: #ea580c;
  --orange-soft: #ffedd5;
  --pink: #db2777;
  --pink-soft: #fce7f3;
  --lime: #65a30d;
  --lime-soft: #ecfccb;
  --sky: #0284c7;
  --sky-soft: #e0f2fe;
}

body[data-theme="midnight"],
body[data-theme="forest"],
body[data-theme="ocean"],
body[data-theme="graphite"] {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--sky) 18%, transparent), transparent 30rem),
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 26rem),
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 88%, #000) 0%, var(--paper) 52%, color-mix(in srgb, var(--surface-2) 70%, var(--paper)) 100%);
  color: var(--ink);
}
body[data-theme="dawn"] {
  background:
    radial-gradient(circle at top left, rgba(14, 116, 110, .12), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(3, 105, 161, .12), transparent 26rem),
    linear-gradient(180deg, #f5f9fc 0%, var(--paper) 48%, #e8f0f6 100%);
}
body[data-theme="midnight"] .sidebar {
  background:
    radial-gradient(circle at 18% 8%, rgba(125, 211, 252, .18), transparent 17rem),
    radial-gradient(circle at 80% 88%, rgba(244, 185, 66, .12), transparent 15rem),
    linear-gradient(180deg, #10182a 0%, #0b1220 62%, #070d18 100%);
}
body[data-theme="forest"] .sidebar {
  background:
    radial-gradient(circle at 18% 8%, rgba(61, 214, 198, .2), transparent 17rem),
    radial-gradient(circle at 80% 88%, rgba(198, 246, 213, .12), transparent 15rem),
    linear-gradient(180deg, #15241c 0%, #0f1a14 62%, #0a130e 100%);
}
body[data-theme="ocean"] .sidebar {
  background:
    radial-gradient(circle at 18% 8%, rgba(56, 189, 248, .2), transparent 17rem),
    radial-gradient(circle at 80% 88%, rgba(148, 163, 184, .14), transparent 15rem),
    linear-gradient(180deg, #122433 0%, #0c1924 62%, #08131c 100%);
}
body[data-theme="graphite"] .sidebar {
  background:
    radial-gradient(circle at 18% 8%, rgba(148, 163, 184, .16), transparent 17rem),
    radial-gradient(circle at 80% 88%, rgba(251, 191, 36, .1), transparent 15rem),
    linear-gradient(180deg, #1a1d22 0%, #121417 62%, #0c0e11 100%);
}
body[data-theme="dawn"] .sidebar {
  background:
    radial-gradient(circle at 18% 8%, rgba(15, 118, 110, .22), transparent 17rem),
    radial-gradient(circle at 80% 88%, rgba(3, 105, 161, .16), transparent 15rem),
    linear-gradient(180deg, #0f3d48 0%, #0c2f3a 62%, #0a2430 100%);
}
body[data-theme="midnight"] .sidebar-bottom,
body[data-theme="forest"] .sidebar-bottom,
body[data-theme="ocean"] .sidebar-bottom,
body[data-theme="graphite"] .sidebar-bottom,
body[data-theme="dawn"] .sidebar-bottom {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .22) 55%);
  border-top-color: rgba(255, 255, 255, .07);
}
body[data-theme="midnight"] .sidebar-dock,
body[data-theme="forest"] .sidebar-dock,
body[data-theme="ocean"] .sidebar-dock,
body[data-theme="graphite"] .sidebar-dock,
body[data-theme="dawn"] .sidebar-dock {
  background: rgba(0, 0, 0, .26);
  border-color: rgba(255, 255, 255, .08);
}

body[data-theme="midnight"] .topbar,
body[data-theme="forest"] .topbar,
body[data-theme="ocean"] .topbar,
body[data-theme="graphite"] .topbar {
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
body[data-theme="midnight"] .panel,
body[data-theme="midnight"] .metric-card,
body[data-theme="midnight"] .question-panel,
body[data-theme="midnight"] .settings-card,
body[data-theme="midnight"] .daily-warmup,
body[data-theme="midnight"] .daily-warmup aside,
body[data-theme="midnight"] .warmup-stars,
body[data-theme="midnight"] .diagnostic-launch-card,
body[data-theme="midnight"] .tei-feature,
body[data-theme="midnight"] .step-card,
body[data-theme="midnight"] .included-card,
body[data-theme="midnight"] .feature-proof-card,
body[data-theme="midnight"] .tool-preview-card,
body[data-theme="midnight"] .public-about-card,
body[data-theme="midnight"] .adaptive-mode-card,
body[data-theme="midnight"] .adaptive-path-insights article,
body[data-theme="midnight"] .archive-card,
body[data-theme="midnight"] .diagnostic-question,
body[data-theme="forest"] .panel,
body[data-theme="forest"] .metric-card,
body[data-theme="forest"] .question-panel,
body[data-theme="forest"] .settings-card,
body[data-theme="forest"] .daily-warmup,
body[data-theme="forest"] .daily-warmup aside,
body[data-theme="forest"] .warmup-stars,
body[data-theme="forest"] .diagnostic-launch-card,
body[data-theme="forest"] .tei-feature,
body[data-theme="forest"] .step-card,
body[data-theme="forest"] .included-card,
body[data-theme="forest"] .feature-proof-card,
body[data-theme="forest"] .tool-preview-card,
body[data-theme="forest"] .public-about-card,
body[data-theme="forest"] .adaptive-mode-card,
body[data-theme="forest"] .adaptive-path-insights article,
body[data-theme="forest"] .archive-card,
body[data-theme="forest"] .diagnostic-question,
body[data-theme="ocean"] .panel,
body[data-theme="ocean"] .metric-card,
body[data-theme="ocean"] .question-panel,
body[data-theme="ocean"] .settings-card,
body[data-theme="ocean"] .daily-warmup,
body[data-theme="ocean"] .daily-warmup aside,
body[data-theme="ocean"] .warmup-stars,
body[data-theme="ocean"] .diagnostic-launch-card,
body[data-theme="ocean"] .tei-feature,
body[data-theme="ocean"] .step-card,
body[data-theme="ocean"] .included-card,
body[data-theme="ocean"] .feature-proof-card,
body[data-theme="ocean"] .tool-preview-card,
body[data-theme="ocean"] .public-about-card,
body[data-theme="ocean"] .adaptive-mode-card,
body[data-theme="ocean"] .adaptive-path-insights article,
body[data-theme="ocean"] .archive-card,
body[data-theme="ocean"] .diagnostic-question,
body[data-theme="graphite"] .panel,
body[data-theme="graphite"] .metric-card,
body[data-theme="graphite"] .question-panel,
body[data-theme="graphite"] .settings-card,
body[data-theme="graphite"] .daily-warmup,
body[data-theme="graphite"] .daily-warmup aside,
body[data-theme="graphite"] .warmup-stars,
body[data-theme="graphite"] .diagnostic-launch-card,
body[data-theme="graphite"] .tei-feature,
body[data-theme="graphite"] .step-card,
body[data-theme="graphite"] .included-card,
body[data-theme="graphite"] .feature-proof-card,
body[data-theme="graphite"] .tool-preview-card,
body[data-theme="graphite"] .public-about-card,
body[data-theme="graphite"] .adaptive-mode-card,
body[data-theme="graphite"] .adaptive-path-insights article,
body[data-theme="graphite"] .archive-card,
body[data-theme="graphite"] .diagnostic-question {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
body[data-theme="dawn"] .daily-warmup,
body[data-theme="dawn"] .daily-warmup aside,
body[data-theme="dawn"] .warmup-stars,
body[data-theme="dawn"] .diagnostic-launch-card,
body[data-theme="dawn"] .tei-feature,
body[data-theme="dawn"] .step-card,
body[data-theme="dawn"] .included-card,
body[data-theme="dawn"] .feature-proof-card,
body[data-theme="dawn"] .tool-preview-card,
body[data-theme="dawn"] .public-about-card {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
body[data-theme="midnight"] .settings-card,
body[data-theme="forest"] .settings-card,
body[data-theme="ocean"] .settings-card,
body[data-theme="graphite"] .settings-card,
body[data-theme="dawn"] .settings-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
body.theme-dark .daily-warmup,
body.theme-dark .diagnostic-launch-card,
body.theme-dark .tei-feature,
body.theme-dark .public-about-card,
body.theme-dark .feature-proof-card,
body.theme-dark .tool-preview-card,
body.theme-dark .step-card,
body.theme-dark .included-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
body.theme-dark .daily-warmup aside,
body.theme-dark .warmup-stars,
body.theme-dark .feature-proof-card:nth-child(3) {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}
body.theme-dark .feature-proof-card span {
  background: var(--blue-soft);
  border-color: var(--line);
  color: var(--blue);
}
body.theme-dark .tei-answer-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  color: var(--ink);
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
}
body.theme-dark .tei-answer-head > span,
body.theme-dark .tei-hotspot-button.selected,
body.theme-dark .tei-multi-option.selected,
body.theme-dark .tei-drop-slot.filled {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 50%, var(--line));
}
body.theme-dark .warmup-result.correct { color: var(--ink); }
body.theme-dark .warmup-result.incorrect { color: var(--ink); }
body.theme-dark .star-rating .filled,
body.theme-dark .star-button:hover,
body.theme-dark .star-button:focus-visible,
body.theme-dark .star-button.filled {
  color: var(--gold);
}
body.theme-dark .exam-tool-strip {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, white), var(--surface-2));
  border-color: var(--line);
}
body.theme-dark .exam-tool-group,
body.theme-dark .exam-tool-button,
body.theme-dark .highlight-swatch,
body.theme-dark .exam-tool-button.compact {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}
body.theme-dark .exam-tool-button.active,
body.theme-dark .highlight-swatch.active {
  background: linear-gradient(180deg, var(--blue), color-mix(in srgb, var(--blue) 62%, #020617));
  color: #ffffff;
}
body.theme-dark .study-notepad { background: #ffffff; color: #111827; }
body[data-theme="midnight"] .choice,
body[data-theme="midnight"] .select,
body[data-theme="midnight"] .text-input,
body[data-theme="midnight"] .icon-button,
body[data-theme="midnight"] .search-box,
body[data-theme="midnight"] .profile-badge,
body[data-theme="midnight"] .settings-toggle,
body[data-theme="midnight"] .toc-item,
body[data-theme="midnight"] .question-number,
body[data-theme="midnight"] .diagnostic-choice,
body[data-theme="midnight"] .tei-select,
body[data-theme="midnight"] .tei-hotspot-button,
body[data-theme="midnight"] .tei-multi-option,
body[data-theme="midnight"] .tei-chip,
body[data-theme="midnight"] .tei-drop-slot,
body[data-theme="midnight"] .adaptive-picker-row select,
body[data-theme="midnight"] .adaptive-priority-list span,
body[data-theme="forest"] .choice,
body[data-theme="forest"] .select,
body[data-theme="forest"] .text-input,
body[data-theme="forest"] .icon-button,
body[data-theme="forest"] .search-box,
body[data-theme="forest"] .profile-badge,
body[data-theme="forest"] .settings-toggle,
body[data-theme="forest"] .toc-item,
body[data-theme="forest"] .question-number,
body[data-theme="forest"] .diagnostic-choice,
body[data-theme="forest"] .tei-select,
body[data-theme="forest"] .tei-hotspot-button,
body[data-theme="forest"] .tei-multi-option,
body[data-theme="forest"] .tei-chip,
body[data-theme="forest"] .tei-drop-slot,
body[data-theme="forest"] .adaptive-picker-row select,
body[data-theme="forest"] .adaptive-priority-list span,
body[data-theme="ocean"] .choice,
body[data-theme="ocean"] .select,
body[data-theme="ocean"] .text-input,
body[data-theme="ocean"] .icon-button,
body[data-theme="ocean"] .search-box,
body[data-theme="ocean"] .profile-badge,
body[data-theme="ocean"] .settings-toggle,
body[data-theme="ocean"] .toc-item,
body[data-theme="ocean"] .question-number,
body[data-theme="ocean"] .diagnostic-choice,
body[data-theme="ocean"] .tei-select,
body[data-theme="ocean"] .tei-hotspot-button,
body[data-theme="ocean"] .tei-multi-option,
body[data-theme="ocean"] .tei-chip,
body[data-theme="ocean"] .tei-drop-slot,
body[data-theme="ocean"] .adaptive-picker-row select,
body[data-theme="ocean"] .adaptive-priority-list span,
body[data-theme="graphite"] .choice,
body[data-theme="graphite"] .select,
body[data-theme="graphite"] .text-input,
body[data-theme="graphite"] .icon-button,
body[data-theme="graphite"] .search-box,
body[data-theme="graphite"] .profile-badge,
body[data-theme="graphite"] .settings-toggle,
body[data-theme="graphite"] .toc-item,
body[data-theme="graphite"] .question-number,
body[data-theme="graphite"] .diagnostic-choice,
body[data-theme="graphite"] .tei-select,
body[data-theme="graphite"] .tei-hotspot-button,
body[data-theme="graphite"] .tei-multi-option,
body[data-theme="graphite"] .tei-chip,
body[data-theme="graphite"] .tei-drop-slot,
body[data-theme="graphite"] .adaptive-picker-row select,
body[data-theme="graphite"] .adaptive-priority-list span {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}
body[data-theme="midnight"] .command-palette-card,
body[data-theme="midnight"] .app-modal-card,
body[data-theme="forest"] .command-palette-card,
body[data-theme="forest"] .app-modal-card,
body[data-theme="ocean"] .command-palette-card,
body[data-theme="ocean"] .app-modal-card,
body[data-theme="graphite"] .command-palette-card,
body[data-theme="graphite"] .app-modal-card {
  background: color-mix(in srgb, var(--surface) 94%, #000);
  color: var(--ink);
}
body[data-theme="midnight"] .next-best,
body[data-theme="forest"] .next-best,
body[data-theme="ocean"] .next-best,
body[data-theme="graphite"] .next-best {
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--green) 18%, transparent), transparent 40%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
}
body[data-theme="midnight"] .continue-ribbon,
body[data-theme="forest"] .continue-ribbon,
body[data-theme="ocean"] .continue-ribbon,
body[data-theme="graphite"] .continue-ribbon {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}
body[data-theme="midnight"] .metric-card:nth-child(3) strong,
body[data-theme="forest"] .metric-card:nth-child(3) strong,
body[data-theme="ocean"] .metric-card:nth-child(3) strong,
body[data-theme="graphite"] .metric-card:nth-child(3) strong {
  color: var(--gold);
}
body[data-theme="midnight"] .skeleton-line,
body[data-theme="forest"] .skeleton-line,
body[data-theme="ocean"] .skeleton-line,
body[data-theme="graphite"] .skeleton-line {
  background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface) 80%, #fff) 45%, var(--surface-2) 100%);
  background-size: 200% 100%;
}
body[data-theme="midnight"] .parent-snapshot,
body[data-theme="forest"] .parent-snapshot,
body[data-theme="ocean"] .parent-snapshot,
body[data-theme="graphite"] .parent-snapshot {
  background: var(--surface-2);
  color: var(--ink);
}
body[data-theme="midnight"] .adaptive-learning-layout .question-panel.is-bridge,
body[data-theme="forest"] .adaptive-learning-layout .question-panel.is-bridge,
body[data-theme="ocean"] .adaptive-learning-layout .question-panel.is-bridge,
body[data-theme="graphite"] .adaptive-learning-layout .question-panel.is-bridge {
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--green-soft) 55%, var(--surface)));
}
@media (max-width: 1040px) {
  .theme-swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .theme-swatch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  main,
  .view,
  .page-heading,
  .settings-grid,
  .settings-grid-wide,
  .settings-card,
  .settings-card-span {
    min-width: 0;
    max-width: 100%;
  }
  .settings-grid,
  .settings-grid-wide {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: hidden;
  }
  .settings-card-span {
    grid-column: auto !important;
  }
  .settings-card {
    padding: 16px;
    border-radius: 16px;
  }
  .settings-card h2 {
    font-size: 20px;
  }
  .settings-toggle {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
  }
  .settings-toggle span,
  .settings-toggle small {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .settings-toggle input {
    flex: 0 0 auto;
    margin-top: 3px;
  }
  .settings-option,
  .settings-option label {
    min-width: 0;
  }
  .settings-actions .button {
    width: 100%;
    justify-content: center;
  }
  .topbar {
    gap: 8px;
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }
  .mobile-menu,
  .icon-button {
    flex: 0 0 44px;
  }
  .search-box {
    flex: 1 1 44px;
    min-width: 44px;
    max-width: 48vw;
  }
}
@media (max-width: 430px) {
  .view {
    padding-inline: 12px;
  }
  .topbar-context {
    flex: 1 1 auto;
    min-width: 0;
  }
  .topbar-context strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .search-box {
    flex: 0 0 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .search-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
  .settings-card {
    padding: 14px;
  }
  .settings-toggle {
    border-radius: 14px;
  }
  .settings-toggle span {
    font-size: 15px;
  }
  .settings-toggle small {
    font-size: 12px;
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .boot-splash-mark,
  .boot-splash-title,
  .boot-progress,
  .view.active {
    animation: none !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .boot-splash,
  .network-banner,
  .toast,
  .scroll-progress,
  .session-meter,
  .atmosphere-tip,
  .command-palette,
  .app-modal,
  .sidebar-scrim,
  .mobile-menu,
  .hero-actions,
  .exam-status .button,
  .question-actions,
  [data-install-app] {
    display: none !important;
  }
  .app-shell,
  body.exam-focus-mode .app-shell {
    display: block;
  }
  .view {
    display: block !important;
    padding: 0;
    max-width: none;
  }
  .panel,
  .question-panel,
  .dashboard-hero {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* Timed adaptive practice */
.adaptive-practice-test-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  margin-block: 1rem 1.75rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}
.adaptive-practice-test-card > div:first-child { flex: 1 1 24rem; }
.adaptive-practice-test-card h2, .adaptive-practice-test-card p { margin: 0 0 .4rem; }
.adaptive-practice-test-card .test-actions, .adaptive-test-actions { flex-wrap: wrap; gap: .65rem; }
.book-tests-heading { margin-block: 1.5rem .65rem; }
.adaptive-test-question { margin-block: 1rem; }
.adaptive-test-actions { align-items: center; }
.adaptive-test-actions p { flex: 1 1 14rem; margin: 0; }
.adaptive-test-coverage { margin-block: 1rem; padding: 1rem; }
.adaptive-test-coverage summary, .adaptive-test-review-item summary { cursor: pointer; font-weight: 700; padding-block: .4rem; }
.adaptive-test-coverage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem; padding-top: .6rem; }
.adaptive-test-coverage-grid h3 { margin: 0 0 .4rem; font-size: 1rem; }
.adaptive-test-coverage-grid ul { list-style: none; padding: 0; margin: 0; }
.adaptive-test-coverage-grid li { display: flex; gap: .5rem; justify-content: space-between; padding: .35rem 0; }
.adaptive-test-coverage-grid li strong { flex: none; }
.adaptive-test-review-item { padding: .5rem 1rem; }
