/*
  wobblehaus design system: direction K ("the highlighter"), at work (Step 2b, 2026-11-30).
  Rules live in docs/design-system.md. test/design-system.test.ts enforces the basics:
  colours and font families are only ever set here, as tokens, and used through var().
*/

/* == Fonts (self-hosted, SIL Open Font License; see /fonts/*.LICENSE.txt) == */

@font-face {
  font-family: "Funnel Display";
  src: url("/fonts/funnel-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* == Tokens == */

:root {
  /* Colour: paper, ink, marker. Everything else is a shade of ink or a functional colour. */
  --paper: #ffffff;
  --surface: #f6f6f6;        /* quiet panels on paper */
  --rule: #e4e4e4;           /* hairlines: dividers, panel edges (decoration, not a control's edge) */
  --rule-strong: #8c8c8c;    /* edges of things people use (inputs, quiet buttons): 3.4:1 on paper */
  --ink: #0d0d0d;            /* on paper: 19.8:1 */
  --ink-soft: #4a4a4a;       /* on paper: 8.9:1, on surface: 8.1:1 */
  --marker: #f2ff3d;         /* fill only, never text on paper */
  --marker-ink: #0d0d0d;     /* text on marker, both themes: 18:1 */
  --plate: #ffffff;          /* behind a design system's logo, both themes: logos are drawn for a light ground */
  --mint: #7debb8;           /* the mint marker: fill only on paper (1.5:1), ink on it 13:1 */
  --mint-ink: #0b6b47;       /* mint you can see on paper (6.6:1): link underlines on hover */
  --mint-wash: #e2faef;      /* behind "that worked" notices; ink on it 18:1 */
  --error: #b3261e;          /* on paper: 6.5:1 */
  --focus: #0d0d0d;
  --scrim: rgb(13 13 13 / 0.4);  /* behind a panel */

  /* Type: who is talking decides the face. */
  --font-name: "Funnel Display", "Instrument Sans", system-ui, sans-serif;  /* the name, app names, buttons */
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;  /* everything you read */
  --font-typed: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;  /* only what a person types */

  --text-xs: 0.75rem;
  --text-s: 0.875rem;
  --text-m: 1rem;
  --text-l: 1.125rem;
  --text-xl: clamp(1.375rem, 3.5vw, 1.75rem);
  --text-title: clamp(1.75rem, 5vw, 2.5rem);
  --text-hero: clamp(2.25rem, 5.5vw, 4rem);

  /* Space: one scale, used through gap and padding. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  /* Shape */
  --line: 1px;
  --radius-xs: 4px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-marker: 0.28em 0.14em 0.32em 0.12em;
  --radius-blob: 46% 54% 50% 44% / 54% 46% 54% 46%;

  /* Motion: wobble once, then rest. */
  --ease-jelly: cubic-bezier(0.3, 0.7, 0.4, 1);
  --ease-pop: cubic-bezier(0.34, 1.25, 0.64, 1);   /* overshoots a touch: only for something thrown or bounced (a haus landing) */
  /* The front page's rhythm and type scale (public/index.html). Spacing says what belongs together:
     a heading sits closer to what it introduces than to the section before it. */
  --front-section: clamp(5rem, 11vw, 9rem);       /* between sections */
  --front-head: clamp(1.5rem, 3vw, 2.5rem);       /* from a section's heading to its content */
  --front-display: clamp(2.6rem, 6.4vw, 5rem);    /* the opening line, and the closing one */
  --front-title: clamp(2rem, 4.4vw, 3.25rem);     /* each section's heading */
  --dur-wobble: 0.9s;
  --dur-swipe: 0.9s;
  /* Everything else settles like a spring with no bounce: fast out of the gate, gentle at the end. */
  --ease-settle: cubic-bezier(0.2, 0.9, 0.3, 1);
  --dur-press: 0.1s;     /* feedback the moment a finger lands */
  --dur-quick: 0.18s;    /* a menu or a small change appearing */
  --dur-sheet: 0.38s;    /* a panel arriving or leaving */

  /* Type: tracking changes with size. Big type pulls tighter, small type opens up a little to stay legible. */
  --track-display: -0.035em;
  --track-title: -0.025em;
  --track-small: 0.01em;

  /* The smallest thing a finger can reliably hit. */
  --hit: 2.75rem;

  --measure: 40rem;
  --page: 72rem;
  --header: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d0d0d;
    --surface: #171717;
    --rule: #2a2a2a;
    --rule-strong: #6e6e6e;    /* on paper: 3.6:1 */
    --ink: #f5f5f5;          /* on paper: 18.4:1 */
    --ink-soft: #b8b8b8;     /* on paper: 10:1, on surface: 8.9:1 */
    --error: #ff8a80;        /* on paper: 8.4:1 */
    --mint-ink: #7debb8;     /* on paper: 13:1 */
    --mint-wash: #0f2e22;    /* ink on it: 14:1 */
    --focus: #f5f5f5;
    --scrim: rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

/* More contrast, when someone has asked their device for it: soft ink comes closer to ink. */
@media (prefers-contrast: more) {
  :root {
    --ink-soft: #262626;     /* on paper: 15:1 */
    --scrim: rgb(13 13 13 / 0.6);
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --ink-soft: #e0e0e0;     /* on paper: 14.7:1 */
    --scrim: rgb(0 0 0 / 0.75);
  }
}

/* == Base == */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--text-m);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links: a mint underline set well below the letters, so it never runs into g, p or y; it deepens on hover. */
a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--mint);
}

a:hover {
  text-decoration-color: var(--mint-ink);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}

/* A smaller headline wraps onto more lines, so it gets a little more room between them and a little less pull. */
h2 {
  font-size: var(--text-xl);
  line-height: 1.15;
  letter-spacing: var(--track-title);
}

/* Small print opens up slightly so it stays easy to read. */
.field__hint,
.crumbs,
.footer,
.item-list__meta,
.history__meta {
  letter-spacing: var(--track-small);
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* A group of fields is held together by its heading and spacing, never by the browser's grey frame. */
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  font-size: var(--text-s);
  font-weight: 600;
}

fieldset.stack > legend {
  margin-bottom: var(--space-4);
}

/* == Page frame == */

.page,
.footer {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
}

/* The header runs the full width with a hairline under it, and stays at the top; what's in it lines up with the page. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  min-height: var(--header);
  padding-left: max(var(--space-4), env(safe-area-inset-left, 0px), calc((100% - var(--page)) / 2 + var(--space-4)));
  padding-right: max(var(--space-4), env(safe-area-inset-right, 0px), calc((100% - var(--page)) / 2 + var(--space-4)));
  background: var(--paper);
  border-bottom: var(--line) solid var(--rule);
}

.page {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding-block: var(--space-6) var(--space-7);
}

.page--app {
  gap: var(--space-6);
}

/* App screens are for working in: their titles are a size down from the front page's. */
.page--app .message__title {
  font-size: var(--text-xl);
}

/* Signing in and saying yes to something: one narrow column, one task, buttons as wide as the column. */
.page--door {
  max-width: calc(26rem + 2 * var(--space-4));
  gap: var(--space-5);
  padding-block: var(--space-7);
}

.page--door .message__title {
  font-size: var(--text-xl);
}

.page--door .lede {
  font-size: var(--text-m);
}

.page--door .button:not(.button--small) {
  width: 100%;
}

/* Every app page is the same width as the header. Running text and forms keep a readable line length, flush left. */
.page--app p,
.page--app .prose li,
.page--app .error-summary {
  max-width: var(--measure);
}

.footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-block: 0 var(--space-6);
  font-size: var(--text-s);
  color: var(--ink-soft);
}

/* == Brand: the mark + the name == */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
  transform-origin: 50% 100%;
}

/* Still at rest. It wobbles only when someone points at it. */
.brand:hover .brand__mark,
.brand:active .brand__mark {
  animation: wobble-again var(--dur-wobble) var(--ease-jelly) both;
}

.brand__name {
  font-family: var(--font-name);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.045em;
  line-height: 1;
}

@keyframes wobble {
  0% { transform: scale(1, 1); }
  20% { transform: scale(1.14, 0.84); }
  40% { transform: scale(0.92, 1.08); }
  60% { transform: scale(1.04, 0.97); }
  80%, 100% { transform: scale(1, 1); }
}

/* The not-found page: the mark looks one way, then the other, as if for the page, then rests. */
.brand__mark--lost {
  animation: look-around 1.4s var(--ease-jelly) 0.2s both;
}

@keyframes look-around {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-9deg); }
  55% { transform: rotate(8deg); }
  80% { transform: rotate(-2deg); }
}

/* Same motion under a new name, so hover replays it. */
@keyframes wobble-again {
  0% { transform: scale(1, 1); }
  20% { transform: scale(1.14, 0.84); }
  40% { transform: scale(0.92, 1.08); }
  60% { transform: scale(1.04, 0.97); }
  80%, 100% { transform: scale(1, 1); }
}

/* == Marker: one per screen, on the thing that's new or just for you == */

.marker {
  position: relative;
  z-index: 0;
  display: inline-block;
  background: none;
  color: var(--marker-ink);
}

.marker::before {
  content: "";
  position: absolute;
  inset: 0.12em -0.08em 0.02em;
  z-index: -1;
  background: var(--marker);
  border-radius: var(--radius-marker);
  transform-origin: 0% 60%;
  animation: swipe var(--dur-sheet) var(--ease-settle) 0.3s both;
}

/* One straight stroke, left to right. */
@keyframes swipe {
  from { transform: scaleX(0); }
}

/* == Buttons == */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--hit);
  font-family: var(--font-name);
  font-weight: 700;
  font-size: var(--text-m);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--marker-ink);
  background: var(--marker);
  border: var(--line) solid var(--marker-ink);
  border-radius: var(--radius-s);
  padding: 0.55rem 1.1rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  justify-self: start;
  touch-action: manipulation;
  transition: transform var(--dur-press) var(--ease-settle), background-color var(--dur-quick) var(--ease-settle), border-color var(--dur-quick) var(--ease-settle);
}

/* Hover only where there's a pointer to hover with; on a phone it would stick after a tap. */
@media (hover: hover) {
  .button:hover {
    box-shadow: inset 0 0 0 1px var(--marker-ink);
  }

  .button--quiet:hover {
    box-shadow: none;
    background: var(--surface);
    border-color: var(--ink);
  }

  .button--ink:hover {
    box-shadow: none;
    background: var(--ink-soft);
    border-color: var(--ink-soft);
  }
}

/* Pressed: it gives the moment a finger or click lands, not when it lets go. */
.button:active {
  transform: scale(0.98);
}

/* Everything else people press sinks a touch too, straight away. */
.account-menu__toggle {
  touch-action: manipulation;
  transition: transform var(--dur-quick) var(--ease-settle), border-color var(--dur-quick) var(--ease-settle);
}

.account-menu__toggle:active {
  transform: scale(0.96);
  transition-duration: var(--dur-press);
}

.button--quiet {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--rule-strong);
}

/* A strong action that isn't the screen's main one (the header's "Get started"). */
.button--ink {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.button--small {
  font-size: var(--text-s);
  padding: var(--space-1) var(--space-3);
}

/* == Setup list (/connect): what to do on the left, how on the right == */

/* How it works: what to do on the left, how on the right, from a tablet up. */
.setup {
  display: grid;
  margin: 0;
}

.setup__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  padding-block: var(--space-5);
}

.setup__row + .setup__row {
  border-top: var(--line) solid var(--rule);
}

.setup__row:first-child {
  padding-top: 0;
}

.setup dt {
  font-weight: 600;
}

.setup dd {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
}

@media (min-width: 48rem) {
  .setup__row {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: var(--space-6);
  }
}

/* Real code someone could paste. Typed face, on surface. */
.code-sample {
  min-width: 0;
  margin: 0;
  padding: var(--space-5);
  overflow-x: auto;
  font-family: var(--font-typed);
  font-size: var(--text-s);
  line-height: 1.7;
  background: var(--surface);
  border-radius: var(--radius-m);
}

.code-sample code {
  padding: 0;
  font-size: inherit;
  background: none;
  border: 0;
  overflow-wrap: normal;
}

/* A state in a word: a version that's live. */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.4rem;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-soft);
  border: var(--line) solid var(--rule-strong);
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.badge--live {
  color: var(--marker-ink);
  background: var(--mint);
  border-color: var(--mint);
}

/* Words to paste, inside a sentence. */
code {
  font-family: var(--font-typed);
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  background: var(--surface);
  border-radius: var(--radius-xs);
  overflow-wrap: anywhere;
}

/* == Sign-up == */

.signup {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  background: var(--surface);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
}

.form-stack {
  display: grid;
  gap: var(--space-5);
  max-width: var(--measure);
}

.field {
  display: grid;
  gap: var(--space-2);
}

label {
  font-size: var(--text-s);
  font-weight: 600;
}

.field__hint {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.field__error {
  font-weight: 600;
  color: var(--error);
}

/* A live answer under a field as someone types ("@sam is free."). */
.field__status {
  font-size: var(--text-s);
  font-weight: 600;
  /* One line's room even while empty, so what's under it never moves as the answer comes and goes. */
  min-height: 1.5em;
}

.field__status--no {
  color: var(--error);
}

input[type="email"],
input[type="text"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  font: inherit;
  min-height: var(--hit);
  color: var(--ink);
  background: var(--paper);
  border: var(--line) solid var(--rule-strong);
  border-radius: var(--radius-s);
  padding: var(--space-2) var(--space-3);
  transition: border-color var(--dur-quick) var(--ease-settle);
  /* When the keyboard comes up, the page scrolls far enough to show the button under the box too. */
  scroll-margin-bottom: calc(var(--hit) + var(--space-7));
}

/* Our own arrow, inset like the text so it never hugs the edge. Drawn in --ink so it follows dark mode. */
input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-soft);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--ink);
  outline-offset: 1px;
}

select {
  --arrow-inset: var(--space-3);
  appearance: none;
  padding-right: calc(var(--arrow-inset) + var(--space-5));
  /* A chevron: two thin strokes meeting at the bottom. */
  background-image:
    linear-gradient(45deg, transparent calc(50% - 1px), var(--ink) calc(50% - 1px), var(--ink) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), var(--ink) calc(50% - 1px), var(--ink) calc(50% + 1px), transparent calc(50% + 1px));
  background-position:
    calc(100% - var(--arrow-inset) - 6px) 50%,
    calc(100% - var(--arrow-inset)) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* A search box looks like every other box (some phones round and shade it on their own). */
input[type="search"] {
  appearance: none;
}

textarea {
  resize: vertical;
  min-height: 5.5rem;
}

/* Choosing a photo: the device's own button, drawn as a quiet one; the name of what was chosen beside it
   in small print. The whole input is the touch area, so it stays a real file input with no script. */
