/* Study guide shell: contents rail, sign header, reading column, formulas, answer key, line-form checklist. Load after system.css. */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
}
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px) 80px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

/* Contents rail */
nav.toc {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  padding: 28px 0 24px;
  font: 500 0.95rem/1.35 var(--f-display);
}
a.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--ink);
  text-decoration: none;
  font: 800 1.15rem/1 var(--f-display);
  letter-spacing: -0.01em;
}
a.brand .mark {
  width: 38px;
  height: 38px;
}
a.brand .mark rect {
  rx: 0;
}
.home-row {
  display: flex;
  gap: 6px;
  margin: 0 0 6px;
}
/* If the chapter list ever lands inside the row, it takes a full line of its own under it. */
.home-row {
  flex-wrap: wrap;
}
.home-row > .chapter-fold {
  order: 1;
  flex: 1 0 100%;
}
.home-row a.home {
  flex: 1;
  margin: 0 !important;
}
nav.toc a.home {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 6px;
  padding: 0 12px;
  border: 2px solid var(--act);
  color: var(--act);
  font-weight: 700;
  text-decoration: none;
}
nav.toc a.home:hover {
  background: var(--fau-tint);
}
/* Guide | Lab switcher: the current page is the solid half */
.chapter-switch {
  display: flex;
  margin: 0 0 6px;
  border: 2px solid var(--act);
}
.chapter-switch a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  color: var(--act);
  font: 700 0.95rem/1.2 var(--f-display);
  text-decoration: none;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.chapter-switch a:hover {
  background: var(--fau-tint);
}
.chapter-switch a[aria-current] {
  background: var(--act);
  color: var(--act-ink);
}
nav.toc li.toc-group {
  border-bottom: 0;
  padding: 16px 10px 4px;
  color: var(--ink);
  font: 800 0.75rem/1.2 var(--f-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
nav.toc li.toc-group:first-child {
  padding-top: 10px;
}
nav.toc ol {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
nav.toc li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
nav.toc li a {
  display: block;
  padding: 9px 10px;
  color: var(--muted);
  text-decoration: none;
  transition:
    background-color 150ms var(--ease),
    color 150ms var(--ease);
}
nav.toc li a:hover {
  color: var(--ink);
  background: var(--paper);
}
nav.toc li a[aria-current] {
  background: var(--fau);
  color: var(--on-fau);
  font-weight: 700;
}

/* Folding. Group headings in the rail are buttons that fold the entries under them; the chapter list folds the same way. */
button.toc-fold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
}
button.toc-fold::after,
.chapter-fold > summary::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: -3px 2px 0 8px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
button.toc-fold[aria-expanded="true"]::after,
.chapter-fold[open] > summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}
.chapter-fold {
  margin: 0 0 6px;
  border-bottom: 1px solid var(--line);
}
.chapter-fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 4px 0 2px;
  color: var(--act);
  font: 700 0.95rem/1.2 var(--f-display);
  cursor: pointer;
  list-style: none;
}
.chapter-fold > summary::-webkit-details-marker {
  display: none;
}
.chapter-fold ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.chapter-fold li.fold-code {
  padding: 8px 10px 2px;
  color: var(--ink);
  font: 800 0.75rem/1.2 var(--f-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chapter-fold li a {
  display: block;
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
}
.chapter-fold li a:hover {
  color: var(--ink);
  background: var(--paper);
}
.chapter-fold li a[aria-current] {
  background: var(--fau);
  color: var(--on-fau);
  font-weight: 700;
}
@media (prefers-reduced-motion: no-preference) {
  .chapter-fold[open] > ul {
    animation: sheet-in 220ms var(--ease) both;
  }
}
/* Previous and next chapter, at the end of the page. */
.chapter-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 56px 0 0;
  /* the same 24px between the rule and the buttons as between the buttons and the panel's bottom edge */
  padding: 24px 0;
  border-top: 2px solid var(--ink);
}
.chapter-pager > * {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  padding: 12px 16px;
  border: 2px solid var(--act);
  color: var(--act);
  text-decoration: none;
}
.chapter-pager > span {
  border-color: var(--line);
  border-style: dashed;
  color: var(--muted);
}
.chapter-pager > span .pager-title {
  display: none;
}
.chapter-pager a:hover {
  background: var(--fau-tint);
}
.chapter-pager .next {
  text-align: right;
  grid-column: 2;
}
.chapter-pager .prev {
  grid-column: 1;
}
.pager-kind {
  font: 800 0.75rem/1.2 var(--f-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pager-title {
  font: 700 0.95rem/1.3 var(--f-display);
}
@media (max-width: 600px) {
  .chapter-pager {
    grid-template-columns: 1fr;
  }
  .chapter-pager .next,
  .chapter-pager .prev {
    grid-column: 1;
    text-align: left;
  }
}
@media print {
  .chapter-pager,
  .chapter-fold {
    display: none;
  }
}

/* The route line: one signal line down the rail's left edge, from the top to the entry being read (js/nav.js sets --lit). */
nav.toc > ol {
  position: relative;
}
nav.toc > ol::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: var(--lit, 0px);
  background: linear-gradient(to bottom, var(--signal-a), var(--signal-b));
  pointer-events: none;
}
/* The end of the route line carries a beacon on the section being read. */
nav.toc > ol li a[aria-current] {
  position: relative;
}
nav.toc > ol li a[aria-current]::before,
nav.toc > ol li a[aria-current]::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  box-sizing: border-box;
  pointer-events: none;
}
nav.toc > ol li a[aria-current]::before {
  background: var(--signal-b);
}
nav.toc > ol li a[aria-current]::after {
  border: 2px solid var(--signal-b);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  nav.toc > ol li a[aria-current]::after {
    animation: beacon 2.4s var(--ease) infinite;
  }
}
@media (prefers-reduced-motion: no-preference) {
  nav.toc > ol::after {
    transition: height 260ms var(--ease);
  }
}
@media print {
  nav.toc > ol::after {
    display: none;
  }
}

/* Phone contents bar (js/nav.js): appears once the rail has scrolled away, names the section being read and opens the list. */
.toc-bar,
.toc-sheet {
  display: none;
}

/* Reading column */
main {
  min-width: 0;
  background: var(--surface);
  margin-top: 28px;
  outline: 1px solid var(--line);
}
main > :not(.sign) {
  margin-left: clamp(18px, 4vw, 56px);
  margin-right: clamp(18px, 4vw, 56px);
}
main > p,
main > ul,
main > ol {
  max-width: 68ch;
}
.sign {
  margin-bottom: 8px;
}
.sign .code {
  background: var(--course);
}
h1,
h2,
h3 {
  text-wrap: balance;
}
h2 {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font: 800 1.65rem/1.2 var(--f-display);
  letter-spacing: -0.02em;
  margin-top: 64px;
  margin-bottom: 16px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
h2::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: var(--fau-mark);
  transform: translateY(-1px);
}
h3 {
  font: 700 1.2rem/1.3 var(--f-display);
  letter-spacing: -0.01em;
  margin-top: 36px;
  margin-bottom: 10px;
}
h4,
h5,
h6 {
  font: 700 1.05rem/1.35 var(--f-display);
  margin-top: 24px;
  margin-bottom: 8px;
}
li {
  margin: 4px 0;
}
li > p {
  margin: 0;
}

.sign + h2 {
  margin-top: 40px;
}

/* Formulas and tables */
.eq {
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 16px 20px;
  background: var(--paper-2);
  overflow-x: auto;
}
.tw {
  overflow-x: auto;
  margin-top: 18px;
  margin-bottom: 18px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}
th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
th {
  font: 700 0.85rem/1.3 var(--f-display);
  letter-spacing: 0.02em;
  background: var(--fau);
  color: var(--on-fau);
}

/* Answer key */
details.answers {
  margin-top: 18px;
  margin-bottom: 18px;
  border: 2px solid var(--act);
  padding: 0 20px;
}
details.answers summary {
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  font: 700 1rem/1.2 var(--f-display);
  color: var(--act);
}
details.answers.armed:not([open]) {
  background: var(--act);
}
details.answers.armed:not([open]) summary {
  color: var(--paper);
}
details.answers[open] summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

/* Exam checklist: state as line form */
li.check {
  list-style: none;
  margin: 0 0 0 -22px;
  border-bottom: 1px solid var(--line);
}
li.check label {
  display: block;
  position: relative;
  padding: 12px 0 12px 38px;
  cursor: pointer;
}
li.check input {
  appearance: none;
  position: absolute;
  left: 0;
  top: 14px;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px dashed var(--muted);
  background: transparent;
  cursor: pointer;
  transition:
    background-color 150ms var(--ease),
    border-color 150ms var(--ease);
}
li.check input:checked {
  border-style: solid;
  border-color: var(--fau);
  background: var(--fau)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.4'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
li.check label:has(input:checked) {
  color: var(--muted);
}
.review {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: var(--fau-tint);
  max-width: 68ch;
}
.review p {
  margin: 0;
  font: 500 0.95rem/1.4 var(--f-display);
}
.progress {
  font: 500 0.9rem var(--f-display);
  color: var(--muted);
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }
  nav.toc {
    position: static;
    max-height: none;
    padding: 18px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }
  a.brand {
    min-height: 44px;
    margin: 0 auto 0 0;
  }
  nav.toc a.home,
  .chapter-switch,
  .home-row {
    margin: 0;
  }
  /* Chapter links get their own full row so their labels never wrap. */
  .chapter-switch {
    flex: 1 1 100%;
  }
  .chapter-switch a {
    min-height: 44px;
    white-space: nowrap;
  }
  nav.toc ol {
    display: none;
  }
  main {
    margin-top: 16px;
  }
}
@media print {
  .toc-bar,
  .toc-sheet {
    display: none !important;
  }
  nav.toc,
  .review button {
    display: none;
  }
  .wrap {
    display: block;
    padding: 0;
  }
  main {
    outline: 0;
    margin: 0;
  }
  .sign {
    background: none;
    color: var(--ink);
    border-bottom: 3px solid var(--ink);
    padding: 0 0 12px;
  }
  .sign h1,
  .sign .course,
  .sign .meta {
    color: var(--ink);
  }
  th {
    background: none;
    color: var(--ink);
    border-bottom: 2px solid var(--ink);
  }
  details.answers {
    display: block;
    border: 0;
    padding: 0;
  }
  .review {
    background: none;
    padding: 0;
  }
}

/* Guide content: formula cards, worked examples, recall checks, practice, downloads, print */
.standfirst {
  margin-top: 30px;
  padding: 18px 20px;
  background: var(--paper-2);
  border-top: 3px solid var(--eei-1);
  max-width: 68ch;
  font-size: 1.2rem;
  line-height: 1.55;
  font-weight: 600;
}
.downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  max-width: 68ch;
  margin: 14px 0 30px;
  padding: 14px 16px;
  background: var(--paper-2);
}
.downloads p {
  flex: 1 0 100%;
  margin: 0;
  color: var(--muted);
  font: 700 0.9rem/1.35 var(--f-display);
}
.downloads .btn {
  flex: 1 1 13rem;
}
.cold-start,
main > section {
  max-width: none;
}
.cold-start {
  margin-top: 34px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--line);
}
.cold-start h2 {
  margin-top: 0;
}
.cold-start details,
.cold-start summary {
  font-family: var(--f-display);
}
.route {
  padding-left: 1.35rem;
}
.route li {
  padding: 3px 0;
}
.eq {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-color: var(--muted) var(--paper-2);
}
.eq strong {
  color: var(--muted);
  font: 700 0.9rem/1.35 var(--f-display);
}
.formula {
  display: block;
  width: max-content;
  min-width: 100%;
  padding: 0.18em 0 0.28em;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  font: 400 1.3rem/1.75 "Cambria Math", "STIX Two Math", "Times New Roman", serif;
  font-variant-numeric: lining-nums tabular-nums;
}
.frac {
  display: inline-grid;
  grid-template-rows: auto auto;
  margin-inline: 0.12em;
  vertical-align: middle;
  text-align: center;
  line-height: 1.15;
}
.frac > span:last-child {
  border-top: 1px solid currentColor;
  padding: 0.08em 0.14em 0;
}
.eq-note {
  color: var(--muted);
  font-size: 0.94rem;
}
.method,
.source-note {
  padding: 14px 20px;
  background: var(--paper-2);
}
.method-list {
  padding-left: 1.5rem;
}
/* Step through: the button sits under the steps; a revealed step is uncovered left to right and underlined once in signal. */
.step-btn {
  margin: 4px 0 10px;
}
.method-list > li {
  position: relative;
}
.worked .math-line {
  /* shrink to the formula and centre it; block with fit-content rather than display: table, because Safari ignores
     max-width on a table and a long line would then run off a phone screen instead of wrapping */
  display: block;
  box-sizing: border-box;
  width: -webkit-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 10px auto 14px;
  padding: 9px 14px;
  border-left: 2px solid var(--course);
  background: var(--paper);
  color: var(--ink);
  font: 400 1.12rem/1.65 "Cambria Math", "STIX Two Math", "Times New Roman", serif;
  font-variant-numeric: lining-nums tabular-nums;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
/* Brackets around a stacked fraction grow to its height. */
.worked .math-line .delim {
  display: inline-block;
  margin-inline: 0.03em;
  transform: scale(1.05, 1.9);
  font-weight: 300;
}
@media (prefers-reduced-motion: no-preference) {
  .method-list > li.step-in {
    animation: step-reveal 260ms var(--ease) both;
  }
  .method-list > li.step-in::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--signal);
    transform-origin: left;
    animation: step-line 800ms var(--ease) both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .method-list > li.step-in {
    animation: answers-fade 200ms ease both;
  }
}
@keyframes step-reveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
}
@keyframes step-line {
  0% {
    transform: scaleX(0);
    opacity: 1;
  }
  45% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}
