/* moonfont lab — visual system
   Refined, dark, editorial. The glyphs are the art; everything else is quiet.
   The ground, the ink and the single red are the ones the other four pages
   declare: the cover differs in scale and motion, not in material. */

:root {
  --bg: #121110;
  --bg-soft: #1a1917;
  --bg-panel: #191817;
  --ink: #ecebe5;
  --ink-dim: #b5b0a7;
  --ink-faint: #8c877e;
  --line: rgba(236, 232, 223, 0.10);
  --line-strong: rgba(236, 232, 223, 0.18);
  --accent: #ff6f4c;
  --accent-soft: rgba(255, 111, 76, 0.16);
  --cool: #e0b08a;
  --radius: 10px;
  --maxw: 1180px;
  --font-ui: "HarmonyOS Sans SC", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --topbar-wash: rgba(18, 17, 16, 0.88);
  --topbar-fade: rgba(18, 17, 16, 0);
  --sheen: rgba(236, 232, 223, 0.04);
  --sheen-strong: rgba(236, 232, 223, 0.055);
  --on-accent: #1a0c08;
}

/* A second impression of the same page: paper instead of night. The type is
   the same size, the rules are the same weight; only the ink and the ground
   swap. The paper is the stock the other pages are printed on. */
:root[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-soft: #eae6dc;
  --bg-panel: #efece4;
  --ink: #191715;
  --ink-dim: #4a4642;
  --ink-faint: #6d6862;
  --line: rgba(25, 23, 21, 0.12);
  --line-strong: rgba(25, 23, 21, 0.22);
  --accent: #a83418;
  --accent-soft: rgba(168, 52, 24, 0.13);
  --cool: #8a4a2a;
  --topbar-wash: rgba(244, 241, 234, 0.9);
  --topbar-fade: rgba(244, 241, 234, 0);
  --sheen: rgba(25, 23, 21, 0.035);
  --sheen-strong: rgba(25, 23, 21, 0.05);
  --on-accent: #fdf9f2;
}

* { box-sizing: border-box; }

/* The highlight is the page's mark, not the browser's blue. */
::selection {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--ink);
}

/* Copy is copy; chrome is not. A selection that spans the masthead, a tab, a
   stat or a diagram is never wanted, and the I-beam over a label reads as an
   invitation to select something that is not text. Prose, code and the inputs
   keep their selection; everything that is furniture does not. */
button,
label,
select,
canvas,
img,
svg,
.topbar,
.wordmark,
.figures,
.modes,
.pick,
.dropzone,
.panel,
.grid,
.tray__stage,
.tray__note,
.hud,
.field__label,
.hero__eyebrow,
.block__index,
.footer__nav,
.theme-toggle,
.tool {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* The pointer stays an arrow over these: they are not paragraphs. */
.figures,
.modes,
.hud,
.field__label,
.hero__eyebrow,
.block__index,
.panel,
.grid,
.tray__note,
label {
  cursor: default;
}

/* Code keeps the characters a reader has to type: no ligatures that draw `>=`
   as a single glyph. Form controls do not inherit, so they are named too. */
html, button, input, textarea, select { font-variant-ligatures: no-contextual; }

/* The page's scrollbar is part of the print. The two standard properties sit
   only in the branch with no ::-webkit-scrollbar, because declaring either of
   them makes Chrome ignore the pseudo-element rules. The gutter keeps its width
   at the top of the page and only the thumb fades. */
@supports selector(::-webkit-scrollbar) {
  html::-webkit-scrollbar { width: 10px; height: 10px; }
  html::-webkit-scrollbar-track { background: transparent; }
  html::-webkit-scrollbar-thumb {
    border-radius: 99px;
    border: 3px solid transparent;
    background-clip: content-box;
    background-color: color-mix(in srgb, var(--ink) 22%, transparent);
  }
  html.at-top::-webkit-scrollbar-thumb { background-color: transparent; }
}
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ink) 24%, transparent) transparent;
  }
  html.at-top { scrollbar-color: transparent transparent; }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain for a tactile, real-material feel */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

code {
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--cool);
}

/* topbar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 28px;
  background: linear-gradient(to bottom, var(--topbar-wash), var(--topbar-fade));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
/* The same hairline the other pages show once they have moved. */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--line-strong) 16%,
    var(--line-strong) 84%,
    transparent
  );
  opacity: 0;
  transition: opacity 150ms ease-out;
}
html:not(.at-top) .topbar::after { opacity: 1; }
.wordmark {
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 14px;
  text-transform: uppercase;
}
.topbar__nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 40px;
  margin-right: auto;
  font-size: 14px;
  color: var(--ink-dim);
}
.topbar__nav a:hover { color: var(--ink); }
.topbar__nav a[aria-current="page"] {
  color: var(--ink);
  position: relative;
}
.topbar__nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--accent);
}
.topbar__tools { display: flex; align-items: center; gap: 6px; }
.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
}
.tool:hover { color: var(--ink); background: var(--bg-soft); }
.tool svg { width: 19px; height: 19px; }
.tool:active { transform: translateY(1px); }
:root[data-theme="light"] .theme-toggle .face { opacity: 0; }
:root[data-theme="dark"] .theme-toggle .foot { opacity: 0; }
.theme-toggle .face, .theme-toggle .foot { transition: opacity 180ms ease; }

