/* zinked.ai — a landing page that is a book.

   Without scripts this is one long readable page. With them (html.js) the
   book is laid out in columns, one column to a page, and js/reader.js shows
   one or two at a time. Chrome is black, blunt and square; the page is paper
   and a serif. One accent, ink blue. */

/* ---------- Colours and type ---------- */

:root {
  --paper: #F6F2E9;
  --ink: #0B0B0B;
  --soft: #5E584E;
  --accent: #27408B;
  --on-accent: #FFFDF8;
  --wash: #D3D4D9;
  --agent: #1F6F5C;
  --on-agent: #FFFDF8;

  --sans: system-ui, -apple-system, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --face: var(--serif);
  --base: clamp(18px, 0.4vw + 16.4px, 21px);
  --scale: 1;

  --rule: 3px;
  --bar: calc(56px + env(safe-area-inset-top, 0px));
  --band: calc(52px + env(safe-area-inset-bottom, 0px));
}

:root[data-theme="white"] { --paper: #FFFFFF; --soft: #55524C; --wash: #DADFEB; }

:root[data-theme="dusk"] {
  --paper: #26272A; --ink: #E4E0D6; --soft: #A8A296;
  --accent: #A3B8FF; --on-accent: #10162B; --wash: #444A5D;
  --agent: #74CDB3; --on-agent: #0B1512;
}

:root[data-theme="black"] {
  --paper: #000000; --ink: #EFEBE2; --soft: #A39C8E;
  --accent: #A3B8FF; --on-accent: #10162B; --wash: #313A54;
  --agent: #74CDB3; --on-agent: #0B1512;
}

/* With no paper chosen, a dark system gets the black one. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #000000; --ink: #EFEBE2; --soft: #A39C8E;
    --accent: #A3B8FF; --on-accent: #10162B; --wash: #313A54;
    --agent: #74CDB3; --on-agent: #0B1512;
  }
}

:root[data-face="sans"] { --face: var(--sans); }
:root[data-face="mono"] { --face: var(--mono); }
:root[data-size="0"] { --scale: 0.86; }
:root[data-size="1"] { --scale: 0.93; }
:root[data-size="3"] { --scale: 1.1; }
:root[data-size="4"] { --scale: 1.22; }
:root[data-size="5"] { --scale: 1.36; }

/* ---------- Ground rules ---------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.4 var(--sans);
}

::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute; left: 8px; top: -80px; z-index: 50;
  padding: 12px 14px;
  background: var(--ink); color: var(--paper);
  font-weight: 800;
}
.skip:focus { top: 8px; }

/* ---------- Buttons ---------- */

.btn {
  min-height: 44px; min-width: 44px;
  padding: 0 12px;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font: 800 13px/1 var(--sans);
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer;
}
.btn[aria-pressed="true"], .btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }

.count {
  display: inline-block; min-width: 1.5em;
  margin-left: 2px; padding: 2px 4px;
  background: var(--ink); color: var(--paper);
  font-variant-numeric: tabular-nums; text-align: center;
}
.btn[aria-expanded="true"] .count { background: var(--paper); color: var(--ink); }
.count.bump { animation: bump 0.32s steps(4, end); }
@keyframes bump { 50% { transform: scale(1.5); } }

.narrow { display: none; }

