:root {
  --study-ink:#111f38;
  --study-muted:#4d5d75;
  --study-paper:#fbfcff;
  --study-line:#dce3ef;
  --study-accent:#2459cf;
  --study-deep:#1b3c80;
  --study-soft:#ecf3ff;
}

.study-home-shell .workspace,
.workspace:has([data-screen=practice],.focused-session,.study-report) { background:var(--study-paper); }

.study-home-title {
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:space-between;
  gap:8px 16px;
  margin-bottom:16px;
  color:var(--study-ink);
}
.study-home-title h1 { font-size:clamp(1.85rem,3vw,2.3rem); line-height:1.45; font-weight:850; }
.study-home-title span { color:var(--study-muted); font-size:.83rem; }
.study-home-shell .topbar .top-actions .track-select {
  display:inline-flex;
  background:#edf3ff;
  border-color:#e0eaff;
  color:#284b8e;
}

.study-home-shell .home-layout {
  grid-template-areas:"mission immediate" "budget budget" var(--final-row,) "agenda next" "recovery recovery" var(--journey-row,) "subjects weekly" "statistics weekly" "tools tools";
}
.study-home-hero.today-hero {
  display:block;
  padding:0;
  border:0;
  border-radius:14px;
  background:var(--study-deep);
  color:#fff;
  isolation:isolate;
}
.study-home-hero.today-hero::before,.study-home-hero.today-hero::after {
  content:"";
  position:absolute;
  z-index:-1;
  inset-block-start:-112px;
  inset-inline-end:-110px;
  width:285px;
  aspect-ratio:1;
  border:1px solid #ffffff2c;
  border-radius:50%;
  pointer-events:none;
}
.study-home-hero.today-hero::after { inset-block-start:-137px; inset-inline-end:-135px; width:335px; }
.study-home-hero .hero-copy { padding:clamp(19px,3vw,28px); }
.study-home-hero .hero-label { display:block; color:#dbe6ff; }
.study-home-hero h2 { color:#fff; line-height:1.5; font-size:clamp(1.56rem,3.2vw,2.16rem); font-weight:800; }
.study-home-hero p { color:#e5eeff; font-size:.89rem; margin-bottom:14px; }
.study-home-hero :is(.question-steps,.meter) { width:min(100%,165px); margin:0; }
.study-home-hero :is(.question-steps i,.meter) { background:#7391c883; }
.study-home-hero .question-steps :is(.past,.current),.study-home-hero .meter span { background:#c8dbff; }
.study-home-hero .hero-actions { margin-top:14px; }
.study-home-hero .hero-actions .btn.primary {
  display:flex;
  flex-direction:row-reverse;
  justify-content:space-between;
  width:100%;
  min-height:48px;
  padding:9px 14px;
  background:#fff;
  color:#1a3d86;
  border-radius:8px;
  font-size:.9rem;
}
.study-home-hero .hero-actions .btn.primary:hover { background:#eaf2ff; }
.home-review { grid-area:immediate; color:var(--study-ink); }
.home-review h2 { font-size:1.05rem; margin:0 0 7px; }
.home-review-list { border-block-start:1px solid var(--study-line); }
.home-review .task-row {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:64px;
  padding:6px 0;
  border-block-end:1px solid var(--study-line);
}
.home-review .task-row div { flex:1; min-width:0; }
.home-review .task-row b { font-size:.88rem; }
.home-review .task-row small { font-size:.77rem; color:var(--study-muted); }
.home-review .tile { background:#e9f0ff; color:#3156a0; border-radius:9px; }
.home-review .task-row>.icon { color:#48649a; }
.home-web-wait { padding-block:8px 0; }
.home-budget.today-budget {
  grid-area:budget;
  display:flex;
  color:var(--study-muted);
  margin:0;
  justify-content:flex-start;
}
.home-budget .btn { margin-inline-start:auto; }
.study-home-shell .home-layout .weekly-record { background:transparent; border:1px solid var(--study-line); }
.study-home-shell .weekly-record .activity-day i { height:33px; border-color:var(--study-line); }
.study-home-shell .weekly-record .activity-day.done i { background:#e4efff; box-shadow:none; }
.study-home-shell .weekly-record .activity-day.is-today i { background:#2459cf; border-color:#2459cf; }
.app-more-menu section { display:grid; }
.app-more-menu h3 { font-size:.91rem; margin-block:8px 3px; }
.app-more-menu section .btn { justify-content:flex-start; border-block-end:1px solid var(--study-line); border-radius:0; }

.focused-session,.study-report { color:var(--study-ink); }
.focused-session { max-width:760px; display:flex; flex-direction:column; gap:13px; }
.study-report.report-book { max-width:810px; margin-inline:auto; }
.focused-session .session-mast,.study-report .session-mast {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:9px;
  min-height:63px;
  border-color:var(--study-line);
  padding-block:0 8px;
}
:is(.focused-session,.study-report) .session-exit {
  justify-content:center;
  width:44px;
  height:44px;
  border:1px solid var(--study-line);
  border-radius:9px;
  background:#fff;
  color:var(--study-ink);
}
.session-context { min-width:0; display:grid; gap:2px; font-size:.89rem; overflow-wrap:anywhere; }
.session-context span { color:var(--study-muted); font-size:.77rem; }
.session-status { display:grid; justify-items:end; color:#345380; font-size:.78rem; }
.session-status .btn { min-height:42px; margin-block:-3px -5px; padding:5px 1px; font-size:.75rem; border:0; }
.session-status .time { display:flex; align-items:center; gap:4px; font-variant-numeric:tabular-nums; }
.session-status .time .icon { width:13px; height:13px; }
.focused-session .question-steps { margin:1px 0 5px; gap:5px; }
.focused-session .question-steps i { height:5px; background:#e2e8f4; }
.focused-session .question-steps .past { background:#6f91db; }
.focused-session .question-steps .current { background:var(--study-accent); }
.focused-session .question {
  margin:0;
  padding:0;
  border:0;
  background:transparent;
}
.focused-session .question h1 {
  margin:8px 0 16px;
  font-size:clamp(1.27rem,2.25vw,1.72rem);
  font-weight:795;
  line-height:1.65;
}
.focused-session .question-source { color:#3f5680; font-size:.77rem; margin-top:0; }
.focused-session .option {
  min-height:54px;
  padding:8px 10px;
  background:#fff;
  border:1px solid #d2ddeb;
  box-shadow:none;
  border-radius:9px;
  line-height:1.72;
  font-size:.92rem;
  font-weight:540;
}
.focused-session .option b { display:grid; place-items:center; width:33px; height:33px; flex:none; background:#eef3fb; color:#284a8e; border-radius:7px; }
.focused-session .option.selected { border-color:#5482dd; background:#eef3ff; box-shadow:none; }
.focused-session .option.selected b { color:#fff; background:#2459cf; }
.focused-session .option.good { border-color:#8ebfaa; background:#edf8f2; opacity:1; }
.focused-session .option.bad { border-color:#d99b95; background:#fdf1ef; opacity:1; }
.focused-session .session-details { margin-block:12px 0; }
.focused-session .session-details .question-trust { padding:4px 0; margin:0; border-width:0 0 1px; border-radius:0; background:transparent; }
.focused-session .session-details .question-trust summary { min-height:40px; }
.focused-session .answer-confidence summary { min-height:42px; padding-block:6px; cursor:pointer; color:var(--study-muted); font-size:.83rem; }
.focused-session label.confidence { align-items:center; margin:4px 0 0; }
.focused-session .session-details .question-trust summary span { font-weight:520; }
.focused-session .confidence select { min-height:42px; }
.focused-session .focus-actions {
  position:sticky;
  bottom:0;
  z-index:2;
  display:flex;
  gap:8px;
  padding:10px 0;
  border-block-start:1px solid var(--study-line);
  background:var(--study-paper);
  margin-block-start:auto;
}
.focus-actions .btn.primary,.report-next .btn.primary,.practice-launchers .btn.primary {
  min-height:48px;
  background:var(--study-accent);
  color:#fff;
  border-radius:8px;
}
.focus-actions .btn.primary { flex:1; }
.focus-actions .btn.primary:hover,.report-next .btn.primary:hover,.practice-launchers .btn.primary:hover { background:#194bb9; }
.study-report h1 { margin:17px 0 14px; font-size:clamp(1.62rem,3vw,2.1rem); font-weight:850; }
.study-report .score-sheet { background:#edf4ff; color:var(--study-ink); border-block-start:3px solid #2a5bc4; border-radius:0 0 12px 12px; }
.score-caption { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:3px 10px; color:var(--study-muted); font-size:.82rem; }
.study-report .score-lead strong { color:#183f90; font-size:clamp(2.2rem,5.8vw,3rem); font-weight:855; line-height:1.3; }
.study-report .result-strip { margin:10px 0; gap:0; background:#d5dfef; border-radius:6px; }
.study-report .result-strip .correct { background:#34795b; }
.study-report .result-strip .wrong { background:#b45249; }
.study-report .result-strip .skipped { background:#8ca6ca; }
.study-report .result-strip .unseen { background:#d1dbea; }
.study-report .result-metrics { display:flex; align-items:baseline; gap:5px 14px; justify-content:space-between; }
.study-report .result-metrics .metric { display:flex; align-items:baseline; gap:4px; min-width:0; background:transparent; color:#4d5d75; }
.study-report .result-metrics .metric.correct { color:#206247; }
.study-report .result-metrics .metric.wrong { color:#943934; }
.study-report .result-metrics .metric strong { font-size:.95rem; }
.study-report .result-metrics .metric p { color:inherit; font-size:.78rem; }
.report-next { margin:22px 0 16px; }
.report-next h2 { font-size:1.08rem; margin-bottom:5px; }
.report-next p { color:var(--study-muted); font-size:.87rem; margin-bottom:11px; }
.report-next .btn { width:100%; display:flex; flex-direction:row-reverse; justify-content:space-between; }
.report-time { border-block:1px solid var(--study-line); }
.report-time>summary { min-height:48px; padding-block:9px; cursor:pointer; font-size:.92rem; color:#2b4f89; }
.report-time .pace-report { margin-block-start:0; }

@media(max-width:850px) {
  .study-home-shell .home-layout { gap:16px; }
  .study-home-shell .home-review { order:0; }
  .study-home-shell .weekly-record { order:0; }
  .study-home-shell .home-budget,.study-home-shell .home-layout>.today-desk,
  .study-home-shell .home-layout>.final-today,.study-home-shell .desk-shortcuts,.study-home-shell .journey-hint { order:1; }
}
@media(max-width:800px) {
  .study-home-shell .top-actions>a.iconbtn,.study-home-shell .top-actions>button { display:none; }
  .study-home-shell .topbar .top-actions .track-select { min-height:44px; }
  .bottom-nav { grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding:4px 10px max(5px,env(safe-area-inset-bottom)); }
  .bottom-nav :is(a,button) {
    display:grid;
    place-items:center;
    align-content:center;
    gap:1px;
    min-height:51px;
    border:0;
    border-radius:8px;
    background:#fff;
    color:var(--study-muted);
    font-size:.75rem;
    font-weight:670;
    padding:2px;
  }
  .bottom-nav a.active { color:#214fae; background:#edf3ff; box-shadow:none; }
  .shell:has(.focused-session,.study-report) .topbar { display:none; }
  [data-screen=result]:has(.study-report) { padding-block-start:0; }
  [data-screen=session]:has(.focused-session) { padding:0 0; }
  .focused-session { min-height:100dvh; padding:0 18px; margin:0 auto; }
  .focused-session .session-mast,.study-report .session-mast { padding-block:5px; }
  .focused-session .focus-actions {
    margin-inline:-18px;
    padding:9px 18px max(9px,env(safe-area-inset-bottom));
    background:#fff;
  }
  .study-report .session-mast { min-height:65px; }
  .study-report .result-metrics { column-gap:9px; }
  .study-report .result-metrics:has(.unseen) { display:grid; grid-template-columns:1fr 1fr; }
}
@media(max-width:365px) {
  .focused-session { padding-inline:14px; }
  .focused-session .focus-actions { margin-inline:-14px; padding-inline:14px; }
}

/* Notebook and mastery use the same reading surfaces as the study report. */
.workspace:has(.notebook,.progress-atlas) { background:var(--study-paper); color:var(--study-ink); }
:is(.notebook,.progress-atlas) .page-heading h1 { font-size:clamp(1.65rem,3vw,2.1rem); color:var(--study-ink); }
:is(.notebook,.progress-atlas) .journal-nav { border-color:var(--study-line); }
:is(.notebook,.progress-atlas) .journal-nav [aria-current] { color:var(--study-accent); box-shadow:inset 0 -3px var(--study-accent); }
.notebook .review-agenda,.progress-atlas .atlas-overview {
  background:#edf4ff;
  color:var(--study-ink);
  border:0;
  border-block-start:3px solid #2a5bc4;
  border-radius:0 0 12px 12px;
}
.notebook .review-agenda strong,.progress-atlas .score-lead strong { color:#183f90; }
.notebook .review-agenda footer { border-color:#cfdcf0; }
.notebook .exam-btn:not(.exam-secondary),.progress-atlas .btn.primary { background:#2459cf; border-color:#2459cf; color:white; }
.notebook .exam-secondary,.progress-atlas .btn.secondary { background:#fff; color:#1c448c; border-color:#c9d8f2; }
.notebook .chip,.progress-atlas .btn { border-radius:8px; }
.notebook .notebook-entry,.progress-atlas .map-subject,.progress-atlas .topic-entry { border-color:var(--study-line); }
.notebook .mistake-rows,.progress-atlas .subject-index,.progress-atlas .topic-index { border-color:var(--study-line); }
.notebook .notebook-entry summary strong { color:var(--study-ink); font-weight:650; }
.notebook .notebook-retry { color:#2459cf; text-decoration:none; }
.notebook .notebook-filters { border-color:#cddbf0; border-radius:9px; }
.progress-atlas .atlas-overview .steady { background:#34795b; }
.progress-atlas .atlas-overview .review { background:#b45249; }
.progress-atlas .atlas-overview .sample { background:#6b8bca; }
.progress-atlas .atlas-overview .new { background:#cbd8eb; }
.progress-atlas .subject-reading .meter>span,.progress-atlas .topic-entry .meter>span { background:#2459cf; }
.progress-atlas .topic-entry h3 a { color:#173773; text-decoration:none; }
.progress-atlas .map-subject:hover,.notebook .notebook-entry:hover { background:#f1f5fd; }
.progress-atlas .map-subject .subject-logo { background:#eaf1ff; color:#3156a0; border-radius:9px; }
@media(max-width:800px) {
  :is(.notebook,.progress-atlas) .app-cover-heading { margin-bottom:16px; border-radius:12px; }
  :is(.notebook,.progress-atlas) .journal-nav { margin-bottom:14px; }
  :is(.notebook,.progress-atlas) .subject-index { grid-template-columns:minmax(0,1fr); }
}

/* Shared surfaces across the learning workspace. */
.workspace {
  --ink:#111f38;
  --muted:#4d5d75;
  --brand:#2459cf;
  --brand-dark:#1b3c80;
  --line:#dce3ef;
  --sky:#edf3ff;
  background:#fbfcff;
  color:#111f38;
}
.workspace main { min-width:0; }
.workspace .page-heading h1 { color:#111f38; line-height:1.45; }
.workspace .page-heading p,.workspace small { color:#4d5d75; }
.workspace .panel,.workspace .exam-box { border-color:#dce3ef; border-radius:12px; box-shadow:none; }
.workspace .btn,.workspace .chip,.workspace .exam-btn { border-radius:9px; min-height:44px; }
.workspace .btn.primary,.workspace .exam-btn:not(.exam-secondary) { background:#2459cf; color:#fff; border-color:#2459cf; }
.workspace .btn.primary:hover,.workspace .exam-btn:not(.exam-secondary):hover { background:#194bb9; }
.workspace .btn.secondary,.workspace .exam-btn.exam-secondary { background:#fff; color:#1c448c; border-color:#c9d8f2; }
.workspace .chip.active { background:#eaf1ff; color:#214fae; border-color:#bcd0f4; }
.workspace .meter>span { background:#2459cf; }
.workspace .app-cover-heading { background:#f0f5ff; border-color:#dce3ef; border-radius:12px; }
.workspace .task-row[href]:hover,.workspace .subject:hover { background:#f1f5fd; color:#1b3c80; }
.workspace :is(.linklist,.pack-grid,.path-grid,.subject-grid) { min-width:0; }
.workspace :is(input,select,textarea) { max-width:100%; }
.workspace .business-school { --bs-blue:#2459cf; --bs-soft:#edf4ff; color:#111f38; }
.workspace .business-school :is(.bs-card,.bs-template,.bs-concept-visual,.bs-concept-grid details,.bs-directory-cover,.bs-article-art) { border-radius:12px; }
@media(max-width:800px) {
  .workspace .page-heading { align-items:start; gap:10px; }
  .workspace .page-heading > div { min-width:0; }
  .workspace .page-heading h1 { overflow-wrap:anywhere; }
  .workspace :is(.form,.reader,.coach,.book-details) { min-width:0; }
  .workspace :is(.wrap,.filters) { gap:7px; }
}
@media(max-width:480px) {
  .effort-page .effort-bars { grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; }
  .effort-page .effort-bars>button { min-width:0; padding-inline:0; font-size:.68rem; }
  .effort-page .effort-bars small { font-size:.65rem; }
}
