@font-face {
  font-family: "Chaparral Pro";
  src: url("../fonts/ChaparralPro-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Chaparral Pro";
  src: url("../fonts/ChaparralPro-Semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Chaparral Pro";
  src: url("../fonts/ChaparralPro-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1d1b19;
  --muted: #5d554a;
  --rule: #c9c1b5;
  --paper: #ffffff;
  --accent: #7a2d12;
  --serif: "Chaparral Pro", Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --plate-max: 980px;
  /* Room below the plate for the sticky offset, the toolbar and the caption. */
  --frame-reserve: 112px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--serif);
  -webkit-text-size-adjust: 100%;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--rule);
  font: 600 13px/1.3 var(--sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand a { color: inherit; text-decoration: none; }
.brand a:hover { text-decoration: underline; }

.atlas {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 64px;
}

.crumbs {
  font: 13px/1.5 var(--sans);
  color: var(--muted);
  margin-bottom: 22px;
}

.crumbs a { color: inherit; }
.crumbs span { padding: 0 6px; }

.eyebrow {
  margin: 0 0 6px;
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The book sets each landform name in Helvetica Neue Black capitals over a
   band of thin rules; Arial Black is the matching extra-bold Arial. */
.unit__title {
  margin: 0;
  font: 900 clamp(25px, 3.7vw, 38px)/1.08 "Arial Black", "Arial Bold", Arial, Helvetica, sans-serif;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.tick-rule {
  height: 13px;
  margin: 14px 0 22px;
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 5px);
}

.unit {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* A plate with a switcher below it needs a little more room reserved. */
.unit:has(.plate__switch) { --frame-reserve: 196px; }

.unit__figure { position: sticky; top: 16px; }

/* A picture that ran across a spread in the book takes the full page width,
   as the open book gave it both pages; the text then follows in two columns. */
.unit:has(.plate[data-wide]) { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.unit:has(.plate[data-wide]) .unit__figure { position: static; }
.unit:has(.plate[data-wide]) .plate { max-width: none; }
.unit:has(.plate[data-wide]) .reading { max-width: none; columns: 2 26em; column-gap: 44px; }
.unit:has(.plate[data-wide]) .reading .lead { column-span: all; max-width: 40em; }
.unit:has(.plate[data-wide]) .inset { break-inside: avoid; }

.plate {
  position: relative;
  max-width: var(--plate-max);
  margin: 0;
}

/* The frame keeps one fixed size whatever the zoom: it never grows past the
   bottom of the screen. Zooming enlarges the plate inside it, and the viewer
   moves around with the hand (dragging) or by scrolling. --ratio is 1 for a
   page plate and 2 for a picture that ran across a spread. */
.plate { --ratio: 1; }

.plate__frame {
  position: relative;
  aspect-ratio: var(--ratio);
  width: 100%;
  max-width: min(100%, calc((100vh - var(--frame-reserve)) * var(--ratio)));
  max-width: min(100%, calc((100dvh - var(--frame-reserve)) * var(--ratio)));
  margin: 0 auto;
  /* Hidden, not auto: the mouse wheel then scrolls the page even over the
     plate, and the plate itself moves with the hand (drag) or arrow keys. */
  overflow: hidden;
  background: #000;
}

/* On touch screens a finger moves inside the plate natively. */
@media (pointer: coarse) {
  .plate__frame { overflow: auto; overscroll-behavior: contain; scrollbar-width: none; }
}

.plate__frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plate__frame.is-zoomed { cursor: grab; }
.plate__frame.is-panning { cursor: grabbing; }

.plate__stage {
  position: relative;
  width: calc(100% * var(--zoom, 1));
  aspect-ratio: var(--ratio);
}

.plate__stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.plate__labels {
  position: absolute;
  inset: 0;
  margin: 0;
  list-style: none;
  padding: 0;
  pointer-events: none;
}

.plate__labels li {
  position: absolute;
  white-space: nowrap;
  /* The line box has to clear Hungarian accents, or É and Ű lose their marks
     against a light plate. */
  font: 11px/1.45 var(--sans);
  color: #000;
  background: #fff;
  padding: 0 3px;
  transform: translateY(-2px);
}

.plate__labels li.is-name { font-weight: 700; }
.plate__labels li.is-tracked { letter-spacing: 0.22em; }
.plate[data-labels="off"] .plate__labels { display: none; }

.plate__rule {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  pointer-events: none;
}

.plate__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font: 13px/1.3 var(--sans);
}

.plate__bar button {
  font: inherit;
  color: var(--ink);
  background: #f4f1ec;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 5px 10px;
  cursor: pointer;
}

.plate__bar button:hover { background: #e8e3da; }
.plate__bar button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.plate__bar output { color: var(--muted); min-width: 3.4em; }

.plate__caption {
  margin: 8px 0 0;
  font: 12px/1.45 var(--sans);
  color: var(--muted);
}

.plate__switch {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.plate__switch button {
  display: block;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.plate__switch img { width: 84px; height: 84px; object-fit: cover; display: block; }
.plate__switch { flex-wrap: wrap; }
.plate__switch button[aria-current="true"] { border-color: var(--accent); }

.reading { max-width: 31em; }

.reading .lead {
  margin: 0 0 20px;
  font-weight: 600;
  font-size: 1.12em;
  line-height: 1.45;
}

.reading p { margin: 0 0 14px; }

.reading .body--opening::first-letter {
  float: left;
  font-size: 3.15em;
  line-height: 0.82;
  padding: 0.06em 0.09em 0 0;
  font-weight: 400;
}

.reading .note {
  font-size: 0.93em;
  color: var(--muted);
}

.plate-ref { color: var(--accent); }
.plate-ref:hover { text-decoration-thickness: 2px; }

.reading .see-also {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 0.95em;
}

.reading__title {
  margin: 30px 0 10px;
  font: 900 19px/1.15 "Arial Black", "Arial Bold", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
}
.reading__title:first-child { margin-top: 0; }

/* The English terms under a title, as the book prints them in light Helvetica. */
.unit__terms,
.reading__terms {
  font-family: var(--sans);
  color: var(--muted);
}
.unit__terms { margin: 8px 0 0; font-size: 16px; line-height: 1.35; }
.reading__terms { margin: -4px 0 12px; font-size: 14px; line-height: 1.35; }

.inset { margin: 24px 0 0; scroll-margin-top: 16px; }
/* The figure shrinks to its picture, so the labels stay on it even when a
   tall strip is limited to the height of the screen. */
.inset__figure { position: relative; margin: 0; width: fit-content; max-width: 100%; }
.inset__figure img { display: block; max-width: 100%; height: auto; max-height: 82vh; width: auto; }
.inset__credit { display: block; font: 11px/1.4 var(--sans); color: var(--muted); }

.inset__labels {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

/* On radar figures the labels look like those on the plates; on maps drawn
   on white they keep the book's italic small capitals. */
.inset__labels li {
  position: absolute;
  white-space: nowrap;
  font: 10px/1.45 var(--sans);
  color: #000;
  background: #fff;
  padding: 0 3px;
  transform-origin: 0 0;
}
.inset__labels li.is-name { font-weight: 700; }
.inset--map .inset__labels li {
  font: italic 700 11px/1.1 var(--serif);
  font-variant-caps: small-caps;
  color: #1d1b19;
  background: none;
  padding: 0;
}

.inset figcaption {
  margin: 8px 0 0;
  font: 700 13px/1.45 var(--serif);
}

.unit__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin: 46px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font: 14px/1.4 var(--sans);
}

.unit__nav a { color: var(--ink); }

.folio {
  margin: 28px 0 0;
  font: 12px/1.4 var(--sans);
  color: var(--muted);
}

/* Contents */
/* The printed cover shares the title's row: at its right end, on the rule,
   its foot level with the foot of the title. */
.contents__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.contents__head .unit__title { min-width: 0; }
.contents__cover {
  display: block;
  flex: none;
  width: clamp(48px, 8vw, 95px);
  height: auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.contents__head + .tick-rule { margin-top: 10px; }
.contents__intro { max-width: 44em; }
.contents__status { font: 13px/1.5 var(--sans); color: var(--muted); }

.chapter { margin: 36px 0 0; }

.chapter h2 {
  margin: 0 0 14px;
  font: 700 14px/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Each card fills its grid cell, so the white title cells of a row end level. */
.cards > li { display: flex; }
.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--rule);
}
.card .card__text { flex: 1 1 auto; }

.card img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
/* The title cell under each thumbnail stays white on the blue page. */
.card__text { padding: 10px 12px 14px; background: #fff; }
.card__text h3 { margin: 0 0 4px; font: 700 15px/1.25 var(--sans); text-transform: uppercase; }
.card__text span { font: 12px/1.4 var(--sans); color: var(--muted); }
.card:hover { border-color: var(--ink); }
.card:hover .card__text h3 { text-decoration: underline; }

footer {
  border-top: 1px solid var(--rule);
  padding: 18px 24px 40px;
  font: 13px/1.55 var(--sans);
  color: var(--muted);
}

.cite { max-width: 1232px; margin: 0 auto; }
.cite h2 {
  margin: 0 0 6px;
  font: 700 12px/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cite p { margin: 0 0 6px; padding-left: 2em; text-indent: -2em; overflow-wrap: anywhere; }
.cite a { color: inherit; }
.cite__label { font-weight: 700; }

@media (max-width: 900px) {
  .unit { grid-template-columns: minmax(0, 1fr); gap: 28px; --frame-reserve: 108px; }
  .unit:has(.plate__switch) { --frame-reserve: 200px; }
  .unit__figure { position: static; }
  .atlas { padding: 16px 16px 48px; }
  .brand { padding: 10px 16px; }
  .plate__labels li { font-size: 9.5px; }
}

/* Front and back matter */
.matter { max-width: 44em; }
.matter--wide { max-width: none; }
.matter--wide > p, .matter--wide > .lead, .matter--wide > .steps,
.matter--wide > .reading__title { max-width: 44em; }
.matter .lead { margin: 0 0 20px; font-weight: 600; font-size: 1.12em; line-height: 1.45; }
.matter p { margin: 0 0 14px; }
.matter .note { color: var(--muted); font-size: 0.95em; }
.matter strong { font-weight: 700; }
.matter a, .reading a { color: var(--accent); }
.matter__figure { margin: 6px 0 22px; }
.matter__figure img { display: block; max-width: 100%; height: auto; }
.matter__figure figcaption { margin-top: 6px; font: 13px/1.45 var(--sans); color: var(--muted); }
.matter__figure--tunde { float: right; width: 150px; margin: 0 0 16px 24px; }
.matter__figure--cover { max-width: 420px; }
.matter__figure--havoc { max-width: 440px; }

.facts { margin: 0 0 28px; padding-left: 1.6em; }
.facts li { margin: 0 0 10px; }
.facts li::marker { font-weight: 700; }
.facts__more { display: block; color: var(--ink); }

.motto { margin: 0 0 30px; padding: 0 0 0 18px; border-left: 2px solid var(--rule); font-style: italic; }
.motto p { margin: 0 0 12px; }
.motto footer { border: 0; padding: 0; font: 13px/1.45 var(--sans); font-style: normal; color: var(--muted); }

.colophon { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px;
  margin: 0; font: 14px/1.5 var(--sans); }
.colophon dt { font-weight: 700; }
.colophon dd { margin: 0; overflow-wrap: anywhere; }

.refs { margin: 0 0 28px; padding: 0; list-style: none; font-size: 0.93em; line-height: 1.5; }
.refs li { margin: 0 0 8px; padding-left: 1.6em; text-indent: -1.6em; overflow-wrap: anywhere; }

.terms { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 22px; margin: 0 0 22px; }
.terms dt { font-weight: 700; font-style: italic; }
.terms dd { margin: 0; }
.terms__see { font: 13px/1.4 var(--sans); color: var(--muted); white-space: nowrap; }

.steps { margin: 0 0 24px; padding-left: 1.6em; }
.steps li { margin: 0 0 10px; }

.exercise { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); scroll-margin-top: 16px; }
.exercise h2 { margin: 0 0 14px; font: 900 19px/1.15 "Arial Black", "Arial Bold", Arial, Helvetica, sans-serif;
  text-transform: uppercase; }
.exercise__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: end; }
.exercise__pair figure { margin: 0; }
.exercise__pair figcaption { margin-top: 6px; font: 13px/1.45 var(--sans); color: var(--muted); }
.exercise__radar img { display: block; width: 100%; height: auto; }
.exercise__sheet { position: relative; line-height: 0; border: 1px solid var(--rule); }
.exercise__sheet img { display: block; width: 100%; height: auto; }
.exercise__sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.exercise__sheet canvas[data-layer="paint"] { opacity: 0.5; pointer-events: none; }
.exercise__sheet canvas[data-layer="ink"] { cursor: crosshair; }
.exercise__tools { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 10px; font: 13px/1.3 var(--sans); }
.exercise__group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.exercise__tools button { min-height: 32px; padding: 5px 10px; border: 1px solid var(--rule); background: #fff;
  color: var(--ink); font: inherit; cursor: pointer; }
.exercise__tools button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.exercise__tools .swatch { width: 32px; padding: 0; background: var(--swatch); }
.exercise__tools .swatch[aria-pressed="true"] { background: var(--swatch); outline: 3px solid var(--ink); outline-offset: 2px; }
.exercise__letter input { width: 3.2em; min-height: 32px; font: 700 15px/1 var(--sans); text-align: center; }
.exercise__angle, .exercise__check { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.exercise__angle input { width: 110px; }
.exercise__angle input:disabled { opacity: 0.45; }
.exercise__sheet[data-tool="name"] canvas[data-layer="ink"] { cursor: text; }
/* Names typed on a baseline. The baseline starts at the point clicked, and
   the name turns around it. Sizes follow the width of the sheet. */
.exercise__names { position: absolute; inset: 0; pointer-events: none; container-type: inline-size; line-height: 1; }
.name-label { position: absolute; width: 0; height: 0; transform-origin: 0 0; }
.name-label__body { position: absolute; left: 0; bottom: 0; display: flex; align-items: flex-end; gap: 2px;
  white-space: nowrap; pointer-events: auto; }
.name-label__text { box-sizing: content-box; min-width: 2ch; padding: 0 0.5em 0.12em 0.12em; border: 0;
  border-bottom: max(1px, 0.09em) solid currentColor; background: transparent; color: inherit;
  font: italic 600 3.2cqw/1.1 var(--serif); field-sizing: content; outline: none; }
.name-label__text:focus { background: rgba(255, 255, 255, 0.55); }
.exercise__names.is-plain .name-label__text { border-bottom-color: transparent; }
.name-label__turn, .name-label__move, .name-label__remove { width: 24px; height: 24px; padding: 0;
  border: 1px solid var(--rule); border-radius: 50%; background: #fff; color: var(--ink);
  font: 14px/1 var(--sans); cursor: grab; opacity: 0; touch-action: none; }
.name-label__remove { cursor: pointer; }
.name-label:hover .name-label__body > button,
.name-label:focus-within .name-label__body > button { opacity: 1; }
.exercise__notes { margin: 14px 0 0; max-width: 44em; font: 14px/1.4 var(--sans); }
.exercise__notes label { display: block; margin-bottom: 4px; font-weight: 700; }
.exercise__notes textarea { display: block; width: 100%; padding: 8px; font: 15px/1.45 var(--serif); }
.exercise__status { display: block; min-height: 1.4em; color: var(--muted); font-size: 12px; }

.system { margin: 8px 0 0; }
.system__svg { display: block; width: 100%; max-width: 980px; height: auto; font-family: var(--serif); }
.system__svg text { fill: var(--ink); text-anchor: middle; }
.system__svg a text { fill: var(--accent); }
.system__hit { fill: transparent; }
.system__svg a:hover .system__hit, .system__svg a:focus .system__hit { fill: rgba(122, 45, 18, 0.14); }
.system__svg a:focus { outline: none; }
.system__svg a:focus-visible .system__hit { stroke: var(--accent); stroke-width: 1.2; }
.system figcaption { margin-top: 6px; font: 13px/1.45 var(--sans); color: var(--muted); }
.system__list { margin: 30px 0 0; }
.system__list h2 { margin: 0 0 10px; font: 700 14px/1.3 var(--sans); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); }
.system__list ul { columns: 3 14em; column-gap: 28px; margin: 0; padding: 0; list-style: none; }
.system__list li { margin: 0 0 6px; break-inside: avoid; }

.matter-links { margin: 36px 0 0; }
.matter-links h2 { margin: 0 0 12px; font: 700 14px/1.3 var(--sans); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); }

@media (max-width: 700px) {
  .exercise__pair { grid-template-columns: minmax(0, 1fr); }
  .matter__figure--tunde { width: 96px; margin-left: 14px; }
  .colophon, .terms { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .colophon dd, .terms dd { margin-bottom: 8px; }
}

/* Printing: one column on A4 or Letter. The type area is 180 x 245 mm, which
   fits inside both sheet sizes once the 14 mm margin is taken off. */
@page { size: auto; margin: 14mm; }

/* Cover theme (2026-11-14): the light blue of the printed cover as the page
   background on every page. The book title of the contents page is set like
   the cover title - light sans-serif capitals in white, each line on its own
   dark blue box with rounded corners; landform and chapter titles keep their
   black capitals. The greys and the link colour are darkened to stay readable
   on the blue. */
:root {
  --paper: #77b8e1;
  --cover-blue: #22408e;
  --muted: #243650;
  --rule: #4f84b4;
  --accent: #172a63;
}
.contents__head .unit__title {
  font: 300 clamp(25px, 3.7vw, 38px)/1.46 "Helvetica Neue", "Segoe UI", Arial, Helvetica, sans-serif;
  letter-spacing: 0.01em;
  color: #fff;
}
.contents__head .unit__title > span {
  background: var(--cover-blue);
  border-radius: 0.2em;
  padding: 0.01em 0.24em 0.05em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media print {
  body { font-size: 10.5pt; background: #fff; }
  /* Backgrounds are usually not printed: the title goes back to dark letters. */
  .contents__head .unit__title { color: var(--ink); font-weight: 400; }
  .contents__head .unit__title > span { background: none; padding: 0; }
  .brand, .crumbs, .unit__nav, .plate__bar, .plate__switch { display: none !important; }
  footer { padding: 6mm 0 0; font-size: 8pt; color: #000; break-inside: avoid; }
  .cite { max-width: 180mm; }
  .atlas { max-width: 180mm; padding: 0; }
  .unit { display: block; }
  .unit__figure { position: static; }
  .plate { max-width: 180mm; }
  .plate__frame { max-width: none; aspect-ratio: auto; overflow: visible; cursor: auto; }
  .plate__stage { width: 100%; }
  .plate__labels li { font-size: 7pt; background: #fff; }
  .reading { max-width: none; margin-top: 8mm; columns: 2; column-gap: 8mm; }
  .reading .lead { column-span: all; }
  .inset { break-inside: avoid; }
  .matter { max-width: none; }
  .exercise__tools, .exercise__status, .system__list, .name-label__body > button { display: none !important; }
  .exercise { break-before: page; border: 0; }
  .exercise__pair { gap: 6mm; }
  .exercise__notes textarea { border: 1px solid #999; }
  .refs li { break-inside: avoid; }
  .system__svg { max-width: 180mm; }
}