input[type="file"] {
  display: block;
  width: 100%;
  min-height: var(--hit);
  font: inherit;
  font-size: var(--text-s);
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  min-height: var(--hit);
  margin-right: var(--space-3);
  font-family: var(--font-name);
  font-weight: 700;
  font-size: var(--text-s);
  letter-spacing: 0;
  color: var(--ink);
  background: var(--paper);
  border: var(--line) solid var(--rule-strong);
  border-radius: var(--radius-s);
  padding: var(--space-2) var(--space-5);
  cursor: pointer;
  transition: transform var(--dur-quick) var(--ease-settle);
}

input[type="file"]:active::file-selector-button {
  transform: scale(0.96);
  transition-duration: var(--dur-press);
}

input[type="file"][aria-invalid="true"]::file-selector-button {
  border-color: var(--error);
}

/* A code someone copies out of an email: their typing, in the typed face, spaced so the digits are easy to check. */
/* Six digits, so the box is about six digits wide and big enough to read back at a glance. */
.code-input {
  max-width: 14rem;
  font-family: var(--font-typed);
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: 0.2em;
}

input[aria-invalid="true"] {
  border-color: var(--error);
}

/* == Message pages (thank you, errors) == */

.lede {
  font-size: var(--text-l);
  color: var(--ink-soft);
}

/* An email address in a sentence: one piece when it fits on the line, broken anywhere only when it can't. */
.address {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.message__title {
  font-size: var(--text-title);
}

/* == Signing in: the heading, and a note on who can come in == */
.door {
  margin-bottom: var(--space-4);
}

.door__title {
  margin: 0;
}

.door__new {
  max-width: var(--measure);
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
  font-size: var(--text-s);
}

.door__new p {
  margin: 0;
}

/* == Things: the screens every app is built from == */

/* Spacing tells people what belongs together: lines in a group sit close, fields sit further apart,
   groups in a section further still, and a sub-heading gets extra room above it. */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

section.stack {
  gap: var(--space-5);
}

.stack > :is(h2, h3):not(:first-child),
.stack > .stack:has(> h3:first-child):not(:first-child) {
  margin-top: var(--space-4);
}

h3 {
  margin: 0;
  font-size: var(--text-l);
  line-height: 1.2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.crumbs {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

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

.item-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: var(--line) solid var(--rule);
}

.item-list li {
  border-top: var(--line) solid var(--rule);
  scroll-margin-top: var(--space-6);
}

.item-list__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-2);
  margin-inline: calc(-1 * var(--space-2));
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: background-color var(--dur-quick) var(--ease-settle);
}

@media (hover: hover) {
  .item-list__link:hover {
    background: var(--surface);
  }
}

.item-list__title {
  font-family: var(--font-name);
  font-weight: 700;
  font-size: var(--text-m);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.item-list__meta {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.details {
  display: grid;
  margin: 0;
  border-top: var(--line) solid var(--rule);
  font-size: var(--text-m);
}

.details__row {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-3);
  border-bottom: var(--line) solid var(--rule);
}

.details dt {
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--ink-soft);
}

.details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.checks {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.check {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--hit); /* the whole row is the target; rows sit close, so no reach past it */
  font-size: var(--text-m);
  font-weight: 500;
  cursor: pointer;
}

/* A choice that belongs to the one above it (the apps under "Only the apps I pick"). */
.check--indent {
  padding-left: var(--space-6);
}

.check input {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--ink);
}

.field__label {
  font-weight: 600;
}

/* == A goal everyone adds toward ==
   The total is the biggest thing on the page. Under it the thing's haus walks along a fat bar the
   highlighter fills, then what's left and the one button to add, together; who's added what under
   that, each as a short ink bar. == */

.money {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.money__currency {
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--ink-soft);
}

.danger-zone {
  padding-top: var(--space-5);
  border-top: var(--line) solid var(--rule);
}

/* A list that ends a section already has its line under it from the next ruled section: one line, not two. */
.danger-zone:has(+ .danger-zone) > .item-list:last-child {
  border-bottom: 0;
}

.error-summary {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: var(--line) solid var(--error);
  border-radius: var(--radius-m);
}

.error-summary ul {
  margin: 0;
  padding-left: var(--space-5);
  color: var(--error);
}

.notice {
  padding: var(--space-3) var(--space-4);
  background: var(--mint-wash);
  border: var(--line) solid var(--mint);
  border-radius: var(--radius-s);
  font-size: var(--text-s);
  font-weight: 600;
}

.history {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--line) solid var(--rule);
}

.history__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  padding-block: var(--space-3);
  border-bottom: var(--line) solid var(--rule);
}

.history__number {
  grid-row: span 3;
  font-family: var(--font-typed);
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.history__what {
  font-size: var(--text-s);
  font-weight: 600;
}

.history__value {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.history__meta {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

/* == People and sharing (Phase 2) == */

.space-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.space-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  font-size: var(--text-s);
  font-weight: 600;
}

.space-nav a:not(.button) {
  color: var(--ink-soft);
  text-decoration: none;
}

.space-nav a:not(.button):hover {
  color: var(--ink);
}

/* Section links on the front page: from a tablet up only; on a phone the header keeps Sign in and Get started. */
.space-nav__section {
  display: none;
}

@media (min-width: 48rem) {
  .space-nav__section {
    display: inline;
  }
}

/* == The path in the header (src/views/switcher.tsx): whose apps, then which app, each a menu ==
   After the mark (the wordmark steps back so the path has room): "/ @sam ▾ / expense-tracker ▾". Plain
   <details>, opening like the account menu, out of the part that was pressed. On a phone the handle hides
   behind its initial and the app menu rises as a sheet from the foot of the screen. */

.brand--short .brand__name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* One line, always: the app's name gives way (it ends in "…") before anything wraps. */
.site-header--path {
  flex-wrap: nowrap;
}

.site-header--path > * {
  flex: none;
}

.site-path {
  display: flex;
  flex: 1 1 0 !important;
  align-items: center;
  min-width: 0;
  font-size: var(--text-s);
}

.site-path .switch--app {
  flex: 0 1 auto;
}

.site-path__slash {
  padding-inline: var(--space-1);
  color: var(--rule-strong);
  font-size: 1.25rem;
  font-weight: 300;
}

.switch {
  position: relative;
  min-width: 0;
}

.switch__toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  min-height: var(--hit);
  padding: 0 var(--space-2);
  border-radius: var(--radius-s);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.switch__toggle::-webkit-details-marker {
  display: none;
}

.switch__toggle::after {
  content: "";
  flex: none;
  width: 0.4em;
  height: 0.4em;
  margin: 0 0.1em 0.2em;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: rotate(45deg);
}

.switch[open] .switch__toggle {
  background: var(--surface);
}

@media (hover: hover) {
  .switch__toggle:hover {
    background: var(--surface);
  }
}

.switch__name,
.site-path__here {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 16rem;
}

.site-path__here {
  padding-inline: var(--space-2);
  font-weight: 600;
}

.switch__face {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--marker-ink);
  background: var(--marker);
  border-radius: var(--radius-xs);
  font-family: var(--font-name);
  font-size: 0.75rem;
  font-weight: 800;
}

/* A company's space: ink, so it never reads as you. */
.switch__face--company {
  color: var(--paper);
  background: var(--ink);
}

/* Live in mint, taken down in grey: the same as the Live badge. */
.switch__dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--mint);
  border-radius: 50%;
}

.switch__dot--off {
  background: var(--rule-strong);
}

.switch__panel {
  position: absolute;
  left: 0;
  top: calc(100% + var(--space-2));
  z-index: 10;
  min-width: 16rem;
  max-width: min(22rem, calc(100vw - 2 * var(--space-4)));
  max-height: 70vh;
  margin: 0;
  padding: var(--space-2);
  overflow-y: auto;
  list-style: none;
  background: var(--paper);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
  transform-origin: top left;
}

.switch[open] .switch__panel {
  animation: menu-in var(--dur-quick) var(--ease-settle);
}

.switch__panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.switch__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-s);
}

.switch__row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.switch__row small {
  margin-left: auto;
  padding-left: var(--space-3);
  color: var(--ink-soft);
  font-weight: 400;
  white-space: nowrap;
}

.switch__row[aria-current="page"],
.switch__row:active {
  background: var(--surface);
}

@media (hover: hover) {
  .switch__row:hover {
    background: var(--surface);
  }
}

.switch__more {
  margin-top: var(--space-2) !important;
  padding-top: var(--space-2) !important;
  border-top: var(--line) solid var(--rule);
}

.switch__plus {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ink-soft);
  border: var(--line) dashed var(--rule-strong);
  border-radius: var(--radius-xs);
}

.switch__find {
  margin: 0 0 var(--space-2);
}

.switch__find input {
  width: 100%;
}

.switch__none {
  margin: 0;
  padding: var(--space-3);
  color: var(--ink-soft);
}

@media (max-width: 29.99rem) {
  .site-path--deep .switch__name--scope {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .switch__name,
  .site-path__here {
    max-width: none;
  }

  /* The app menu rises from the foot of the screen, the full width, easy to reach with a thumb. */
  .switch--app .switch__panel {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    max-width: none;
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    border-radius: var(--radius-m) var(--radius-m) 0 0;
    transform-origin: bottom center;
  }
}

/* == Account menu == */

.account-menu {
  position: relative;
  font-size: var(--text-s);
}

.account-menu__toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--hit);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-s);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.account-menu__toggle::-webkit-details-marker {
  display: none;
}

/* A small down caret after the handle, flipped while the menu is open. */
.account-menu__toggle::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  margin: 0 0.15em 0.2em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.account-menu__details[open] .account-menu__toggle::after {
  margin-bottom: -0.2em;
  transform: rotate(-135deg);
}

.account-menu__face {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--marker-ink);
  background: var(--marker);
  border-radius: var(--radius-xs);
  font-family: var(--font-name);
  font-weight: 800;
}

.account-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  z-index: 10;
  min-width: 14rem;
  padding: var(--space-2);
  background: var(--paper);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
  /* It grows out of the button that opened it, top right, so it's clear where it came from. */
  transform-origin: top right;
}

.account-menu__details[open] .account-menu__panel {
  animation: menu-in var(--dur-quick) var(--ease-settle);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

.account-menu__toggle::after {
  transition: transform var(--dur-quick) var(--ease-settle), margin var(--dur-quick) var(--ease-settle);
}

.account-menu__who {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  color: var(--ink-soft);
}

.account-menu__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-menu__links a,
.account-menu__out button {
  display: block;
  width: 100%;
  padding: var(--space-3);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--radius-s);
  cursor: pointer;
}

.account-menu__links a:active,
.account-menu__out button:active {
  background: var(--surface);
}

@media (hover: hover) {
  .account-menu__links a:hover,
  .account-menu__out button:hover {
    background: var(--surface);
  }
}

/* Sign out sits last, under a rule, the way people expect to find it. */
.account-menu__out {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: var(--line) solid var(--rule);
}

/* On a phone the handle hides; the round initial and caret are enough to open the menu. */
@media (max-width: 29.99rem) {
  .account-menu__handle {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.check--hinted {
  align-items: flex-start;
}

/* An option that can't be picked yet reads as quieter than the ones that can. */
.check:has(input:disabled) {
  color: var(--ink-soft);
  cursor: default;
}

.check--hinted > span {
  display: grid;
  gap: var(--space-1);
}

.check--hinted input {
  margin-top: 0.15rem;
}

.people__row {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-3);
  justify-items: start;
}

.people__row form {
  margin-top: var(--space-2);
}

/* == Making something (Phase 3) == */

@keyframes hop {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.08, 0.9); }
  60% { transform: scale(0.97, 1.04); }
  100% { transform: scale(1, 1); }
}

/* Small text links look small but are easy to hit: their touch area reaches above and below the words.
   On the contents of a reading page the rows sit a little further apart, so neighbours don't overlap. */
.crumbs a,
.settings__action,
.settings__links a,
.footer a,
.prose__contents a,
.space-nav a {
  position: relative;
}

.crumbs a::after,
.settings__action::after,
.settings__links a::after,
.footer a::after,
.prose__contents a::after,
.space-nav a::after {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-3)) calc(-1 * var(--space-1));
}

.prose__contents a::after {
  inset: calc(-1 * var(--space-2)) calc(-1 * var(--space-1));
}

/* == Sentence: what we guessed, said back, each guess changeable where it's written ==
   Each `.blank` is a real select or input set into the sentence, so it works with no script.
   public/make-blanks.js swaps each select for a button that opens `.blank-menu` out of the word on a wider
   screen, or the panel with `.blank-sheet` rows on a phone. */

/* "How it works": a few short numbered steps in body text, each number in an ink circle. */
.how {
  display: grid;
  gap: var(--space-3);
  max-width: var(--measure);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
}

.how li {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: var(--space-3);
  align-items: baseline;
  counter-increment: how;
}

.how li::before {
  content: counter(how);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: var(--line) solid var(--rule-strong);
  border-radius: var(--radius-s);
  font-family: var(--font-name);
  font-weight: 700;
  font-size: var(--text-s);
  line-height: 1;
}

@keyframes land {
  0% { transform: rotate(-2deg) translateY(-0.75rem) scale(0.96); opacity: 0; }
  35% { transform: rotate(-2deg) scale(1.06, 0.9); opacity: 1; }
  55% { transform: rotate(-2deg) scale(0.97, 1.05); }
  75% { transform: rotate(-2deg) scale(1.01, 0.98); }
  100% { transform: rotate(-2deg); }
}

/* == Secret Santa (Phase 3) == */

.ideas {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--line) solid var(--rule);
}

.ideas li {
  padding-block: var(--space-3);
  border-bottom: var(--line) solid var(--rule);
  overflow-wrap: anywhere;
}

.ideas__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.ideas__row form {
  flex-shrink: 0;
}

.inline-form {
  display: flex;
  gap: var(--space-2);
}

.inline-form input {
  flex: 1;
  min-width: 0;
}

/* == A page: something shown off, as wide as the column. A big title, words with their heading beside
   them on wider screens, photos edge to edge, a row of photos laid down like prints, a big button out.
   Its maker switches between Changing it and Preview at the top; while changing, each section has its
   bar of buttons under it and "Add a section here" between. == */

::view-transition-group(mode-thumb) {
  animation-duration: var(--dur-sheet);
  animation-timing-function: var(--ease-settle);
}

/* A change with no number in front of it (Recent changes on a doc or an app). */
.history__row--plain {
  grid-template-columns: minmax(0, 1fr);
}

.people__row .inline-form {
  margin-top: var(--space-2);
}

.people__row .inline-form select {
  width: auto;
}

/* == Waiting: while we work on something you asked for ==
   The one thing besides the typing example that loops, and only until the answer arrives (public/waiting.js). */

