/* Story styles. The shared reading-header.css stays unchanged; only its
   documented theme colours are set here. */
@font-face {
  font-family: "Newsreader";
  src: url("assets/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/newsreader-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* The masthead keeps the shared light defaults from reading-header.css. */
  --paper: #faf9f6;
  --panel: #f1eee6;
  --surface: #ffffff;
  --chip: #e8e4da;
  --ink: #1f2522;
  --ink-muted: #545f58;
  --rule: #cfcabd;
  --edge: #7a786e;
  --link: #145a96;
  /* Colour carries one meaning each: new or selected, breaks a rule, keeps a rule. */
  --amber: #f6bf4f;
  --amber-soft: #fdf0d2;
  --clash: #a3211c;
  --clash-soft: #fbe2df;
  --keep: #14603b;
  --keep-soft: #dcefe3;
  --display: "Horizons Archivo", Archivo, system-ui, sans-serif;
  --reading: "Newsreader", Georgia, "Times New Roman", serif;
  --measure: min(max(60vw, 736px), 1024px);
  --figure: min(max(78vw, 864px), 1280px);
}

*, *::before, *::after { box-sizing: border-box; }
/* Figures are sized in rem, so they grow with the wider desktop columns. */
html { -webkit-text-size-adjust: 100%; font-size: clamp(100%, calc(12px + .4167vw), 112.5%); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(20px, calc(14.5px + .4167vw), 21px)/1.6 var(--reading);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--amber); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .06em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid #1a6cbd; outline-offset: 3px; border-radius: 2px; }
html:not(.js) .needs-js { display: none; }
.js .needs-js { display: block; }
p { margin: 0 0 1em; }
h2 {
  font: 780 clamp(1.7rem, 3.4vw, 2.5rem)/1.12 var(--display);
  font-stretch: 112%;
  letter-spacing: -.02em;
  margin: 2.6em 0 .7em;
  text-wrap: balance;
}

/* ---------- Opening ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 48px) clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--rule);
}
.soc-article-header h1 {
  margin: 0 0 .55em;
  font: 830 clamp(2.5rem, 5.6vw, 5.1rem)/1.02 var(--display);
  font-stretch: 118%;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.soc-dek { max-width: 34rem; margin: 0 0 1.1rem; font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.42; }
.soc-publication-date { margin: 0; font: 600 .95rem/1 var(--display); letter-spacing: .04em; color: var(--ink-muted); }
.hero-scene { --chip-w: 4.5rem; --chip-h: 1.875rem; --roof: 0.75rem; margin: 0; justify-self: center; width: min(100%, 44rem); font-family: var(--display); }
.hero-scene figcaption { margin-top: 0.5rem; font-size: .98rem; line-height: 1.45; color: var(--ink-muted); }
.hero-scene .scene-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.75rem; margin: 0 0 0.5rem; }
.hero-scene .scene-rule { margin: 0; font-size: 1.3rem; font-weight: 750; line-height: 1.25; text-wrap: balance; }
.hero-scene .scene-list + .scene-list { margin-top: 0.5rem; }
.hero-scene .scene-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* A guest is at the party or in their own house; an empty party seat keeps its name. */
.hero-scene .scene-places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.hero-scene .scene-place { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 1.5rem 0.5rem 0.5rem; border-radius: 0.625rem; }
.hero-scene .scene-party { border: 1px solid var(--rule); background: var(--amber-soft); }
.hero-scene .scene-place-name { position: absolute; top: 0.375rem; left: 0.625rem; margin: 0; font-size: .8rem; font-weight: 700; line-height: 1.2; color: var(--ink-muted); }
.hero-scene .scene-party .scene-place-name { color: var(--ink); }
.hero-scene .scene-seats { display: flex; align-items: center; gap: 0.375rem; }
.hero-scene .scene-spots { display: flex; align-items: flex-end; gap: 0.25rem; }
.hero-scene .scene-seat { position: relative; width: var(--chip-w); height: var(--chip-h); }
.hero-scene .scene-spot { position: relative; flex: 0 1 auto; width: calc(var(--chip-w) + 0.25rem); min-width: 0; height: calc(var(--chip-h) + 0.25rem + var(--roof)); }
.hero-scene .scene-spot::before { content: ""; position: absolute; top: 0; left: -2px; right: -2px; height: calc(var(--roof) + 1px); background: var(--rule); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.hero-scene .scene-spot::after { content: ""; position: absolute; top: var(--roof); left: 0; right: 0; bottom: 0; border: 1.5px solid var(--rule); border-top: 0; border-radius: 0 0 0.375rem 0.375rem; }
.hero-scene .scene-empty { position: absolute; inset: 0; display: grid; place-items: center; border: 2px dashed var(--rule); border-radius: 62.44rem; color: var(--ink-muted); font-size: .85rem; font-weight: 500; }
.hero-scene .scene-guest { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; border: 2px solid var(--edge); border-radius: 62.44rem; background: var(--surface); color: var(--ink); font-size: .92rem; font-weight: 700; transition: background-color .2s, border-color .2s, color .2s; }
.hero-scene .scene-spot > .scene-guest { inset: calc(var(--roof) + 2px) 2px 2px; }
.hero-scene .scene-guest.is-coming { border-color: var(--ink); background: var(--amber); }
.hero-scene .scene-guest.is-home { border-style: dashed; border-color: var(--edge); background: var(--paper); color: var(--ink-muted); }
.hero-scene .scene-guest.is-clash { border-color: var(--clash); background: var(--clash-soft); color: var(--clash); }
.hero-scene .scene-guest.is-kept { border-color: var(--keep); color: var(--keep); }
/* One frame holds the rule's two seats: red when both come, green when one stays home. */
.hero-scene .scene-pair { display: flex; gap: 0.25rem; padding: 0.25rem; border: 0.1562rem solid transparent; border-radius: 62.44rem; transition: border-color .25s, background-color .25s; }
.hero-scene .rule-broken .scene-pair { border-color: var(--clash); background: var(--clash-soft); }
.hero-scene .rule-kept .scene-pair { border-style: dashed; border-color: var(--keep); }
.hero-scene .scene-verdict { margin: 0.25rem 0 0; font-size: .98rem; font-weight: 700; line-height: 1.3; text-wrap: pretty; transition: opacity .25s; }
.hero-scene .rule-broken .scene-verdict { color: var(--clash); }
.hero-scene .rule-kept .scene-verdict { color: var(--keep); }
.hero-scene .scene-verdict.is-waiting { opacity: 0; }
.hero-scene.is-instant * { transition: none !important; }

/* ---------- Reading column ---------- */
main { overflow-x: clip; }
.prose { width: min(100% - 40px, var(--measure)); margin-inline: auto; }
.prose:first-child { padding-top: clamp(32px, 5vw, 64px); }
.prose h2:first-child { margin-top: 1.6em; }
.lead { font-size: 1.16em; line-height: 1.45; }
.cites { font: 700 .7em/1 var(--display); vertical-align: super; white-space: nowrap; }
.cites a { display: inline-block; min-width: 1.05em; padding: .3em .1em; text-align: center; text-decoration: none; scroll-margin-top: 30vh; }
.cites a:hover { text-decoration: underline; }
/* The citation the reader returned to, marked for a moment. */
.cites a.cite--back { animation: cite-back 1.8s ease-out; }
@keyframes cite-back { 0%, 50% { background: var(--amber); color: var(--ink); } }
.cites a:target { background: var(--amber); color: var(--ink); }
figure { margin: 0; }
figcaption { font: 400 .98rem/1.45 var(--display); color: var(--ink-muted); }

/* ---------- Shared controls ---------- */
.soft-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1.5px solid var(--edge);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: 600 1rem/1.2 var(--display);
  cursor: pointer;
}
@media (hover: hover) {
  .soft-button:hover:not([aria-pressed="true"]) { border-color: var(--ink); }
}
.soft-button[aria-pressed="true"] { border-color: var(--ink); background: var(--amber); }

/* Every working figure sits on one calm panel */
.party, .grow, .split, .seating {
  width: min(100% - 24px, var(--figure));
  margin: 2.2rem auto 1.6rem;
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--panel);
  font-family: var(--display);
}
.party figcaption, .grow figcaption, .split figcaption, .seating figcaption { margin-top: 0.875rem; }

