/* Calm study theme. Loaded after component styles so shared surfaces stay consistent. */
:root {
  --ink-3: #657084;
  --edge-a: var(--line);
  --edge-b: var(--line-2);
  --link: #0a6e98;
  --nav-soft: #e7f6fc;
  --action: #1aa3d6;
  --action-hover: #1f6fd1;
  --control-line: #8491a3;
  --action-good: #258653;
  --action-bad: #c53c50;
  --glow: var(--shadow-2);
  --glow-soft: var(--shadow-1);
}
:root[data-theme="night"] {
  --ink-3: #98a7bc;
  --edge-a: var(--line);
  --edge-b: var(--line-2);
  --link: #38d6ff;
  --nav-soft: #0f2d42;
  --action: #1f8fd6;
  --action-hover: #1f6fd1;
  --control-line: #69798f;
  --glow: var(--shadow-2);
  --glow-soft: var(--shadow-1);
}

/* Navigation and secondary controls recede; one strong action leads each section. */
a { color:var(--link); }
h2, h3, h4 { font-family:var(--ui); line-height:1.3; }
.btn { min-height:40px; font-family:var(--ui); text-transform:none; box-shadow:none; }
.btn.primary { color:#fff; box-shadow:var(--shadow-1); }
.btn.primary:hover { box-shadow:var(--shadow-1); filter:none; }
.btn.big { min-height:46px; }
.tabs a, .home-tabs a { text-transform:none; }
.rail a[aria-current="page"] svg { color:var(--link); background:var(--nav-soft); box-shadow:none; }
.theme-seg button[aria-pressed="true"], .gl-set .seg-a[aria-current="page"] { background:var(--nav-soft); color:var(--link); box-shadow:none; }
.page-head .subnav a[aria-current="page"] { background:var(--nav-soft); color:var(--link); box-shadow:none; }
.page-head .subnav a[aria-current="page"] .ico { color:currentColor; }

/* Headers provide orientation without competing with the lesson. */
.page-head { background:var(--surface); border-color:var(--line); box-shadow:none; animation:none; margin-bottom:26px; }
.page-head::before { content:none; }
.ph-grid { padding:22px 24px; row-gap:10px; }
.page-head h1 { line-height:1.18; }
.page-head .ph-lede > * { line-height:1.6; }
.ph-ico, .mv-guide-icon { background:var(--nav-soft); color:var(--link); box-shadow:none; }
.ph-filters { row-gap:12px; }
/* Neutral elevation keeps card edges separate from action and feedback colours. */
.card { box-shadow:var(--shadow-1); }
.card, .account-card, .card.pad:not(.danger-zone) { border-color:var(--line); }
.account-card { box-shadow:var(--shadow-1); }
.account-card::before, .card.pad:not(.danger-zone)::before { content:none; }
.card.pad:not(.danger-zone, .empty-state, .vcard, .sun) { box-shadow:var(--shadow-1); }
.mod-card.current { border-color:var(--link); box-shadow:none; }
.mod-card:hover:not([disabled]) { border-color:var(--orange); box-shadow:var(--shadow-1); transform:none; }
.mod-code { background:var(--nav-soft); color:var(--link); box-shadow:none; }
.mod-card:hover .mod-code, .mod-card:focus-visible .mod-code { animation:none; }

/* Longer passages have a comfortable measure, generous leading, and stable contrast. */
.concept .body, .brief .body { max-width:74ch; font-size:18px; line-height:1.8; }
.concept .body p, .brief .body p { margin-bottom:1em; }
.brief .body > p:first-child { font:600 1.1rem/1.7 var(--ui); margin-bottom:1.2em; }
.brief .body li { margin-bottom:.5em; }
.brief-head { margin-bottom:18px; gap:18px; }
.brief.learned { opacity:1; }
.src { color:var(--link); line-height:1.6; }
.stem { font:500 1.25rem/1.65 var(--ui); max-width:72ch; }
.choice { padding:16px 18px; line-height:1.6; }
.choice .letter { font-family:var(--ui); }
.explain { padding:22px; line-height:1.75; }
.review-q { line-height:1.65; }
.fc-q, .fc-ghost, .fc-ans { box-shadow:none; }
.fc-q .q { font:600 clamp(1.25rem,1.8vw,1.65rem)/1.5 var(--ui); }
.fc-q::after { height:2px; background:var(--line); }
.fc-ghost { border:1px dashed var(--line); background:var(--surface); }
.fc-stage:hover .fc-ghost { border-color:var(--link); background:var(--surface-2); }
.fc-ans { border:1px solid var(--line); font-size:18px; line-height:1.75; }
.revealed .fc-ans, .revealed .fc-body > *, .grade-row:not(.hidden) { animation:none; }
.revealed .fc-q { opacity:1; transform:none; }
.fc-lines i { background:var(--line); animation:none; filter:none; }
.learn-nav a { font-family:var(--ui); font-size:.94rem; line-height:1.5; }
.learn-nav-h, .learn-nav-h span { font-family:var(--ui); }
.mv-item.current { background:var(--nav-soft); color:var(--link); box-shadow:inset 2px 0 var(--link); }
:root[data-theme="night"] .choice.right .letter,
:root[data-theme="night"] .choice.wrong .letter { color:var(--canvas); }
.fc-body { max-width:68ch; }
.fc-q .meta, .fc-ghost .meta, .fc-ans .meta { color:var(--ink-2); font-weight:500; }
.glossary-grid .gl-entry .def { font-size:17px; line-height:1.75; }
.mv-standards, .mv-settings { line-height:1.7; }

/* Dashboard personality: a broad, quiet dawn wash from the lower left. */
.today-sky { background:radial-gradient(ellipse var(--route-wash-width,32%) var(--route-wash-height,48%) at 0% 100%,color-mix(in srgb,var(--action) 10%,var(--surface)) 0%,transparent 100%),linear-gradient(155deg,var(--surface-2),var(--surface) 75%); border-color:var(--line); box-shadow:none; }
:root[data-theme="night"] .today-sky { background:radial-gradient(ellipse var(--route-wash-width,32%) var(--route-wash-height,48%) at 0% 100%,color-mix(in srgb,var(--action) 15%,var(--surface)) 0%,transparent 100%),linear-gradient(155deg,var(--surface-2),var(--surface) 75%); }
.today-sky::before { content:none; }
.today-sky h1 { font-family:var(--display); line-height:1.16; }
.today-sky .greet { letter-spacing:.02em; }
.today-session .btn.primary { box-shadow:var(--shadow-1); }
.today-session .btn.primary:hover { filter:none; }
.today-trail-head { padding-top:10px; }
.today-status { background:color-mix(in srgb,var(--surface) 88%,transparent); }
.today-status-item b { font-family:var(--ui); font-size:1rem; }
.page-report .report-open { border-color:transparent; background:transparent; box-shadow:none; font-size:.82rem; }
.page-report .report-open:hover { color:var(--link); border-color:var(--line); background:var(--surface); }
@media(max-width:600px) {
  .ph-grid { padding:18px; }
  .concept .body, .brief .body { font-size:17px; line-height:1.75; }
  .explain { padding:18px; }
}

/* Tool modes are navigation, distinct from primary actions and quiz feedback. */
#toolMount .page-head .tabs { display:flex; flex-wrap:wrap; gap:4px; margin:0 !important; padding:4px; border:1px solid var(--line); border-radius:11px; background:var(--canvas); }
#toolMount .page-head .tabs a { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:0 13px; margin:0; border:0; border-radius:8px; color:var(--ink-2); background:none; box-shadow:none; font:600 .82rem var(--ui); text-transform:none; }
#toolMount .page-head .tabs a[aria-current="page"] { background:var(--nav-soft); color:var(--link); box-shadow:none; }
#toolMount .page-head .vs-head { margin:0; gap:12px; }

/* Practice navigation follows reading direction: leave on the left, advance on the right. */
.practice-run-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; }
.practice-run-actions .practice-next { margin:0 0 0 auto; }
.practice-run-actions .practice-exit { color:var(--bad); background:var(--bad-soft); border-color:color-mix(in srgb,var(--bad) 30%,var(--line)); }
.practice-run-actions .practice-exit:hover { border-color:var(--bad); background:color-mix(in srgb,var(--bad) 12%,var(--surface)); }
.practice-answer-hint { text-align:right; }
@media(max-width:420px) { .practice-run-actions { gap:8px; } .practice-run-actions .btn { padding:0 10px; font-size:.8rem; } }