/* What the wait stands in for (and the wait itself, until it starts), whatever display it usually has. */
[data-wait-area] > [hidden] {
  display: none;
}

/* == Footer ==
   A 2px rule, then "Start one" on the pages strangers read, then the small print in one wrapping row. */

.footer__rule {
  border-bottom: var(--line) solid var(--rule);
}

.footer__fine {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
}

.footer__contact span {
  display: block;
}

/* == Footer links: help, privacy, terms == */

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}

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

/* == Ad cookie ask ==
   On the public pages until someone chooses (public/ads.js). A panel at the foot of the screen. Quiet,
   no yellow, so the page's one main button stays the one. */

.ad-ask {
  position: fixed;
  left: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  max-width: 48rem;
  margin: 0 auto;
  padding: var(--space-4);
  background: var(--paper);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
  animation: ad-ask-in var(--dur-quick) var(--ease-settle);
}

.ad-ask__body {
  flex: 1 1 12rem;
  display: grid;
  gap: var(--space-1);
}

.ad-ask__title {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--text-m);
  line-height: 1.1;
}

.ad-ask__words {
  margin: 0;
  font-size: var(--text-s);
  letter-spacing: var(--track-small);
}

.ad-ask__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@keyframes ad-ask-in {
  from { opacity: 0; transform: translateY(var(--space-3)); }
}

@media (prefers-reduced-motion: reduce) {
  .ad-ask { animation: none; }
}

/* On a phone: the panel sits closer to the edges, so the words take fewer lines. */
@media (max-width: 30rem) {
  .ad-ask {
    left: var(--space-2);
    right: var(--space-2);
    bottom: var(--space-2);
    gap: var(--space-2);
    padding: var(--space-3);
  }

  .ad-ask__title {
    font-size: var(--text-m);
  }
}

@media print {
  .ad-ask { display: none; }
}

/* == Your account == */

.settings dd {
  display: grid;
  gap: var(--space-1);
  justify-items: start;
  white-space: normal;
}

.settings__value {
  font-size: var(--text-l);
  overflow-wrap: anywhere;
}

.settings__action {
  font-size: var(--text-s);
  font-weight: 600;
}

.settings__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

/* == Reading pages: help, privacy, terms == */

.prose__contents ul {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-s);
  font-weight: 600;
}

.prose {
  display: grid;
  gap: var(--space-6);
}

.prose section {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: var(--line) solid var(--rule);
}

.prose h2 {
  font-size: var(--text-l);
  scroll-margin-top: var(--space-4);
}

.prose h3 {
  margin: 0;
  font-size: var(--text-m);
  font-weight: 600;
}

.prose ul {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-left: var(--space-5);
}

.prose__qa {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-2);
}

/* == Admin == */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.stats__item {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--surface);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
}

.stats dt {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.stats dd {
  margin: 0;
  font-family: var(--font-name);
  font-weight: 800;
  font-size: var(--text-xl);
}

/* == Wider screens == */

@media (min-width: 48rem) {
  .page {
    padding-block: var(--space-7) var(--space-8);
  }

  

  .signup {
    padding: var(--space-7);
  }

  .details__row {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: baseline;
  }
}

/* == Panel: a quick action beside the page ==
   A link with data-panel opens its page here instead of leaving (public/panel.js).
   Phones: a sheet up from the bottom, in reach of a thumb. Wider screens: a drawer from the right. */

@starting-style {
  .panel[open] {
    transform: translateY(100%);
  }
}

@starting-style {
  .panel[open]::backdrop {
    opacity: 0;
  }
}

@media (min-width: 48rem) {

  

  @starting-style {
    .panel[open] {
      transform: translateX(100%);
    }
  }

  

  

  

  

}

/* == Less motion: everything is shown at rest == */

@media (prefers-reduced-motion: reduce) {
  .brand__mark,
  .marker::before {
    animation: none;
  }

  

  

  

  

  .button,
  .account-menu__toggle,
  .account-menu__toggle::after,
  input[type="file"]::file-selector-button {
    transition: none;
  }

  .account-menu__details[open] .account-menu__panel,
  .switch[open] .switch__panel {
    animation: none;
  }

  /* Pressing still shows, without anything moving: the outline darkens instead. */
  .button:hover,
  .button:active,
  .account-menu__toggle:active,
  input[type="file"]:active::file-selector-button {
    transform: none;
  }

  

  

  @starting-style {
    .panel[open] {
      opacity: 0;
    }
  }

  

}

/* An item people can put their name on: the item on the left, its small button on the right. */
.item-list__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-3);
}

.item-list__row .item-list__link {
  flex: 1 1 12rem;
  min-width: 0;
}

.item-list__row form,
.item-list__action {
  flex-shrink: 0;
  padding-block: var(--space-2);
}

/* == Who can open an app: who on the left, what they can do, then Remove ==
   The same shape as a doc's share list. The owner's row has no button, so its role lines up with the others
   through the grid. */
.access {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  min-height: calc(var(--hit) + var(--space-3));
  padding-block: var(--space-2);
}

.access__who {
  font-weight: 500;
}

.access__role {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.access form {
  grid-column: 2;
}

@media (min-width: 30rem) {
  .access {
    grid-template-columns: minmax(0, 1fr) 6rem 6rem;
  }

  .access form {
    grid-column: 3;
    justify-self: end;
  }
}

/* == Drop a folder or .zip (Your things, a site's page; public/drop.js) ==
   A dashed box that turns solid while something is dragged over it. */
.drop {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5);
  border: var(--line) dashed var(--rule-strong);
  border-radius: var(--radius-m);
  background: var(--paper);
}

.drop.is-over {
  border-style: solid;
  background: var(--surface);
}

.drop.is-busy {
  border-style: solid;
}

.drop.is-busy .drop__pick {
  pointer-events: none;
  opacity: 0.5;
}

.drop__title {
  margin: 0;
  font-family: var(--font-name);
  font-weight: 800;
  font-size: var(--text-l);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.drop .actions {
  margin-top: var(--space-2);
}

.drop [hidden] {
  display: none;
}

.drop__pick:focus-within {
  outline: var(--line) solid var(--rule);
  outline-offset: 3px;
}

.drop__status:empty {
  display: none;
}

.drop__status {
  margin: 0;
  font-weight: 600;
}

/* A row's actions side by side (Download, Go back to this): the group has the space under it, not each form. */
.item-list__action form {
  padding-bottom: 0;
}

/* == Going from a card to its thing ==
   Page to page, the card's name moves up into the thing's title, so it reads as the same thing opened,
   not a new page. Only the card being opened carries the name (it has focus as it's pressed).
   With less motion asked for, pages simply fade. */
@view-transition {
  navigation: auto;
}

::view-transition-group(thing-title) {
  animation-duration: 280ms;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*) {
    animation-duration: 0s;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 150ms;
  }
}

/* == Print: a doc prints as a letter, a thing as its list == */

@media print {
  :root {
    --paper: #FFFFFF;
    --surface: #FFFFFF;
    --ink: #0D0D0D;
    --ink-soft: #4A4A4A;
  }

  @page {
    margin: 2cm 2.2cm;
  }

  body {
    background: var(--paper);
    color: var(--ink);
  }

  .site-header,
  .footer,
  .crumbs,
  .account-menu,
  .notice,
  form,
  .button {
    display: none !important;
  }

  .page,
  .page--app {
    max-width: none;
    padding: 0;
  }

  

  

  

  .item-list li {
    break-inside: avoid;
  }

  /* Gaps and changed words print as plain words, not yellow blocks. */
  .marker {
    background: none;
    color: var(--ink);
  }

  .marker::before {
    display: none;
  }

  .message__title {
    view-transition-name: none;
  }
}

/* == Hauses ==
   The little houses greeting cards carry (src/views/hauses.tsx). Lines and fills come from the palette, each
   has one yellow part (.h-light), and each has one move that hauses.js plays once (.is-playing) before it
   rests. Specials, only ever from wobblehaus, are drawn in reverse. Nothing moves with less motion. */

