@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-latin-wdth-normal.e3a28ead.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/fonts/newsreader-latin-opsz-normal.6e4f2958.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url("/assets/fonts/newsreader-latin-wght-italic.48bc8861.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* sims.games — ink on paper. The frame carries no color of its own; every
   color on a page comes from a sim (--sim-ground / --sim-signal, set inline
   on that sim's entry) or from its screenshots. @font-face rules are
   prepended by the build.

   One grid everywhere: 12 columns. Above 1100px the left four columns hold
   the catalogue numbers, section headings and short text, and the right
   eight hold the pictures and the reading column (it starts at column 5 on
   every page). 761-1100px: headings over full-width pictures. Up to 760px:
   one column. */

:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d8;      /* row hover, quiet fills */
  --field: #fbf9f4;        /* inside form fields */
  --ink: #1c1a16;
  --ink-2: #5b5549;        /* secondary text, 6:1 on paper */
  --rule: #1c1a16;
  --rule-soft: #c9c0ae;
  --sans: "Archivo", "Arial Narrow", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --margin: clamp(20px, 3.4vw, 48px);
  --gap: 24px;
  --measure: 31em;         /* reading text: about 65-75 characters a line */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;   /* safety net for long words in running text */
}

/* Titles (and the Run link, which carries the title) may be one long word:
   let them break anywhere rather than push the page sideways. */
.entry-title, .compact-title, .index-table .c-title, .sim-title, .run, .more {
  overflow-wrap: anywhere;
}

[hidden] { display: none !important; }

img { max-width: 100%; }

p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

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

.skip {
  position: absolute;
  left: var(--margin);
  top: 0;
  z-index: 10;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--paper);
  font: 600 0.9375rem/1 var(--sans);
  text-decoration: none;
  transform: translateY(-120%);
}
.skip:focus { transform: none; }

#main { flex: 1 0 auto; width: 100%; }

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--margin);
  padding-right: var(--margin);
}

/* ---------- type roles ---------- */

/* Condensed caps: labels, metadata, running heads. */
.meta, .running-head, .content-note-label,
.facts-list dt, .facts-table th, .filter-label, .index-table thead th,
.masthead-aside nav, .index-count, .tally .sep, .slip-terms-title {
  font-family: var(--sans);
  font-stretch: 80%;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums lining-nums;
}

.meta { color: var(--ink-2); }
.sep { color: var(--ink-2); padding: 0 0.25em; }

/* Section headings: Archivo, sentence case, one size across the site. */
.band-title, .index-title {
  font-family: var(--sans);
  font-stretch: 112%;
  font-weight: 750;
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Sub-headings inside a section. */
.sub-head, .fold-title {
  font-family: var(--sans);
  font-stretch: 100%;
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

/* The catalogue numbers: 001, 002, 003. */
.entry-num, .sim-num, .page-num, .compact-num {
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 250;
  line-height: 0.74;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums lining-nums;
  margin-left: -0.05em;
}

.working {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-size: 0.8em;
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0;
}

.prose { max-width: var(--measure); }
.prose p + p, .prose p + .fold, .prose .fold + p, .prose ul + p { margin-top: 0.9em; }
.prose i { font-style: italic; }

/* ---------- site bar (inner pages) ---------- */

.sitebar { border-bottom: 1px solid var(--rule); }
.sitebar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 20px;
  min-height: 60px;
}
/* The site name and the link labels come from site.json: let them wrap
   rather than push the page sideways. Padding keeps each a 44px target. */
.sitebar-mark {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  padding: 13px 0;
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-decoration: none;
}
.sitebar nav { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: 24px; min-width: 0; }
.sitebar nav a {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  padding: 13px 0;
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.3;
}
.sitebar nav a[aria-current="page"] { text-decoration-thickness: 2px; }

/* ---------- masthead (front page) ---------- */

.masthead { padding-top: clamp(24px, 3.4vw, 48px); }

/* The heading: the wordmark, and the line that says what the site is, set
   on the wordmark's baseline at the right (under it on narrow screens). */
.masthead-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: var(--gap);
  row-gap: 10px;
  padding-bottom: clamp(8px, 1.3vw, 18px);
  border-bottom: 3px solid var(--rule);
}
.wordmark {
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.75rem, 7.4vw, 6.75rem);
  line-height: 0.8;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
}
.masthead-line {
  font-family: var(--sans);
  font-stretch: 100%;
  font-weight: 600;
  font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  min-width: 0;
}