/* ---------- The bar at the top ---------- */

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: var(--bar);
  padding: env(safe-area-inset-top, 0px) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px));
  border-bottom: var(--rule) solid var(--ink);
  background: var(--paper);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px;
  color: inherit; text-decoration: none;
}
.mark { display: block; flex: none; width: 30px; height: 30px; }
.mark-tile { fill: #0B0B0B; }
.mark-frame { fill: none; stroke: var(--ink); stroke-width: 6; }
.mark-z { fill: #FFFFFF; }
.wordmark { font: 900 23px/1 var(--sans); letter-spacing: -0.02em; }

.bar-tools { display: flex; gap: 8px; }

/* ---------- The book as a plain page (no scripts) ---------- */

.plain-note {
  max-width: 34em; margin: 0 auto; padding: 14px 22px;
  border-bottom: 2px solid var(--ink);
  font-size: 14px;
}

.book {
  max-width: 34em;
  margin: 0 auto;
  padding: 32px 22px 96px;
  counter-reset: chapter;
  font-family: var(--face);
  font-size: calc(var(--base) * var(--scale));
  line-height: 1.5;
  text-align: justify;
  hyphens: auto; -webkit-hyphens: auto;
  hyphenate-limit-chars: 7 3 3;
  overflow-wrap: break-word;
  orphans: 2; widows: 2;
  font-kerning: normal;
}
:root[data-face="mono"] .book { font-size: calc(var(--base) * var(--scale) * 0.88); text-align: left; hyphens: manual; -webkit-hyphens: manual; }

.book p { margin: 0; }
.book p + p, .book p + .keep > p:first-child { text-indent: 1.5em; }

/* A box or a figure that cannot be cut in two is kept on one page with the
   short paragraph beside it, so that it is never alone on a page. */
.keep, .try, .object, .contents { -webkit-column-break-inside: avoid; break-inside: avoid; }
.book a { color: inherit; text-decoration-thickness: 0.1em; text-underline-offset: 0.18em; }
.book section:focus { outline: none; }

html:not(.js) .chapter { margin-top: 4em; }
html:not(.js) .try { display: none; }

/* ---------- The cover ---------- */

.cover-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cover-mark { display: block; flex: none; width: 3.4em; height: 3.4em; }

.cover h1 {
  margin: 0.2em 0 0.16em;
  font: 900 4.7em/0.86 var(--sans);
  letter-spacing: -0.03em;
  text-align: left;
}

.cover .lede {
  padding-top: 0.6em;
  border-top: 6px solid var(--ink);
  font-size: 1.12em; line-height: 1.34;
  text-align: left; hyphens: manual; -webkit-hyphens: manual; text-wrap: pretty;
}

.contents {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(4, auto); column-gap: 1.2em;
  margin: 1.3em 0 0; padding: 0;
  list-style: none; counter-reset: entry;
  border-top: 2px solid var(--ink);
  font: 800 0.76em/1.2 var(--sans);
  text-align: left; hyphens: manual; -webkit-hyphens: manual;
}
.contents li { counter-increment: entry; border-bottom: 2px solid var(--ink); }
.contents a { display: flex; align-items: center; gap: 0.7em; min-height: 44px; text-decoration: none; }
.contents a::before { content: counter(entry); min-width: 0.9em; font-variant-numeric: tabular-nums; color: var(--accent); }

.book .stamp {
  display: table;
  padding: 0.55em 0.75em 0.5em;
  background: var(--ink); color: var(--paper);
  font: 800 0.7em/1 var(--sans);
  letter-spacing: 0.11em; text-transform: uppercase;
  text-indent: 0;
}

/* ---------- Chapters ---------- */

.chapter { -webkit-column-break-before: always; break-before: column; }

.chapter h2 {
  counter-increment: chapter;
  margin: 0 0 0.62em;
  padding-top: 0.3em;
  border-top: 6px solid var(--ink);
  font: 900 1.9em/1 var(--sans);
  letter-spacing: -0.035em;
  text-align: left; hyphens: manual; -webkit-hyphens: manual; text-wrap: balance;
  break-after: avoid;
}
.chapter h2::before {
  content: counter(chapter);
  display: block;
  margin-bottom: 0.06em;
  font-size: min(2.3em, 11vh); line-height: 0.92; letter-spacing: -0.05em;
}

/* An invitation to do the thing on this page. It is the page talking about
   itself, so it is set in the chrome's face and boxed. */
.try {
  margin: 1.05em 0;
  padding: 0 12px 11px;
  border: 2px solid var(--ink);
  font: 0.8em/1.45 var(--sans);
  text-align: left; hyphens: manual; -webkit-hyphens: manual;
}
.try::before {
  content: "Try it";
  display: table;
  margin: 0 0 9px -12px;
  padding: 5px 9px 4px;
  background: var(--ink); color: var(--paper);
  font-weight: 800; font-size: 11px; line-height: 1;
  letter-spacing: 0.11em; text-transform: uppercase;
}
.book .try p + p { margin-top: 0.7em; text-indent: 0; }
.book .try + p, .book .object + p { text-indent: 0; }
.keep > :first-child { margin-top: 0; }
.keep > .try:first-child, .keep > .object:first-child { margin-top: 1.05em; }

.object figcaption b {
  display: block;
  font-weight: 800; font-size: 11px; line-height: 1.6;
  letter-spacing: 0.11em; text-transform: uppercase;
}

/* Things a paper is full of: an equation, a table, code. */
.object { margin: 1.05em 0; }
.object figcaption { margin-top: 0.55em; font: 0.76em/1.42 var(--sans); text-align: left; hyphens: manual; -webkit-hyphens: manual; }
.object q { font: italic 1.14em/1.38 var(--face); }

.display {
  padding: 0.75em 0 0.6em;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  font-size: 1.08em; text-align: center;
  overflow: hidden;
}
math { font-size: 1.05em; }

.book table {
  width: 100%;
  border-collapse: collapse; border-top: 2px solid var(--ink);
  font: 0.76em/1.3 var(--sans);
  text-align: left; hyphens: manual; -webkit-hyphens: manual;
}
.book th {
  padding: 0.55em 0 0.5em;
  border-bottom: 2px solid var(--ink);
  font-weight: 800; font-size: 11px; letter-spacing: 0.11em; text-transform: uppercase;
  vertical-align: bottom;
}
.book td { padding: 0.5em 0.8em 0.5em 0; border-bottom: 1px solid var(--ink); }
.book .n { padding-right: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.book pre {
  margin: 0; padding: 0.9em;
  border: 2px solid var(--ink);
  font: 0.68em/1.55 var(--mono);
  text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; hyphens: manual; -webkit-hyphens: manual;
}

.do { margin-top: 0.75em !important; }

.stars { display: flex; gap: 2px; margin: 0.5em 0 0 -8px; padding: 0; border: 0; }
.stars label { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.stars input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.star { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.8; }
/* A star is filled when it, or one after it, is the one chosen. */
.stars label:has(input:checked) .star, .stars label:has(~ label input:checked) .star { fill: var(--accent); stroke: var(--accent); }
.stars label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }

.price {
  margin-top: 0.5em !important; padding-top: 0.32em;
  border-top: 6px solid var(--ink);
  font: 800 0.9em/1.1 var(--sans);
  text-align: left; text-indent: 0 !important;
}
.price b { display: block; font-weight: 900; font-size: 3.1em; line-height: 0.95; letter-spacing: -0.05em; }
.price + .price { margin-top: 0.7em !important; }
.price + .stamp { margin-top: 1.4em; }
.fin { margin-top: 1.3em !important; font-size: 0.86em; text-align: left; text-indent: 0 !important; }

/* ---------- Marks, and the wash under the sentence being said ---------- */

.mk { --mark: var(--accent); --on-mark: var(--on-accent); cursor: pointer; }
.mk[data-by] { --mark: var(--agent); --on-mark: var(--on-agent); }
.mk-highlight { background: var(--mark); color: var(--on-mark); }
.mk-underline { text-decoration: underline var(--mark) 0.13em; text-underline-offset: 0.2em; text-decoration-skip-ink: none; }
.mk-strike { text-decoration: line-through var(--mark) 0.12em; }
.mk-circle { outline: 0.12em solid var(--mark); outline-offset: 0.1em; border-radius: 999px; }
.mk-end[data-by]::after {
  content: attr(data-by);
  margin-left: 0.5em; padding: 0.15em 0.45em;
  border: 2px solid var(--agent);
  background: var(--paper); color: var(--agent);
  font: 800 0.56em/1 var(--sans);
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  vertical-align: 0.22em;
}

/* The wash is one quiet block, joined from line to line, so that it never
   reads as a highlight. It is opaque so that the joins do not show. */
.say {
  padding: 0.17em 0;
  background: var(--wash);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.mk-highlight .say { background: none; }
.saying { background: var(--wash); outline: 7px solid var(--wash); }

/* ---------- The reader (scripts on) ---------- */

html.js, html.js body { height: 100%; overflow: hidden; }
html.js body {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh; height: 100dvh;
  overscroll-behavior: none;
}
html.js:not(.ready) .stage { visibility: hidden; }

.js .reader {
  position: relative; min-height: 0;
  margin: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}
.js .stage {
  position: absolute; inset: 0;
  display: grid; justify-content: center;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.js .window { position: relative; width: var(--window-w, 100vw); height: 100%; overflow: hidden; }
.js .strip { position: absolute; inset: 0; }
.js .strip.sliding { transition: transform 0.27s cubic-bezier(0.2, 0.75, 0.25, 1); }

.js .book {
  position: absolute; left: 0; top: var(--top, 24px);
  width: 100%; max-width: none; height: var(--page-h, 70vh);
  margin: 0; padding: 0 var(--pad, 24px);
  column-width: var(--page-w, 300px);
  column-gap: calc(2 * var(--pad, 24px));
  column-fill: auto;
  outline: none;
}

/* The page number sits under each page and moves with it. Its upright is
   the edge of the sheet, seen only while a page is turning. */
.folio {
  position: absolute; bottom: 0;
  display: grid; place-items: center;
  width: var(--cell); height: 40px;
  font: 800 12px/1 var(--sans);
  letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
}
.folio:first-child { color: transparent; }
.folio::before {
  content: "";
  position: absolute; left: -1px; bottom: 0;
  width: 2px; height: 200vh;
  background: var(--ink);
  opacity: 0;
}
.sliding .folio::before, .turning .folio::before { opacity: 1; }

/* Two pages: a hard rule down the gutter. */
.spread .window::after {
  content: "";
  position: absolute; left: 50%; top: var(--top); bottom: 40px;
  width: 2px; margin-left: -1px;
  background: var(--ink);
}

.edge {
  position: absolute; top: 0; bottom: 40px; z-index: 2;
  display: grid; place-items: center;
  width: max(var(--pad, 24px), 22px);
  padding: 0; border: 0; background: none; color: var(--ink);
  opacity: 0.55;
  cursor: pointer;
}
.edge.prev { left: 0; }
.edge.next { right: 0; }
.edge svg { width: 12px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: square; }
.edge:focus-visible { opacity: 1; }
.edge:disabled { visibility: hidden; }

.ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ink polyline { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ink .fading { opacity: 0; transition: opacity 0.8s; }
.stage.pen { cursor: crosshair; touch-action: none; }
.stage.pen .book { user-select: none; -webkit-user-select: none; }
.stage.pen .mk { cursor: crosshair; }

/* ---------- The band at the foot ---------- */

.band {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  height: var(--band);
  padding: 0 max(14px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(14px, env(safe-area-inset-left, 0px));
  border-top: var(--rule) solid var(--ink);
  background: var(--paper);
}
.progress {
  position: absolute; left: 0; top: calc(-1 * var(--rule));
  width: 0; height: var(--rule);
  background: var(--accent);
}
.where {
  flex: 1; min-width: 0; margin: 0;
  font: 800 12px/1.25 var(--sans);
  letter-spacing: 0.1em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.where.said { font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; white-space: normal; }
.transport { display: flex; gap: 6px; }
.transport .btn { min-height: 40px; }

/* The tool for typeface, size and paper. A dot until it is pressed. */
.tool { position: relative; margin-left: auto; }
.dot { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -12px; padding: 0; border: 0; background: none; cursor: pointer; }
.dot span { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); }
.dot[aria-expanded="true"] span { background: var(--accent); }

.tool-panel {
  position: absolute; right: -2px; bottom: calc(100% + 8px); z-index: 25;
  width: min(300px, 100vw - 24px);
  padding: 12px 12px 2px;
  border: var(--rule) solid var(--ink);
  background: var(--paper);
}
.tool-panel fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.tool-panel legend { margin-bottom: 6px; padding: 0; font-weight: 800; font-size: 11px; letter-spacing: 0.11em; text-transform: uppercase; }
.seg { display: flex; }
.seg > * { position: relative; flex: 1; margin-left: -2px; }
.seg > :first-child { margin-left: 0; }
.seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg label > span, .seg button, .seg output {
  display: grid; place-items: center;
  min-height: 44px;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font: 700 14px/1 var(--sans);
}
.seg button { cursor: pointer; }
.seg button:disabled { color: var(--soft); cursor: default; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; z-index: 1; }
.a-small { font-size: 13px; }
.a-large { font-size: 21px; }

/* Each paper is shown in its own colours; the chosen one gets a bar. */
.papers .sw { position: relative; font-size: 12px; }
.papers .sw-paper, .papers input:checked + .sw-paper { background: #F6F2E9; color: #0B0B0B; }
.papers .sw-white, .papers input:checked + .sw-white { background: #FFFFFF; color: #0B0B0B; }
.papers .sw-dusk, .papers input:checked + .sw-dusk { background: #26272A; color: #E4E0D6; }
.papers .sw-black, .papers input:checked + .sw-black { background: #000000; color: #EFEBE2; }
.papers input:checked + .sw::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: #27408B; }
.papers input:checked + .sw-dusk::after, .papers input:checked + .sw-black::after { background: #A3B8FF; }

/* ---------- The notebook ---------- */

.notebook {
  position: fixed; z-index: 20;
  top: var(--bar); right: 0; bottom: var(--band);
  display: flex; flex-direction: column;
  width: min(400px, 100%);
  border-left: var(--rule) solid var(--ink);
  background: var(--paper);
}
.notebook-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: var(--rule) solid var(--ink);
}
.notebook h2 { margin: 0; font: 900 24px/1 var(--sans); letter-spacing: -0.035em; }
.notebook h2:focus { outline: none; }
.notebook-empty { margin: 0; padding: 16px 14px; font: 17px/1.45 var(--serif); }

.entries { flex: 1; margin: 0; padding: 0; overflow: auto; list-style: none; }
.entries li { display: flex; border-bottom: 2px solid var(--ink); }
.entry-go {
  flex: 1; min-width: 0;
  padding: 12px 14px 13px;
  border: 0; background: none; color: inherit;
  font: inherit; text-align: left;
  cursor: pointer;
}
.entry-kind { display: block; margin-bottom: 5px; font-weight: 800; font-size: 11px; letter-spacing: 0.11em; text-transform: uppercase; }
.entry-by { margin-left: 8px; padding: 1px 5px; border: 2px solid var(--agent); color: var(--agent); }
.entry-quote { display: block; font: 17px/1.4 var(--serif); }
.entry-note { display: block; margin-top: 7px; padding-left: 9px; border-left: 3px solid var(--agent); font-size: 14px; }
.entry-drop {
  min-width: 44px; padding: 0 14px;
  border: 0; border-left: 2px solid var(--ink); background: none; color: inherit;
  font: 800 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
}

.notebook-foot { padding: 12px 14px 14px; border-top: var(--rule) solid var(--ink); }
.notebook-foot p { margin: 0; font-size: 12px; color: var(--soft); }
.notebook-foot .btn { width: 100%; margin-bottom: 10px; }

/* On a wide screen the notebook is a column beside the book, which is set
   again in the room that is left. On a narrow one it lies over the book. */
@media (min-width: 900px) {
  html.notes-open .reader { margin-right: calc(400px + env(safe-area-inset-right, 0px)); }
}

/* ---------- The bar for selected words ---------- */

.selbar { position: fixed; z-index: 30; display: flex; gap: 2px; padding: 2px; background: var(--paper); border: 2px solid var(--ink); }
.selbar.docked { left: 50%; bottom: calc(var(--band) + 10px); transform: translateX(-50%); }
.selbar button {
  min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 0;
  background: var(--ink); color: var(--paper);
  font: 800 13px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer;
}
.selbar button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* ---------- Under a mouse ---------- */

/* Only where a pointer can hover: on a touch screen a hover sticks to the
   last thing tapped and makes it look pressed. */
@media (hover: hover) {
  .btn:hover, .entry-drop:hover, .contents a:hover { background: var(--ink); color: var(--paper); }
  .btn:hover .count { background: var(--paper); color: var(--ink); }
  .contents a:hover::before { color: inherit; }
  .edge:hover { opacity: 1; }
  .dot:hover span { background: var(--accent); }
  .entry-go:hover .entry-quote { text-decoration: underline; }
  .selbar button:hover { background: var(--accent); color: var(--on-accent); }
}

/* ---------- Small screens, quiet motion, print ---------- */

@media (max-width: 480px) {
  .wide { display: none; }
  .narrow { display: inline; }
  .bar { gap: 8px; }
  .bar-tools { gap: 6px; }
  .bar .btn { padding: 0 9px; font-size: 12px; letter-spacing: 0.04em; }
  .notebook { border-left: 0; }
  .transport .btn { padding: 0 9px; font-size: 12px; letter-spacing: 0.04em; }
  html.listening .where:not(.said) { display: none; }
  html.listening .where.said { position: absolute; left: 0; right: 0; bottom: 100%; padding: 8px 14px; background: var(--ink); color: var(--paper); }
}
@media (max-width: 379px) {
  .wordmark { display: none; }
}

/* A phone on its side has little height: the chapter number sits beside
   its title, not above it. */
@media (max-height: 480px) {
  .chapter h2::before { display: inline; margin-right: 0.3em; font-size: 1em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .bar-tools, .band, .edge, .selbar, .notebook, .folios, .skip { display: none !important; }
  html.js, html.js body { display: block; height: auto; overflow: visible; }
  .js .reader, .js .stage, .js .window, .js .strip, .js .book { position: static; height: auto; overflow: visible; transform: none !important; columns: auto; }
  .js .book { max-width: 34em; margin: 0 auto; }
}