/* A guest's name with the shared icon */
.name-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 6px; border-radius: 999px; background: var(--chip); font-size: 1rem; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.name-chip svg { flex: none; width: 16px; height: 16px; fill: currentColor; }
.name-chip.new { background: var(--amber); }
.list-names { display: flex; flex-wrap: wrap; gap: 5px; }
.list-label { display: block; margin-bottom: 5px; font-size: .92rem; font-weight: 650; color: var(--ink-muted); }

/* ---------- First puzzle ---------- */
/* Drawn as the opening scene draws a party: named seats, the guests' own houses,
   a verdict line in red or green, and one pill control. */
.party { --chip-w: 6rem; --chip-h: 2.25rem; --roof: 0.8125rem; }
.party .party-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.75rem; margin: 0 0 0.625rem; }
.party .party-ask { margin: 0; font-size: 1.3rem; font-weight: 750; line-height: 1.25; text-wrap: balance; }
.party .party-reset, .party .party-reveal { flex: none; display: inline-flex; align-items: center; gap: 0.375rem; height: 2.5rem; padding: 0 0.875rem 0 0.6875rem; border: 1.5px solid var(--edge); border-radius: 62.44rem; background: var(--surface); color: var(--ink); font: 600 .92rem/1 var(--display); cursor: pointer; }
.party .party-reveal { padding: 0 0.875rem; }
.party .party-reveal[aria-pressed="true"] { border-color: var(--ink); background: var(--amber); }
.party .party-reset:disabled, .seating .seat-reset:disabled { border-color: var(--chip); background: var(--chip); color: #8a8c82; cursor: not-allowed; }
.party .party-reset svg { width: 1.062rem; height: 1.062rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.party .party-places { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0.5rem; }
.js .party .party-places.needs-js { display: grid; }
.party .party-place { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 1.625rem 0.625rem 0.625rem; border-radius: 0.625rem; }
.party .party-at { border: 1px solid var(--rule); background: var(--amber-soft); }
.party .party-place-name { margin: 0; font-size: .8rem; font-weight: 700; line-height: 1.2; color: var(--ink-muted); }
.party .party-place .party-place-name { position: absolute; top: 0.4375rem; left: 0.625rem; }
.party .party-at .party-place-name { color: var(--ink); }
.party .party-seats { display: flex; align-items: center; gap: 0.5rem; }
.party .party-spots { display: flex; align-items: flex-end; gap: 0.25rem; }
.party .party-seat { position: relative; width: var(--chip-w); height: var(--chip-h); }
.party .party-spot { position: relative; flex: none; width: calc(var(--chip-w) + 0.25rem); height: calc(var(--chip-h) + 0.25rem + var(--roof)); }
.party .party-spot::before { content: ""; position: absolute; top: 0; left: -2px; right: -2px; height: calc(var(--roof) + 1px); background: var(--rule); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.party .party-spot::after { content: ""; position: absolute; top: var(--roof); left: 0; right: 0; bottom: 0; border: 1.5px solid var(--rule); border-top: 0; border-radius: 0 0 0.375rem 0.375rem; }
.party .party-empty { position: absolute; inset: 0; display: grid; place-items: center; border: 2px dashed var(--rule); border-radius: 62.44rem; color: var(--ink-muted); font-size: .85rem; font-weight: 500; }
/* A guest is a pressable chip: amber in a seat, dashed in their house, red when they break a rule */
.party .party-guest { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 0; border: 2px dashed var(--edge); border-radius: 62.44rem; background: var(--paper); color: var(--ink-muted); font: 700 .95rem/1 var(--display); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.party .party-spot > .party-guest, .party .party-spot > .party-empty { inset: calc(var(--roof) + 2px) 2px 2px; }
.party .party-guest::before { content: ""; position: absolute; inset: -5px -2px; }
.party .party-guest { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.party .party-guest.is-dragging { z-index: 5; cursor: grabbing; box-shadow: 0 0.375rem 1rem rgb(31 37 34 / .22); }
.party .party-place.is-target { outline: 2px dashed var(--ink); outline-offset: 2px; }
.party .party-guest.is-in { border-style: solid; border-color: var(--ink); background: var(--amber); color: var(--ink); }
.party .party-guest.is-clash { border-style: solid; border-color: var(--clash); background: var(--clash-soft); color: var(--clash); }
.party .party-verdict { min-height: 1.3em; margin: 0.5rem 0 0; font-size: .98rem; font-weight: 700; line-height: 1.3; }
.party .party-verdict.is-bad { color: var(--clash); }
.party .party-verdict.is-good { color: var(--keep); }
.party .party-verdict.is-waiting { color: var(--ink-muted); }
/* A rule is its sentence with the guests it names, then its own verdict line */
.party .party-rules { counter-reset: rule; margin: 0; padding: 0; list-style: none; }
.js .party .party-rules { margin-top: 14px; }
.party .party-rule { counter-increment: rule; display: grid; grid-template-columns: 1.6em minmax(0, 1fr); padding: 0.625rem 0; border-top: 1px solid var(--rule); }
.party .party-rule:last-child { border-bottom: 1px solid var(--rule); }
.party .party-rule::before { content: counter(rule) "."; font-size: 1.05rem; font-weight: 700; line-height: 1.9; color: var(--ink-muted); }
.party .party-say { font-size: 1.05rem; font-weight: 700; line-height: 1.9; }
.party .party-why { grid-column: 2; margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.3; color: var(--keep); }
.party .party-rule.is-broken .party-why { color: var(--clash); }
.party .party-rule.is-waiting .party-why { font-weight: 600; color: var(--ink-muted); }
.party .party-who { display: inline-grid; place-items: center; height: 1.75rem; margin: 0 1px; padding: 0 0.625rem; border: 2px dashed var(--edge); border-radius: 62.44rem; background: var(--paper); color: var(--ink-muted); font: 700 .9rem/1 var(--display); vertical-align: middle; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.party .party-who.is-in { border-style: solid; border-color: var(--ink); background: var(--amber); color: var(--ink); }
.party .is-broken .party-who.is-blame { border-style: solid; border-color: var(--clash); background: var(--clash-soft); color: var(--clash); }
.party .is-shake { animation: party-shake .32s; }
@keyframes party-shake { 25% { translate: -4px 0; } 50% { translate: 4px 0; } 75% { translate: -3px 0; } }
/* The board: all 16 lists as small parties, marked as the reader tries them */
.party .party-board { margin-top: 1.125rem; }
.party .party-board-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.js .party .party-board-head { display: flex; }
.party .party-tally { margin: 2px 0 0.625rem; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.party .party-tally span { font-weight: 500; color: var(--ink-muted); }
.party .party-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.party .party-tile { display: grid; gap: 0.3125rem; min-width: 0; padding: 0.3125rem 0.3125rem 0.375rem; border: 1.5px solid var(--rule); border-radius: 0.625rem; background: transparent; color: var(--ink); font-family: var(--display); text-align: left; cursor: pointer; }
.party .party-tile-seats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.1875rem; padding: 0.3125rem 0.25rem; border-radius: 0.4375rem; background: var(--amber-soft); }
.party .party-tile-seat { display: grid; place-items: center; min-width: 0; height: 1.375rem; border: 1.5px dashed var(--rule); border-radius: 62.44rem; color: var(--ink-muted); font-size: .68rem; font-weight: 500; line-height: 1; }
.party .party-tile-seat.is-in { border-style: solid; border-color: var(--ink); background: var(--amber); color: var(--ink); font-weight: 700; }
.party .party-tile-say { padding-left: 0.1875rem; font-size: .78rem; font-weight: 700; line-height: 1.2; color: var(--ink-muted); }
.party .party-tile:not(.is-tried) .party-tile-seats { background: transparent; }
.party .party-tile:not(.is-tried) .party-tile-seat { border-color: var(--edge); }
.party .party-tile:not(.is-tried) .party-tile-seat.is-in { border-style: solid; background: var(--amber-soft); }
.party .party-tile:not(.is-tried) .party-tile-say { font-weight: 500; }
.party .party-tile.is-tried { background: var(--surface); }
.party .party-tile.is-tried .party-tile-say { color: var(--clash); }
.party .party-tile.is-tried .party-tile-seat.is-clash { border-color: var(--clash); color: var(--clash); }
.party .party-tile.is-tried .party-tile-seat.is-in.is-clash { background: var(--clash-soft); }
.party .party-tile.is-tried.works { border-color: var(--keep); background: var(--keep-soft); }
.party .party-tile.is-tried.works .party-tile-say { color: var(--keep); }
.party .party-tile[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.party.is-instant * { animation: none !important; transition: none !important; }
@media (hover: hover) {
  .party .party-reset:hover:not(:disabled), .party .party-reveal:hover:not([aria-pressed="true"]) { border-color: var(--ink); }
  .party .party-guest:hover { box-shadow: 0 0 0 0.1875rem var(--amber-soft), 0 0 0 0.2812rem var(--ink); }
  .party .party-tile:hover { border-color: var(--ink); }
}

/* ---------- One more guest ---------- */
/* One dinner list grows into a tree: each new guest splits every list into
   without and with. Heading row, pills and seats follow the dinner figure. */
.grow { --d: 1.25rem; }
.grow .grow-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.75rem; margin-bottom: 0.75rem; }
.js .grow .grow-head.needs-js { display: flex; }
.grow .grow-ask { margin: 0; font-size: 1.3rem; font-weight: 750; line-height: 1.25; text-wrap: balance; }
.grow .grow-controls { display: flex; flex: none; gap: 0.5rem; }
.grow .grow-pill { display: inline-flex; align-items: center; gap: 0.375rem; height: 2.5rem; padding: 0 0.875rem; border: 1.5px solid var(--edge); border-radius: 62.44rem; background: var(--surface); color: var(--ink); font: 600 .92rem/1 var(--display); white-space: nowrap; cursor: pointer; }
.grow .grow-pill.is-next { border-color: var(--ink); background: var(--amber); }
.grow .grow-pill:disabled { border-color: var(--chip); background: var(--chip); color: #8a8c82; cursor: not-allowed; }
.grow .grow-pill svg { width: 1.062rem; height: 1.062rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Each column is as wide as its guest count, so seats stay one size across the tree. */
.grow .grow-tree { position: relative; grid-template-columns: 4fr 5fr 6fr 7fr; gap: 0 1.75rem; min-height: 23.75rem; }
.js .grow .grow-tree.needs-js { display: grid; }
.grow .grow-level { display: flex; flex-direction: column; justify-content: space-around; gap: 0.375rem; min-width: 0; }
.grow .grow-node { position: relative; z-index: 1; display: grid; gap: 0.25rem; min-width: 0; padding: 0.3125rem; border: 1.5px solid var(--rule); border-radius: 0.5625rem; background: var(--surface); }
.grow .grow-node.is-root { border-color: var(--ink); }
.grow .grow-seats { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 0.1875rem; padding: 0.3125rem 0.375rem; border-radius: 0.4375rem; background: var(--amber-soft); }
.grow .grow-seat { display: grid; place-items: center; flex: 0 1 var(--d); min-width: 0; aspect-ratio: 1; border: 1.5px dashed var(--edge); border-radius: 50%; background: var(--paper); color: var(--ink-muted); font-size: calc(var(--d) * .48); font-weight: 700; line-height: 1; }
.grow .grow-seat.is-in { border-style: solid; border-color: var(--ink); background: var(--amber); color: var(--ink); }
.grow .grow-seat.is-new { box-shadow: 0 0 0 2px var(--ink); }
.grow .grow-tag { padding-left: 2px; font-size: .74rem; font-weight: 600; line-height: 1.15; color: var(--ink-muted); }
.grow .grow-node.is-with .grow-tag, .grow .grow-node.is-root .grow-tag { font-weight: 750; color: var(--ink); }
.grow .grow-next { display: grid; place-items: center; min-height: 3.25rem; padding: 0.375rem; border: 2px dashed var(--rule); border-radius: 0.5625rem; color: var(--ink-muted); font-size: .85rem; font-weight: 650; line-height: 1.2; text-align: center; }
.grow .grow-lines { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.grow .grow-lines path { fill: none; stroke: var(--edge); stroke-width: 2; }
.grow .grow-lines path.is-fresh { stroke-dasharray: 400; stroke-dashoffset: 400; animation: grow-draw .5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes grow-draw { to { stroke-dashoffset: 0; } }
.grow .grow-node.is-fresh { animation: grow-in .45s cubic-bezier(0.16, 1, 0.3, 1) .1s both; }
@keyframes grow-in { from { opacity: 0; transform: translateX(-24px); } }
/* The count sits where the dinner figure puts its verdict */
.grow .grow-count { flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.875rem; margin: 1rem 0 0.25rem; padding-top: 0.875rem; border-top: 1px solid var(--rule); }
.js .grow .grow-count.needs-js { display: flex; }
.grow .grow-total { font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 830; font-stretch: 115%; line-height: 1; }
.grow .grow-sum { font-size: 1rem; font-weight: 700; color: var(--ink-muted); }
.grow .grow-say { margin: 0; font-size: .98rem; font-weight: 700; line-height: 1.35; color: var(--keep); }
.grow .grow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.375rem; margin: 0.875rem 0 0; padding: 0; list-style: none; }
.grow .grow-steps li { padding: 0.375rem 0.5rem 0; border-top: 0.1875rem solid var(--ink); font-size: .88rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.grow .grow-steps b { display: block; font-size: 1.15rem; }
.js .grow .grow-steps li:not(.is-on) { border-color: var(--rule); color: var(--ink-muted); }
@media (hover: hover) {
  .grow .grow-pill:hover:not(:disabled):not(.is-next) { border-color: var(--ink); }
}

/* ---------- Split ---------- */
/* The groups either side of Dev, walked through one step at a time. Every
   step sits in the same grid cell, so the figure keeps the tallest step's
   height and never moves the page. Chips and pills follow the dinner figure. */
.split .split-bar { margin-bottom: 0.875rem; }
.split .split-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.split .split-steps button { display: flex; align-items: baseline; gap: 0.375rem; width: 100%; min-height: 2.75rem; padding: 0.5rem 0.25rem 0.25rem; border: 0; border-top: 0.25rem solid var(--rule); background: none; color: var(--ink-muted); font: 650 .9rem/1.2 var(--display); text-align: left; cursor: pointer; }
.split .split-steps button b { font-size: 1.05rem; font-weight: 800; }
.split .split-steps button.is-done { border-color: var(--ink); color: var(--ink); }
.split .split-steps button[aria-current="step"] { border-color: var(--amber); color: var(--ink); font-weight: 800; }
.split .split-steps button:disabled { cursor: default; }
.split .split-pill { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 0.375rem; min-width: 4.75rem; height: 2.5rem; padding: 0 0.875rem; border: 1.5px solid var(--edge); border-radius: 62.44rem; background: var(--surface); color: var(--ink); font: 600 .92rem/1 var(--display); cursor: pointer; }
/* A button to press is a raised key: a rounded rectangle with a deeper bottom edge, unlike the round guest chips */
.split .split-pill.is-next, .split .split-choice .split-pill { border: 2px solid var(--ink); border-bottom-width: 0.25rem; border-radius: 0.5rem; background: var(--amber); font-weight: 700; white-space: nowrap; }
.split .split-pill.is-next:active, .split .split-choice .split-pill:active { border-bottom-width: 2px; transform: translateY(2px); }
.split .split-pill.split-end { background: var(--surface); }
.split .split-pill.is-next:not(.split-end)::after, .split .split-choice .split-pill::after { content: "→"; font-size: 1.05rem; line-height: 1; }
.split .split-pill:disabled { border-color: var(--chip); background: var(--chip); color: #8a8c82; cursor: not-allowed; }
.split .split-pill[aria-pressed="true"] { border-color: var(--ink); background: var(--amber); }
.js .split .split-stage { display: grid; }
.js .split .split-step { grid-area: 1 / 1; visibility: hidden; }
.js .split .split-step.is-current { visibility: visible; }
.split .split-title { margin: 0 0 0.25rem; font-size: 1.3rem; font-weight: 750; line-height: 1.25; outline: none; }
.split .split-say { min-height: 2.6em; margin: 0 0 0.75rem; font-size: 1.02rem; font-weight: 600; line-height: 1.35; color: var(--ink-muted); text-wrap: pretty; }
.split .split-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(10.75rem, .45fr) minmax(0, 1fr); gap: 0.75rem; align-items: start; }
.split .split-cols.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split .split-group { padding: 0.75rem; border: 1px solid var(--rule); border-radius: 0.625rem; background: var(--surface); }
.split .split-group-name { margin: 0 0 0.375rem; font-size: 1rem; font-weight: 750; line-height: 1.3; }
.split .split-group-name b { color: var(--keep); }
.split .split-rules { counter-reset: rule; margin: 0; padding: 0; list-style: none; }
.split .split-rules li { counter-increment: rule; display: grid; grid-template-columns: 1.4em minmax(0, 1fr); padding: 0.1875rem 0; border-top: 1px solid var(--rule); font-size: .95rem; font-weight: 650; line-height: 1.9; }
.split .split-rules li:first-child { border-top: 0; }
.split .split-rules li::before { content: counter(rule) "."; color: var(--ink-muted); }
.split .split-note { grid-column: 2; font-size: .85rem; font-weight: 700; line-height: 1.3; color: var(--keep); }
.split .split-who { display: inline-grid; place-items: center; height: 1.625rem; padding: 0 0.5625rem; border: 2px solid var(--edge); border-radius: 62.44rem; background: var(--paper); font-size: .85rem; font-weight: 700; line-height: 1; vertical-align: middle; }
.split .split-who.is-dev { border-color: var(--ink); background: var(--amber); box-shadow: 0 0 0 2px var(--surface), 0 0 0 0.25rem var(--amber); }
.split .split-who.is-away { border-style: dashed; background: var(--paper); box-shadow: none; color: var(--ink-muted); }
.split .split-dev { display: grid; justify-items: center; gap: 0.5rem; padding-top: 1rem; text-align: center; }
.split .split-dev p { margin: 0; font-size: .85rem; font-weight: 600; line-height: 1.3; color: var(--ink-muted); }
.split .split-dev-chip { display: grid; place-items: center; width: 5.25rem; height: 2.75rem; border: 2px solid var(--ink); border-radius: 62.44rem; background: var(--amber); font-size: 1.05rem; font-weight: 750; transition: background-color .2s, border-color .2s; }
.split .split-dev-chip.is-open { border-style: dashed; border-color: var(--edge); background: var(--paper); color: var(--ink-muted); }
.split .split-dev-chip.is-home { border-style: dashed; background: var(--paper); }
.split .split-choice { display: flex; flex-direction: column; gap: 0.375rem; }
/* An option row: one box, a pick marker, the guests as chips */
.split .split-options { display: grid; gap: 0.375rem; margin-top: 0.5rem; }
.split .split-option { display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 2.75rem; padding: 0.3125rem 0.625rem 0.3125rem 0.5rem; border: 1.5px solid var(--rule); border-radius: 0.625rem; background: var(--surface); color: var(--ink); font: 650 .9rem/1.2 var(--display); text-align: left; cursor: pointer; }
.split .split-option::before { content: ""; flex: none; width: 1.125rem; height: 1.125rem; border: 2px solid var(--edge); border-radius: 50%; background: var(--surface); }
.split .split-option[aria-pressed="true"] { border: 2px solid var(--ink); background: var(--amber-soft); }
.split .split-option[aria-pressed="true"]::before { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 0.1875rem var(--amber-soft); }
.split .split-option .split-who { height: 1.75rem; border-color: var(--ink); background: var(--amber); }
.split .split-none { color: var(--ink-muted); }
.split .split-pairing { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.875rem; min-height: 5.25rem; margin-top: 0.75rem; padding: 0.5rem 0.75rem; border: 2px dashed var(--rule); border-radius: 0.625rem; }
.split .split-pairing.is-full { border: 1.5px solid var(--keep); background: var(--surface); }
.split .split-pairing p { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.3; color: var(--ink-muted); }
.split .split-pairing.is-full p { color: var(--keep); }
.split .split-pairing .split-pill { margin-left: auto; }
.split .split-seats { display: flex; gap: 0.1875rem; padding: 0.25rem; border-radius: 0.5rem; background: var(--amber-soft); }
.split .split-seat { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 1.5px dashed var(--edge); border-radius: 50%; background: var(--paper); color: var(--ink-muted); font-size: .74rem; font-weight: 700; }
.split .split-seat.is-in { border-style: solid; border-color: var(--ink); background: var(--amber); color: var(--ink); }
/* Multiply: the two option lists either side of the sign */
/* One card per answer about Dev, side by side: the groups, multiplied, and what that makes. */
.split .split-cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.split .split-case-card { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; padding: 0.75rem; border: 1px solid var(--rule); border-radius: 0.625rem; }
.split .split-case-card.is-later { position: relative; border-style: dashed; border-color: var(--edge); }
.split .split-case-card.is-later > :not(.split-later) { visibility: hidden; }
.split .split-later { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.75rem; text-align: center; }
.split .split-case { margin: 0; font-size: 1rem; font-weight: 750; }
.split .split-unknown { margin: 0; color: var(--ink-muted); font-size: 1.6rem; font-weight: 830; font-stretch: 112%; line-height: 1; }
.split .split-product { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.5rem; }
.split .split-product .split-sign { align-self: center; }
.split .split-stack { align-content: start; }
.split .split-result { display: flex; align-items: baseline; justify-content: flex-end; gap: 0.5rem; margin: auto 0 0; }
.split .split-stack { display: grid; gap: 0.25rem; padding: 0.625rem; border: 1px solid var(--rule); border-radius: 0.625rem; background: var(--surface); }
.split .split-stack p { margin: 0 0 2px; font-size: .85rem; font-weight: 700; color: var(--ink-muted); }
.split .split-stack span.split-row { display: flex; flex-wrap: wrap; gap: 0.25rem; min-height: 1.75rem; align-items: center; font-size: .85rem; font-weight: 650; }
.split .split-sign { font-size: 1.6rem; font-weight: 800; }
.split .split-big { font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 830; font-stretch: 115%; line-height: 1; }
.split .split-lines { display: grid; gap: 0.375rem; margin: 0.875rem 0 0; }
.split .split-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.875rem; min-height: 2.75rem; margin: 0; font-size: 1.05rem; font-weight: 700; }
.split .split-line b { font-size: 1.4rem; font-weight: 830; font-stretch: 112%; }
.split .split-line.is-total { outline: none; }
.split .split-line.is-pending { visibility: hidden; }
.split .split-line.is-total b { font-size: clamp(1.7rem, 4vw, 2.2rem); }
.split .split-meter { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem 0.75rem; align-items: center; margin-top: 0.875rem; }
.split .meter-name, .split .meter-value { margin: 0; font-size: .95rem; line-height: 1.2; }
.split .meter-track { height: 1rem; border: 1px solid var(--rule); border-radius: 62.44rem; background: var(--surface); }
.split .meter-bar { display: block; height: 100%; border-radius: 62.44rem; background: var(--edge); }
.split .meter-split { background: var(--amber); }
html:not(.js) .split .split-step + .split-step { margin-top: 16px; }
@media (hover: hover) {
  .split .split-pill:hover:not(:disabled):not(.is-next):not([aria-pressed="true"]), .split .split-option:hover:not([aria-pressed="true"]) { border-color: var(--ink); }
}

/* ---------- Growth comparison ---------- */
.rates { width: min(100% - 24px, var(--figure)); margin: 2.4rem auto; font-family: var(--display); }
.rates table { width: 100%; border-collapse: collapse; font-size: 1.02rem; line-height: 1.35; }
.rates th, .rates td { padding: 11px 12px; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.rates thead th { border-top: 0; font-size: .92rem; font-weight: 650; color: var(--ink-muted); }
.rates tbody th { width: 34%; font-weight: 750; }
.rates tbody tr:last-child > * { border-top: 2px solid var(--ink); background: var(--amber-soft); }
.rates figcaption { padding-top: 10px; }

/* ---------- Researcher card ---------- */
.person {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 1.8rem 0;
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font: 400 1.02rem/1.45 var(--display);
  scroll-margin-top: 1rem;
  transition: background-color .15s ease, border-color .15s ease;
}
/* Hovering or focusing the name in the text points at the card. */
.prose:has(.who-yang:hover) .person, .prose:has(.who-yang:focus-visible) .person, .person:target { border-color: var(--ink); background: var(--amber-soft); }
.person img { width: 7rem; height: auto; border-radius: 4px; }
.person p { margin: 0 0 .5em; }
.person-name { font-size: 1.15rem; font-weight: 750; }
.credit { font-size: .9rem; color: var(--ink-muted); }

/* ---------- Researchers in the text ---------- */
/* First mention: a round photo and the name, one link that opens the profile card. */
.who { color: inherit; text-decoration: underline dotted var(--edge); text-decoration-thickness: 1.5px; text-underline-offset: .22em; white-space: nowrap; transition: color .12s, text-decoration-color .12s; }
.who:hover, .who[aria-expanded="true"] { color: var(--link); text-decoration-color: var(--link); text-decoration-style: solid; }
.who-photo { display: inline-block; width: 1.4em; height: 1.4em; margin: -.25em .3em -.25em 0; border-radius: 50%; object-fit: cover; vertical-align: middle; box-shadow: 0 0 0 1px var(--rule); }
.who-mono { display: inline-grid; place-items: center; width: 2.33em; height: 2.33em; background: var(--amber-soft); color: var(--ink); margin: -.42em .5em -.42em 0; font: 700 .6em/1 var(--display); box-shadow: 0 0 0 1px var(--edge); }
@media (hover: hover) {
  .who:hover .who-photo { box-shadow: 0 0 0 2px var(--amber); }
}

/* The profile card, in the form the haze story uses: a floating card on a desktop, a sheet from the bottom on a phone. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.profile-sheet { position: fixed; margin: 0; padding: 0; border: 0; max-width: 100%; max-height: 100%; background: var(--paper); color: var(--ink); overflow: auto; overscroll-behavior: contain; transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1); }
.profile-sheet:focus { outline: none; }
.profile-sheet::backdrop { background: rgb(31 37 34 / .12); }
.profile-sheet--float { top: 50%; left: 50%; width: min(26rem, calc(100vw - 32px)); max-height: 86vh; border: 1px solid var(--edge); border-top: 4px solid var(--ink); box-shadow: 0 28px 60px -18px rgb(31 37 34 / .6); transform: translate(-50%, -50%); animation: float-in .24s cubic-bezier(0.16, 1, 0.3, 1); }
.profile-sheet--bottom { top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 0 0; box-shadow: 0 -14px 40px -12px rgb(31 37 34 / .45); animation: from-bottom .3s cubic-bezier(0.16, 1, 0.3, 1); }
.profile-sheet--dragging { transition: none; user-select: none; cursor: grabbing; }
.profile-sheet--float.is-leaving { animation: float-out .16s ease-in forwards; }
.profile-sheet--bottom.is-leaving { animation: to-bottom .22s ease-in forwards; }
@keyframes float-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(.98); } }
@keyframes float-out { to { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(.98); } }
@keyframes from-bottom { from { transform: translateY(100%); } }
@keyframes to-bottom { to { transform: translateY(100%); } }
.profile-grip { position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--rule); }
.profile { padding: 0 1.25rem; font: 400 1rem/1.5 var(--reading); }
.profile p { margin: 0; }
.profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; margin-bottom: 1rem; padding: 1.25rem 0 1rem; border-bottom: 1px solid var(--rule); }
.profile-sheet--bottom .profile-head { padding-top: 1.75rem; cursor: grab; touch-action: none; }
.profile-photo { display: grid; place-items: center; width: 4rem; height: 4.875rem; overflow: hidden; border-radius: 2rem 2rem 3px 3px; background: var(--chip); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-mono { font: 700 1.1rem/1 var(--display); letter-spacing: .04em; }
.profile-name { font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.profile .profile-title { margin-top: .3rem; color: var(--ink-muted); font-size: .86rem; line-height: 1.4; }
.profile-close { align-self: start; display: grid; place-items: center; width: 36px; height: 36px; margin: -.2rem -.35rem 0 0; padding: 0; border: 0; border-radius: 50%; background: rgb(31 37 34 / .07); color: var(--ink); cursor: pointer; transition: background-color .15s; }
.profile-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.profile-close:hover { background: rgb(31 37 34 / .14); }
.profile .profile-text { margin-bottom: 1rem; }
.profile .profile-more { position: sticky; bottom: 0; margin: 0 -1.25rem; background: var(--paper); padding: .75rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); }
.profile-link { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 10px; background: var(--ink); color: var(--paper); font: 600 1rem/1.2 var(--reading); text-decoration: none; transition: background-color .15s; }
.profile-link:hover { background: #333b37; color: var(--paper); }

/* ---------- The number, printed in full ---------- */

/* ---------- Guest faces ---------- */
/* One guest chip everywhere: a drawn mock portrait sits in the left end of the pill,
   concentric with it, and the name centres in the space left. --ch is the chip's height,
   in three sizes: on the stage, in a line of text, and in a list tile. */
.face { display: inline-block; flex: none; width: 1.25em; height: 1.25em; margin: -.15em .25em 0 0; border-radius: 50%; vertical-align: middle; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.hero-scene .scene-guest, .party .party-guest, .party .party-who, .party .party-tile-seat, .split .split-who, .split .split-dev-chip, .seating .seat-guest, .seating .seat-pair { --ch: 2.25rem; display: inline-flex; align-items: center; justify-content: flex-start; gap: .3em; padding: 0 .7em 0 2px; font-size: .88rem; font-weight: 700; line-height: 1; }
.hero-scene .scene-guest, .party .party-guest, .split .split-dev-chip, .party .party-tile-seat { display: flex; }
.hero-scene .scene-guest, .hero-scene .scene-empty { --ch: 1.875rem; padding-right: .5em; font-size: .8rem; }
.party .party-who, .split .split-who, .split .split-option .split-who, .seating .seat-pair { --ch: 1.625rem; height: var(--ch); font-size: .8rem; }
.party .party-tile-seat { --ch: 1.375rem; height: var(--ch); padding-left: 1.5px; font-size: .68rem; }
.split .split-dev-chip { height: var(--ch); }
.seating .seat-guest { height: var(--ch); }
.hero-scene .scene-guest .face, .party .party-guest .face, .party .party-who .face, .party .party-tile-seat .face, .split .split-who .face, .split .split-dev-chip .face, .seating .seat-guest .face, .seating .seat-pair .face { width: calc(var(--ch) - 8px); height: calc(var(--ch) - 8px); margin: 0; }
.chip-name { flex: 1 1 auto; min-width: 0; text-align: center; white-space: nowrap; }
.seat-who .chip-name { white-space: normal; }
.seating .seat-pair { background: var(--chip); }
.grip { order: 3; }
/* An empty seat keeps the same shape, with a ring where the face will sit. */
.party .party-empty { --ch: 2.25rem; font-size: .88rem; }
.hero-scene .scene-empty, .party .party-empty { padding: 0 .5em 0 calc(var(--ch) - 2px); }
.hero-scene .scene-empty::before, .party .party-empty::before { content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px; aspect-ratio: 1; border: 1.5px dashed var(--rule); border-radius: 50%; }
.grow .grow-seat, .split .split-seat { overflow: hidden; font-size: 0; }
.grow .grow-seat .face, .split .split-seat .face { width: 100%; height: 100%; margin: 0; }
.hero-scene .scene-guest.is-home .face, .party .party-guest:not(.is-in):not(.is-clash) .face, .party .party-who:not(.is-in):not(.is-blame) .face, .party .party-tile-seat:not(.is-in) .face, .grow .grow-seat:not(.is-in) .face, .split .split-seat:not(.is-in) .face, .split .split-who.is-away .face, .split .split-dev-chip.is-home .face, .split .split-dev-chip.is-open .face { filter: grayscale(1); opacity: .55; }

/* ---------- Seating ---------- */
/* Three round tables in the dinner's look: amber seats, red when rivals share a
   table, green when everyone sits apart. Guests are dragged or pressed. */
.seating .seat-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.75rem; margin: 0 0 0.5rem; }
.seating .seat-ask { margin: 0; font-size: 1.3rem; font-weight: 750; line-height: 1.25; text-wrap: balance; }
.seating .seat-reset { flex: none; display: inline-flex; align-items: center; gap: 0.375rem; height: 2.5rem; padding: 0 0.875rem 0 0.6875rem; border: 1.5px solid var(--edge); border-radius: 62.44rem; background: var(--surface); color: var(--ink); font: 600 .92rem/1 var(--display); cursor: pointer; }
.js .seating .seat-reset.needs-js { display: inline-flex; }
.seating .seat-reset svg { width: 1.062rem; height: 1.062rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.seating .seat-rivals { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.75rem; margin: 0 0 0.625rem; }
.seating .seat-rule { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.seating .seat-pairs { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.seating .seat-pair { padding: 0.1875rem 0.625rem; border-radius: 62.44rem; background: var(--chip); font-size: .92rem; font-weight: 650; line-height: 1.4; white-space: nowrap; transition: background-color .2s, color .2s; }
.seating .seat-pair.is-clash { background: var(--clash-soft); color: var(--clash); box-shadow: inset 0 0 0 1.5px var(--clash); }
.seating .seat-hint { display: flex; align-items: center; gap: 0.4375rem; margin: 0 0 0.625rem; font-size: .92rem; line-height: 1.3; color: var(--ink-muted); }
.js .seating .seat-hint.needs-js { display: flex; }
.seating .seat-hint svg { flex: none; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.seating .seat-tables { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.625rem; }
.seating .seat-table { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.375rem; min-width: 0; min-height: 10rem; padding: 2.125rem 1.125rem 1.125rem; border: 2px solid var(--rule); border-radius: 50%; background: var(--amber-soft); transition: border-color .2s, background-color .2s; }
.seating .seat-table.is-clash { border-color: var(--clash); background: var(--clash-soft); }
.seating.is-solved .seat-table { border-color: var(--keep); background: var(--keep-soft); }
.seating .seat-table.is-target { border-style: dashed; border-color: var(--ink); }
.seating .seat-name { position: absolute; top: 0.875rem; left: 0; right: 0; margin: 0; text-align: center; font-size: .88rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.seating .seat-guests { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3125rem; }
.seating .seat-guest { display: inline-flex; align-items: center; justify-content: center; gap: 0.3125rem; min-width: 3.625rem; height: 2.25rem; padding: 0 0.6875rem; border: 2px solid var(--ink); border-radius: 62.44rem; background: var(--amber); color: var(--ink); font: 700 .95rem/1 var(--display); touch-action: none; user-select: none; -webkit-user-select: none; }
.seating button.seat-guest { padding-left: 2px; cursor: grab; touch-action: none; }
.grip { flex: none; width: 0.5rem; height: 0.875rem; fill: currentColor; opacity: .55; }
.seating .seat-guest.is-clash { border-color: var(--clash); background: var(--surface); color: var(--clash); }
.seating .seat-guest.is-dragging { position: relative; z-index: 5; cursor: grabbing; box-shadow: 0 0.375rem 1rem rgb(31 37 34 / .22); }
.seating .seat-status { min-height: 1.3em; margin: 0.625rem 0 0; font-size: 1.05rem; font-weight: 750; line-height: 1.3; }
.seating .seat-status.is-bad { color: var(--clash); }
.seating .seat-status.is-good { color: var(--keep); }
.seating .seat-questions { margin: 0.75rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.seating .seat-q-title { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.seating .seat-q-row { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; }
.seating .seat-q-note { margin: 0.5rem 0 0; font-size: .92rem; line-height: 1.35; color: var(--ink-muted); }
.seating .seat-answer b { font-weight: 750; }
.seating .seat-answer { display: inline-block; height: 1.875rem; padding: 0 0.6875rem; line-height: 1.688rem; border: 1.5px dashed var(--edge); border-radius: 62.44rem; color: var(--ink-muted); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.seating .seat-answer.is-yes { border: 2px solid var(--ink); background: var(--amber); color: var(--ink); }
.seating .seat-count { margin: 0.75rem 0 0; padding-top: 0.625rem; border-top: 1px solid var(--rule); font-size: .98rem; font-weight: 650; color: var(--ink); }
@media (hover: hover) {
  .seating .seat-reset:hover:not(:disabled) { border-color: var(--ink); }
  .seating button.seat-guest:hover { box-shadow: 0 0 0 0.1875rem var(--amber-soft), 0 0 0 0.2812rem var(--ink); }
}

/* ---------- Ending ---------- */
.ending { margin-top: 4rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--panel); }
.ending-inner { width: min(100% - 40px, var(--measure)); margin-inline: auto; padding: 1.2rem 0 3rem; }
.ending h2 { margin-top: 1.4em; }

/* ---------- Notes ---------- */
.notes {
  width: min(100% - 40px, var(--measure));
  margin: 0 auto;
  padding: 3rem 0 4rem;
  font: 400 1.02rem/1.5 var(--display);
}
.notes h2 { margin: 0 0 .8em; font-size: 1.6rem; }
.source-list { margin: 0 0 1.4rem; padding-left: 2.75em; }
.source-list li { position: relative; isolation: isolate; margin-bottom: .8em; scroll-margin-top: 16px; }
.js .source-list .back { display: none; }
/* The source's number is the button back to the citation the reader came from: numbers
   right-aligned in one gutter, arrows in a column beside them. */
.source-list li.ref--back { list-style: none; }
.ref-return { position: absolute; left: -2.75em; top: 0; display: flex; align-items: baseline; justify-content: flex-end; gap: .25em; width: 2.3em; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--link); font: inherit; font-variant-numeric: tabular-nums; font-weight: 650; cursor: pointer; }
.ref-return svg { flex: none; align-self: center; width: .7em; height: .7em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
@media (hover: hover) {
  .ref-return:hover { color: var(--ink); }
  .ref-return:hover svg { transform: translateY(-2px); }
}
.source-list li:target::before { content: ""; position: absolute; inset: -.35em -.5em -.35em -3em; z-index: -1; border-radius: 6px; background: var(--amber-soft); }
.source-list cite { font-style: italic; }
.back {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding-inline: 6px;
  font-weight: 600;
  white-space: nowrap;
}
.detail-group { margin: 1.4rem 0; border-top: 1px solid var(--rule); }
details { border-bottom: 1px solid var(--rule); }
summary { display: flex; align-items: center; min-height: 48px; font-weight: 700; cursor: pointer; }
summary::before { content: ""; flex: none; width: 9px; height: 9px; margin-right: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
details[open] summary::before { transform: rotate(45deg); }
details p { margin-bottom: .8em; }
math { font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", serif; font-size: 1.05em; }
.formula { margin: .4em 0 1em; overflow-x: auto; padding: 4px 0; }
.formula math { font-size: 1.1em; }
.method-note { font-size: .95rem; color: var(--ink-muted); }
.more { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }

/* ---------- Narrow screens ---------- */
/* Two-column hero on a narrow desktop: the houses go under the party, as on phones */
@media (max-width: 1360px) {
  .hero-scene .scene-places { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .hero-scene .scene-home { flex-direction: row; justify-content: flex-start; align-items: flex-end; gap: 0.625rem; padding: 0 0.5rem 0 0.625rem; }
  .hero-scene .scene-home .scene-place-name { position: static; flex: none; padding-bottom: 0.5625rem; }
}
@media (max-width: 860px) {
  body { font-size: 1.19rem; }
  .hero { grid-template-columns: 1fr; }
  .lead { font-size: 1.32rem; }
  .split .split-cols, .split .split-cols.is-two { grid-template-columns: 1fr; }
  .split .split-dev { order: -1; grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; padding-top: 0; text-align: left; }
  .split .split-choice { grid-column: 1 / -1; flex-flow: row wrap; }
  .split .split-choice .split-pill { flex: 1 1 auto; }
  .split .split-cases { grid-template-columns: minmax(0, 1fr); }
  .person { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
  .person img { width: 84px; }
}
@media (max-width: 1500px) {
  .party .party-places { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .party .party-at { padding: 1.5rem 0.5rem 0.5rem; }
  .party .party-home { flex-direction: row; justify-content: flex-start; align-items: flex-end; gap: 0.625rem; padding: 0 0.5rem 0 0.625rem; }
  .party .party-home .party-place-name { position: static; flex: none; padding-bottom: 0.625rem; }
  .party .party-seats { justify-content: space-between; }
}
@media (max-width: 1700px) {
  .party .party-tile-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .party { --chip-w: 4rem; --chip-h: 1.875rem; --roof: 0.5625rem; }
  .party .party-ask { font-size: 1.12rem; }
  .party .party-say { font-size: 1rem; }
  .party .party-grid { gap: 0.375rem; }
  .party .party-tile-seat .face { display: none; }
  .party .party-tile-seat { padding: 0 .15em; }
  .grow .grow-seat .face { display: none; }
  .party .party-tile { padding: 0.25rem; }
  .party .party-tile-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0.25rem 0.1875rem; }
  .party .party-tile-seat { height: 1.25rem; font-size: .6rem; }
  .party .party-tile-say { padding-left: 1px; font-size: .68rem; }
  .grow { --d: 0.4375rem; }
  .grow .grow-head { flex-wrap: wrap; }
  .grow .grow-ask { font-size: 1.12rem; }
  .grow .grow-tree { gap: 0 0.625rem; min-height: 18.75rem; }
  .grow .grow-node { gap: 2px; padding: 2px; border-radius: 0.4375rem; }
  .grow .grow-seats { gap: 1px; padding: 0.25rem 2px; border-radius: 0.3125rem; }
  .grow .grow-seat { font-size: 0; border-width: 1px; }
  .grow .grow-seat.is-new { box-shadow: 0 0 0 1px var(--amber-soft), 0 0 0 2px var(--ink); }
  .grow .grow-tag { display: none; }
  .grow .is-root .grow-tag { display: block; padding: 0 2px 2px; font-size: .66rem; }
  .grow .grow-next { min-height: 2.5rem; padding: 0.25rem; font-size: .7rem; }
  .grow .grow-steps li { padding: 0.375rem 2px 0; font-size: .74rem; }
  .grow .grow-steps b { font-size: 1rem; }
  .seating .seat-ask { font-size: 1.12rem; }
  .seating .seat-reset { padding: 0 0.6875rem; }
  .seating .seat-reset-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .seating .seat-tables { gap: 0.375rem; }
  .seating .seat-table { justify-content: flex-start; min-height: 0; padding: 2rem 0.25rem 0.625rem; border-radius: 1.5rem; }
  .seating .seat-name { top: 0.6875rem; }
  .seating .seat-guests { flex-direction: column; align-items: center; gap: 0.25rem; }
  .seating .seat-guest { min-width: 0; width: 100%; max-width: 5.25rem; }
  .grip { display: none; }
  .seating .seat-guests { align-self: stretch; }
  .seating .seat-answer { padding: 0 0.5rem; font-size: .82rem; }
  .seating .seat-status { min-height: 3.9em; font-size: 1rem; }
  .split .split-steps button { flex-direction: column; gap: 0; font-size: .76rem; }
  .split .split-title { font-size: 1.12rem; }
  .split .split-say { font-size: .95rem; }
  .split .split-meter { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  /* Stacked, so a list of two guests stays on one line. */
  .split .split-product { grid-template-columns: minmax(0, 1fr); }
  .split .split-product .split-sign { justify-self: center; line-height: 1; }
  .split .meter-value { margin-bottom: 0.5rem; }
  .split .split-seat { width: 1.5rem; height: 1.5rem; font-size: .66rem; }
  .hero-scene { --chip-w: 4rem; --chip-h: 1.625rem; --roof: 0.5rem; }
  .hero-scene .scene-head { margin-bottom: 0.375rem; }
  .hero-scene .scene-list + .scene-list { margin-top: 0.375rem; }
  .hero-scene figcaption { margin-top: 0.375rem; }
  .hero-scene .scene-places { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .hero-scene .scene-party { padding: 1.375rem 0.5rem 0.375rem; }
  .hero-scene .scene-party .scene-place-name { top: 0.3125rem; }
  .hero-scene .scene-home { flex-direction: row; justify-content: flex-start; align-items: flex-end; gap: 0.625rem; padding: 0 0.5rem 0 0.625rem; }
  .hero-scene .scene-home .scene-place-name { position: static; flex: none; padding-bottom: 0.5625rem; }
  .hero-scene .scene-place-name { font-size: .78rem; }
}
@media (max-width: 640px) {
  .party .party-guest, .seating .seat-guest, .party .party-empty { --ch: 1.875rem; gap: .15em; padding-right: .4em; font-size: .8rem; }
  .hero-scene .scene-guest, .hero-scene .scene-empty { --ch: 1.625rem; gap: .15em; padding-right: .4em; }
  .hero-scene .scene-empty, .party .party-empty { padding-left: calc(var(--ch) - 2px); }
}
@media (max-width: 400px) {
  .party .party-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .party .party-tile-seat { height: 1.5rem; padding: 0 .3em 0 1.5px; font-size: .75rem; }
  .party .party-tile-seat .face { display: inline-block; width: calc(1.5rem - 7px); height: calc(1.5rem - 7px); }
  .party { --chip-h: 1.625rem; }
  .hero-scene .scene-home { flex-wrap: wrap; gap: 0.25rem; }
  .hero-scene .scene-home .scene-place-name { width: 100%; padding-bottom: 0; }
  .party .party-guest, .party .party-empty { --ch: 1.625rem; }
  .party .party-home { flex-wrap: wrap; gap: 0.25rem; padding-left: 0.5rem; }
  .party .party-home .party-place-name { width: 100%; padding-bottom: 0; }
  .party .party-reset { width: 2.5rem; padding: 0; justify-content: center; }
  .party .party-reset-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 360px) {
  .hero-scene, .party { --chip-w: 3.625rem; }
  .hero-scene .scene-guest, .party .party-guest, .hero-scene .scene-empty, .party .party-empty { font-size: .72rem; }
  .party .party-spots, .hero-scene .scene-spots { gap: 0.125rem; }
  .formula math { font-size: .96em; }
}
@media (prefers-reduced-motion: reduce) {
  summary::before { transition: none; }
  .person { transition: none; }
  .ref-return svg { transition: none; }
  .profile-sheet--float, .profile-sheet--bottom { animation: none; }
  .hero-scene * { transition: none; }
  .party * { animation: none !important; transition: none !important; }
  .seating * { transition: none !important; }
}
@media (forced-colors: active) {
  .party .party-guest.is-in, .party .party-who.is-in, .party .party-tile-seat.is-in, .party .party-reveal[aria-pressed="true"], .split .split-option[aria-pressed="true"], .split .split-pill[aria-pressed="true"], .split .split-pill.is-next, .split .split-steps button[aria-current="step"], .split .split-seat.is-in, .seating .seat-guest, .seating .seat-answer.is-yes { forced-color-adjust: none; }
  .hero-scene .scene-guest.is-coming { forced-color-adjust: none; }
}
