/* Shared presentation: keep the subject and the next action in focus. */
.learning-home {
  --home-ink: #243f43;
  --home-teal: #00b8cc;
  --home-deep: #008b9f;
  color: var(--home-ink);
}
.learning-home .home-nav { border-color: #e4f0f1; }
.learning-home .home-intro { padding-bottom: 24px; }
.learning-home .home-intro h1 { margin-bottom: 0; }
.learning-home .home-layout { align-items: start; }
.learning-home .home-course {
  border-color: #a9e6ed;
  border-bottom-color: #73d5e1;
  background: #f5fcfd;
  padding: 26px;
}
.learning-home .home-course-head { gap: 20px; }
.learning-home .home-subject-icon {
  display: grid;
  place-items: center;
  background: #27c0d2;
  border-color: #83e1ea;
  border-bottom-color: #00a2b5;
}
.learning-home .home-course-title h3 { color: var(--home-ink); }
.learning-home .home-course-progress { margin: 26px 0 20px; }
.learning-home .home-progress-track { background: #d7ebed; }
.learning-home .home-primary { background: #2cc4d5; border-color: #00a5b9; }
.learning-home .home-secondary { background: #fff; }
.learning-home :is(.home-primary, .home-secondary, .home-login, .home-register, .home-language):focus-visible {
  outline: 3px solid #006c7a;
  outline-offset: 3px;
}
.learning-home .home-summary { border-color: #e2eeee; }

/* One readable scale and separate areas for content, models and controls. */
.geo-session,
.lesson-screen {
  --lesson-copy-size: 16px;
  --lesson-copy-leading: 1.45;
  --lesson-title-size: 26px;
}
.geo-session :is(.teaching-content, .quiz-content) { min-width: 0; }
.geo-session :is(.teaching-content, .quiz-content) > * { min-width: 0; }
.geo-session :is(.speech, .option, .chapter-choices button) { overflow-wrap: anywhere; }
.geo-session :is(.chapter-model, .chapter-question-figure) { max-width: 100%; }
/* The old generic rule gave even one standalone SVG only half a row. */
.geo-session .chapter-model > div > svg:only-child {
  width: 100%;
  max-width: 100%;
}
.geo-session :is(.chapter-choices, .intro-choices, .options) > button {
  min-width: 0;
  touch-action: manipulation;
}
.geo-session .geo-footer { z-index: 2; background: #fff; }
.geo-session .footer-inner > .primary { min-width: 0; }
@media (max-width: 700px) {
  .learning-home .home-intro { padding: 30px 0 20px; }
  .learning-home .home-course { padding: 20px; }
  .learning-home .home-course-head { gap: 14px; }
  .learning-home .home-course-progress { margin: 22px 0 18px; }
  .learning-home .home-summary { padding: 16px 18px; }
  .geo-session { gap: 10px; }
  .geo-session > :is(.teaching-content, .quiz-content) {
    gap: 8px;
    padding-bottom: 14px;
    scrollbar-gutter: auto;
  }
  .geo-session .guide-row { gap: 8px; }
  .geo-session .speech { padding: 8px 12px; }
}
@media (max-width: 380px) {
  .learning-home .home-course-actions { flex-direction: column; }
  .learning-home .home-course-actions > a { width: 100%; box-sizing: border-box; }
}
/* A chapter card is already a link; its title, progress and chevron are enough. */
.course-directory .directory-list .directory-course {
  align-items: center;
  min-height: 112px;
}
.course-directory .directory-course-content { gap: 10px; }
.course-directory .directory-course-heading strong { color: #243f43; }
.course-directory .directory-course:focus-visible {
  outline: 3px solid #007e8e;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  /* Progress is already shown on the subject card; detailed stats live in progress. */
  .learning-home .home-summary { display: none; }
  .learning-home .home-side:not(:has(.home-guest)) { display: none; }
  .learning-home .home-side .home-guest:has([data-sync-status]:empty) { display: none; }
}
/* Progress is already in the header; keep step codes available to assistive tech
   without using valuable space beside the question or model. */
.geo-session .quiz-content > .eyebrow,
.geo-session .chapter-lesson .lesson-step-heading > .eyebrow {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.geo-session .chapter-lesson .lesson-step-heading { justify-content: flex-end; }
/* Brief instructions use one line of copy; feedback keeps its own space. */
.geo-session .quiz-content > .exercise-hint {
  flex: 0 0 auto;
  margin: 0;
  color: #587074;
  font-size: var(--lesson-copy-size);
  line-height: var(--lesson-copy-leading);
}
/* Pair colours and numbers already show progress; keep the live count for
   assistive technology without taking room from the cards on small phones. */
.geo-session .match-status {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}
/* Keep question titles in a predictable position even without a figure. */
.geo-session .quiz-content:not(:has(.question-figure)) { justify-content: flex-start; }

/* Size the actual shelf drawing, not an independently stretched grid cell. */
.geo-session .crust-shelf-frame { height:auto !important; max-height:none; align-self:center; justify-self:center; }
.geo-session .crust-shelf-frame > svg { position:relative; inset:auto; width:100%; height:auto !important; aspect-ratio:600 / 320; }
.geo-session .chapter-question-figure > img.question-context-image { display:block; width:100%; height:100%; object-fit:contain; }
.geo-session .chapter-question-figure.question-context { flex:1 1 160px; min-height:120px; max-height:230px; width:100%; margin:0 auto; overflow:hidden; }
/* Credits share the figure container, but must never take the figure's height. */
.geo-session .chapter-question-figure.question-context > .figure-credit { width:auto; height:auto; flex:0 0 auto; }
.geo-session .chapter-question-figure.question-context > .g61-g64-neutral-panels { height:auto; min-height:0; flex:1 1 0; }
.geo-session .chapter-question-figure.question-context:has(> .figure-credit) > img.question-context-image { height:auto; min-height:0; flex:1 1 0; }
.geo-session .chapter-question-figure.question-context > .g71-question-views { width:auto; height:auto; flex:0 0 auto; gap:6px; }
.geo-session .g71-question-views button { min-width:72px; min-height:32px; border:2px solid #9ae3eb; border-radius:10px; background:white; color:#254c50; font:inherit; cursor:pointer; }
.geo-session .g71-question-views button.selected { background:#cef3f6; border-color:#00b9cc; }
/* Question sections share a bounded stage; SVG viewBoxes stay in their native ratio. */
.geo-session .quiz-content > .question-figure.crust-models { flex:1 1 160px; min-height:120px; max-height:190px; width:100%; margin:0 auto; }
.geo-session .quiz-content > .question-figure.crust-models figure { height:100%; }
.path-unit .contextual-scene { object-fit:contain; }