.haus {
  --haus-light: var(--marker);
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

button.haus {
  cursor: pointer;
  border-radius: var(--radius-m);
}

.haus svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.haus * {
  transform-box: view-box;
}

/* On a shelf, every haus but the newest has its light off. */
.haus--quiet {
  --haus-light: var(--paper);
}

/* Not found yet: just its shape, in soft ink and see-through, so it shows on paper in both themes without giving away its face. */
.haus--hidden .h-all * {
  fill: var(--ink-soft);
  stroke: var(--ink-soft);
}

.haus--hidden svg {
  opacity: 0.35;
}

.haus--special {
  --h-fill: var(--ink);
  --h-face: var(--paper);
}

.h-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.h-paper { fill: var(--h-fill, var(--paper)); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.h-light { fill: var(--haus-light); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.h-white { fill: var(--paper); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.h-knob { fill: var(--ink); }
.h-eye { fill: var(--h-face, var(--ink)); }
.h-face-line { fill: none; stroke: var(--h-face, var(--ink)); stroke-width: 3; stroke-linecap: round; }
.h-spring-out { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.h-spring-in { fill: none; stroke: var(--haus-light); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.h-ghost { opacity: 0; }
.h-all { transform-origin: 60px 106px; }
.haus .h-owl-eye { transform-box: fill-box; transform-origin: center; }

/* cake: makes a wish. The flame stretches, goes out in a puff, and lights again. */
.haus--cake .h-flame { transform-origin: 60px 30px; }
.haus--cake.is-playing .h-all { animation: h-inhale 1.5s var(--ease-settle); }
.haus--cake.is-playing .h-flame { animation: h-flame 1.5s var(--ease-jelly); }
.haus--cake.is-playing .h-puff { animation: h-puff 1.5s var(--ease-settle); }
@keyframes h-inhale { 0%, 100% { transform: none; } 20% { transform: scale(1.04, 0.93); } 40% { transform: scale(0.98, 1.03); } 55% { transform: none; } }
@keyframes h-flame { 0% { transform: none; } 22% { transform: scale(1.15, 1.35) skewX(-6deg); } 38% { transform: scale(0.1) translateX(6px); } 72% { transform: scale(0); } 86% { transform: scale(1.2, 0.85); } 100% { transform: none; } }
@keyframes h-puff { 0%, 34% { opacity: 0; transform: scale(0.5); } 45% { opacity: 1; } 80%, 100% { opacity: 0; transform: translate(12px, -16px) scale(1.5); } }

/* moving: hops, lands, and its suitcase swings. */
.haus--moving .h-case { transform-origin: 99px 76px; }
.haus--moving.is-playing .h-all { animation: h-hop 1.2s var(--ease-jelly); }
.haus--moving.is-playing .h-case { animation: h-swing 1.2s var(--ease-settle); }
@keyframes h-hop { 0% { transform: none; } 14% { transform: scale(1.07, 0.88); } 34% { transform: translateY(-18px) scale(0.94, 1.08); } 54% { transform: scale(1.1, 0.86); } 70% { transform: scale(0.97, 1.04); } 84% { transform: translateY(-3px); } 100% { transform: none; } }
@keyframes h-swing { 0%, 20% { transform: none; } 36% { transform: rotate(-16deg); } 56% { transform: rotate(12deg); } 74% { transform: rotate(-5deg); } 100% { transform: none; } }

/* sleepy: peeks with one eye, lets out a z, back to sleep. */
.haus--sleepy .h-pom { transform-origin: 62px 30px; }
.haus--sleepy.is-playing .h-all { animation: h-breathe 2s var(--ease-settle); }
.haus--sleepy.is-playing .h-open { animation: h-peek 2s steps(1); }
.haus--sleepy.is-playing .h-shut { animation: h-unpeek 2s steps(1); }
.haus--sleepy.is-playing .h-z { animation: h-z 2s var(--ease-settle); }
.haus--sleepy.is-playing .h-pom { animation: h-pom 2s var(--ease-jelly); }
@keyframes h-breathe { 0%, 100% { transform: none; } 50% { transform: scale(1.03, 0.97); } 70% { transform: scale(0.99, 1.01); } }
@keyframes h-peek { 0%, 100% { opacity: 0; } 18%, 42% { opacity: 1; } }
@keyframes h-unpeek { 0%, 100% { opacity: 1; } 18%, 42% { opacity: 0; } }
@keyframes h-z { 0%, 45% { opacity: 0; transform: none; } 55% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -22px) scale(1.4); } }
@keyframes h-pom { 0%, 40% { transform: none; } 55% { transform: rotate(10deg); } 70% { transform: rotate(-5deg); } 85%, 100% { transform: none; } }

/* heart: the heart beats twice. */
.haus--heart .h-heart { transform-origin: 60px 52px; }
.haus--heart.is-playing .h-heart { animation: h-beat 1.1s var(--ease-settle); }
.haus--heart.is-playing .h-all { animation: h-beat-all 1.1s var(--ease-settle); }
@keyframes h-beat { 0%, 30%, 60%, 100% { transform: none; } 14% { transform: scale(1.35); } 44% { transform: scale(1.25); } }
@keyframes h-beat-all { 0%, 30%, 60%, 100% { transform: none; } 14% { transform: scale(1.03, 0.97); } 44% { transform: scale(1.02, 0.98); } }

/* thanks: tips its roof like a hat and squints. */
.haus--thanks .h-roof { transform-origin: 30px 66px; }
.haus--thanks .h-eye { transform-origin: 60px 82px; }
.haus--thanks.is-playing .h-roof { animation: h-tip 1.3s var(--ease-jelly); }
.haus--thanks.is-playing .h-eye { animation: h-squint 1.3s var(--ease-settle); }
.haus--thanks.is-playing .h-all { animation: h-bow 1.3s var(--ease-settle); }
@keyframes h-tip { 0% { transform: none; } 28%, 58% { transform: translate(-2px, -14px) rotate(-14deg); } 80% { transform: scale(1.04, 0.92); } 100% { transform: none; } }
@keyframes h-squint { 0%, 18%, 66%, 100% { transform: none; } 26%, 58% { transform: scaleY(0.25); } }
@keyframes h-bow { 0%, 100% { transform: none; } 30%, 58% { transform: rotate(-3deg); } }

/* rain: quiet on purpose. Two drops land on the umbrella and it leans in. */
.haus--rain .h-brolly { transform-origin: 60px 30px; }
.haus--rain.is-playing .h-drop1 { animation: h-drop 1.8s var(--ease-settle); }
.haus--rain.is-playing .h-drop2 { animation: h-drop 1.8s var(--ease-settle) 0.35s; }
.haus--rain.is-playing .h-brolly { animation: h-dip 1.8s var(--ease-settle); }
.haus--rain.is-playing .h-all { animation: h-lean 1.8s var(--ease-settle); }
@keyframes h-drop { 0% { opacity: 0; transform: translateY(-16px); } 15% { opacity: 1; } 40% { opacity: 1; transform: translateY(10px); } 50%, 100% { opacity: 0; transform: translateY(12px); } }
@keyframes h-dip { 0%, 30% { transform: none; } 42% { transform: scale(1.04, 0.92); } 60%, 80% { transform: rotate(4deg); } 100% { transform: none; } }
@keyframes h-lean { 0%, 40% { transform: none; } 65%, 82% { transform: rotate(3deg); } 100% { transform: none; } }

/* sprout: a shoot grows out of the chimney and opens a leaf. */
.haus--sprout .h-shoot { transform-origin: 79px 36px; }
.haus--sprout .h-leaf { transform-origin: 79px 23px; }
.haus--sprout.is-playing .h-shoot { animation: h-grow 1.4s var(--ease-jelly); }
.haus--sprout.is-playing .h-leaf { animation: h-unfurl 1.4s var(--ease-jelly); }
.haus--sprout.is-playing .h-all { animation: h-push 1.4s var(--ease-settle); }
@keyframes h-grow { 0% { transform: scaleY(0); } 45% { transform: scaleY(1.25); } 65% { transform: scaleY(0.92); } 82%, 100% { transform: none; } }
@keyframes h-unfurl { 0%, 35% { transform: scale(0) rotate(-40deg); } 65% { transform: scale(1.15) rotate(6deg); } 100% { transform: none; } }
@keyframes h-push { 0%, 100% { transform: none; } 15% { transform: scale(1.05, 0.93); } 35% { transform: scale(0.98, 1.03); } }

/* pumpkin (October): the light inside flickers and it shimmies. */
.haus--pumpkin.is-playing .h-glow { animation: h-flicker 1.4s steps(1); }
.haus--pumpkin.is-playing .h-all { animation: h-shimmy 1.4s var(--ease-settle); }
@keyframes h-flicker { 0%, 100% { opacity: 1; } 12% { opacity: 0.2; } 20% { opacity: 1; } 34% { opacity: 0.3; } 40%, 60% { opacity: 1; } 66% { opacity: 0.1; } 74% { opacity: 1; } }
@keyframes h-shimmy { 0%, 100% { transform: none; } 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-2deg); } 80% { transform: rotate(1deg); } }

/* snow (December): shivers, and a clump slides off the edge. */
.haus--snow .h-cap { transform-origin: 60px 50px; }
.haus--snow.is-playing .h-all { animation: h-shiver 1.3s linear; }
.haus--snow.is-playing .h-cap { animation: h-cap 1.3s var(--ease-jelly); }
.haus--snow.is-playing .h-clump { animation: h-clump 1.3s var(--ease-settle); }
@keyframes h-shiver { 0%, 50%, 100% { transform: none; } 6%, 18% { transform: translateX(-2px); } 12%, 24% { transform: translateX(2px); } 30% { transform: translateX(-1px); } 36% { transform: translateX(1px); } }
@keyframes h-cap { 0%, 30% { transform: none; } 45% { transform: scale(1.08, 0.85); } 60% { transform: scale(0.97, 1.06); } 75%, 100% { transform: none; } }
@keyframes h-clump { 0%, 30% { opacity: 0; transform: none; } 38% { opacity: 1; transform: translate(4px, 2px); } 100% { opacity: 0; transform: translate(10px, 44px); } }

/* tree (November and December): the tree shakes off the cold and its star turns. */
.haus--tree .h-firs { transform-origin: 79px 40px; }
.haus--tree .h-topper { transform-origin: 79px 9px; }
.haus--tree.is-playing .h-firs { animation: h-fir 1.4s var(--ease-settle); }
.haus--tree.is-playing .h-topper { animation: h-twinkle 1.4s var(--ease-jelly); }
.haus--tree.is-playing .h-all { animation: h-push 1.4s var(--ease-settle); }
@keyframes h-fir { 0%, 100% { transform: none; } 15% { transform: rotate(-6deg); } 35% { transform: rotate(5deg); } 55% { transform: rotate(-3deg); } 75% { transform: rotate(1deg); } }

/* menorah (November and December): the flames light one by one, the tall one first. */
.haus--menorah .h-candles > * { transform-origin: center bottom; transform-box: fill-box; }
.haus--menorah.is-playing .h-candles > * { animation: h-light-up 1.8s var(--ease-jelly) both; }
.haus--menorah.is-playing .h-candles > :nth-child(5) { animation-delay: 0s; }
.haus--menorah.is-playing .h-candles > :nth-child(1) { animation-delay: 0.15s; }
.haus--menorah.is-playing .h-candles > :nth-child(2) { animation-delay: 0.25s; }
.haus--menorah.is-playing .h-candles > :nth-child(3) { animation-delay: 0.35s; }
.haus--menorah.is-playing .h-candles > :nth-child(4) { animation-delay: 0.45s; }
.haus--menorah.is-playing .h-candles > :nth-child(6) { animation-delay: 0.55s; }
.haus--menorah.is-playing .h-candles > :nth-child(7) { animation-delay: 0.65s; }
.haus--menorah.is-playing .h-candles > :nth-child(8) { animation-delay: 0.75s; }
.haus--menorah.is-playing .h-candles > :nth-child(9) { animation-delay: 0.85s; }
@keyframes h-light-up { 0% { transform: scale(0); } 40% { transform: scale(1.4, 1.6); } 65% { transform: scale(0.9); } 100% { transform: none; } }

/* diya (October and November): the flame stretches tall and two sparkles come out. */
.haus--diya .h-wick { transform-origin: 84px 14px; }
.haus--diya.is-playing .h-wick { animation: h-flame-up 1.5s var(--ease-jelly); }
.haus--diya.is-playing .h-spark1 { animation: h-glint 1.5s var(--ease-settle) 0.2s; }
.haus--diya.is-playing .h-spark2 { animation: h-glint 1.5s var(--ease-settle) 0.45s; }
.haus--diya.is-playing .h-all { animation: h-proud 1.5s var(--ease-settle); }
@keyframes h-flame-up { 0% { transform: none; } 30% { transform: scale(1.3, 1.6) skewX(5deg); } 50% { transform: scale(0.9, 1.1) skewX(-4deg); } 70% { transform: scale(1.1, 1.25); } 100% { transform: none; } }

/* lights (November to January): the bulbs blink round the roof, one after another. */
.haus--lights .h-bulbs > * { transform-origin: center; transform-box: fill-box; }
.haus--lights.is-playing .h-bulbs > * { animation: h-bulb 1.6s var(--ease-settle); }
.haus--lights.is-playing .h-bulbs > :nth-child(2) { animation-delay: 0.1s; }
.haus--lights.is-playing .h-bulbs > :nth-child(3) { animation-delay: 0.2s; }
.haus--lights.is-playing .h-bulbs > :nth-child(4) { animation-delay: 0.3s; }
.haus--lights.is-playing .h-bulbs > :nth-child(5) { animation-delay: 0.4s; }
.haus--lights.is-playing .h-bulbs > :nth-child(6) { animation-delay: 0.5s; }
.haus--lights.is-playing .h-bulbs > :nth-child(7) { animation-delay: 0.6s; }
.haus--lights.is-playing .h-all { animation: h-breathe 2.2s var(--ease-settle); }
@keyframes h-bulb { 0%, 100% { transform: none; opacity: 1; } 20% { opacity: 0.15; transform: scale(0.7); } 40% { opacity: 1; transform: scale(1.4); } 60% { transform: none; } }

/* fireworks (December and January): one goes off, then a second, and the haus looks up. */
.haus--fireworks .h-burst { transform-origin: 90px 20px; }
.haus--fireworks .h-burst2 { transform-origin: 30px 24px; }
.haus--fireworks.is-playing .h-burst { animation: h-bang 1.6s var(--ease-jelly); }
.haus--fireworks.is-playing .h-trail { animation: h-glint 1.6s var(--ease-settle) reverse; }
.haus--fireworks.is-playing .h-burst2 { animation: h-bang-again 1.6s var(--ease-settle); }
.haus--fireworks.is-playing .h-all { animation: h-proud 1.6s var(--ease-settle); }
@keyframes h-bang { 0% { transform: translateY(40px) scale(0.1); } 30% { transform: translateY(0) scale(0.2); } 50% { transform: scale(1.35); } 70% { transform: scale(0.95); } 100% { transform: none; } }
@keyframes h-bang-again { 0%, 40% { opacity: 0; transform: scale(0.2); } 60% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(1.4); } }

/* lantern (January and February): the lantern swings on its pole. */
.haus--lantern .h-hang { transform-origin: 96px 20px; }
.haus--lantern.is-playing .h-hang { animation: h-swing 1.6s var(--ease-settle); }
.haus--lantern.is-playing .h-all { animation: h-lean 1.6s var(--ease-settle); }

/* colour (February and March): a puff of colour bursts out and lands on the roof. */
.haus--colour .h-splat { transform-origin: 46px 51px; }
.haus--colour.is-playing .h-splat { animation: h-splat 1.4s var(--ease-jelly); }
.haus--colour.is-playing .h-puff1 { animation: h-pop1 1.4s var(--ease-settle); }
.haus--colour.is-playing .h-puff2 { animation: h-pop2 1.4s var(--ease-settle) 0.1s; }
.haus--colour.is-playing .h-puff3 { animation: h-pop1 1.4s var(--ease-settle) 0.2s; }
.haus--colour.is-playing .h-all { animation: h-hop 1.4s var(--ease-jelly); }
@keyframes h-splat { 0%, 25% { transform: scale(0); } 45% { transform: scale(1.3); } 65% { transform: scale(0.92); } 100% { transform: none; } }

/* blossom (March and April): the flowers open and a petal drifts down. */
.haus--blossom .h-bloom1 { transform-origin: 92px 10px; }
.haus--blossom .h-bloom2 { transform-origin: 72px 19px; }
.haus--blossom.is-playing .h-bloom1 { animation: h-unfurl 1.6s var(--ease-jelly); }
.haus--blossom.is-playing .h-bloom2 { animation: h-unfurl 1.6s var(--ease-jelly) 0.15s; }
.haus--blossom.is-playing .h-petal { animation: h-petal 1.6s var(--ease-settle) 0.3s; }
.haus--blossom.is-playing .h-all { animation: h-push 1.6s var(--ease-settle); }
@keyframes h-petal { 0% { opacity: 0; transform: none; } 15% { opacity: 1; } 50% { transform: translate(8px, 20px) rotate(90deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(2px, 44px) rotate(200deg); } }

/* crescent (Ramadan, Eid): the moon and the star sway on their string, each its own way. */
.haus--crescent .h-sway1 { transform-origin: 40px 15px; }
.haus--crescent .h-sway2 { transform-origin: 80px 15px; }
.haus--crescent.is-playing .h-sway1 { animation: h-swing 1.6s var(--ease-settle); }
.haus--crescent.is-playing .h-sway2 { animation: h-swing 1.6s var(--ease-settle) 0.2s reverse; }
.haus--crescent.is-playing .h-all { animation: h-breathe 1.6s var(--ease-settle); }

/* gift: the bow pops up and settles. */
.haus--gift .h-bow { transform-origin: 60px 30px; }
.haus--gift.is-playing .h-bow { animation: h-bow-pop 1.3s var(--ease-jelly); }
.haus--gift.is-playing .h-all { animation: h-hop 1.3s var(--ease-jelly); }
@keyframes h-bow-pop { 0%, 15% { transform: none; } 35% { transform: translateY(-10px) scale(1.25); } 55% { transform: scale(0.9, 1.1); } 75% { transform: scale(1.05, 0.95); } 100% { transform: none; } }

/* cocoa: the steam rises, and the haus has a long warm breath. */
.haus--cocoa .h-steam, .haus--cocoa .h-steam2 { transform-origin: 98px 80px; }
.haus--cocoa.is-playing .h-steam { animation: h-steam 1.8s var(--ease-settle); }
.haus--cocoa.is-playing .h-steam2 { animation: h-z 1.8s var(--ease-settle); }
.haus--cocoa.is-playing .h-all { animation: h-breathe 1.8s var(--ease-settle); }
@keyframes h-steam { 0%, 100% { transform: none; opacity: 1; } 40% { transform: translateY(-8px) scaleX(-1); opacity: 0.4; } 70% { transform: translateY(-3px); opacity: 1; } }

/* pet: wags its tail and twitches an ear. */
.haus--pet .h-tail { transform-origin: 90px 98px; }
.haus--pet .h-ear1 { transform-origin: 40px 48px; }
.haus--pet .h-ear2 { transform-origin: 80px 48px; }
.haus--pet.is-playing .h-tail { animation: h-wag 1.4s var(--ease-settle); }
.haus--pet.is-playing .h-ear2 { animation: h-twitch 1.4s var(--ease-settle); }
.haus--pet.is-playing .h-all { animation: h-push 1.4s var(--ease-settle); }
@keyframes h-wag { 0%, 100% { transform: none; } 15%, 45% { transform: rotate(-14deg); } 30%, 60% { transform: rotate(10deg); } 75% { transform: rotate(-4deg); } }
@keyframes h-twitch { 0%, 50%, 100% { transform: none; } 58% { transform: rotate(12deg); } 66% { transform: rotate(-4deg); } 74% { transform: none; } }

/* founding (special): the flag runs up the pole and waves once. */
.haus--founding .h-flag { transform-origin: 61px 12px; }
.haus--founding.is-playing .h-flag { animation: h-hoist 1.6s var(--ease-jelly); }
.haus--founding.is-playing .h-all { animation: h-proud 1.6s var(--ease-settle); }
@keyframes h-hoist { 0% { transform: translateY(16px) scaleX(0.6); } 40% { transform: translateY(-2px); } 55% { transform: skewY(-12deg); } 70% { transform: skewY(8deg); } 85% { transform: skewY(-3deg); } 100% { transform: none; } }
@keyframes h-proud { 0%, 100% { transform: none; } 40% { transform: scale(0.97, 1.05); } 60% { transform: scale(1.02, 0.98); } }

/* star (special): the star turns a fifth and twinkles. */
.haus--star .h-star { transform-origin: 60px 16px; }
.haus--star.is-playing .h-star { animation: h-twinkle 1.3s var(--ease-jelly); }
.haus--star.is-playing .h-all { animation: h-push 1.3s var(--ease-settle); }
@keyframes h-twinkle { 0% { transform: none; } 35% { transform: rotate(72deg) scale(1.4); } 55% { transform: rotate(72deg) scale(0.85); } 75% { transform: rotate(72deg) scale(1.08); } 100% { transform: rotate(72deg); } }

/* lost (hidden): looks one way, then the other, like the mark on the not-found page. */
.haus--lost .h-eyes { transform-origin: 60px 82px; }
.haus--lost.is-playing .h-all { animation: look-around 1.6s var(--ease-settle); }
.haus--lost.is-playing .h-eyes { animation: h-glance 1.6s var(--ease-settle); }
@keyframes h-glance { 0%, 80%, 100% { transform: none; } 25% { transform: translateX(-3px); } 55% { transform: translateX(3px); } }

/* wobbly (hidden): the biggest wobble we allow, smaller each time. */
.haus--wobbly.is-playing .h-all { animation: h-jelly 1.6s var(--ease-jelly); }
@keyframes h-jelly { 0% { transform: none; } 12% { transform: scale(1.3, 0.7); } 26% { transform: scale(0.8, 1.22); } 40% { transform: scale(1.16, 0.86); } 54% { transform: scale(0.92, 1.09); } 68% { transform: scale(1.05, 0.96); } 82% { transform: scale(0.99, 1.02); } 100% { transform: none; } }

/* night owl (hidden): two slow, big blinks and a turn of the head. */
.haus--owl.is-playing .h-owl-eye { animation: h-blink 1.8s var(--ease-settle); }
.haus--owl.is-playing .h-all { animation: h-turn 1.8s var(--ease-settle); }
@keyframes h-blink { 0%, 20%, 34%, 56%, 70%, 100% { transform: none; } 27%, 63% { transform: scaleY(0.1); } }
@keyframes h-turn { 0%, 100% { transform: none; } 40% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }

/* leap (hidden): squashes its spring, jumps high, lands. */
.haus--leap .h-spring { transform-origin: 60px 106px; }
.haus--leap.is-playing .h-up { animation: h-leap 1.5s var(--ease-jelly); }
.haus--leap.is-playing .h-spring { animation: h-boing 1.5s var(--ease-jelly); }
@keyframes h-leap { 0% { transform: none; } 20% { transform: translateY(6px); } 45% { transform: translateY(-32px); } 68% { transform: translateY(3px) scale(1.06, 0.92); } 84% { transform: translateY(-3px); } 100% { transform: none; } }
@keyframes h-boing { 0% { transform: none; } 20% { transform: scaleY(0.4); } 45% { transform: scaleY(1.5); } 68% { transform: scaleY(0.8); } 84% { transform: scaleY(1.1); } 100% { transform: none; } }

/* ghost (hidden): floats up, goes see-through, comes back. */
.haus--ghost.is-playing .h-all { animation: h-boo 1.8s var(--ease-settle); }
@keyframes h-boo { 0%, 100% { transform: none; opacity: 1; } 40% { transform: translateY(-12px); opacity: 0.3; } 70% { transform: translateY(-5px); opacity: 0.9; } }

/* party: a hop, its hat bounces, and the confetti pops out. */
.haus--party .h-hat { transform-origin: 60px 38px; }
.haus--party.is-playing .h-all { animation: h-hop 1.3s var(--ease-jelly); }
.haus--party.is-playing .h-hat { animation: h-hat 1.3s var(--ease-jelly); }
.haus--party.is-playing .h-bit1 { animation: h-pop1 1.3s var(--ease-settle); }
.haus--party.is-playing .h-bit2 { animation: h-pop2 1.3s var(--ease-settle); }
.haus--party.is-playing .h-bit3 { animation: h-pop1 1.3s var(--ease-settle) 0.1s; }
.haus--party.is-playing .h-bit4 { animation: h-pop2 1.3s var(--ease-settle) 0.1s; }
@keyframes h-hat { 0%, 20% { transform: none; } 38% { transform: translateY(-6px) rotate(-10deg); } 58% { transform: rotate(8deg); } 76% { transform: rotate(-3deg); } 100% { transform: none; } }
@keyframes h-pop1 { 0%, 25% { opacity: 0; transform: translate(10px, 10px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-6px, -8px) rotate(-40deg); } }
@keyframes h-pop2 { 0%, 25% { opacity: 0; transform: translate(-10px, 10px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -8px) rotate(40deg); } }

/* lucky: its clover turns all the way round. */
.haus--luck .h-clover { transform-origin: 79px 23px; }
.haus--luck.is-playing .h-clover { animation: h-spin 1.4s var(--ease-jelly); }
.haus--luck.is-playing .h-all { animation: h-push 1.4s var(--ease-settle); }
@keyframes h-spin { 0% { transform: none; } 60% { transform: rotate(380deg) scale(1.15); } 80% { transform: rotate(350deg); } 100% { transform: rotate(360deg); } }

/* sunny: the sun comes up, its rays turn, and the haus stretches into it. */
.haus--sunny .h-rays { transform-origin: 90px 26px; }
.haus--sunny .h-sun { transform-origin: 90px 26px; }
.haus--sunny.is-playing .h-rays { animation: h-rays 1.6s var(--ease-settle); }
.haus--sunny.is-playing .h-sun { animation: h-rise 1.6s var(--ease-jelly); }
.haus--sunny.is-playing .h-all { animation: h-proud 1.6s var(--ease-settle); }
@keyframes h-rays { 0% { transform: none; } 70%, 100% { transform: rotate(45deg); } }
@keyframes h-rise { 0% { transform: translateY(12px) scale(0.8); } 45% { transform: translateY(-3px) scale(1.1); } 70% { transform: scale(0.97); } 100% { transform: none; } }

/* grad: throws its cap in the air and catches it. */
.haus--grad .h-cap-up { transform-origin: 60px 30px; }
.haus--grad.is-playing .h-cap-up { animation: h-toss 1.5s var(--ease-jelly); }
.haus--grad.is-playing .h-all { animation: h-hop 1.5s var(--ease-jelly); }
@keyframes h-toss { 0%, 15% { transform: none; } 45% { transform: translateY(-34px) rotate(200deg); } 70% { transform: translateY(2px) rotate(360deg); } 85% { transform: translateY(-2px) rotate(360deg); } 100% { transform: rotate(360deg); } }

/* moon: the moon rocks and the stars come out. */
.haus--moon .h-moon { transform-origin: 98px 18px; }
.haus--moon.is-playing .h-moon { animation: h-rock 1.8s var(--ease-settle); }
.haus--moon.is-playing .h-twinkle1 { animation: h-glint 1.8s var(--ease-settle); }
.haus--moon.is-playing .h-twinkle2 { animation: h-glint 1.8s var(--ease-settle) 0.3s; }
.haus--moon.is-playing .h-all { animation: h-breathe 1.8s var(--ease-settle); }
@keyframes h-rock { 0%, 100% { transform: none; } 30% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-3deg); } }
@keyframes h-glint { 0%, 100% { opacity: 0; transform: none; } 30%, 55% { opacity: 1; transform: scale(1.1); } }