.masthead-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 12px;
  align-items: baseline;
  padding: 16px 0 clamp(20px, 2.4vw, 32px);
}

.tally {
  grid-column: 1 / span 4;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums lining-nums;
}
.tally-line { display: block; white-space: nowrap; }
.tally-n {
  display: inline-block;
  min-width: 1.6em;
  font-stretch: 125%;
  font-weight: 700;
}

.intro {
  grid-column: 5 / span 6;
  grid-row: 1 / span 2;
  font-size: clamp(1.125rem, 1.45vw, 1.3125rem);
  line-height: 1.42;
  max-width: 34em;
}
.intro p + p { margin-top: 0.4em; }

/* The jump links sit under the tally, in the left columns. */
.masthead-aside { grid-column: 1 / span 4; grid-row: 2; margin-top: -6px; }
.masthead-aside ul { display: flex; flex-wrap: wrap; column-gap: 20px; }
.masthead-aside nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- running heads ---------- */

.running-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 24px;
  padding: 12px 0 0;
  border-top: 1px solid var(--rule);
}
.running-head h2 { font: inherit; letter-spacing: inherit; }
.running-head p { color: var(--ink-2); }

/* ---------- Run link ---------- */

/* The Run link is the one place a sim's own accent pair becomes a control. */
.run {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--sim-signal, var(--ink));
  color: var(--sim-ground, var(--paper));
  border: 1px solid var(--sim-ground, var(--ink));
  font-family: var(--sans);
  font-stretch: 85%;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
}
.run:hover {
  background: var(--sim-ground, var(--ink));
  color: var(--sim-signal, var(--paper));
}
.run:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.run--big { min-height: 60px; padding: 16px 24px; font-size: 1.25rem; }
.run--small { min-height: 44px; padding: 10px 14px; font-size: 0.9375rem; }

.actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.more {
  display: inline-block;
  align-self: flex-start;
  max-width: 100%;
  padding: 10px 0;
  font-size: 1.0625rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* ---------- content note ---------- */

.content-note {
  border: 1px solid var(--rule);
  padding: 10px 14px 11px;
  font-size: 1rem;
  line-height: 1.42;
}
.content-note-label { margin-right: 0.5em; }

/* ---------- plates ---------- */

.plate-media { display: block; background: #0d0d0d; }
.plate-media img { display: block; width: 100%; height: auto; }
a.plate-media:hover { outline: 1px solid var(--ink); outline-offset: 3px; }
.plate--tall .plate-media { width: fit-content; max-width: 100%; }
.plate--tall .plate-media img { width: auto; max-width: 100%; max-height: min(78vh, 860px); }

.plate figcaption {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.42;
  /* The rule runs the full width of the picture; the text keeps a measure. */
  padding-right: max(0px, 100% - 40em);
}
.plate-caption { font-weight: 600; }

/* ---------- featured entry (front page) ---------- */

.entry {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto 1fr;
  column-gap: var(--gap);
  padding: 32px 0 72px;
}
.entry + .entry { border-top: 2px solid var(--rule); }

.entry-num {
  grid-column: 1 / span 4;
  grid-row: 1;
  align-self: end;
  font-size: clamp(3.25rem, 6.6vw, 6rem);
}

.entry-head { grid-column: 5 / -1; grid-row: 1; align-self: end; }
.entry-title {
  margin-top: 6px;
  font-family: var(--sans);
  font-stretch: 112%;
  font-weight: 750;
  font-size: clamp(2.125rem, 3.6vw, 3.25rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.entry-title a { text-decoration: none; }
.entry-title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.1em; }

.entry-lead { grid-column: 5 / -1; grid-row: 2; margin-top: 24px; }
.entry-text {
  grid-column: 1 / span 4;
  grid-row: 2 / span 2;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.entry-act, .entry-about { display: flex; flex-direction: column; gap: 18px; }
.entry-summary { font-size: 1.125rem; line-height: 1.5; }

.facts-list { border-top: 1px solid var(--rule); }
.facts-list div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 14px;
  padding: 8px 0 9px;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
.facts-list dt { color: var(--ink-2); }
.facts-list dd {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums lining-nums;
}

.entry-minor {
  grid-column: 5 / -1;
  grid-row: 3;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px var(--gap);
  align-items: start;
}
.entry-minor .plate figcaption { font-size: 0.875rem; }

/* ---------- earlier (compact rows) ---------- */

.earlier { padding-bottom: 64px; }
.compact {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 5.5fr) minmax(0, 1.5fr);
  column-gap: var(--gap);
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.compact-num { font-size: 3rem; line-height: 0.8; letter-spacing: -0.04em; }
.compact-thumb { display: block; background: #0d0d0d; }
.compact-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.compact-title {
  margin: 4px 0 6px;
  font-family: var(--sans);
  font-stretch: 108%;
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.compact-title a { text-decoration: none; }
.compact-title a:hover { text-decoration: underline; }
.compact-summary { font-size: 1.0625rem; max-width: var(--measure); }
.compact .content-note { margin-top: 10px; display: inline-block; font-size: 0.9375rem; padding: 6px 10px 7px; }
.compact-run { justify-self: end; }

/* ---------- index (front page) ---------- */

.index { padding: 0 0 80px; border-top: 3px solid var(--rule); }
.index-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px 0 20px;
}
.index-count { color: var(--ink-2); }

.filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 0 0 20px;
}
.filter-label { color: var(--ink-2); }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.filter button {
  appearance: none;
  margin: 0;
  min-height: 44px;
  padding: 10px 14px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 0;
  font-family: var(--sans);
  font-stretch: 80%;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.filter button:hover { background: var(--paper-2); }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filter-n { font-variant-numeric: tabular-nums; font-weight: 400; margin-left: 0.2em; }
.filter-status { color: var(--ink-2); font-size: 0.9375rem; }

.table-wrap { overflow-x: auto; }
.index-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums lining-nums;
}
.index-table th, .index-table td {
  text-align: left;
  vertical-align: baseline;
  padding: 12px 20px 11px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-weight: 400;
}
.index-table thead th {
  padding-top: 0;
  padding-bottom: 8px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
}
.index-table tbody tr:hover { background: var(--paper-2); }
/* The number column is four grid columns wide, so titles start at column 5. */
.index-table .c-num { width: calc((100% - 11 * var(--gap)) / 3 + 4 * var(--gap)); }
.index-table td.c-num {
  font-stretch: 125%;
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
}
.index-table th.c-title { width: 40%; }
.index-table tbody .c-title {
  font-stretch: 100%;
  font-weight: 650;
  font-size: 1.25rem;
  line-height: 1.2;
}
/* The title link is the row's target: at least 44px tall without making
   the row taller. */
.index-table tbody .c-title a {
  display: inline-block;
  padding: 10px 0;
  margin: -10px 0;
  text-decoration-color: var(--rule-soft);
  text-decoration-thickness: 2px;
}
.index-table tbody .c-title a:hover { text-decoration-color: var(--ink); }
.index-table .no-link { color: var(--ink-2); font-weight: 500; }
.index-table .c-sub { display: none; }
.index-table td.c-kind, .index-table td.c-status { font-size: 1rem; }
.is-in-development td { color: var(--ink-2); }

.mark {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.5em;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  vertical-align: 0.02em;
}
.is-in-development .mark { background: transparent; border-color: var(--ink-2); }
.index-key { margin-top: 14px; font-size: 0.9375rem; color: var(--ink-2); }

/* ---------- colophon ---------- */

.colophon { border-top: 1px solid var(--rule); }
.colophon-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 8px;
  align-items: baseline;
  padding-top: 18px;
  padding-bottom: 36px;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.colophon-mark {
  grid-column: 1 / span 4;
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.125rem;
}
.colophon-mark a, .colophon-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px 0;
}
.colophon-mark a { text-decoration: none; }
.colophon-text { grid-column: 5 / span 6; color: var(--ink-2); max-width: var(--measure); }
.colophon-side { grid-column: 11 / span 2; justify-self: end; }
/* The link label and the site name come from site.json: allow them to wrap. */
.colophon-contact, .colophon-mark { overflow-wrap: anywhere; min-width: 0; }
.colophon-contact { font-family: var(--sans); }

/* ---------- sim page ---------- */

.sim-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: clamp(24px, 3vw, 40px) 0 clamp(48px, 5vw, 72px);
}
.sim-num {
  grid-column: 1 / span 4;
  grid-row: 1;
  align-self: end;
  font-size: clamp(3.25rem, 7vw, 6.5rem);
}
.sim-titleblock { grid-column: 5 / -1; grid-row: 1; align-self: end; }
.sim-title {
  margin-top: 6px;
  text-wrap: balance;
  font-family: var(--sans);
  font-stretch: 112%;
  font-weight: 780;
  font-size: clamp(2.375rem, 4.8vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.sim-sub {
  margin-top: 14px;
  max-width: 34em;
  color: var(--ink-2);
  font-size: clamp(1.1875rem, 1.5vw, 1.375rem);
  line-height: 1.35;
}
.sim-intro {
  grid-column: 1 / span 4;
  grid-row: 2;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sim-run { display: flex; flex-direction: column; gap: 14px; }
.sim-lead { grid-column: 5 / -1; grid-row: 2; margin-top: 28px; }

.lede {
  font-size: clamp(1.1875rem, 1.4vw, 1.3125rem);
  line-height: 1.42;
  max-width: 34em;
}
.run-note { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.4; }

/* Sections of a sim page: the heading in the left four columns, the text
   from column 5. */
.band {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 22px;
  align-items: start;
  padding: 18px 0 72px;
  border-top: 1px solid var(--rule);
}
.band-title, .band-head { grid-column: 1 / span 4; }
.band-main { grid-column: 5 / span 5; }
.band--ref .band-main { grid-column: 5 / span 6; }
.band-side { grid-column: 10 / span 3; }
.band-wide { grid-column: 5 / -1; }
.band-note { margin-top: 10px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.4; }

.sub-head { margin-bottom: 10px; }

.facts-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule); }
.facts-table th, .facts-table td {
  text-align: left;
  vertical-align: baseline;
  padding: 9px 0 10px;
  border-bottom: 1px solid var(--rule-soft);
  line-height: 1.35;
}
.facts-table th { width: 40%; padding-right: 14px; color: var(--ink-2); }
.facts-table td {
  font-family: var(--sans);
  font-size: 1rem;
  font-variant-numeric: tabular-nums lining-nums;
}

.sim-plates {
  grid-column: 5 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px var(--gap);
  align-items: start;
}
.sim-plates > .plate--full { grid-column: 1 / -1; }

/* Term lists (orders, tools, settings) fold under their own heading. */
.fold { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fold + .fold { border-top: 0; }
.fold summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after {
  content: "+";
  content: "+" / "";
  flex: none;
  width: 1em;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.625rem;
  line-height: 1;
  text-align: center;
}
.fold[open] summary::after { content: "\2013"; content: "\2013" / ""; }
.fold summary:hover .fold-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.fold[open] > .terms { margin-bottom: 18px; }
.faq-answer { padding: 0 0 16px; }
.faq .fold-title { text-wrap: pretty; }

/* Links to the other sims, after the last Run link. */
.band--others { padding-bottom: 64px; }
.others { grid-column: 5 / span 6; max-width: var(--measure); border-top: 1px solid var(--rule); }
.others li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 16px;
  border-bottom: 1px solid var(--rule-soft);
}
.others a {
  display: inline-block;
  min-width: 0;
  padding: 10px 0 11px;
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-stretch: 100%;
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.25;
}

.terms { border-top: 1px solid var(--rule-soft); }
.terms div {
  display: grid;
  grid-template-columns: minmax(0, 11em) minmax(0, 1fr);
  gap: 20px;
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 1.0625rem;
  line-height: 1.45;
}
.terms div:last-child { border-bottom: 0; }
.terms dt { font-family: var(--sans); font-weight: 650; font-size: 1rem; line-height: 1.4; }

.controls-table { width: 100%; max-width: 52rem; border-collapse: collapse; border-top: 1px solid var(--rule); }
.controls-table th, .controls-table td {
  text-align: left;
  vertical-align: baseline;
  padding: 11px 0 12px;
  border-bottom: 1px solid var(--rule-soft);
  line-height: 1.45;
}
.controls-table th {
  width: 36%;
  padding-right: var(--gap);
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1rem;
}
.controls-table td { font-size: 1.0625rem; }

.notes { border-top: 1px solid var(--rule); }
.notes li { padding: 11px 0 12px; border-bottom: 1px solid var(--rule-soft); font-size: 1.0625rem; line-height: 1.5; }

.sim-end {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: 0 0 80px;
}
.sim-end .run { grid-column: 5 / span 4; }

/* ---------- plain pages: 404, the message form and its result pages ---------- */

/* No catalogue number (the 404 page shows its code in its place): the
   left four columns stay empty and the text sits in the reading column. */
.page {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-content: start;
  padding-top: clamp(32px, 4.4vw, 64px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.page > * { grid-column: 5 / span 7; max-width: 38rem; }
.page-num {
  grid-column: 1 / span 4;
  grid-row: 1;
  font-size: clamp(3.25rem, 7vw, 6.5rem);
  padding-top: 0.12em;
}
.page-title {
  margin-top: 8px;
  font-family: var(--sans);
  font-stretch: 112%;
  font-weight: 760;
  font-size: clamp(2.125rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.page-lede {
  margin-top: 16px;
  font-size: clamp(1.1875rem, 1.4vw, 1.3125rem);
  line-height: 1.45;
}
.page-lede p + p { margin-top: 0.5em; }
.page-link { margin-top: 18px; }

.notice-list { margin-top: 18px; border-top: 1px solid var(--rule); }
.notice-list li { padding: 10px 0 11px; border-bottom: 1px solid var(--rule-soft); line-height: 1.45; }
.notice-after { margin-top: 18px; }

/* The message form: one column, labels above their fields. */
.slip {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.slip-labelrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 16px;
}
.slip-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1.0625rem;
  line-height: 1.3;
}
.slip-optional {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-2);
}
.slip-count {
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums lining-nums;
}
.slip-count.is-near { color: var(--ink); font-weight: 650; }

.slip-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 0;
  font: inherit;
  line-height: 1.5;
  appearance: none;
}
input.slip-input { min-height: 52px; }
textarea.slip-input { min-height: 15em; resize: vertical; }
.slip-input:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
.slip-hint { margin-top: 8px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }

/* What happens to a message: quiet, compact, just above the button. */
.slip-terms {
  padding: 14px 18px 16px;
  background: var(--paper-2);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.slip-terms-title { color: var(--ink-2); margin-bottom: 8px; }
.slip-terms ul { max-width: 34em; }
.slip-terms li + li { margin-top: 6px; }

.slip-send { margin-top: -4px; }
.send {
  appearance: none;
  margin: 0;
  min-height: 56px;
  min-width: 15rem;
  padding: 14px 28px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: var(--sans);
  font-stretch: 85%;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.send:hover { background: var(--paper); color: var(--ink); }
.send:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Honeypot on the message form: a real field that people never see or
   reach. Moved off-screen rather than display:none, which some bots skip. */
.trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 761-1100px ---------- */

@media (max-width: 1100px) {
  .intro { grid-column: 5 / -1; }

  .entry-num { grid-column: 1 / span 4; }
  .entry-head { grid-column: 5 / -1; }
  .entry-lead { grid-column: 1 / -1; grid-row: 2; }
  .entry-text {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
  }
  .entry-act { grid-column: 1 / span 5; }
  .entry-about { grid-column: 6 / -1; }
  .entry-minor { grid-column: 1 / -1; grid-row: 4; }

  .sim-intro {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
  }
  .lede { grid-column: 1 / span 7; }
  .sim-run { grid-column: 8 / -1; }
  .sim-lead { grid-column: 1 / -1; grid-row: 3; }

  .band-title, .band-head { grid-column: 1 / span 3; }
  .band-main, .band--ref .band-main, .band-wide, .others { grid-column: 4 / -1; }
  .band-side { grid-column: 4 / -1; max-width: var(--measure); margin-top: 12px; }
  .band--plates .band-head { grid-column: 1 / -1; }
  .sim-plates { grid-column: 1 / -1; }
  .sim-end .run { grid-column: 4 / span 6; }

  .page > * { grid-column: 4 / -1; }
  .page-num { grid-column: 1 / span 3; }

  .compact { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 7fr); }
  .compact-run { grid-column: 3; justify-self: start; margin-top: 12px; }

  .colophon-mark { grid-column: 1 / span 3; }
  .colophon-text { grid-column: 4 / span 6; }
  .colophon-side { grid-column: 10 / span 3; }
}

/* ---------- up to 760px ---------- */

@media (max-width: 760px) {
  body { font-size: 1.0625rem; }

  /* One row for the real names; long values wrap onto a second row. */
  .sitebar-inner { min-height: 52px; column-gap: 12px; }
  .sitebar-mark { font-size: 1.0625rem; }
  .sitebar nav { column-gap: 14px; justify-content: flex-start; }
  .sitebar nav a { font-size: 0.875rem; }

  /* Intro, then the tally and the jump link on one line when they fit. */
  .masthead-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px 16px;
    padding: 12px 0 22px;
  }
  .masthead-row .intro { flex: 1 0 100%; order: -1; }
  .masthead-aside { margin-top: 0; }
  /* The entries follow at once; on a phone only the jump to the index is kept. */
  .masthead-aside li:has(a[href="#simulations"]) { display: none; }

  .entry {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    padding: 24px 0 56px;
  }
  .entry > * { grid-column: 1 !important; grid-row: auto !important; }
  .entry-num { font-size: 3rem; }
  .entry-head { margin-top: 8px; }
  .entry-title { font-size: 2.125rem; }
  .entry-lead { margin-top: 16px; }
  .entry-text { display: flex; margin-top: 16px; gap: 24px; }
  .entry-act, .entry-about { gap: 16px; }
  .entry-summary { font-size: 1.0625rem; }
  .entry-minor { margin-top: 24px; gap: 16px 14px; }
  .entry-minor .plate figcaption { font-size: 0.8125rem; }

  .compact { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); row-gap: 12px; padding: 20px 0; }
  .compact-num { grid-column: 1 / -1; font-size: 2.25rem; }
  .compact-thumb { grid-column: 1; }
  .compact-text { grid-column: 2; }
  .compact-run { grid-column: 1 / -1; margin: 0; justify-self: stretch; }
  .compact-run .run { display: flex; }
  .compact-title { font-size: 1.3125rem; }
  .compact-summary { font-size: 1rem; }

  .index-table td.c-kind, .index-table thead .c-kind { display: none; }
  .index-table .c-sub {
    display: block;
    margin-top: 2px;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--ink-2);
  }
  .index-table .c-num { width: 3.6em; }
  .index-table th.c-num, .index-table td.c-num { padding-right: 0; }
  .index-table td.c-num { font-size: 1.25rem; }
  .index-table th.c-title { width: auto; }
  .index-table tbody .c-title { font-size: 1.0625rem; }
  .index-table th, .index-table td { padding-right: 12px; }
  .index-table td.c-status { font-size: 0.9375rem; padding-right: 0; white-space: nowrap; }

  .colophon-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 14px; padding-bottom: 28px; }
  .colophon-side { justify-self: auto; }

  .sim-head { grid-template-columns: minmax(0, 1fr); padding: 18px 0 48px; }
  .sim-head > * { grid-column: 1 !important; grid-row: auto !important; }
  .sim-num { font-size: 3rem; }
  .sim-titleblock { margin-top: 8px; }
  .sim-title { font-size: 2.375rem; }
  .sim-intro { display: flex; margin-top: 16px; gap: 16px; }
  .lede { font-size: 1.125rem; line-height: 1.42; }
  .sim-run { gap: 12px; }
  .content-note { font-size: 0.9375rem; padding: 9px 12px 10px; }
  .sim-lead { margin-top: 20px; }

  .band { grid-template-columns: minmax(0, 1fr); row-gap: 14px; padding: 16px 0 52px; }
  .band > *, .sim-plates { grid-column: 1 !important; }
  .band-side { margin-top: 14px; }
  .sim-plates { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .terms div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .controls-table th, .controls-table td { display: block; width: auto; padding-right: 0; }
  .controls-table th { padding-bottom: 0; border-bottom: 0; }
  .controls-table td { padding-top: 2px; }
  .sim-end { display: block; padding-bottom: 56px; }
  .sim-end .run { display: flex; }

  .page { grid-template-columns: minmax(0, 1fr); padding-top: 28px; }
  .page > * { grid-column: 1 !important; grid-row: auto !important; max-width: none; }
  .page-num { font-size: 3rem; padding-top: 0; margin-bottom: 12px; }
  .page-title { font-size: 2.125rem; }
  .page-lede { font-size: 1.125rem; }

  .slip { margin-top: 28px; padding-top: 22px; gap: 24px; }
  .slip-terms { padding: 12px 14px 14px; }
  .send { width: 100%; min-width: 0; }
}

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

@media print {
  .skip, .filter, .actions, .sim-end, .band--others, .masthead-aside nav, .slip-send { display: none !important; }
  body { background: #fff; }
  .entry, .plate { break-inside: avoid; }
  /* Every fold prints its contents, open or closed, with no open/close
     marker. Browsers with ::details-content (Chrome 131+, Safari 18.4+,
     Firefox 143+) do it here; src/index.js also opens the folds on
     beforeprint and restores them on afterprint, for the rest. */
  .fold summary { cursor: auto; }
  .fold summary::after { content: none !important; }
  /* A browser that does not know ::details-content drops only this rule. */
  .fold::details-content { display: block; content-visibility: visible; }
}

/* ---------- play page: a slim bar over the game ---------- */

body.page-play { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #111; }
.playbar { flex: none; display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 12px; background: #16181b; color: #e9e6df; font: 500 13px/1 "Archivo Variable", system-ui, sans-serif; }
.playbar a { color: inherit; text-decoration: none; white-space: nowrap; }
.playbar a:hover, .playbar a:focus-visible { text-decoration: underline; }
.playbar-home { font-weight: 700; }
.playbar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #b9b5ab; }
.playbar-full { flex: none; font: inherit; color: inherit; background: none; border: 1px solid #4a4d52; border-radius: 3px; padding: 4px 9px; cursor: pointer; }
.playbar-full:hover, .playbar-full:focus-visible { border-color: #e9e6df; }
.playframe { flex: 1; min-height: 0; display: flex; }
.playframe-game { flex: 1; width: 100%; height: 100%; border: 0; display: block; background: #000; }
@media (max-height: 520px) { .playbar { height: 26px; font-size: 12px; } .playbar-about { display: none; } .playbar-full { padding: 2px 7px; } }
@media (max-width: 520px) { .playbar-about { display: none; } }