/* Acronyms share the glossary's sticky navigation, card rhythm, and reading measure. */
.acronym-card-head { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.acronym-card-head .chip { font-size:.7rem; }
.acronym-alias { margin:0; font-size:.78rem; }
.acronyms-page .glossary-grid .gl-entry .def { font-size:17px; line-height:1.75; }

/* One study entry point contains module selection, guided work, and independent activities. */
.study-hub-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:6px 0 18px; }
.study-hub-bar > div { display:flex; align-items:baseline; flex-wrap:wrap; gap:12px; }
.study-hub-bar .eyebrow { margin:0; }
.study-hub-module { font:600 .9rem var(--ui); }
.study-module-picker { position:relative; flex:none; }
.study-module-picker > summary { list-style:none; cursor:pointer; border:1px solid var(--line); border-radius:9px; padding:9px 14px; background:var(--surface); color:var(--link); font-size:.82rem; }
.study-module-picker > summary::-webkit-details-marker { display:none; }
.study-module-picker > summary::after { content:' \25be'; }
.study-module-options { position:absolute; top:calc(100% + 8px); right:0; z-index:30; padding:8px; width:min(370px,calc(100vw - 40px)); max-height:70dvh; overflow:auto; box-shadow:var(--shadow-2); }
.study-module-options form { margin:0; }
.study-module-options button { display:flex; align-items:baseline; width:100%; gap:10px; border:0; border-radius:7px; padding:11px; text-align:left; background:none; color:var(--ink-2); cursor:pointer; font:400 .82rem var(--ui); }
.study-module-options button b { min-width:30px; color:var(--ink); }
.study-module-options button small { margin-left:auto; }
.study-module-options button:hover,.study-module-options button[aria-current=page] { background:var(--nav-soft); color:var(--link); }
.study-module-options > a { display:block; padding:12px 10px 6px; border-top:1px solid var(--line); font-size:.76rem; }
.study-hub-modes { margin:26px 0; }
.study-hub-modes-heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px 18px; margin-bottom:14px; }
.study-hub-modes-heading h2 { font-size:1.12rem; margin:0; }
.study-hub-modes-heading p { color:var(--ink-2); font-size:.82rem; margin:0; }
.study-hub-mode-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.study-hub-mode { display:flex; align-items:center; gap:12px; padding:18px; text-decoration:none; color:var(--ink); }
.study-hub-mode > .ico { color:var(--link); }
.study-hub-mode h3 { margin:0 0 4px; font:600 .92rem var(--ui); }
.study-hub-mode p { margin:0; font-size:.74rem; color:var(--ink-2); line-height:1.5; }
.study-hub-mode > span { margin-left:auto; color:var(--link); }
.study-hub-mode:hover { border-color:var(--link); }
@media(max-width:1050px) { .study-hub-mode-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { .study-hub-bar { align-items:start; } .study-hub-bar > div { gap:4px; } .study-hub-mode { padding:14px; gap:8px; } .study-hub-mode > span { display:none; } }

.rail-theme { display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 2px 7px; border:0; border-radius:12px; background:none; color:var(--ink-2); font:500 .74rem var(--ui); cursor:pointer; flex:none; }
.rail-theme svg { width:22px; height:22px; }
.rail-theme:hover { color:var(--ink); background:var(--canvas); }
@media(max-width:760px) { .rail-theme { display:none; } body.more-open .rail-theme { display:flex; flex:0 0 calc(20% - 2px); order:-1; padding:6px 0; font-size:.68rem; margin-bottom:6px; } }

.theme-preview-footer{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px 16px;margin:10px 28px 16px;font-size:.78rem;color:var(--ink-2)}.theme-preview-footer[hidden]{display:none}.theme-preview-footer button{background:none;border:0;padding:3px;color:var(--link);font:inherit;text-decoration:underline;cursor:pointer}.theme-preview-footer a{color:var(--link)}

/* Keep course context and switching inside the same dashboard card as the flight plan. */
.today-sky { overflow:visible; }
.today-sky .study-hub-bar { position:relative; z-index:3; padding:0 0 16px; margin:0 0 22px; border-bottom:1px solid var(--line); }
.today-sky .study-hub-module { color:var(--link); }
.today-sky .study-module-options { max-height:min(60dvh,480px); }
@media(max-width:600px) {
  .today-sky .study-hub-bar { align-items:start; gap:10px; flex-wrap:wrap; }
  .today-sky .study-hub-bar>div { flex:1 1 180px; flex-direction:column; gap:4px; }
  .today-sky .study-module-options { width:min(340px,calc(100vw - 80px)); }
}