/* boomerang: throws it, and it comes back round. */
.haus--boomerang .h-boom { transform-origin: 84px 26px; }
.haus--boomerang.is-playing .h-boom { animation: h-boom 1.6s var(--ease-settle); }
.haus--boomerang.is-playing .h-all { animation: h-lean 1.6s var(--ease-settle); }
@keyframes h-boom { 0% { transform: none; } 30% { transform: translate(-30px, -22px) rotate(-360deg); } 55% { transform: translate(-58px, 0) rotate(-720deg); } 85% { transform: translate(-4px, 2px) rotate(-1080deg); } 100% { transform: rotate(-1080deg); } }

/* shy: ducks away and blushes, then comes back. */
.haus--shy .h-blush { transform-origin: 60px 91px; }
.haus--shy.is-playing .h-all { animation: h-duck 1.6s var(--ease-settle); }
.haus--shy.is-playing .h-blush { animation: h-blush 1.6s var(--ease-settle); }
@keyframes h-duck { 0%, 100% { transform: none; } 25%, 60% { transform: rotate(-5deg) scale(0.94, 0.9); } 80% { transform: rotate(1deg); } }
@keyframes h-blush { 0%, 100% { transform: none; } 25%, 60% { transform: scale(1.35, 1.2); } }

/* == Haus picker: which haus goes on a card's front == */

.haus-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (min-width: 30rem) {
  .haus-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.haus-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  border: var(--line) solid transparent;
  border-radius: var(--radius-m);
  text-align: center;
  font-size: var(--text-s);
  letter-spacing: var(--track-small);
  cursor: pointer;
  transition: transform var(--dur-quick) var(--ease-settle);
}

.haus-pick:active {
  transform: scale(0.96);
  transition-duration: var(--dur-press);
}

.haus-pick:has(input:checked) {
  border-color: var(--ink);
}

.haus-pick:has(input:focus-visible) {
  outline: var(--line) solid var(--focus);
  outline-offset: 2px;
}

.haus-pick .haus {
  max-width: 5rem;
}

.haus-pick small {
  color: var(--ink-soft);
}

/* == Shelf == */

@media (prefers-reduced-motion: reduce) {
  .haus *,
  .haus .h-all {
    animation: none !important;
  }

  .haus-pick {
    transition: none;
  }

  .haus-pick:active {
    transform: none;
  }
}

/* == Template page: /make/potluck and the rest (src/views/template-page.tsx) == */


/* == App screens: Your apps as cards, and one app with its header and tabs (direction A, JP 2026-11-30) == */

/* A screen's title with its count and its main action on the same line; the action wraps under on a phone. */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.page-head .message__title {
  margin: 0;
}

.page-head__count {
  font-size: var(--text-s);
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
}

.page-head__end {
  margin-left: auto;
}

/* "Put an app online": a button that opens the drop box under the title. Plain <details>, no script. */
.put-online > summary {
  list-style: none;
}

.put-online > summary::-webkit-details-marker {
  display: none;
}

.put-online[open] > summary {
  display: none;
}

/* On the title line while closed; open, the drop box takes the whole width under it. */
.put-online[open] {
  flex-basis: 100%;
}

/* == Put an app online, open ==
   Two ways side by side from 48rem: asking your agent first (most apps come from one), on --surface, then the
   drop box as the second way. Stacked on a phone, agent first. */
.put-ways {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

@media (min-width: 48rem) {
  .put-ways {
    grid-template-columns: 3fr 2fr;
    align-items: stretch;
  }
}

.put-ways__agent {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface);
  border-radius: var(--radius-m);
}

.put-ways__agent p {
  margin: 0;
}

.put-ways__title {
  margin: 0;
  font-size: var(--text-l);
  letter-spacing: var(--track-title);
}

.put-ways__sub {
  margin: var(--space-4) 0 0;
  padding-top: var(--space-4);
  border-top: var(--line) solid var(--rule);
  font-size: var(--text-m);
  font-weight: 600;
}

.put-ways__agent .agent-ask__say code {
  font-size: var(--text-m);
}

.put-ways__agent [hidden] {
  display: none;
}

/* Second to asking your agent: the drop box's title reads at the same weight as a heading, not louder. */
/* No margin under the form here, so its edge lines up with the agent panel's. */
.put-ways .drop {
  align-content: start;
  margin: 0;
}

.put-ways .drop__title {
  font-family: var(--font-text);
  font-weight: 600;
  letter-spacing: var(--track-title);
}

/* What needs the owner first: one line per app with problems or taken down, on an error edge. Gone when there's nothing. */
.needs-look {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.needs-look__title {
  margin: 0;
  font-size: var(--text-s);
  font-weight: 600;
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
}

.needs-look__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.needs-look__item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1) var(--space-4);
  align-items: baseline;
  padding: var(--space-3) var(--space-4);
  border: var(--line) solid var(--rule);
  border-left: 3px solid var(--error);
  border-radius: var(--radius-s);
}

@media (min-width: 48rem) {
  .needs-look__item {
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr) auto;
  }
}

.needs-look__name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.needs-look__what {
  min-width: 0;
  font-size: var(--text-s);
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.needs-look__go {
  font-size: var(--text-s);
  white-space: nowrap;
}

/* Every app, one row each. The headers are sort links; under 48rem each row stacks into a short block. */
.apps {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.apps__find {
  margin: 0;
  max-width: 24rem;
}

.apps__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-s);
  font-variant-numeric: tabular-nums;
}

.apps__table th,
.apps__table td {
  padding: var(--space-3) var(--space-3);
  text-align: left;
  vertical-align: baseline;
  border-bottom: var(--line) solid var(--rule);
}

.apps__table thead th {
  padding-block: var(--space-2);
  font-weight: 600;
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
  white-space: nowrap;
}

.apps__table thead a {
  color: inherit;
  text-decoration: none;
}

.apps__table thead [aria-sort] a {
  color: var(--ink);
}

@media (hover: hover) {
  .apps__table thead a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--mint);
  }

  .apps__table tbody tr:hover {
    background: var(--surface);
  }
}

.apps__table .apps__num {
  text-align: right;
}

/* Numbers and dates stay on one line; the app and who can open it take the wrapping. */
.apps__table td:not(.apps__who) {
  white-space: nowrap;
}

.apps__app {
  font-weight: 400;
  min-width: 12rem;
}

.apps__name {
  display: block;
  font-family: var(--font-name);
  font-weight: 700;
  font-size: var(--text-m);
  overflow-wrap: anywhere;
}

.apps__link {
  display: block;
  margin-top: var(--space-1);
  color: var(--ink-soft);
  letter-spacing: var(--track-small);
  overflow-wrap: anywhere;
}

.apps__alert {
  color: var(--error);
  font-weight: 600;
}

.apps__none {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 47.99rem) {
  .apps__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .apps__table,
  .apps__table tbody {
    display: block;
  }

  .apps__table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2) var(--space-4);
    padding-block: var(--space-4);
    border-bottom: var(--line) solid var(--rule);
  }

  .apps__table tr[hidden] {
    display: none;
  }

  .apps__table th,
  .apps__table td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
    white-space: normal;
  }

  .apps__table .apps__app {
    grid-column: 1 / -1;
  }

  .apps__table .apps__num {
    text-align: left;
  }

  .apps__table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 400;
    font-size: var(--text-xs);
    letter-spacing: var(--track-small);
    color: var(--ink-soft);
  }
}

/* An app's header: its name and state, then Open and Share. */
.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.app-head__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-width: 0;
}

.app-head__name .message__title {
  margin: 0;
  overflow-wrap: anywhere;
}

.app-head .actions {
  margin-left: auto;
}

/* Under the name (an app's page): its address with Copy, then what's live and who put it up. */
.app-head__id {
  display: grid;
  flex: 1 1 18rem;
  gap: var(--space-2);
  min-width: 0;
}

.app-head__link .button {
  flex: none;
}

.app-head:has(.app-head__where) {
  align-items: flex-start;
}

.app-head__where {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.app-head__where > * {
  margin: 0;
}

.app-head__link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-2);
}

/* The address is something to paste, so it's in the typed face, on a surface chip like `code`. */
.app-head__url {
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-typed);
  font-size: var(--text-s);
  /* On a phone the address is cut short with "…" rather than broken; Copy copies all of it. */
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
  background: var(--surface);
  border-radius: var(--radius-xs);
}