@media print {
  .step-btn {
    display: none;
  }
  .method-list > li[hidden] {
    display: list-item;
  }
}
/* Symbol tracing (js/guide.js): the same symbol underlined across its section while it is hovered. */
.trace {
  position: relative;
}
.trace::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--signal);
  transform-origin: left;
  transition: opacity 150ms var(--ease);
  pointer-events: none;
}
.trace-off::after {
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .trace::after {
    animation: trace-draw 240ms var(--ease) both;
    animation-delay: calc(var(--t, 0) * 30ms);
  }
}
@keyframes trace-draw {
  from {
    transform: scaleX(0);
  }
}
@media print {
  .trace::after {
    display: none;
  }
}
/* Callout boxes share one form with the lab's challenge card: a 3px rule on top, 16px by 20px padding.
   Worked examples and challenges carry the subject colour on cool paper; recall checks are open, with an action-blue rule. */
.worked,
.recall {
  margin: 18px 0;
  padding: 18px 20px;
  border-top: 3px solid var(--course);
  background: var(--paper-2);
}
.recall {
  border-top-color: var(--act);
  border-bottom: 1px solid var(--line);
  background: none;
}
.worked-title,
.recall-title {
  margin: 0 0 6px;
  color: var(--muted);
  font: 800 0.85rem/1.3 var(--f-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.recall details.answers {
  margin: 10px 0 12px;
}
.tw table {
  min-width: 560px;
}
.tw th,
.tw td {
  font-variant-numeric: tabular-nums;
}
.problems > li {
  padding: 7px 0 7px 4px;
}
.answers ol > li {
  margin-bottom: 10px;
}
.sec-ref {
  margin-left: 6px;
  font-size: 0.85em;
  opacity: 0.7;
  white-space: nowrap;
}
details.answers {
  padding: 12px 20px 16px;
}
.checks {
  margin-top: 12px;
  padding-left: 22px;
}
.checks .check {
  margin-left: -22px;
}
.checks .check label {
  max-width: 68ch;
}
.source-note {
  margin-top: 48px;
  margin-bottom: 24px;
  font-size: 0.92rem;
}
.mobile-toc {
  display: none;
}
@media (max-width: 560px) {
  .standfirst {
    font-size: 1.06rem;
  }
  .formula {
    width: 100%;
    min-width: 0;
    font-size: 1.0625rem;
    line-height: 1.8;
    text-align: left;
    white-space: normal;
  }
  .frac {
    white-space: nowrap;
  }
  .eq {
    padding: 14px 16px;
  }
  /* One compact row on a phone, so section 1 starts sooner. */
  .downloads {
    margin: 10px 0 20px;
    padding: 0;
    background: none;
  }
  .downloads p {
    display: none;
  }
  .downloads .btn {
    flex: 1 1 0;
    min-height: 44px;
    font-size: 0.85rem;
  }
}
@media (max-width: 900px) {
  main section[id],
  main .experiment {
    scroll-margin-top: 64px;
  }
  .toc-bar {
    display: block;
    position: fixed;
    top: 4px;
    left: 0;
    right: 0;
    z-index: 45;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    transform: translateY(calc(-100% - 4px));
  }
  .toc-bar.on {
    visibility: visible;
    transform: none;
  }
  @media (prefers-reduced-motion: no-preference) {
    .toc-bar {
      transition:
        transform 220ms var(--ease),
        visibility 0s linear 220ms;
    }
    .toc-bar.on {
      transition:
        transform 220ms var(--ease),
        visibility 0s;
    }
  }
  .toc-bar-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    background: none;
    color: var(--ink);
    font: 700 0.95rem/1.2 var(--f-display);
    text-align: left;
    cursor: pointer;
  }
  .toc-bar-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .toc-bar-label::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 10px;
    background: var(--fau-mark);
  }
  .toc-bar-word {
    display: flex;
    align-items: center;
    flex: none;
    color: var(--act);
  }
  .toc-bar-word::after {
    content: "";
    width: 7px;
    height: 7px;
    margin: -3px 0 0 9px;
    border: solid var(--act);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  .toc-bar.open .toc-bar-word::after {
    margin-top: 3px;
    transform: rotate(225deg);
  }
  .toc-sheet {
    position: fixed;
    top: 53px;
    left: 0;
    right: 0;
    z-index: 44;
    max-height: calc(100vh - 53px);
    max-height: calc(100dvh - 53px);
    overflow-y: auto;
    background: var(--surface);
    border-bottom: 2px solid var(--ink);
    font: 500 0.95rem/1.35 var(--f-display);
  }
  .toc-sheet:not([hidden]) {
    display: block;
  }
  @media (prefers-reduced-motion: no-preference) {
    .toc-sheet:not([hidden]) {
      animation: sheet-in 220ms var(--ease) both;
    }
  }
  .toc-sheet ol {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .toc-sheet li {
    margin: 0;
    border-bottom: 1px solid var(--line);
  }
  nav.toc .chapter-fold li a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .toc-sheet .chapter-fold {
    margin: 0;
    padding: 0 16px;
  }
  .toc-sheet .chapter-fold li a {
    min-height: 44px;
    align-items: center;
    display: flex;
    padding: 0 8px;
  }
  .toc-sheet li.toc-group {
    padding: 14px 16px 4px;
    border-bottom: 0;
    font: 800 0.75rem/1.2 var(--f-display);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .toc-sheet li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    color: var(--muted);
    text-decoration: none;
  }
  .toc-sheet li a[aria-current] {
    background: var(--fau);
    color: var(--on-fau);
    font-weight: 700;
  }
  .wrap nav.toc details.mobile-toc {
    display: block;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .wrap nav.toc details.mobile-toc summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
    color: var(--act);
    font: 700 0.95rem/1.2 var(--f-display);
  }
  .wrap nav.toc details.mobile-toc > ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
    margin: 0 0 12px;
    border-top: 2px solid var(--ink);
    border-bottom: 0;
  }
  .wrap nav.toc details.mobile-toc > ol li {
    min-width: 0;
  }
}
@media print {
  .standfirst,
  .method,
  .worked,
  .source-note {
    background: none;
  }
  .worked,
  .recall {
    break-inside: avoid;
  }
  .eq {
    break-inside: avoid;
    overflow: visible;
  }
  #practice,
  .answers,
  #checklist {
    break-before: page;
    page-break-before: always;
  }
  .problems > li,
  .checks .check {
    break-inside: avoid;
  }
}

