body:is(.on-formation,.on-classroom,.on-comparison,.on-data-search) {
  --learn-ink:var(--guide-ink);
  --learn-sub:var(--guide-text);
  --learn-teal:var(--guide-blue);
  --learn-rule:var(--guide-line);
  --learn-paper:var(--guide-paper);
  --learn-wash:var(--guide-wash);
  --ink:var(--guide-ink);
  --muted:var(--guide-text);
}
body .site-header .top {
  grid-template-columns:max-content minmax(0,1fr) auto auto auto;
}
body .site-header .mode-library {
  grid-area:1 / 5;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  color:var(--learn-sub);
  font-size:.88rem;
  font-weight:740;
  text-decoration:none;
  white-space:nowrap;
}
body .site-header .mode-library[aria-current] {
  color:var(--learn-teal);
  text-decoration:underline;
  text-underline-offset:4px;
}
body.on-discovery:not(.learning-project) .site-header .search-trigger { display:none; }
body.learning-project .site-header .mode-library { display:none; }
.mode-heading { margin:0 0 21px; background:transparent; border:0; }
.mode-heading p {
  margin:7px 0 0;
  max-width:62ch;
  line-height:1.62;
  color:var(--learn-sub);
  word-break:keep-all;
  overflow-wrap:anywhere;
}
.mode-links {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px 18px;
  margin-top:13px;
  font-weight:720;
}
.mode-links a,.map-return {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  text-underline-offset:.22em;
}
.mode-links a[aria-current] {
  color:var(--learn-ink);
  text-decoration:none;
  border-bottom:2px solid var(--learn-teal);
}
.map-return { color:#d6ebe6; }

body.on-formation {
  --guide-ink:#25372d;
  --guide-text:#384d40;
  --guide-muted:#4c6052;
  --guide-blue:#235b47;
  --guide-line:#d8d9cd;
  --guide-paper:#f9f7ef;
  --guide-wash:#e8efe4;
}
body.on-formation:not(.project) .site-header { background:var(--guide-paper); }
.hub-formation .concept-arrangement { gap:clamp(18px,3vw,43px); }
.hub-formation .concept-navigation {
  padding:5px 13px 8px 0;
  border-radius:0;
  border-inline-end:1px solid var(--guide-line);
  background:transparent;
  color:var(--guide-text);
}
.hub-formation .concept-group + .concept-group { border-color:var(--guide-line); }
.hub-formation .concept-group h2 {
  color:var(--guide-ink);
  font-size:.93rem;
  font-weight:770;
}
.hub-formation .concept-group a {
  min-height:44px;
  border-radius:0;
}
.hub-formation .concept-group a:hover,.hub-formation .concept-group a[aria-current] {
  background:var(--guide-wash);
  color:var(--guide-blue);
}
.hub-formation .concept-group a[aria-current] { border-inline-start-color:var(--guide-blue); }
.hub-formation .concept-group a:focus-visible { outline-color:#996006; }
.hub-formation .concept-article {
  background:transparent;
  padding:0;
  border:0;
}
.hub-formation .textbook-heading {
  background:transparent;
  margin:0 0 23px;
  border-bottom:1px solid var(--guide-line);
  padding-bottom:19px;
}
.hub-formation .learn-concept-title { font-size:clamp(2.3rem,4.6vw,3.75rem); }
.hub-formation .learn-concept-summary {
  font-size:clamp(1.03rem,1.55vw,1.23rem);
  margin:8px 0 0;
}
.textbook-reading { margin:0 0 23px; }
.textbook-reading.textbook-split {
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(235px,.84fr);
  gap:clamp(15px,2.35vw,36px);
  align-items:start;
}
.hub .textbook-reading .learn-point-grid { grid-template-columns:1fr; gap:0; }
.hub .textbook-reading .formation-point {
  border:0;
  border-bottom:1px solid var(--guide-line);
  padding:0 0 14px;
  margin:0 0 14px;
  background:transparent;
}
.hub .textbook-reading .formation-point h2 {
  margin:0 0 5px;
  font-size:1.2rem;
  line-height:1.4;
  color:var(--guide-blue);
}
.textbook-reading .formation-point p { color:var(--guide-ink); font-size:1rem; line-height:1.68; }
.textbook-reading .learn-workbench { grid-template-columns:minmax(0,1fr); margin:0; }
.textbook-reading .learn-process { margin:0; min-width:0; }
.river-concept-figure { margin:0; }
.river-concept-figure figcaption { margin:0 0 .55rem; font-weight:700; color:var(--guide-ink); }
.river-concept-figure img { display:block; width:100%; height:auto; }
.learn-river-example { margin-top:.7rem; border-top:1px solid var(--guide-line); }
.learn-river-example summary { padding:.7rem 0; cursor:pointer; color:var(--guide-ink); font-weight:600; }
.textbook-figure { margin:0; }
.textbook-figure img { display:block; width:100%; height:auto; }
.textbook-figure figcaption { padding:8px 0 0; }
.textbook-figure figcaption p { color:var(--guide-text); }
.textbook-figure figcaption a { display:inline-flex; align-items:center; min-height:44px; color:var(--guide-blue); font-weight:700; }
.hub-formation .learn-concept-read .formation-observe {
  background:var(--guide-wash);
  border-inline-start-color:var(--guide-blue);
}

body.on-classroom {
  --guide-ink:#f3faf6;
  --guide-text:#cfe1d9;
  --guide-blue:#abe1d0;
  --guide-line:#4b6a60;
  --guide-paper:#102923;
}
body.on-classroom:not(.project) .site-header { background:#152f28; }
body.on-classroom .site-header .brand { color:var(--guide-ink); }
.on-classroom .site-header :focus-visible,.hub-classroom :focus-visible { outline-color:#ffde83; }
.hub-classroom .mode-links { margin-top:3px; }
.hub-classroom .mode-links a { color:var(--guide-blue); }
.ridge-field { border:0; margin:0; padding:0; color:var(--guide-ink); --ridge-border:#4b6a60; }
.ridge-field-tools {
  display:flex;
  justify-content:space-between;
  gap:8px 20px;
  flex-wrap:wrap;
  margin:0 0 13px;
}
.ridge-field :is(.learn-segment button,.ridge-clue) {
  border-color:#668579;
  background:transparent;
  color:var(--guide-ink);
}
.ridge-field :is(.learn-segment button,.ridge-clue)[aria-pressed=true] {
  color:#143a30;
  background:#afe5d4;
  border-color:#afe5d4;
}
.ridge-field .ridge-case {
  display:grid;
  grid-template-columns:minmax(0,1.92fr) minmax(275px,1fr);
  grid-template-areas:"map head" "map detail" "map profile";
  grid-template-rows:auto auto 1fr;
  align-items:start;
  background:#193830;
}
.ridge-field .ridge-case-head { grid-area:head; border:0; background:transparent; padding:21px 19px 7px; }
.ridge-field .ridge-case-head h3 { grid-row:1; grid-column:1; font-size:1.54rem; margin:0; }
.ridge-field .ridge-case-head p { color:var(--guide-text); }
.ridge-field .ridge-class { color:var(--guide-text); border-color:#668579; }
.ridge-field .ridge-media { grid-area:map; padding:0; border-inline-end:1px solid var(--ridge-border); }
.ridge-field .ridge-media.one-layer .ridge-media-sheet { max-width:none; }
.ridge-field .ridge-media-caption { color:var(--guide-text); padding:7px 12px; }
.ridge-field .ridge-case-note { grid-area:detail; padding:11px 19px 14px; }
.ridge-field .ridge-observation { background:#233f35; color:#eff9f4; border-color:#9fd0bc; }
.ridge-field .ridge-observation p { color:var(--guide-text); }
.ridge-field .ridge-case-note>a { color:var(--guide-text); }
.ridge-field .ridge-profile-panel {
  grid-area:profile;
  padding:13px 19px 18px;
  background:transparent;
  border-color:var(--ridge-border);
  border-bottom:0;
}
.ridge-field .ridge-gridline { stroke:#668579; }
.ridge-field .ridge-profile-fill { fill:#2c5348; }
.ridge-field .ridge-profile-line { stroke:#a6e1cf; }
.ridge-field .ridge-marker-stem { stroke:#a6e1cf; }
.ridge-field .ridge-tick { fill:#dbebe4; }
.ridge-field .ridge-profile-label { fill:#e0eee8; stroke:#193830; }
.ridge-field .ridge-chart-mark.point-active .ridge-profile-label { fill:#ffdf92; }
.ridge-field .ridge-profile-note { color:var(--guide-text); }
.ridge-field .field-credit { display:inline-flex; align-items:center; min-height:44px; }

body.on-comparison {
  --guide-ink:#193044;
  --guide-text:#3b5567;
  --guide-blue:#255879;
  --guide-paper:#f1f5f9;
  --guide-line:#c8d6e1;
}
.hub-comparison .ridge-atlas { margin:10px 0 0; padding-top:13px; border-color:var(--guide-line); }
.hub-comparison .ridge-toolbar { margin-bottom:12px; }
.hub-comparison .ridge-case { --ridge-border:#c0d0dd; }
.hub-comparison .ridge-case-head,.hub-comparison .ridge-profile-panel { background:#edf4f8; }
.hub-comparison .ridge-case-head h3 { grid-row:1; grid-column:1; color:var(--guide-ink); font-size:1.35rem; margin:0; }
.hub-comparison .ridge-media.one-layer .ridge-media-sheet { max-width:460px; }
.hub-comparison .ridge-profile-panel .ridge-profile { max-width:510px; margin-inline:auto; }
.hub-comparison .ridge-profile-line { stroke:#265778; }
.hub-comparison .ridge-profile-fill { fill:#d3e3ef; }
.ridge-overlay { display:none; margin:0 0 12px; border:1px solid #b9ccdb; background:#fff; }
.ridge-overlay figcaption { display:flex; flex-wrap:wrap; gap:3px 14px; align-items:baseline; padding:9px 10px 0; font-size:.9rem; }
.ridge-overlay figcaption strong { width:100%; font-size:1rem; }
.overlay-key { color:#265778; font-weight:730; }
.overlay-key.second { color:#884c22; }
.overlay-key::before { content:""; display:inline-block; width:18px; margin-right:4px; border-bottom:2px solid; vertical-align:.22em; }
.overlay-key.second::before { border-bottom-style:dashed; }
.overlay-path { fill:none; stroke:#265778; stroke-width:3; }
.overlay-path.second { stroke:#884c22; stroke-dasharray:7 5; }

body.on-data-search {
  --guide-ink:#1b3124;
  --guide-text:#3e5647;
  --guide-line:#c7d4cb;
  --guide-blue:#28593e;
  --guide-wash:#eaf2e8;
  --guide-paper:#f8faf7;
}
.hub-data-search .mode-heading { padding-bottom:19px; border-bottom:1px solid var(--guide-line); }
.data-query { display:flex; gap:7px; margin:13px 0 0; max-width:720px; }
.data-query .atlas-search { flex:1; margin:0; }
.hub-data-search .action {
  display:inline-flex; align-items:center; justify-content:center; min-height:44px;
  padding:7px 14px; border:1px solid var(--guide-blue); border-radius:5px;
  background:var(--guide-blue); color:#fff; font-weight:750; text-decoration:none;
}
.data-query .action { white-space:nowrap; }
.data-work {
  display:grid;
  grid-template-columns:minmax(140px,.34fr) minmax(210px,1fr) minmax(210px,1.03fr);
  gap:15px clamp(13px,2vw,26px);
  align-items:start;
}
.data-filters h2 { margin:0 0 8px; font-size:1.03rem; }
.data-filters .compact-select { display:block; width:100%; min-width:0; margin:10px 0 3px; }
.data-filters>a { display:inline-flex; align-items:center; min-height:44px; color:var(--guide-blue); }
.data-kinds { display:grid; gap:3px; }
.data-kinds button,.data-result {
  border:1px solid transparent;
  min-height:44px;
  background:transparent;
  color:var(--guide-text);
  text-align:left;
  font:inherit;
}
.data-kinds button { border-inline-start:3px solid transparent; padding:6px 9px; }
.data-kinds button[aria-pressed=true] {
  background:var(--guide-wash);
  color:var(--guide-ink);
  border-inline-start-color:var(--guide-blue);
  font-weight:760;
}
.data-count { min-height:27px; font-size:.9rem; color:var(--guide-text); }
.data-result-list { display:grid; }
.data-result {
  display:flex;
  gap:12px;
  align-items:center;
  width:100%;
  min-height:70px;
  margin-top:-1px;
  padding:7px 10px;
  background:#fff;
  border-color:var(--guide-line);
  overflow-wrap:anywhere;
}
.data-result[aria-pressed=true] { z-index:1; background:var(--guide-wash); border-color:#769582; color:var(--guide-ink); }
.data-thumb { flex:none; width:72px; aspect-ratio:8/5; object-fit:cover; }
.data-result-label { min-width:0; }
.data-result-label strong,.data-result-label small { display:block; }
.data-result-label small { color:var(--guide-text); font-size:.85rem; }
.data-empty { padding:13px; border:1px solid var(--guide-line); }
.data-more { min-height:44px; margin-top:9px; }
.data-detail { min-width:0; background:white; border:1px solid var(--guide-line); }
.data-detail-copy { padding:17px; }
.data-detail-copy h2 { margin:2px 0 8px; font-size:1.45rem; color:var(--guide-ink); }
.data-detail-copy p { margin:0 0 12px; color:var(--guide-text); }
.data-detail-copy .data-meta { margin-bottom:2px; font-size:.87rem; }
.data-figure { margin:0; }
.data-figure :is(img,svg) { display:block; width:100%; max-height:295px; object-fit:contain; background:#e7ede5; }
.data-figure figcaption { display:flex; flex-wrap:wrap; gap:0 8px; justify-content:space-between; padding:5px 12px; color:var(--guide-text); font-size:.83rem; }

@media(max-width:960px) {
  .textbook-reading.textbook-split { grid-template-columns:minmax(0,1fr); gap:5px; }
}
@media(max-width:760px) {
  html { scroll-padding-bottom:0; }
  body { padding-bottom:0; }
  body .site-header .top {
    grid-template-columns:minmax(0,1fr) auto auto auto;
    grid-template-rows:auto auto;
    gap:0 6px;
  }
  body .site-header .mode-library { grid-area:1 / 4; font-size:.82rem; }
  body .site-header .site-nav {
    position:static;
    grid-area:2 / 1 / 3 / -1;
    padding:0;
    background:transparent;
    border:0;
    box-shadow:none;
  }
  body .site-header .contents-link { grid-area:3 / 1 / 4 / -1; }
  body .site-nav a {
    min-height:47px;
    border-bottom:3px solid transparent;
    font-size:.85rem;
    line-height:1.35;
  }
  body .site-nav a[aria-current] { background:transparent; border-color:currentColor; }
  body .site-nav a[aria-current]::before { content:none; }
  .mode-heading { margin-bottom:14px; }
  .mode-links { gap:0 12px; }
  .hub-formation .textbook-heading { padding-bottom:12px; margin-bottom:16px; }
  .hub-formation .learn-concept-title { font-size:clamp(2rem,8.6vw,2.65rem); }
  .hub-formation .concept-picker { background:transparent; }
  .ridge-field .ridge-case {
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"head" "map" "detail" "profile";
  }
  .ridge-field :is(.ridge-case-head,.ridge-case-note,.ridge-profile-panel) { padding-inline:11px; }
  .ridge-field .ridge-media { border:0; }
  .ridge-field-tools .learn-segment { flex-wrap:wrap; }
  .ridge-field-tools .learn-segment button { flex:1 0 auto; }
  .hub-comparison .ridge-overlay { display:block; }
  .data-work { grid-template-columns:minmax(0,1fr); }
  .data-kinds { display:flex; gap:5px; flex-wrap:wrap; }
  .data-kinds button { border-inline-start:0; border-bottom:2px solid transparent; }
  .data-kinds button[aria-pressed=true] { border-bottom-color:var(--guide-blue); }
  .data-filters .compact-select { display:inline-block; width:auto; max-width:100%; margin-right:12px; }
}


/* On a phone the observation immediately follows the definition. */
.hub-formation .textbook-heading { margin-bottom:clamp(12px,2vw,22px); }
.hub-formation .learn-workbench .learn-model-note { font-size:.91rem; line-height:1.48; color:#344c40; }
.hub-formation .learn-model-bar .learn-segment button { min-height:44px; font-size:.92rem; }
.hub-formation .learn-raster { background:#f3f4e9; }
.hub-formation .learn-process .process-image { width:100%; }
.hub-formation .textbook-reading .learn-point-grid { margin-top:0; }
@media (max-width:760px) {
  .hub-formation .textbook-heading { padding-bottom:12px; margin-bottom:12px; }
  .textbook-reading.textbook-split { display:grid; grid-template-columns:minmax(0,1fr); gap:22px; }
  .hub-formation .textbook-reading .formation-point { margin-bottom:10px; }
}

.learn-evidence .learn-curtain-reading { margin:7px 0; color:var(--learn-sub); font-size:.93rem; line-height:1.55; }