@media (hover: hover) {
  .app-head__url:hover {
    text-decoration: underline;
    text-decoration-color: var(--mint-ink);
  }
}

.app-head__last {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-s);
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
}

/* An assistant's initial beside what it did (the app's header, History): small, mint, a hairline edge. */
.face.face--small {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.625rem;
  background: var(--mint);
  border-width: var(--line);
  margin-top: 0.05rem;
}

/* == History: versions and assistants' changes on one timeline, newest first ==
   A rail down the left with a node per entry; the live version's node is mint, a record change's is dashed. */
.history-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
}

.history-bar > .field__hint {
  flex: 1 1 20rem;
  margin: 0;
}

.history-bar__put[open] {
  flex-basis: 100%;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  --node: 0.75rem;
  --node-top: calc(var(--space-4) + 0.4rem);
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4) 0 var(--space-4) var(--space-6);
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--node) / 2);
  border-left: var(--line) solid var(--rule);
}

.timeline__item:first-child::before {
  top: var(--node-top);
}

.timeline__item:last-child::before {
  bottom: calc(100% - var(--node-top));
}

.timeline__item::after {
  content: "";
  position: absolute;
  top: calc(var(--node-top) - var(--node) / 2);
  left: 0;
  width: var(--node);
  height: var(--node);
  background: var(--paper);
  border: var(--line) solid var(--rule-strong);
  border-radius: 50%;
}

.timeline__item--live::after {
  background: var(--mint);
  border-color: var(--mint-ink);
}

.timeline__item--change::after {
  border-style: dashed;
}

.timeline__what {
  display: grid;
  gap: var(--space-1);
  flex: 1 1 16rem;
  min-width: 0;
}

.timeline__title {
  font-family: var(--font-name);
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.timeline__item--change .timeline__title {
  font-family: var(--font-text);
  font-weight: 500;
  letter-spacing: 0;
}

.timeline__meta {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-s);
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
}

.timeline__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.timeline__actions form {
  margin: 0;
}

/* Going back is offered on the row being looked at, so five rows don't shout the same button. Touch screens
   (no hover) and the keyboard (focus) always see it. */
@media (hover: hover) {
  .timeline__actions > form .button {
    transition: opacity var(--dur-quick) var(--ease-settle);
  }

  .timeline__item:not(:hover):not(:focus-within) .timeline__actions > form .button {
    opacity: 0;
  }
}

/* == Settings: what's set up once, a part at a time ==
   On a phone the parts are a row like the tabs; from 48rem a column on the left, the open one marked in mint. */
.settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}

.settings__body {
  display: grid;
  gap: var(--space-6);
  align-content: start;
  min-width: 0;
}

.subnav {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: var(--line) solid var(--rule);
}

.subnav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  margin-bottom: calc(-1 * var(--line));
  font-size: var(--text-s);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.subnav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--mint);
}

@media (hover: hover) {
  .subnav a:hover {
    color: var(--ink);
  }
}

@media (min-width: 48rem) {
  .settings {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: var(--space-6);
  }

  .subnav {
    flex-direction: column;
    gap: var(--space-1);
    align-self: start;
    position: sticky;
    top: calc(var(--header) + var(--space-4));
    border-bottom: 0;
  }

  .subnav a {
    min-height: 2.25rem;
    margin: 0;
    padding-inline: var(--space-3);
    border-bottom: 0;
    border-left: 2px solid transparent;
    border-radius: 0 var(--radius-s) var(--radius-s) 0;
  }

  .subnav a[aria-current="page"] {
    background: var(--surface);
    border-left-color: var(--mint);
  }
}

/* == Overview: a tile per thing to keep an eye on ==
   Each tile's label links to the tab behind it, and the link covers the whole tile. Meters fill in mint. */
.tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Six tiles: two rows of three on a laptop, three rows of two on a small tablet, one column on a phone. */
@media (min-width: 30rem) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tile {
  position: relative;
  display: grid;
  gap: var(--space-1);
  align-content: start;
  min-width: 0;
  padding: var(--space-4);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
}

.tile--alert {
  border-color: var(--error);
}

.tile__label {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

a.tile__label {
  justify-self: start;
  color: var(--ink);
}

a.tile__label::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

@media (hover: hover) {
  .tile:has(a.tile__label):hover {
    background: var(--surface);
    border-color: var(--rule-strong);
  }
}

.tile__value {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: var(--track-title);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.tile__value--words {
  font-size: var(--text-m);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
}

.tile__hint {
  min-width: 0;
  font-size: var(--text-s);
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
}

.tile__hint code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meter {
  display: block;
  width: 100%;
  height: 0.375rem;
  margin-block: var(--space-1);
  background: var(--surface);
  border-radius: var(--radius-xs);
}

.meter rect {
  fill: var(--mint);
}

/* == Status page == */
/* status.wobblehaus.com (watch/): each part of wobblehaus with its state and 90 days of bars. */
.status {
  display: grid;
  gap: var(--space-5);
}

.status__overall p {
  margin: 0;
}

/* Down: the one red edge on the page. Slow keeps the plain panel; the words say which. */
.status__overall--down {
  border-color: var(--error);
}

.status__parts {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--line) solid var(--rule);
}

.status__part {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-5);
  border-bottom: var(--line) solid var(--rule);
}

.status__part p {
  margin: 0;
}

.status__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
}

.status__name {
  margin: 0;
  font-size: var(--text-m);
  font-weight: 600;
  letter-spacing: 0;
}

.status__part .status__foot {
  max-width: none;
}

.status__foot {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

/* One bar per day, oldest first. The words are in each bar's title and, for screen readers, inside it:
   colour is never the only way a day is told apart. */
.uptime {
  display: flex;
  gap: 1px;
  height: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.uptime__day {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 1px;
  background: var(--rule);
}

.uptime__day--up {
  background: var(--mint);
}

/* Slow or failing at times: mint with ink stripes, so it reads apart from both working and down. */
.uptime__day--slow {
  background: repeating-linear-gradient(135deg, var(--mint) 0 3px, var(--ink-soft) 3px 5px);
}

.uptime__day--down {
  background: var(--error);
}

/* An app's tabs: one line that scrolls sideways on a phone; the open one is underlined in mint. */
.tabs {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: var(--line) solid var(--rule);
}

.tabs a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--hit);
  margin-bottom: calc(-1 * var(--line));
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.tabs a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--mint);
}

/* On a phone, an app's five tabs fit on one line without scrolling. */
@media (max-width: 30rem) {
  .tabs {
    gap: var(--space-2);
    justify-content: space-between;
  }

  .tabs a {
    font-size: var(--text-s);
  }
}

@media (hover: hover) {
  .tabs a:hover {
    color: var(--ink);
  }
}

.badge--alert {
  color: var(--error);
  border-color: var(--error);
}

/* A tab's overview: the link and numbers on the left, who can open it and what needs a look on the right. */
.overview {
  display: grid;
  /* One column on a phone, never wider than the screen, even with a long line of code in it. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

.overview__col {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

@media (min-width: 56rem) {
  .overview {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

/* Reading pages (Privacy, Terms): the words wide, what's on the page beside them, held in view on a wide
   screen; on a phone, what's on the page comes first. */
@media (min-width: 56rem) {
  .overview--read {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  }

  .overview--read > .overview__main {
    grid-column: 1;
    grid-row: 1;
  }

  .overview--read > .overview__aside {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: var(--space-5);
  }
}

.panel {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: var(--space-5);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
}

.panel > * {
  margin: 0;
}

.panel > h2 {
  font-size: var(--text-l);
}

.panel__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.panel__head h2 {
  font-size: var(--text-l);
}

.panel__head a {
  margin-left: auto;
  font-size: var(--text-s);
}

/* Under the number: what it's out of, or a link. */
.stats dd + dd {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--text-s);
}

/* Fields side by side, lined up on their inputs, wrapping on a phone ("Add people or a domain" with its role). */
.field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
}

.field-row > .field {
  flex: 1 1 14rem;
}

.field-row > .field--narrow {
  flex: 0 1 11rem;
}

/* Design systems (/design, pivot step 9): a design system's colours as a strip (an SVG data image, since our
   own pages allow no inline styles), and its logo, both with a hairline so white shows on white. */
.swatches {
  display: block;
  max-width: 100%;
  height: auto;
  margin-bottom: var(--space-2);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-xs);
}

/* The list at /design: each design system as a small sample screen in its own colours beside its name. */
.design-list__link {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}

.design-list__specimen {
  display: block;
  width: 100%;
  height: auto;
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-s);
}

.design-list__text {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.design-list .item-list__meta code {
  font-size: 0.875em;
  padding: 0;
  background: none;
}

.design-logo {
  display: block;
  max-width: 100%;
  height: 48px;
  width: auto;
  margin-bottom: var(--space-3);
  padding: var(--space-2);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-xs);
  background: var(--plate);
}

/* == One design system (/design/:id) ==
   What to tell an agent first, then the editor beside a live preview that stays in view on a wide screen
   (on a phone the preview comes first). Colours are a table: what each is for down the side, light and dark
   across. A save bar stays at the foot of the editor and says when something isn't saved (public/design.js). */

/* "Tell your agent" with the words to paste and a Copy button (public/copy.js): a design system's page, an app's Problems. */
.design-use,
.agent-ask {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-radius: var(--radius-m);
}

.design-use__say,
.agent-ask__say {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.design-use__lead,
.agent-ask__lead {
  font-weight: 600;
}

.design-use__say code,
.agent-ask__say code {
  font-size: var(--text-s);
  padding: var(--space-1) var(--space-2);
  background: var(--paper);
  overflow-wrap: anywhere;
}

.design-use__more > summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
  font-size: var(--text-s);
  font-weight: 600;
  cursor: pointer;
}

.design-use__steps {
  display: grid;
  gap: var(--space-3);
  max-width: var(--measure);
}

.design-use__steps > * {
  margin: 0;
}

.design-layout {
  margin-top: var(--space-4);
}

@media (min-width: 56rem) {
  .design-layout__edit {
    grid-column: 1;
    grid-row: 1;
  }

  .design-layout__preview {
    grid-column: 2;
    grid-row: 1;
  }

  /* Held in view under the header while the editor scrolls past. */
  .design-preview {
    position: sticky;
    top: calc(var(--header) + var(--space-4));
  }
}

.design-editor {
  display: grid;
  gap: var(--space-4);
}

.design-editor .panel {
  gap: var(--space-4);
}

/* A built-in design system's editor: shown to read, locked (a copy is how it changes). Same rhythm as the form. */
.design-editor__locked {
  display: grid;
  gap: var(--space-4);
}

.design-editor__count {
  text-align: right;
}

/* The foot of the editor: whether it's saved, then Undo and Save. Stays in view until the form ends. */
.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  background: var(--paper);
  border-top: var(--line) solid var(--rule);
}

.save-bar__status {
  margin: 0;
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.save-bar__status[data-state="dirty"] {
  font-weight: 600;
  color: var(--ink);
}

.save-bar .actions {
  margin-left: auto;
}

/* Colours: one row per use, light and dark side by side. The dark column shows only when it's in use. */
.colours {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.colours__table {
  width: 100%;
  border-collapse: collapse;
}

.colours__table th,
.colours__table td {
  padding: var(--space-2) 0;
  text-align: left;
  vertical-align: middle;
  border-bottom: var(--line) solid var(--rule);
}

.colours__table thead th {
  padding-top: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
}

.colours__table tbody tr:last-child > * {
  border-bottom: 0;
}

.colours__table th[scope="row"] {
  padding-right: var(--space-3);
  font-weight: 500;
}

.colours__table td + td {
  padding-left: var(--space-3);
}

.colours:has(#f-dark-on:not(:checked)) .colours__dark {
  display: none;
}

.colour {
  display: grid;
  justify-items: start;
  gap: var(--space-1);
}

@media (min-width: 30rem) {
  .colour {
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
    gap: var(--space-2);
  }

  .colour__hex {
    width: 6.5rem;
  }
}

input[type="color"] {
  appearance: none;
  width: var(--hit);
  height: var(--hit);
  padding: 3px;
  background: var(--paper);
  border: var(--line) solid var(--rule-strong);
  border-radius: var(--radius-s);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--dur-press) var(--ease-settle), border-color var(--dur-quick) var(--ease-settle);
}

input[type="color"]:active {
  transform: scale(0.94);
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: var(--radius-xs);
}

input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: var(--radius-xs);
}

/* The hex beside a colour: typed face, since people paste it. Read-only until design.js keeps it in step. */
.colour__hex {
  width: 5.5rem;
  min-height: 2.25rem;
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-typed);
  font-size: var(--text-xs);
  color: var(--ink);
  background: var(--paper);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-s);
}

.colour__hex[readonly] {
  border-color: transparent;
  padding-inline: 0;
}

.colour__hex:not([readonly]):hover {
  border-color: var(--ink-soft);
}

.colour__hex:focus-visible {
  border-color: var(--ink);
}

/* Size and shape: a slider with its value beside it. */
.slider {
  display: grid;
  gap: var(--space-1);
}

.slider label {
  font-weight: 600;
}

.slider__row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.slider input[type="range"] {
  flex: 1;
  min-width: 0;
  min-height: var(--hit);
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.slider output {
  min-width: 3.5rem;
  font-family: var(--font-typed);
  font-size: var(--text-s);
  text-align: right;
}

/* Two or three choices in one control (Light, Dark): radios, the chosen one in ink. */
.segmented {
  display: inline-flex;
  margin: 0 0 0 auto;
  padding: 2px;
  border: var(--line) solid var(--rule-strong);
  border-radius: var(--radius-s);
}

.segmented label {
  position: relative;
  display: inline-flex;
}

.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 var(--space-3);
  font-size: var(--text-s);
  font-weight: 600;
  border-radius: var(--radius-xs);
  color: var(--ink-soft);
  transition: background-color var(--dur-quick) var(--ease-settle), color var(--dur-quick) var(--ease-settle);
}

/* The control is 2rem tall to sit beside a heading; its touch area reaches the full --hit. */
.segmented label::after {
  content: "";
  position: absolute;
  inset: calc((2rem - var(--hit)) / 2) 0;
}

.segmented input:checked + span {
  color: var(--paper);
  background: var(--ink);
}

.segmented input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* The sample screen, drawn only in the design system's own tokens (--sp-*, set by public/design.js from the
   form). Not ours, so none of our colours, faces or corners appear inside it. Changes show at once: no
   transitions, so it follows a colour picker or a slider without lag. */
.specimen {
  overflow: hidden;
  color: var(--sp-text);
  background: var(--sp-background);
  border: var(--line) solid var(--rule);
  border-radius: var(--radius-m);
  font-family: var(--sp-font-body);
  font-size: var(--sp-size);
  line-height: 1.5;
}