/* Motion: answers unfold, jump targets announce themselves, ticks acknowledge, progress lights up. */
details.answers[open] > :not(summary) {
  animation: answers-fade 200ms var(--ease) both;
}
@keyframes answers-fade {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  details.answers[open] > :not(summary) {
    animation: answers-unfold 320ms var(--ease) both;
  }
  /* Answer lines then step in one after another (js/guide.js numbers them, capped at 8), so your own working is
     compared with them in order. The list itself holds still. */
  details.answers[open] > ol {
    animation: none;
  }
  details.answers[open] > ol > li {
    animation: answers-step 240ms var(--ease) both;
    animation-delay: calc(var(--n, 0) * 40ms);
  }
  section:target > h2::after {
    animation: lock-on 1800ms linear 250ms 1 forwards;
  }
  li.check input:checked {
    animation: tick-pop 260ms var(--ease);
  }
}
@keyframes sheet-in {
  from {
    clip-path: inset(0 0 100% 0);
  }
}
@keyframes answers-step {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@media print {
  details.answers[open] > ol > li {
    animation: none;
  }
}
@keyframes answers-unfold {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: none;
  }
}
/* Jump target: four signal corners close in on the heading's square, hold, then fade. The square sits about 29px below
   the heading's top edge (2px rule + 18px padding + the baseline offset), so the corners are placed from there. */