@media (width <= 860px) {
  .topbar { padding: 14px 18px; gap: 10px; }
  .topbar__nav { gap: 14px; margin-left: 12px; font-size: 13px; }
  .topbar__nav a:not([aria-current="page"]) { display: none; }
  .wordmark::before { display: none; }
}

.wordmark::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-1px);
}

/* hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 28px;
  overflow: hidden;
}
/* Behind the copy: the letter is the hero's ground, and the copy is what the
   hero says. */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero__copy {
  position: relative;
  max-width: 640px;
}
.hero__eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hero__title {
  margin: 0;
  font-size: clamp(56px, 12vw, 148px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.92;
  /* The title sits over the rendered glyph, which is faint enough to be a
     ground: the page's ink reads on paper and over the letter in both
     impressions, so the heading needs no blending trick to survive it. */
  color: var(--ink);
}
.hero__tagline {
  margin: 26px 0 0;
  max-width: 540px;
  color: var(--ink-dim);
  font-size: 17px;
}
.hero__control {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero__control label {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.figures {
  position: absolute;
  left: 28px; right: 28px;
  bottom: 64px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 42px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.figures li { display: flex; flex-direction: column; gap: 2px; }
.figures b {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.figures span {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (width <= 860px) {
  .figures { display: none; }
}

/* blocks */
.block {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 120px 28px;
  border-top: 1px solid var(--line);
}
.block__head { max-width: 720px; margin-bottom: 42px; }
.block__index {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.block__title {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.block__lede {
  margin: 0;
  color: var(--ink-dim);
  font-size: 17px;
}

/* fields / inputs */
.field {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.field label,
.field__label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.glyph-input {
  width: 64px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  font-size: 20px;
  font-family: var(--font-ui);
  text-align: center;
  transition: border-color 0.2s ease;
}
.glyph-input:focus { outline: none; border-color: var(--accent); }
.glyph-input:focus-visible,
.text-input:focus-visible,
.btn:focus-visible,
.pick__button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
.text-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  font-size: 18px;
  font-family: var(--font-ui);
  transition: border-color 0.2s ease;
}
.text-input:focus { outline: none; border-color: var(--accent); }
/* The dropdown. A native select would be drawn by the platform, in the
   platform's type and colour, which is the one thing this page cannot have. */
.pick { position: relative; }
.pick__button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 92px;
  justify-content: space-between;
  padding: 9px 12px 9px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.pick__button:hover { border-color: var(--line-strong); }
.pick__button[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.pick__mark {
  width: 10px;
  height: 6px;
  color: var(--ink-dim);
  transition: transform 180ms ease;
}
.pick__button[aria-expanded="true"] .pick__mark { transform: rotate(180deg); }
.pick__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 100%;
  margin: 0;
  padding: 5px;
  list-style: none;
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 16px 34px rgb(0 0 0 / 0.28);
}
:root[data-theme="light"] .pick__list { box-shadow: 0 16px 34px rgb(23 22 26 / 0.12); }
.pick__option {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-dim);
  cursor: pointer;
  white-space: nowrap;
}
.pick__option:hover,
.pick__option:focus { background: var(--bg-soft); color: var(--ink); outline: none; }
.pick__option[aria-selected="true"] { color: var(--accent); }
.pick__option[aria-selected="true"]::after { content: ""; float: right; }

/* Sliders are the page's too: a hairline rail and a turned knob. */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.range::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
}
.range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--accent-soft); }
.btn {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }

/* anatomy quad */
.quad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 720px) { .quad { grid-template-columns: minmax(0, 1fr); } }
.panel {
  margin: 0;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel__canvas, .panel__svg {
  display: block;
  width: 100%;
  height: 320px;
  background:
    radial-gradient(circle at 50% 40%, var(--sheen), transparent 70%);
}
.panel figcaption {
  padding: 12px 16px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

/* dropzone */
.dropzone {
  margin-top: 8px;
  padding: 56px 24px;
  text-align: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-panel);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone:hover, .dropzone:focus, .dropzone.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone__primary { margin: 0; font-size: 20px; font-weight: 500; }
.dropzone__secondary { margin: 8px 0 0; color: var(--ink-faint); font-size: 14px; }

.upload__info {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
}
.upload__name { font-weight: 600; font-size: 18px; }
.upload__meta { margin-left: 12px; color: var(--ink-dim); font-size: 14px; }

/* glyph grid */
.grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
/* The character keeps a strip of ground at the foot of the tile, so its label
   has somewhere to sit that is not on top of the letter. */
.tile canvas { display: block; width: 100%; height: calc(100% - 16px); }
/* A character the file has no sort for is still set, in the page's face and
   faintly, and the tile says so with a dashed rule: a hole in the grid looks
   the same as a renderer that gave up. */
.tile[data-absent] { border-style: dashed; border-color: var(--line-strong); }
.tile__ch {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16px;
  padding-bottom: 2px;
  text-align: center;
  font-size: 10px;
  line-height: 14px;
  color: var(--ink-faint);
  font-family: ui-monospace, monospace;
  pointer-events: none;
}
.upload__note { margin-top: 14px; color: var(--ink-faint); font-size: 13px; line-height: 1.5; }

/* 3d lab */
.lab3d__canvas {
  display: block;
  width: 100%;
  height: 560px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 35%, var(--sheen-strong), transparent 65%),
    var(--bg-panel);
  cursor: grab;
  touch-action: none;
}
.lab3d__canvas:active { cursor: grabbing; }

/* The anatomy solid turns under the hand as well, so it says so. The tray's
   canvas is driven by its own hover test: grab over a casting, arrow on the
   floor between them. */
#ana3d { cursor: grab; }
#ana3d:active { cursor: grabbing; }

/* footer */
.footer {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 28px 60px;
  border-top: 1px solid var(--line);
}
.footer__cols {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}
.footer__title { margin: 0 0 10px; font-size: 22px; font-weight: 600; }
.footer__note { margin: 0; max-width: 420px; color: var(--ink-dim); }
.footer__nav { display: flex; flex-direction: column; gap: 8px; }
.footer__nav a { color: var(--ink-dim); transition: color 0.2s ease; }
.footer__nav a:hover { color: var(--accent); }
.footer__fine {
  margin: 40px 0 0;
  color: var(--ink-faint);
  font-size: 13px;
}

.filewarning {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 20;
  padding: 14px 20px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  text-align: center;
}
.filewarning code { color: var(--on-accent); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* The tray. The canvas is the floor of the stage; the two controls that sit in
   it are real page elements, so the letters collide with them and a reader can
   still click them. Nothing in the stage takes a text selection: a drag that
   highlighted the caption instead of throwing a letter would be a failure of
   the interaction, not a convenience. */
.tray__stage {
  position: relative;
  height: min(42vh, 350px);
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 32% 0%, var(--sheen-strong), transparent 62%),
    radial-gradient(90% 70% at 70% 110%, var(--sheen), transparent 70%),
    var(--bg-panel);
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}
.tray__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* Registration marks, as on a proof sheet: four ticks, not a frame. */
.tray__marks span {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  pointer-events: none;
}
.tray__marks span:nth-child(1) { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.tray__marks span:nth-child(2) { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.tray__marks span:nth-child(3) { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.tray__marks span:nth-child(4) { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.tray__hud {
  position: absolute;
  top: 18px;
  left: 32px;
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 3px var(--bg-panel), 0 0 6px var(--bg-panel);
}
.tray__note,
.tray__button {
  position: absolute;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
}
/* The note is a solid, so it needs the opacity of one: a label, frosted, so a
   letter resting behind it cannot make the sentence unreadable. */
.tray__note {
  left: 22px;
  bottom: 24px;
  max-width: 250px;
  min-height: 64px;
  margin: 0;
  padding: 10px 12px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-panel) 76%, transparent);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--ink-dim);
  pointer-events: none; /* the letters bounce off it; the text is not a target */
}
.tray__note span { display: block; }
.tray__hud-mode { display: none; }
.tray__hud-mode::after { content: " · "; opacity: 0.6; }
.tray__note-solid {
  margin-top: 7px;
  color: var(--ink-faint);
}
.tray__button {
  right: 22px;
  bottom: 22px;
  background: color-mix(in srgb, var(--bg-panel) 74%, transparent);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.tray__button:focus-visible,
.tray__canvas:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* The renderings. A rule across the tabs, the active one marked like a
   specimen's section index rather than boxed like a widget. */
.modes {
  position: relative;
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--line);
  user-select: none;
  -webkit-user-select: none;
}
.mode {
  position: relative;
  margin-top: -1px;
  padding: 13px 22px 11px;
  border: 0;
  border-top: 1px solid transparent;
  background: none;
  color: var(--ink-faint);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}
.mode:first-child { padding-left: 0; }
.mode:hover { color: var(--ink); }
.mode[aria-pressed="true"] { color: var(--ink); }

/* The marker is a body on a spring, drawn on the rule by `site/marks.js`. The
   rule itself stays as the fallback for a page that never runs the script. */
.modes .marker {
  position: absolute;
  top: -1px;
  left: 0;
  z-index: 2;
  pointer-events: none;
  display: block;
}
.mode:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
/* On a phone the label would sit on the button, so it moves under the count,
   keeps only the line that explains the rendering, and leaves the floor to the
   letters. */
@media (width <= 560px) {
  .mode { padding: 12px 12px 10px; letter-spacing: 0.14em; }
  /* No room for a label over the castings: the rendering's name moves into
     the count, where it costs one line and covers nothing. */
  .tray__note { display: none; }
  .tray__hud-mode { display: inline; }
  .tray__button { right: 14px; bottom: 14px; padding: 9px 12px; }
}

.tray__credit {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.5;
}
.tray__credit a {
  color: var(--ink-dim);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.tray__credit a:hover { color: var(--accent); }