.specimen__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-space);
  padding: var(--sp-space) calc(var(--sp-space) * 2);
  border-bottom: 1px solid var(--sp-border);
}

.specimen__brand {
  font-family: var(--sp-font-heading);
  font-weight: 700;
}

.specimen__logo {
  display: block;
  height: calc(var(--sp-size) * 1.75);
  width: auto;
  max-width: 60%;
}

.specimen__nav {
  font-size: 0.875em;
  color: var(--sp-muted);
}

.specimen__body {
  display: grid;
  gap: var(--sp-space);
  padding: calc(var(--sp-space) * 2);
}

.specimen__body > p {
  margin: 0;
}

.specimen__title {
  font-family: var(--sp-font-heading);
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.specimen__link {
  color: var(--sp-accent);
  text-decoration: underline;
}

.specimen__card {
  display: grid;
  gap: calc(var(--sp-space) * 0.75);
  padding: calc(var(--sp-space) * 2);
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
}

.specimen__label {
  font-size: 0.875em;
  font-weight: 600;
}

.specimen__input {
  padding: calc(var(--sp-space) * 0.75) var(--sp-space);
  background: var(--sp-background);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
}

.specimen__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-space);
  margin-top: calc(var(--sp-space) * 0.5);
}

.specimen__button {
  padding: var(--sp-space) calc(var(--sp-space) * 2);
  font-weight: 600;
  color: var(--sp-on-primary);
  background: var(--sp-primary);
  border: 1px solid var(--sp-primary);
  border-radius: var(--sp-radius);
}

.specimen__button--quiet {
  color: var(--sp-text);
  background: var(--sp-background);
  border-color: var(--sp-border);
}

.specimen__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-space) calc(var(--sp-space) * 2);
  font-size: 0.875em;
}

.specimen__ok {
  font-weight: 600;
  color: var(--sp-success);
}

.specimen__bad {
  font-weight: 600;
  color: var(--sp-danger);
}

.specimen__code {
  font-family: var(--sp-font-mono);
  font-size: 1em;
  padding: 0;
  color: var(--sp-text);
  background: none;
}

.specimen__muted {
  font-size: 0.875em;
  color: var(--sp-muted);
}

/* A step before something that can't be undone: the first press opens the second, which does it. No dialog. */
.segmented[hidden],
.save-bar [hidden],
.design-use [hidden],
.agent-ask [hidden] {
  display: none;
}

.confirm > summary {
  list-style: none;
}

.confirm > summary::-webkit-details-marker {
  display: none;
}

.confirm[open] > summary {
  display: none;
}

.confirm__body {
  display: grid;
  gap: var(--space-3);
}

.confirm__body > * {
  margin: 0;
}

/* == Front page (public/index.html, public/front.js) ==
   A page with a bit of life: the move-in (a file stuck on a laptop jumps into the party haus and comes out as
   a link), before and after on one slider, what you say to your agent typed out, the hauses as what every app
   gets, an ink band, the promises in four highlighted sentences, and the name huge at the foot. Everything is drawn at rest
   first; front.js only plays it. With less motion it all stays at rest. */

.page--front {
  gap: var(--front-section);
  padding-block: var(--space-6) var(--space-8);
}

/* A section: its heading, then what it's about, a fixed step apart on every section. */
.front-section {
  display: grid;
  gap: var(--front-head);
  min-width: 0;
}

/* Jumping to a section ("See how") lands below the sticky header, not under it. */
.page--front > :is(section, div) {
  scroll-margin-top: calc(var(--header) + var(--space-5));
}

.front-head {
  display: grid;
  gap: var(--space-3);
  max-width: 44rem;
}

.front-head h2 {
  font-size: var(--front-title);
  line-height: 1.04;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}

.front-head p {
  max-width: 36em;
  font-size: var(--text-l);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Someone's initial in a circle: the people in a story. Mint, paper, yellow in turn. */
.face {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  font-family: var(--font-name);
  font-weight: 800;
  font-size: var(--text-s);
  line-height: 1;
  color: var(--marker-ink);
  background: var(--mint);
  border: 2px solid var(--marker-ink);
  border-radius: 50%;
}

.face:nth-of-type(3n + 2) {
  background: var(--plate);
}

.face:nth-of-type(3n) {
  background: var(--marker);
}

/* -- The move-in -- */

.front-hero {
  display: grid;
  gap: var(--space-7);
  align-items: center;
  padding-top: var(--space-5);
}

/* Headline, then the sentence under it, then the buttons a clear step further down. */
.front-hero__words {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}

.front-hero__words .actions {
  margin-top: var(--space-4);
}

.front-hero__title,
.last-call__title {
  font-size: var(--front-display);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.front-hero__title {
  max-width: 11em;
}

.front-hero__lede {
  max-width: 28em;
  font-size: var(--text-l);
  line-height: 1.5;
  color: var(--ink-soft);
}

@media (min-width: 64rem) {
  .front-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: var(--space-7);
    padding-top: var(--space-6);
  }
}

/* The stage is drawn in its own width (cqw), so the jump lands on the haus at any size. */
.move-in {
  position: relative;
  width: 100%;
  max-width: 38rem;
  aspect-ratio: 5 / 4;
  margin: 0;
  justify-self: center;
  container-type: inline-size;
}

.move-in__ground {
  position: absolute;
  left: 0;
  right: 0;
  top: 70cqw;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.move-in__laptop {
  position: absolute;
  left: 3cqw;
  top: 40.6cqw;
  width: 38cqw;
}

.move-in__screen {
  height: 27cqw;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 1.6cqw 1.6cqw 0.5cqw 0.5cqw;
}

.move-in__base {
  height: 2.4cqw;
  margin-inline: -4cqw;
  background: var(--ink);
  border-radius: 0.4cqw 0.4cqw 1.8cqw 1.8cqw;
}

.move-in__file {
  position: absolute;
  left: 6cqw;
  top: 46cqw;
  width: 32cqw;
  padding: 2cqw;
  font-family: var(--font-typed);
  font-weight: 500;
  font-size: max(9px, 1.9cqw);
  line-height: 1.35;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0.6cqw 2.6cqw 0.6cqw 0.6cqw;
  opacity: 0;
}

.move-in__file span {
  display: block;
  margin-bottom: 0.8cqw;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: max(9px, 2cqw);
  color: var(--ink-soft);
}

.move-in__huh {
  position: absolute;
  left: 33cqw;
  top: 33cqw;
  font-family: var(--font-name);
  font-weight: 800;
  font-size: 6.5cqw;
  line-height: 1;
  opacity: 0;
  transform: rotate(-10deg);
}

.move-in .move-in__haus {
  position: absolute;
  left: 42cqw;
  top: 17.8cqw;
  width: 58cqw;
}

.move-in .h-eye {
  transition: transform 0.2s var(--ease-settle);
}

.move-in__link {
  position: absolute;
  right: 0;
  top: 1cqw;
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin: 0;
  padding: 0.7em 0.9em;
  font-family: var(--font-typed);
  font-weight: 500;
  font-size: max(10px, 2.6cqw);
  line-height: 1;
  white-space: nowrap;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-s);
  transform-origin: 70% 100%;
}

.move-in__dot {
  flex: none;
  width: 0.75em;
  height: 0.75em;
  background: var(--mint);
  border: 1.5px solid var(--marker-ink);
  border-radius: 50%;
}

.move-in__people {
  position: absolute;
  left: 2cqw;
  top: 15cqw;
  display: flex;
  align-items: center;
  margin: 0;
  transform-origin: 0 50%;
}

.move-in__people .face {
  width: max(28px, 8cqw);
  height: max(28px, 8cqw);
  font-size: max(11px, 3cqw);
}

.move-in__people .face + .face {
  margin-left: -1.6cqw;
}

.move-in__who {
  margin-left: 1.6cqw;
  font-size: max(11px, 2.5cqw);
  color: var(--ink-soft);
}

/* The story, beat by beat (front.js sets data-step). */
.move-in.is-running .move-in__link,
.move-in.is-running .move-in__people {
  opacity: 0;
  transition: opacity var(--dur-quick), transform var(--dur-quick);
}

/* Both come out of the haus, so they start on its side and grow from the edge nearest it. */
.move-in.is-running .move-in__link {
  transform: translate(-4cqw, 8cqw) scale(0.6);
}

.move-in.is-running .move-in__people {
  transform: translateX(14cqw) scale(0.6);
  transform-origin: 100% 50%;
}

.move-in.is-running[data-step="link"] .move-in__link,
.move-in.is-running[data-step="people"] .move-in__link,
.move-in.is-running[data-step="people"] .move-in__people {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-quick), transform var(--dur-sheet) var(--ease-settle);
}

.move-in.is-running[data-step="people"] .move-in__people .face {
  animation: pop-in var(--dur-sheet) var(--ease-settle) backwards;
}

.move-in.is-running[data-step="people"] .move-in__people .face:nth-child(2) { animation-delay: 0.12s; }
.move-in.is-running[data-step="people"] .move-in__people .face:nth-child(3) { animation-delay: 0.24s; }

.move-in[data-step="stuck"] .move-in__file {
  opacity: 1;
  animation: nervous 0.32s linear infinite;
}

.move-in[data-step="stuck"] .move-in__huh {
  opacity: 1;
  animation: huh 0.45s var(--ease-pop) 0.7s backwards;
}

.move-in[data-step="jump"] .move-in__file {
  animation: jump 0.9s var(--ease-settle) forwards;
}

@keyframes nervous {
  0%, 100% { transform: none; }
  25% { transform: rotate(-3.5deg) translateX(-0.3cqw); }
  75% { transform: rotate(3.5deg) translateX(0.3cqw); }
}

@keyframes huh {
  from { opacity: 0; transform: scale(0.3) rotate(-30deg); }
}

@keyframes jump {
  0% { opacity: 1; transform: none; }
  18% { opacity: 1; transform: scale(1.08, 0.84); }
  55% { opacity: 1; transform: translate(25cqw, -26cqw) rotate(190deg) scale(0.75); }
  92% { opacity: 1; transform: translate(49cqw, 4cqw) rotate(350deg) scale(0.18); }
  100% { opacity: 0; transform: translate(49cqw, 4cqw) rotate(360deg) scale(0.1); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.6); }
}

/* -- Before and after: one slider. On a phone, the two sides stack instead. -- */

.swap {
  --split: 50%;
  position: relative;
  display: grid;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius-m);
  isolation: isolate;
}

.swap__side {
  position: relative;
  display: grid;
  gap: var(--space-6);
  align-items: center;
  align-content: center;
  padding: calc(var(--space-6) + var(--space-5)) var(--space-5) var(--space-6);
  min-width: 0;
}

.swap__before {
  background: var(--surface);
}

.swap__after {
  background: var(--paper);
  border-top: 2px solid var(--ink);
}

.swap__tag {
  position: absolute;
  top: var(--space-4);
  left: var(--space-5);
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-typed);
  font-size: var(--text-xs);
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius-xs);
}

.swap__tag--after {
  color: var(--marker-ink);
  background: var(--mint);
}

.swap__says {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: var(--track-display);
  max-width: 10em;
}

.swap__handle,
.swap__range {
  display: none;
}

@media (min-width: 48rem) {
  .swap__side {
    grid-area: 1 / 1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-7);
    padding: calc(var(--space-7) + var(--space-4)) var(--space-6) var(--space-6);
  }

  .swap__after {
    border-top: 0;
    clip-path: inset(0 0 0 var(--split));
  }

  .swap__after .swap__tag {
    left: auto;
    right: var(--space-5);
  }

  .swap.is-live {
    cursor: ew-resize;
  }

  .swap.is-live .swap__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--split);
    z-index: 2;
    display: block;
    width: 0;
    pointer-events: none;
  }

  .swap__handle::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1.5px;
    width: 3px;
    background: var(--ink);
  }

  .swap__handle span {
    position: absolute;
    top: 50%;
    left: 0;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    font-family: var(--font-name);
    font-weight: 800;
    font-size: var(--text-l);
    color: var(--marker-ink);
    background: var(--marker);
    border: 2px solid var(--marker-ink);
    border-radius: var(--radius-blob);
    transform: translate(-50%, -50%);
    transition: transform var(--dur-quick) var(--ease-settle);
  }

  .swap.is-dragging .swap__handle span {
    transform: translate(-50%, -50%) scale(1.12);
    transition-duration: var(--dur-press);
  }

  .swap.is-dragging {
    cursor: grabbing;
    user-select: none;
  }

  .swap:has(.swap__range:focus-visible) .swap__handle span {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }

  /* The range is there for the keyboard and screen readers; a pointer drags the panel itself (front.js),
     so pressing anywhere picks the divider up where it is instead of jumping it to the press. */
  .swap.is-live .swap__range {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  .swap.is-live {
    touch-action: pan-y;
  }
}

.chat {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.chat p {
  font-size: var(--text-s);
  line-height: 1.45;
}

.chat b {
  font-weight: 600;
}

.chat time {
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.chat__file,
.pile span {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  max-width: 100%;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-typed);
  font-size: var(--text-xs);
  line-height: 1.2;
  color: var(--ink);
  background: var(--paper);
  border: var(--line) solid var(--rule-strong);
  border-radius: var(--radius-s);
  overflow-wrap: anywhere;
}

.chat__file {
  margin-top: var(--space-2);
}

.chat__file::before,
.pile span::before {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 1px 4px 1px 1px;
}

.swap.is-arriving .chat li {
  animation: pop-up var(--dur-sheet) var(--ease-settle) backwards;
}

.swap.is-arriving .chat li:nth-child(2) { animation-delay: 0.3s; }
.swap.is-arriving .chat li:nth-child(3) { animation-delay: 0.6s; }
.swap.is-arriving .chat li:nth-child(4) { animation-delay: 0.9s; }
.swap.is-arriving .chat li:nth-child(5) { animation-delay: 1.2s; }

@keyframes pop-up {
  from { opacity: 0; transform: translateY(0.75rem) scale(0.96); }
}

/* Every copy of the same tracker, in a heap, none of them sure they're the right one. */
.pile {
  position: relative;
  min-height: 15rem;
}

.pile span {
  position: absolute;
  border-color: var(--ink);
  border-width: 1.5px;
}

.pile span:nth-child(1) { left: 8%; top: 8%; transform: rotate(-9deg); }
.pile span:nth-child(2) { left: 30%; top: 26%; transform: rotate(6deg); }
.pile span:nth-child(3) { left: 4%; top: 46%; transform: rotate(-4deg); }
.pile span:nth-child(4) { left: 26%; top: 64%; transform: rotate(11deg); }
.pile span:nth-child(5) { left: 12%; top: 82%; transform: rotate(-7deg); }

.swap.is-arriving .pile span {
  animation: shiver 0.4s steps(2) 6;
}

.swap.is-arriving .pile span:nth-child(2n) {
  animation-duration: 0.55s;
  animation-iteration-count: 4;
}

@keyframes shiver {
  50% { translate: 1px -1px; }
}

@media (max-width: 47.99rem) {
  .pile {
    display: none;
  }
}

/* A sketch of the app the expenses live in now. */
.tool {
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-m);
}