section:target > h2 {
  position: relative;
}
section:target > h2::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 26px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0;
  background:
    var(--signal) 0 0 / 7px 2px no-repeat,
    var(--signal) 0 0 / 2px 7px no-repeat,
    var(--signal) 100% 0 / 7px 2px no-repeat,
    var(--signal) 100% 0 / 2px 7px no-repeat,
    var(--signal) 0 100% / 7px 2px no-repeat,
    var(--signal) 0 100% / 2px 7px no-repeat,
    var(--signal) 100% 100% / 7px 2px no-repeat,
    var(--signal) 100% 100% / 2px 7px no-repeat;
}
/* The delay lets the smooth scroll arrive first. Easing sits on the closing step only: the shared ease is so front-loaded
   that the corners would snap shut in a few frames and read as a blink. */
@keyframes lock-on {
  0% {
    opacity: 1;
    left: -17px;
    top: 12px;
    width: 48px;
    height: 48px;
    animation-timing-function: cubic-bezier(0.3, 0.6, 0.3, 1);
  }
  33% {
    opacity: 1;
    left: -3px;
    top: 26px;
    width: 20px;
    height: 20px;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  section:target > h2::after {
    animation: lock-fade 1200ms ease 250ms 1 forwards;
  }
}
@keyframes lock-fade {
  0%,
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media print {
  section:target > h2::after {
    display: none;
  }
}
@keyframes tick-pop {
  0% {
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
/* The header's progress line lights up briefly after a tick. */
#review-meta.lit,
.review p.lit {
  animation: meta-lit 900ms var(--ease);
}
@keyframes meta-lit {
  0% {
    background: var(--course);
    color: var(--ink);
  }
}
#review-meta,
.review p {
  padding: 2px 6px;
  margin-left: -6px;
}

/* Section references in answers become jump links to the section. */
.sec-ref a {
  color: inherit;
  text-decoration-color: currentColor;
  text-decoration-style: dotted;
}
.sec-ref a:hover {
  text-decoration-style: solid;
}

/* Link from a guide section to its lab experiment */
.lab-link {
  max-width: 68ch;
  padding: 10px 14px;
  border: 2px dashed var(--course);
  font-size: 0.95rem;
}
.lab-link a {
  font-weight: 700;
}
.topic-link {
  max-width: 68ch;
  padding: 10px 14px;
  border: 1px solid var(--line);
  font-size: 0.95rem;
}
.topic-link a {
  color: var(--act);
  font-weight: 700;
  text-underline-offset: 3px;
}
@media print {
  .lab-link {
    display: none;
  }
}

/* Width standard for guides and labs: two widths only.
   The section frame and wide media (tables, the lab bench) use the full column;
   everything that is read uses one measure, set in rem so it does not drift with font size. */
main {
  /* 46rem fills the reading panel on a laptop or desktop; headings, text and cards all stop at this one edge. */
  --measure: 46rem;
}
main > p,
main > ul,
main > ol,
main > .downloads,
main > .source-note,
main > .standfirst,
main section > p,
main section > ul,
main section > ol,
main section > h3,
main section > details,
main section > .worked,
main section > .recall,
main section > .review,
main section > .lab-link,
main section > #lab-results,
main .cold-start > :not(h2),
main .method {
  max-width: var(--measure);
}
main section > .eq {
  max-width: var(--measure);
}
main section > .tw,
main section > .bench {
  max-width: none;
}
/* The first section after the intro sits as close as the guide's first block. */
main > section:first-of-type > h2 {
  margin-top: 34px;
}
.cold-start > h2 {
  margin-top: 0;
}

/* Concept map: three columns (measured, defined, derived). Without JavaScript each node lists what it rests on. */
.cmap {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 12px;
}
/* The dependency lines of the selected node (js/concept-map.js). */
.cm-links {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}
.cm-head {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
  color: var(--muted);
  font: 600 0.82rem/1.3 var(--f-display);
}
.cm-head strong {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cmap ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cm-node {
  padding: 10px 12px;
  border: 2px dashed var(--line);
  background: var(--paper);
}
.cm-title,
.cm-formula,
.cm-why {
  margin: 0;
}
.cm-title {
  font: 700 0.95rem/1.3 var(--f-display);
}
.cm-title .sec-ref {
  font-weight: 600;
}
.cm-formula {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}
.cm-why {
  margin-top: 6px;
  font-size: 0.88rem;
}
/* live map */
.cmap.live .cm-node {
  padding: 0;
}
.cmap.live .cm-why {
  display: none;
}
.cm-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cmap.live .cm-node {
  transition:
    border-color 150ms var(--ease),
    background-color 150ms var(--ease),
    opacity 150ms var(--ease);
}
.cmap.live .cm-node:hover {
  border-color: var(--act);
}
.cmap.live .cm-node.base {
  border-style: solid;
  border-color: var(--fau-mark);
}
.cmap.live .cm-node.direct {
  background: var(--fau-tint);
}
.cmap.live .cm-node.on {
  border-style: solid;
  border-color: var(--fau);
  background: var(--fau);
  color: var(--on-fau);
}
.cmap.live .cm-node.on .cm-formula,
.cmap.live .cm-node.on .sec-ref {
  color: var(--on-fau-soft);
}
.cmap.live .cm-node.dim {
  opacity: 0.55;
}
.cm-detail {
  max-width: var(--measure);
  margin: 0 0 18px;
  padding: 14px 20px;
  border-top: 3px solid var(--fau-mark);
  background: var(--paper-2);
}
@media (max-width: 760px) {
  .cmap {
    grid-template-columns: 1fr;
  }
}
@media print {
  .cm-links {
    display: none;
  }
  .cmap {
    grid-template-columns: 1fr;
  }
  .cmap.live .cm-why {
    display: block;
  }
  .cm-detail {
    display: none;
  }
}

/* Big operators with limits: sums, products, unions and intersections stack top limit, sign, bottom limit;
   integrals keep the sign on the left with the top limit over the bottom one on its right. */
.op {
  display: inline-grid;
  vertical-align: middle;
  margin-inline: 0.08em 0.16em;
  line-height: 1.05;
  white-space: nowrap;
}
.op > sub,
.op > sup {
  position: static;
  vertical-align: baseline;
  font-size: 0.64em;
  line-height: 1.1;
}
.op-sum {
  grid-template-areas: "hi" "sym" "lo";
  justify-items: center;
}
.op-sum > .op-sym {
  grid-area: sym;
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif;
  font-size: 1.3em;
  line-height: 1;
}
.op-sum > sup { grid-area: hi; }
.op-sum > sub { grid-area: lo; }
/* Integrals: one thin, slanted sign everywhere, with the upper limit beside its top end and the lower limit beside its
   bottom end (as in print). The sign is drawn as a mask in the text colour, so it stays thin at any height and looks the
   same in every browser and font; js/guide.js tags each sign (data-sign), and without it the font's own sign shows.
   Display lines (formula cards, worked lines, the concept map) get the tall sign, running text a shorter one. */
.op-int {
  --int-h: 1.6em;
  grid-template-areas: "sym hi" "sym lo";
  grid-template-columns: auto auto;
  align-items: center;
  margin-inline: 0.04em 0.14em;
}
.formula .op-int,
.math-line .op-int,
.cm-formula .op-int {
  --int-h: 2.3em;
}
.op-int > .op-sym {
  grid-area: sym;
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif;
  font-size: 1.7em;
  line-height: 1;
  padding-inline-end: 0.06em;
}
.op-int > .op-sym[data-sign] {
  display: inline-block;
  height: var(--int-h);
  padding: 0;
  overflow: hidden;
  font-size: 1em;
  line-height: var(--int-h);
  -webkit-text-fill-color: transparent;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.op-int > .op-sym[data-sign="int"] {
  width: calc(var(--int-h) * 0.40);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3C/g%3E%3C/svg%3E");
}
.op-int > .op-sym[data-sign="oint"] {
  width: calc(var(--int-h) * 0.40);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3Cellipse cx='20.0' cy='50' rx='7.5' ry='7.5' fill='none' stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3Cellipse cx='20.0' cy='50' rx='7.5' ry='7.5' fill='none' stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E");
}
.op-int > .op-sym[data-sign="iint"] {
  width: calc(var(--int-h) * 0.56);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3Cpath d='M49 9C49 2 41 1 39.2 11' stroke-width='2.4'/%3E%3Cpath d='M39.2 11C37.4 32 35.4 68 33 89' stroke-width='3.3'/%3E%3Cpath d='M33 89C31.4 99 23 99 23 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='49.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='22.6' cy='91.4' r='3.3'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3Cpath d='M49 9C49 2 41 1 39.2 11' stroke-width='2.4'/%3E%3Cpath d='M39.2 11C37.4 32 35.4 68 33 89' stroke-width='3.3'/%3E%3Cpath d='M33 89C31.4 99 23 99 23 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='49.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='22.6' cy='91.4' r='3.3'/%3E%3C/g%3E%3C/svg%3E");
}
.op-int > .op-sym[data-sign="oiint"] {
  width: calc(var(--int-h) * 0.56);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3Cpath d='M49 9C49 2 41 1 39.2 11' stroke-width='2.4'/%3E%3Cpath d='M39.2 11C37.4 32 35.4 68 33 89' stroke-width='3.3'/%3E%3Cpath d='M33 89C31.4 99 23 99 23 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='49.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='22.6' cy='91.4' r='3.3'/%3E%3Cellipse cx='28.0' cy='50' rx='16' ry='7.5' fill='none' stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3Cpath d='M49 9C49 2 41 1 39.2 11' stroke-width='2.4'/%3E%3Cpath d='M39.2 11C37.4 32 35.4 68 33 89' stroke-width='3.3'/%3E%3Cpath d='M33 89C31.4 99 23 99 23 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='49.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='22.6' cy='91.4' r='3.3'/%3E%3Cellipse cx='28.0' cy='50' rx='16' ry='7.5' fill='none' stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E");
}
.op-int > .op-sym[data-sign="iiint"] {
  width: calc(var(--int-h) * 0.72);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3Cpath d='M49 9C49 2 41 1 39.2 11' stroke-width='2.4'/%3E%3Cpath d='M39.2 11C37.4 32 35.4 68 33 89' stroke-width='3.3'/%3E%3Cpath d='M33 89C31.4 99 23 99 23 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='49.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='22.6' cy='91.4' r='3.3'/%3E%3Cpath d='M65 9C65 2 57 1 55.2 11' stroke-width='2.4'/%3E%3Cpath d='M55.2 11C53.4 32 51.4 68 49 89' stroke-width='3.3'/%3E%3Cpath d='M49 89C47.4 99 39 99 39 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='65.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='38.6' cy='91.4' r='3.3'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 100' fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg fill='none'%3E%3Cpath d='M33 9C33 2 25 1 23.2 11' stroke-width='2.4'/%3E%3Cpath d='M23.2 11C21.4 32 19.4 68 17 89' stroke-width='3.3'/%3E%3Cpath d='M17 89C15.4 99 7 99 7 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='33.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='6.6' cy='91.4' r='3.3'/%3E%3Cpath d='M49 9C49 2 41 1 39.2 11' stroke-width='2.4'/%3E%3Cpath d='M39.2 11C37.4 32 35.4 68 33 89' stroke-width='3.3'/%3E%3Cpath d='M33 89C31.4 99 23 99 23 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='49.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='22.6' cy='91.4' r='3.3'/%3E%3Cpath d='M65 9C65 2 57 1 55.2 11' stroke-width='2.4'/%3E%3Cpath d='M55.2 11C53.4 32 51.4 68 49 89' stroke-width='3.3'/%3E%3Cpath d='M49 89C47.4 99 39 99 39 91' stroke-width='2.4'/%3E%3Ccircle fill='black' cx='65.4' cy='8.6' r='3.3'/%3E%3Ccircle fill='black' cx='38.6' cy='91.4' r='3.3'/%3E%3C/g%3E%3C/svg%3E");
}
.op-int > sup { grid-area: hi; align-self: start; margin-left: 0.18em; }
.op-int > sub { grid-area: lo; align-self: end; margin-left: -0.06em; }

/* Square roots: a thin sign that stretches to the height of what is under it, joined to a bar over all of it (as in
   print), so the reader sees exactly what the root covers. Markup:
   <span class="sqrt"><span class="root">√</span><span class="rad">x<sup>2</sup> + y<sup>2</sup></span></span>.
   The real √ stays in the text for copying and screen readers; the mask draws the sign in the text colour. */
.sqrt {
  position: relative;
  display: inline-block;
  padding-left: 0.6em;
  white-space: nowrap;
}
.sqrt > .root {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.62em;
  overflow: hidden;
  -webkit-text-fill-color: transparent;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 62 100' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M2 60L13 54L28 88L54 0L62 0L62 6L57.5 6L31 100L26 100L11 61L4 64Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 62 100' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M2 60L13 54L28 88L54 0L62 0L62 6L57.5 6L31 100L26 100L11 61L4 64Z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
.sqrt > .rad {
  display: inline-block;
  padding: 0.18em 0.08em 0 0.06em;
  border-top: 0.075em solid currentColor;
}

/* Formula cards: one formula per line, italic variables, the note set apart under a hairline. */
.eq {
  gap: 0;
}
.eq > strong {
  margin-bottom: 8px;
}
.formula {
  padding: 0.12em 0;
  line-height: 1.6;
  word-spacing: 0.02em;
}
.formula var {
  font-style: italic;
  padding-inline-end: 0.04em;
}
.eq-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  line-height: 1.55;
}

/* HUD frame (owner's request, 2026-11-04). The tick ruler under section headings was removed at the owner's request
   (it carried no information); the reading chip (js/hud.js) shows where you are instead.
   Formula cards carry four corner brackets; worked examples and recall checks, which already have a top rule, carry
   the two bottom ones. Colour is --hud-c: FAU blue on light paper, signal cyan in dark mode. */
main h2 {
  position: relative;
  max-width: var(--measure);
}
/* Reading chip (js/hud.js): fixed under the reading-progress bar, right-aligned to the column's edge, wide screens only. */
.hud-chip {
  position: fixed;
  top: 12px;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  transform: translateX(-100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--hud-c);
  color: var(--muted);
  font: 600 0.78rem/1 var(--f-body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.hud-chip.on {
  opacity: 1;
}
.hud-chip .hc-sec {
  color: var(--hud-c);
  font-weight: 700;
}
.hc-bar {
  width: 48px;
  height: 4px;
  background: var(--line);
}
.hc-bar i {
  display: block;
  height: 100%;
  background: var(--signal);
  box-shadow: var(--glow);
}
.hud-chip .hc-time {
  color: var(--ink);
}
@media (min-width: 901px) {
  .hud-chip {
    display: flex;
  }
}
.eq {
  background:
    linear-gradient(var(--hud-c), var(--hud-c)) left top / 10px 2px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) left top / 2px 10px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right top / 10px 2px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right top / 2px 10px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) left bottom / 10px 2px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) left bottom / 2px 10px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right bottom / 10px 2px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right bottom / 2px 10px no-repeat,
    var(--paper-2);
}
.worked,
.recall {
  background:
    linear-gradient(var(--hud-c), var(--hud-c)) left bottom / 10px 2px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) left bottom / 2px 10px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right bottom / 10px 2px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right bottom / 2px 10px no-repeat,
    var(--paper-2);
}
.recall {
  background-color: transparent;
}
@media print {
  .hud-chip {
    display: none !important;
  }
  .eq,
  .worked {
    background: var(--paper-2);
  }
  .recall {
    background: none;
  }
}

/* Long unbroken strings (a binary sum, a URL) wrap instead of widening the page. Formula cards that are still too wide
   scroll inside a thin scrollbar rather than a heavy one. */
main p,
main li {
  overflow-wrap: break-word;
}
.eq {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

/* How to use and Version log pages. */
.hud-demo {
  font: 600 0.8rem/1 var(--f-body);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  white-space: pre;
  color: var(--hud-c);
}
.log-date {
  margin: -6px auto 12px;
  color: var(--muted);
  font-weight: 600;
}

/* One centred column. Everything capped at the measure sits in the middle of the reading panel, so the empty space on
   its left and right is equal at every width; tables, the lab bench and the concept map still use the full panel. */
main > :not(.sign):not(section) {
  margin-left: max(clamp(18px, 4vw, 56px), calc((100% - var(--measure)) / 2));
  margin-right: max(clamp(18px, 4vw, 56px), calc((100% - var(--measure)) / 2));
}
main section > p,
main section > ul,
main section > ol,
main section > h2,
main section > h3,
main section > details,
main section > .worked,
main section > .recall,
main section > .review,
main section > .lab-link,
main section > #lab-results,
main section > .eq,
main .cold-start > :not(h2),
main section > .cm-detail,
main section > .res-list {
  margin-left: auto;
  margin-right: auto;
}
/* The rail scrolls on short screens: a thin, pale scrollbar with room before it, so the rail's right edge is not a
   heavy bar pressed against its buttons. */
nav.toc {
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
@media (max-width: 900px) {
  nav.toc {
    padding-right: 0;
  }
}
/* Cards keep the same space above their first line as below their last. */
.worked > :last-child,
.recall > :last-child,
.challenge > :last-child {
  margin-bottom: 0;
}
/* Pager cards share a row height; a short title sits in the middle instead of leaving a gap below it. */
.chapter-pager > * {
  justify-content: center;
}

/* Folding the contents rail (js/nav.js, wide screens only). The arrow sits at the rail's top right; folded, the rail
   becomes a 36px strip holding only the arrow, and the reading panel takes the width. */
.rail-toggle {
  display: none;
}
@media (min-width: 901px) {
  .rail-toggle {
    position: absolute;
    top: 24px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid var(--act);
    background: transparent;
    color: var(--act);
    cursor: pointer;
  }
  .rail-toggle:hover {
    background: var(--fau-tint);
  }
  .rail-toggle svg {
    transition: transform 200ms var(--ease);
  }
  nav.toc a.brand {
    padding-right: 46px;
  }
  .wrap {
    transition: grid-template-columns 260ms var(--ease);
  }
  html.rail-folded .wrap {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  html.rail-folded nav.toc {
    padding-right: 0;
    overflow: visible;
  }
  html.rail-folded nav.toc > :not(.rail-toggle) {
    display: none;
  }
  html.rail-folded .rail-toggle {
    right: 0;
  }
  html.rail-folded .rail-toggle svg {
    transform: scaleX(-1);
  }
}
@media print {
  .rail-toggle {
    display: none;
  }
}

/* Formula cards never scroll sideways: a formula line wraps, at relation signs when js/hud.js has segmented it
   (each .f-seg stays whole), and balanced so the lines come out similar in length. Fractions and stacked limits are
   inline grids, so they never split. */
.eq {
  overflow-x: visible;
}
.formula {
  width: auto;
  min-width: 0;
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.f-seg {
  white-space: nowrap;
}
.f-seg.f-free {
  white-space: normal;
}

/* Super- and subscripts at 80% of the surrounding size, without stretching the line: in formulas they were set
   at the browser's "smaller" against a math serif and read too small. */
.formula sub,
.formula sup,
main p sub,
main p sup,
main li sub,
main li sup {
  font-size: 0.8em;
  line-height: 0;
}
.formula sup sup,
.formula sub sub,
.formula sup sub,
.formula sub sup {
  font-size: 0.85em;
}
/* Limits stacked on ∑ ∏ ∫ ⋃ keep their own grid line height, a little larger than before for legibility. */
.formula .op > sub,
.formula .op > sup,
.op > sub,
.op > sup {
  font-size: 0.72em;
  line-height: 1.1;
}
/* Formula spacing added by js/hud.js where the source sets signs flush: x ∈ A, X × Y, (x, y), f (x). */
.formula .mo,
.cm-formula .mo {
  margin-inline: 0.22em;
}
.formula .mp,
.cm-formula .mp {
  margin-right: 0.22em;
}
.formula var.ic,
.cm-formula var.ic {
  margin-right: 0.08em;
}
.formula var + sup,
.cm-formula var + sup {
  margin-left: 0.06em;
}
.eq-note .mo {
  margin-inline: 0.18em;
}

/* Arrow diagrams (figure.amap, drawn by js/guide.js): sets as boxes, elements as labels, one arrow per pair. An input
   without exactly one arrow and an output reached twice are action blue; an output never reached is grey. */
.arrows {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 32px;
  max-width: var(--measure);
  margin: 20px auto;
}
.amap {
  flex: 0 1 220px;
  margin: 0;
}
.amap svg {
  display: block;
  margin: 0 auto 10px;
  overflow: visible;
}
.amap .set {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}
.amap .set-name {
  fill: var(--muted);
  font: 700 13px/1 var(--f-display);
  text-anchor: middle;
}
.amap .item {
  fill: var(--ink);
  font: italic 15px/1 "Cambria Math", "STIX Two Math", "Times New Roman", serif;
  text-anchor: middle;
}
.amap .item.hot {
  fill: var(--act);
  font-weight: 700;
}
.amap .item.off {
  fill: var(--muted);
  opacity: 0.6;
}
.amap .arrow {
  stroke: var(--ink);
  stroke-width: 1.4;
}
.amap .arrow.hot {
  stroke: var(--act);
  stroke-width: 2;
}
.amap .mk-ink {
  fill: var(--ink);
}
.amap .mk-hot {
  fill: var(--act);
}
.amap figcaption {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}
.amap figcaption strong {
  color: var(--ink);
}
/* "In plain words": the idea before the symbols, set apart by a rule in the subject colour. */
.plain {
  max-width: var(--measure);
  margin: 0 auto 18px;
  padding: 12px 18px;
  border-left: 3px solid var(--fau-mark);
  background: var(--surface);
  font-size: 1.05rem;
}
/* "Read it as": how a formula card is said aloud, the first line of its note. */
.eq-note .say {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-style: italic;
}
/* Four diagrams sit two by two rather than three and a straggler. */
.arrows:has(> .amap:nth-child(4)) > .amap {
  flex-basis: calc(50% - 16px);
}

/* Picture diagrams (figure.viz, drawn by js/guide.js; the PDF draws the same data in TikZ). A row of them sits in
   div.figs, laid out like the arrow diagrams. Thick, shaded or filled parts are in the action colour. */
.figs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 32px;
  max-width: var(--measure);
  margin: 20px auto;
}
.figs:has(> figure:nth-child(4)) > figure {
  flex-basis: calc(50% - 16px);
}
.viz {
  flex: 0 1 240px;
  margin: 0;
}
.figs > .amap {
  flex: 0 1 220px;
}
.viz svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 10px;
  overflow: visible;
}
.viz figcaption {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}
.viz figcaption strong {
  color: var(--ink);
}
.vz-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
}
.vz-line.thick {
  stroke-width: 2.2;
}
.vz-dash {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
}
.vz-seg {
  stroke: var(--act);
  stroke-width: 4;
}
.vz-plate {
  stroke: var(--ink);
  stroke-width: 5;
}
.vz-head {
  fill: var(--ink);
}
.vz-head.hot {
  fill: var(--act);
}
.vz-fill {
  /* a solid tint, not transparency, so overlapping shaded regions keep one colour (the PDF uses a solid tint too) */
  fill: color-mix(in srgb, var(--act) 28%, var(--surface));
}
.vz-bg {
  fill: var(--surface);
}
.vz-dot {
  fill: var(--act);
  stroke: var(--act);
  stroke-width: 2;
}
.vz-dot.open {
  fill: var(--surface);
}
.vz-cell {
  fill: var(--paper-2);
  stroke: var(--line);
  stroke-width: 1.5;
}
.vz-cell.hot {
  fill: var(--act);
  fill-opacity: 0.28;
  stroke: var(--act);
}
.vz-charge {
  fill: var(--act);
}
.vz-text {
  fill: var(--ink);
  font: 600 14px/1 var(--f-body);
}
.vz-small {
  fill: var(--muted);
  font: 500 12px/1 var(--f-body);
}
.vz-it {
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif;
  font-style: italic;
  font-size: 15px;
}
.vz-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.vz-acc {
  fill: var(--act);
  font-weight: 700;
}
.vz-on {
  fill: var(--surface);
}
.vz-text.vz-on {
  font-size: 17px;
  font-weight: 800;
}
.vz-seg.thin {
  stroke-width: 3;
  fill: none;
}
.vz-line.thick,
.vz-dash.thick {
  stroke-width: 2;
}
polyline.vz-line,
polyline.vz-dash,
path.vz-line:not(.vz-fill, .vz-cell, .vz-bg),
path.vz-dash,
path.vz-seg {
  fill: none;
}
/* A label that has to cross a line gets a halo in the background colour, so the line breaks around the letters. */
.vz-halo {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 4px;
  stroke-linejoin: round;
}
/* Curves and bends join round, so sampled lines read as smooth rather than kinked. */
.viz svg :is(polyline, path, line),
.amap svg line {
  stroke-linejoin: round;
}
.viz svg :is(polyline, path).vz-line,
.viz svg :is(polyline, path).vz-seg {
  stroke-linecap: round;
}

/* A flow chart is drawn twice: a row, and a stack for narrow screens, where the row's text would shrink too far. */
.viz svg.vz-narrow {
  display: none;
}
@media (max-width: 560px) {
  .viz svg.vz-wide {
    display: none;
  }
  .viz svg.vz-narrow {
    display: block;
  }
}
/* Coordinate-system pictures are 3D and busy, so they take a wider column: two to a row. */
.figs > .viz[data-kind^="coord"] {
  flex: 0 1 330px;
}
/* Wide diagrams (a chain of steps) take a full row, so their labels stay readable. */
.figs > .viz[data-kind="flow"] {
  flex: 1 1 100%;
  max-width: 520px;
}
.vz-group {
  fill: none;
  stroke: var(--act);
  stroke-width: 2.5;
}