.tool__bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-typed);
  font-size: var(--text-xs);
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
  overflow-wrap: anywhere;
}

.tool__body {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
}

.tool__hi {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: var(--track-display);
}

.tool__rows {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool__rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--space-3);
  align-items: center;
  padding-block: var(--space-2);
  font-size: var(--text-s);
  font-variant-numeric: tabular-nums;
  border-top: var(--line) solid var(--rule);
}

.tool__ok {
  padding: 0.3rem 0.55rem;
  font-family: var(--font-name);
  font-weight: 700;
  font-size: var(--text-xs);
  color: var(--marker-ink);
  background: var(--marker);
  border: 1.5px solid var(--marker-ink);
  border-radius: var(--radius-xs);
}

.tool__ok--done {
  background: var(--mint);
}

.tool__who {
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

/* -- What you say to your agent -- */

.talk {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A new request starts a new exchange: more room above it than between a request and its answer. */
.talk__agent + .talk__you {
  margin-top: var(--space-6);
}

.talk li {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}

.talk__who {
  font-size: var(--text-s);
  font-weight: 600;
  letter-spacing: var(--track-small);
  color: var(--ink-soft);
}

.talk__said {
  min-width: 0;
  overflow-wrap: anywhere;
}

.talk__you .talk__said {
  font-family: var(--font-typed);
  font-weight: 500;
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  line-height: 1.45;
}

.talk__agent .talk__said {
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--track-title);
  max-width: 28em;
}

.talk__agent code {
  font-size: 0.8em;
}

@media (min-width: 48rem) {
  .talk li {
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: var(--space-5);
    align-items: baseline;
  }

  .talk__who {
    text-align: right;
  }
}

.talk.is-waiting li:not(.is-on) {
  visibility: hidden;
}

/* Where the next letter goes: a block of highlighter. Only while typing. */
.talk__caret {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 0.06em;
  vertical-align: -0.2em;
  background: var(--marker);
  border: 1.5px solid var(--marker-ink);
  border-radius: 2px;
}

.talk__word {
  display: inline-block;
  animation: word-in 0.35s var(--ease-settle) backwards;
}

@keyframes word-in {
  from { opacity: 0; transform: translateY(0.35em); }
}

.talk__more {
  max-width: 40rem;
  margin-top: var(--space-4);
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (min-width: 48rem) {
  .talk__more {
    margin-left: calc(9rem + var(--space-5));
  }
}

/* -- What every app gets: a street of hauses -- */

.street {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-7) var(--space-5);
  margin-bottom: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.street li {
  display: grid;
  gap: var(--space-1);
  align-content: start;
  min-width: 0;
}

.street .street__haus {
  width: 100%;
  max-width: 9.5rem;
  margin-bottom: var(--space-3);
}

/* A haus answers the moment it's pressed, before its move plays on release. */
button.haus {
  touch-action: manipulation;
  transition: transform var(--dur-quick) var(--ease-settle);
}

button.haus:active {
  transform: scale(0.95);
  transition-duration: var(--dur-press);
}

.street b {
  font-family: var(--font-name);
  font-weight: 800;
  font-size: var(--text-l);
  letter-spacing: -0.03em;
}

.street span {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.street span {
  line-height: 1.45;
}

.street code {
  justify-self: start;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  overflow-wrap: normal;
}

@media (min-width: 40rem) {
  .street {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .street {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* -- Safe to share: an ink band the full width of the window. The shadow paints past the column and the
   clip keeps it to the band's own height; neither makes the page any wider. -- */

.safe {
  display: grid;
  gap: var(--front-head);
  padding-block: clamp(3.5rem, 8vw, 6rem);
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 0 0 100vmax var(--ink);
  clip-path: inset(0 -100vmax);
}

.safe h2 {
  font-size: var(--front-title);
  line-height: 1.04;
  letter-spacing: var(--track-display);
}

.safe__list {
  display: grid;
  gap: var(--space-6) var(--space-7);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-l);
  line-height: 1.5;
}

.safe__list strong {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-xl);
  line-height: 1.2;
  letter-spacing: var(--track-title);
}

.safe__company {
  padding-top: var(--space-5);
  border-top: var(--line) solid var(--ink-soft);
  line-height: 1.6;
}

.safe a {
  color: var(--paper);
}

.safe :focus-visible {
  outline-color: var(--paper);
}

@media (min-width: 48rem) {
  .safe__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -- The promises: four sentences at headline size, each with its words in the highlighter -- */

.vows {
  display: grid;
  gap: var(--space-4);
}

.vows__label {
  font-family: var(--font-typed);
  font-size: var(--text-s);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.vows__list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.vows__list li {
  font-size: var(--front-title);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}

.vows__mark {
  position: relative;
  z-index: 0;
  color: var(--marker-ink);
  background: none;
}

.vows__mark::before {
  content: "";
  position: absolute;
  inset: 0.08em -0.06em 0.02em;
  z-index: -1;
  background: var(--marker);
  border-radius: var(--radius-marker);
  transform-origin: 0% 60%;
}

/* Waiting to be seen: no highlight yet, then one straight stroke per line (front.js). */
.vows__list.is-waiting .vows__mark,
.vows__list:has(.is-on) li:not(.is-on) .vows__mark {
  color: inherit;
}

.vows__list.is-waiting .vows__mark::before,
.vows__list:has(.is-on) li:not(.is-on) .vows__mark::before {
  transform: scaleX(0);
}

.vows__list li.is-on .vows__mark::before {
  animation: swipe 0.55s var(--ease-settle) both;
}

.vows__fine {
  margin-top: var(--space-3);
  color: var(--ink-soft);
  font-size: var(--text-l);
}

.last-call {
  display: grid;
  gap: var(--space-6);
  justify-items: start;
}

.last-call__title {
  font-family: var(--font-name);
  font-weight: 800;
}

.button--big {
  min-height: 3.5rem;
  padding: 0.9rem 1.6rem;
  font-size: var(--text-l);
}

/* -- The name, huge, at the foot of the front page. Each letter wobbles when pointed at. -- */

.footer:has(.bigmark) {
  container-type: inline-size;
}

.bigmark {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-family: var(--font-name);
  font-weight: 800;
  font-size: 17.5cqw;
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--ink);
  user-select: none;
}

.bigmark span {
  display: inline-block;
  transform-origin: 50% 90%;
}

@media (hover: hover) {
  .bigmark span:hover {
    animation: wobble-again var(--dur-wobble) var(--ease-jelly);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bigmark span:hover,
  .swap.is-live .pile span,
  .move-in .h-eye {
    animation: none;
    transition: none;
  }
}

/* == What it can do (/what-it-does, src/views/what.tsx, public/what.js) ==
   A page about wobblehaus that plays, like the front page: the neighbourhood (a haus for each thing every app
   gets) rises in once and watches the pointer, "Made with" tags lead to each one, each haus does its move as
   it comes into view, the lost haus stands on the "Not for" band, the owl keeps the questions. Everything is
   on the page at rest first; with less motion nothing moves. */

.what-hero {
  display: grid;
  gap: var(--space-7);
  align-items: center;
  padding-top: var(--space-5);
}

.what-hero__words {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}

.what-hero__title {
  max-width: 11em;
  font-size: var(--front-display);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.what-hero__lede {
  max-width: 30em;
  font-size: var(--text-l);
  line-height: 1.5;
  color: var(--ink-soft);
}

.what-jump {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
  margin-top: var(--space-3);
  font-size: var(--text-s);
  font-weight: 600;
}

.what-jump a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit);
}

/* The neighbourhood: five across on a phone, three across beside the words. */
.what-hood ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.what-hood a {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-s);
}

.what-hood a:focus-visible {
  outline-offset: var(--space-1);
}

.what-hood__haus {
  max-width: 6.5rem;
}

@media (hover: hover) {
  .what-hood a:hover {
    color: var(--ink);
  }
}

@media (min-width: 64rem) {
  .what-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    padding-top: var(--space-6);
  }

  .what-hood ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5) var(--space-4);
  }

  .what-hood a {
    font-size: var(--text-s);
  }
}

/* -- Good for: what people put up, each with the hauses it's made with -- */

.what-uses__list {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.what-uses__list li {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.what-uses__text {
  max-width: 26em;
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: var(--track-title);
  text-wrap: pretty;
}

.what-uses__with {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.what-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 2.25rem;
  padding: 0 var(--space-3) 0 var(--space-1);
  color: var(--ink);
  font-size: var(--text-s);
  font-weight: 600;
  text-decoration: none;
  border: var(--line) solid var(--rule-strong);
  border-radius: var(--radius-s);
  transition: transform var(--dur-quick) var(--ease-settle);
}

/* Drawn small on purpose: its touch area reaches past it. */
.what-tag::after {
  content: "";
  position: absolute;
  inset: -0.25rem 0;
}

.what-tag__haus {
  width: 1.75rem;
}

.what-tag:active {
  transform: scale(0.96);
  transition-duration: var(--dur-press);
}

@media (hover: hover) {
  .what-tag:hover {
    border-color: var(--ink);
    background: var(--surface);
  }
}

@media (min-width: 56rem) {
  .what-uses__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-7) var(--space-8);
  }
}

/* -- What every app gets: a haus, what it is, and how far it goes, the number big -- */

.what-gets__list {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.what-gets__item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  align-items: start;
  border-radius: var(--radius-m);
  scroll-margin-top: calc(var(--header) + var(--space-5));
}

.what-gets__words {
  display: grid;
  gap: var(--space-1);
  max-width: 36em;
}

.what-gets__words h3 {
  font-family: var(--font-name);
  font-weight: 800;
  font-size: var(--text-l);
  letter-spacing: -0.03em;
}

.what-gets__words p {
  color: var(--ink-soft);
  line-height: 1.5;
}

.what-gets__spec {
  grid-column: 2;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.what-gets__spec b {
  font-family: var(--font-name);
  font-weight: 800;
  font-size: var(--text-xl);
  line-height: 1;
  letter-spacing: -0.03em;
}

.what-gets__spec span {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

.what-gets__more {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--track-title);
}

@media (min-width: 48rem) {
  .what-gets__list {
    gap: var(--space-5);
  }

  .what-gets__item {
    grid-template-columns: 6.5rem minmax(0, 1fr) 13rem;
    gap: var(--space-6);
    align-items: center;
  }

  .what-gets__spec {
    grid-column: auto;
    display: grid;
    justify-items: end;
    gap: var(--space-1);
    text-align: right;
  }

  .what-gets__spec b {
    font-size: var(--front-title);
  }
}

/* -- Not for: an ink band the width of the window, the lost haus standing on it -- */

.what-not {
  display: grid;
}


/* The lost haus is a hidden one, drawn in ink, which vanishes against the ink band: here it's paper like the rest. */
.what-not__haus.haus--special {
  --h-fill: var(--paper);
  --h-face: var(--ink);
}

.what-not__haus {
  width: 6.5rem;
  margin-bottom: -0.65rem;
}

.what-not__band {
  display: grid;
  gap: var(--front-head);
  padding-block: clamp(3rem, 7vw, 5rem);
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 0 0 100vmax var(--ink);
  clip-path: inset(0 -100vmax);
}

.what-not__band .front-head p {
  color: inherit;
}

.what-not__list {
  display: grid;
  gap: var(--space-5) var(--space-7);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-l);
  line-height: 1.5;
}

.what-not__list strong {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-xl);
  line-height: 1.2;
  letter-spacing: var(--track-title);
}

@media (min-width: 48rem) {
  .what-not__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .what-not__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* -- Can it…: the owl, then each question opens to its answer, the verdict first -- */

.what-ask__head {
  display: flex;
  align-items: end;
  gap: var(--space-4);
}

.what-ask__haus {
  width: 5rem;
  flex: none;
}

.what-ask__head h2 {
  font-size: var(--front-title);
  line-height: 1.04;
  letter-spacing: var(--track-display);
}

.what-ask__list {
  border-top: 2px solid var(--ink);
}

.what-ask__item {
  border-bottom: var(--line) solid var(--rule);
}

.what-ask__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--hit);
  padding-block: var(--space-4);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: var(--track-title);
  list-style: none;
  cursor: pointer;
}

.what-ask__item summary::-webkit-details-marker {
  display: none;
}

/* A plus that turns into a cross when open. */
.what-ask__item summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-name);
  font-weight: 800;
  font-size: var(--text-xl);
  line-height: 1;
  transition: transform var(--dur-quick) var(--ease-settle);
}

.what-ask__item[open] summary::after {
  transform: rotate(45deg);
}

.what-ask__item p {
  max-width: 40em;
  padding-bottom: var(--space-5);
  font-size: var(--text-l);
  line-height: 1.5;
  color: var(--ink-soft);
}

.what-ask__item p strong {
  color: var(--ink);
}

.what-ask__item[open] p {
  animation: what-open var(--dur-sheet) var(--ease-settle) both;
}

@keyframes what-open {
  from {
    opacity: 0;
    transform: translateY(-0.4rem);
  }
}

/* -- The last word -- */

.what-end {
  display: grid;
  gap: var(--space-5);
  justify-items: start;
}

.what-end__title {
  max-width: 11em;
  font-size: var(--front-display);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.what-end__line {
  max-width: 30em;
  font-size: var(--text-l);
  line-height: 1.5;
  color: var(--ink-soft);
}

.what-end__write {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

/* -- Motion: the neighbourhood rises in once, a row someone jumped to says so. None with less motion. -- */

@media (prefers-reduced-motion: no-preference) {
  html:has(.what-hero) {
    scroll-behavior: smooth;
  }

  .what-hood li {
    animation: what-rise 0.7s var(--ease-settle) both;
  }

  .what-hood li:nth-child(2) { animation-delay: 0.06s; }
  .what-hood li:nth-child(3) { animation-delay: 0.12s; }
  .what-hood li:nth-child(4) { animation-delay: 0.18s; }
  .what-hood li:nth-child(5) { animation-delay: 0.24s; }
  .what-hood li:nth-child(6) { animation-delay: 0.3s; }
  .what-hood li:nth-child(7) { animation-delay: 0.36s; }
  .what-hood li:nth-child(8) { animation-delay: 0.42s; }
  .what-hood li:nth-child(9) { animation-delay: 0.48s; }

  .what-gets__item:target {
    animation: what-here 1.8s var(--ease-settle);
  }
}

@keyframes what-rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}

@keyframes what-here {
  from {
    background: var(--surface);
  }
}
