/*
  Ternpost: a printed airmail stamp.
  Layout: full-bleed halftone seascapes open and close the page; between them, left-aligned sections on
  onionskin paper. Two postal devices carry the identity: airmail stripes around the live inbox, and
  perforated stamps around the illustrations. Everything else is quiet type and rules.
*/

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-wdth-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-next-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-next-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #eef2f9;
  --sheet: #fbfcff;
  --ink: #0b1e46;
  --ink-soft: #46567b;
  --rule: #c9d3e6;
  --airmail: #2563eb;
  --link: #1d4ed8;
  --beak: #ff6b4a;
  --select: #dfe8fd;
  --on-airmail: #ffffff;
  --print: #1d44c4;
  --print-paper: #ffffff;
  --on-print: #ffffff;
  --on-print-soft: #d5e0ff;

  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text:
    "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", ui-sans-serif, system-ui, sans-serif;

  --measure: 66ch;
  --max: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #081430;
    --sheet: #0d1c40;
    --ink: #e8eef9;
    --ink-soft: #a5b4d4;
    --rule: #22355f;
    --airmail: #3b74f6;
    --link: #93b4ff;
    --beak: #ff7a5c;
    --select: #1a2f63;
    --print: #2149bd;
    --print-paper: #eef3ff;
    --on-print: #ffffff;
    --on-print-soft: #dbe5ff;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* Pulling past the top or bottom shouldn't drag the page away from the window edge. */
  overscroll-behavior-y: none;
}

/* Where a browser still bounces, the area it reveals matches the blue hero instead of the paper. */
html:has(body.home) {
  background: var(--print);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px / 1.6 var(--text);
}

h1,
h2,
h3 {
  font-family: var(--display);
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 48px);
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--sheet);
  padding: 8px 12px;
}

/* Header */
.site-header {
  position: relative;
  z-index: 3;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 780 24px / 1 var(--display);
  font-stretch: 86%;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  gap: 26px;
  font-size: 16px;
}

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

.home .site-header {
  position: absolute;
  inset: 0 0 auto;
}

.home .brand,
.home .site-nav a,
.home .site-nav a:hover {
  color: var(--on-print);
}

/* Scenes: halftone canvases */
.scene {
  --scene-ink: var(--print);
  --scene-coral: var(--beak);
  --scene-paper: var(--print-paper);
  position: relative;
  isolation: isolate;
}

.scene > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Hero */
.hero {
  background: linear-gradient(var(--print) 0 52%, var(--paper));
}

.hero.live,
.finale.live {
  background: none;
}

.hero-copy {
  padding-block: clamp(120px, 13vw, 176px) clamp(240px, 34vw, 520px);
  color: var(--on-print);
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(50px, 7.2vw, 106px);
  font-weight: 830;
  font-stretch: 70%;
  line-height: 0.9;
  letter-spacing: -0.005em;
}

.hero .lede {
  margin-top: 28px;
  max-width: 36ch;
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.5;
  color: var(--on-print-soft);
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 36px;
}

.hero .actions a:not(.button) {
  color: var(--on-print);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding-inline: 26px;
  border-radius: 3px;
  background: var(--airmail);
  color: var(--on-airmail);
  font: 700 17px / 1 var(--text);
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.button.on-print {
  background: var(--print-paper);
  color: var(--print);
}

/* Sections */
.section .wrap {
  padding-block: clamp(64px, 9vw, 128px);
}

.section-head {
  display: grid;
  gap: 16px;
  max-width: 48rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section h2,
.finale h2 {
  font-size: clamp(36px, 5.2vw, 68px);
  font-weight: 820;
  font-stretch: 72%;
  line-height: 0.96;
}

.section-head p {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 54ch;
}

/* Live inbox */
.demo .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
}

.demo-copy {
  display: grid;
  gap: 20px;
}

.demo-copy p {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 42ch;
}

.demo-keys {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  align-items: center;
  margin: 8px 0 0;
  font-size: 17px;
}

.demo-keys dt {
  display: flex;
  gap: 6px;
}

.demo-keys dd {
  margin: 0;
}

.envelope {
  padding: 12px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    -45deg,
    var(--airmail) 0 18px,
    var(--sheet) 18px 27px,
    var(--beak) 27px 45px,
    var(--sheet) 45px 54px
  );
  box-shadow: 0 30px 60px -34px rgba(11, 30, 70, 0.55);
}

.inbox {
  position: relative;
  background: var(--sheet);
  border-radius: 1px;
  padding: 18px 0 10px;
}

.inbox:focus-visible {
  outline-offset: 16px;
}

.inbox-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px 14px;
  border-bottom: 1px solid var(--rule);
}

.inbox-head h3 {
  font-size: 24px;
  font-weight: 780;
  font-stretch: 86%;
}

.inbox-count {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  font-size: 15px;
}

.inbox ol {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 350px;
}

.inbox li {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 11px 22px;
  border-bottom: 1px solid var(--rule);
  font-size: 15.5px;
  line-height: 1.35;
  cursor: default;
}

.inbox li .from {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox li .subject {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-soft);
}

.inbox li time {
  font: 500 14px / 1.35 var(--display);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.inbox li[aria-selected="true"] {
  background: var(--select);
  box-shadow: inset 4px 0 0 var(--airmail);
}

.inbox li.leaving {
  animation: archive 240ms ease-in forwards;
}

@keyframes archive {
  to {
    opacity: 0;
    transform: translateX(32px);
  }
}

.inbox .empty {
  display: grid;
  place-content: center;
  gap: 6px;
  min-height: 350px;
  text-align: center;
  color: var(--ink-soft);
  border: 0;
}

.inbox .empty strong {
  font: 800 30px / 1.05 var(--display);
  font-stretch: 76%;
  color: var(--ink);
}

.inbox-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 22px 4px;
  font-size: 15px;
  color: var(--ink-soft);
}

.sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.sync::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
  flex: none;
}

.sync[data-state="held"]::before {
  background: var(--beak);
}

.sync[data-state="sent"]::before {
  background: var(--airmail);
}

.inbox-buttons {
  display: flex;
  gap: 8px;
}

.inbox-buttons button {
  min-height: 36px;
  padding-inline: 12px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font: 600 14px / 1 var(--text);
  cursor: pointer;
}

.inbox-buttons button:hover {
  border-color: var(--ink-soft);
}

.flying-tern {
  position: fixed;
  z-index: 20;
  width: 44px;
  height: 44px;
  pointer-events: none;
  color: var(--airmail);
}

kbd {
  display: inline-block;
  min-width: 1.9em;
  padding: 0.12em 0.45em;
  border: 1px solid var(--rule);
  border-bottom-width: 3px;
  border-radius: 5px;
  background: var(--sheet);
  color: var(--ink);
  font: 700 0.86em / 1.35 var(--text);
  text-align: center;
}

/* App showcase: the band takes the colours of the theme being previewed. The colours are registered
   so they animate as colours, which lets the band's faded edges follow a theme change smoothly. */
@property --t-bg {
  syntax: "<color>";
  inherits: true;
  initial-value: #f6f2ea;
}

@property --t-surface {
  syntax: "<color>";
  inherits: true;
  initial-value: #fffdf8;
}

@property --t-text {
  syntax: "<color>";
  inherits: true;
  initial-value: #22190f;
}

@property --t-muted {
  syntax: "<color>";
  inherits: true;
  initial-value: #5f5446;
}

@property --t-fill {
  syntax: "<color>";
  inherits: true;
  initial-value: #b2461f;
}

@property --t-line {
  syntax: "<color>";
  inherits: true;
  initial-value: #e7dfd2;
}

.showcase {
  --t-bg: #f6f2ea;
  --t-surface: #fffdf8;
  --t-text: #22190f;
  --t-muted: #5f5446;
  --t-fill: #b2461f;
  --t-line: #e7dfd2;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fade: clamp(120px, 14vw, 200px);
  /* The fades overlap the neighbouring sections' empty padding instead of adding to it. */
  position: relative;
  margin-block: calc(var(--fade) * -0.45);
  background: linear-gradient(
    to bottom,
    var(--paper) 0,
    color-mix(in oklab, var(--paper) 88%, var(--t-bg)) calc(var(--fade) * 0.2),
    color-mix(in oklab, var(--paper) 50%, var(--t-bg)) calc(var(--fade) * 0.5),
    color-mix(in oklab, var(--paper) 12%, var(--t-bg)) calc(var(--fade) * 0.8),
    var(--t-bg) var(--fade),
    var(--t-bg) calc(100% - var(--fade)),
    color-mix(in oklab, var(--paper) 12%, var(--t-bg)) calc(100% - var(--fade) * 0.8),
    color-mix(in oklab, var(--paper) 50%, var(--t-bg)) calc(100% - var(--fade) * 0.5),
    color-mix(in oklab, var(--paper) 88%, var(--t-bg)) calc(100% - var(--fade) * 0.2),
    var(--paper) 100%
  );
  color: var(--t-text);
  transition:
    --t-bg 0.5s ease,
    --t-surface 0.5s ease,
    --t-text 0.5s ease,
    --t-muted 0.5s ease,
    --t-fill 0.5s ease,
    --t-line 0.5s ease;
}

.showcase .wrap {
  display: grid;
  gap: 28px;
  padding-block: calc(var(--fade) * 0.85);
}

.showcase-head {
  display: grid;
  gap: 16px;
  max-width: 48rem;
  margin-bottom: clamp(8px, 2vw, 20px);
}

.showcase h2 {
  font-size: clamp(36px, 5.2vw, 68px);
  font-weight: 820;
  font-stretch: 72%;
  line-height: 0.96;
  color: inherit;
}

.showcase-head p {
  max-width: 54ch;
  font-size: 19px;
  color: var(--t-muted);
}

/* Controls: one toolbar, views on the left, theme and appearance on the right */
.showcase-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.showcase-controls fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.showcase-controls input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.showcase-controls .views,
.showcase-controls .mode {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--t-line);
  border-radius: 999px;
  background: var(--t-surface);
}

/* Sized and moved by site.js to the chosen label's box, so it also works when the views wrap */
.views-pill,
.mode-pill {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  background: var(--t-fill);
  transition:
    transform 0.42s var(--ease),
    width 0.42s var(--ease),
    height 0.42s var(--ease);
}

.views label,
.mode label {
  position: relative;
  cursor: pointer;
}

.views span,
.mode span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px 0 12px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: var(--t-muted);
  white-space: nowrap;
}

.mode span {
  padding-inline: 18px;
}

.views label:hover span,
.mode label:hover span {
  color: var(--t-text);
}

.views input:checked + span,
.mode input:checked + span {
  color: var(--t-bg);
}

.views kbd {
  min-width: 2.1em;
  border-color: color-mix(in srgb, var(--t-text) 18%, transparent);
  background: var(--t-bg);
  color: var(--t-text);
  font-size: 13px;
}

.views input:checked + span kbd {
  border-color: transparent;
}

.views label:has(input:focus-visible) span,
.mode label:has(input:focus-visible) span,
.chip-label:has(input:focus-visible) .chip {
  outline: 3px solid var(--t-fill);
  outline-offset: 3px;
}

.looks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.chips {
  display: flex;
  gap: 6px;
}

.chip-label {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.chip {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--l-bg) 49%, var(--d-bg) 51%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--t-text) 18%, transparent),
    0 0 0 0 var(--t-bg),
    0 0 0 0 var(--t-fill);
  transition:
    box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.chip::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--l-fill) 47%, var(--d-fill) 53%);
}

.chip-label:hover .chip {
  transform: scale(1.1);
}

.chip-label:has(input:checked) .chip {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--t-text) 18%, transparent),
    0 0 0 3px var(--t-bg),
    0 0 0 5px var(--t-fill);
}

/* The window */
.stage-window {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--t-line);
  border-radius: 14px;
  background: var(--t-surface);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--t-text) 6%, transparent),
    0 60px 100px -60px rgba(0, 0, 0, 0.55);
}

.stage-window .window-bar {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--t-line);
}

.window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--t-line);
}

/* A thin progress line along the bar, only when a capture takes a moment to arrive */
.stage-window .window-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--t-fill);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}

.showcase.loading .window-bar::after {
  opacity: 1;
  animation: fetching 1.2s var(--ease) 0.15s both;
}

@keyframes fetching {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(0.85);
  }
}

.stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--t-bg);
}

.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage-window figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 40px;
  padding: 16px 20px 18px;
  border-top: 1px solid var(--t-line);
  font-size: 16px;
  color: var(--t-muted);
}

.stage-window figcaption p {
  max-width: 52ch;
}

.stage-window figcaption kbd {
  border-color: color-mix(in srgb, var(--t-text) 18%, transparent);
  background: var(--t-bg);
  color: var(--t-text);
}

.theme-caption strong {
  color: var(--t-text);
}

.showcase:not(.interactive) .theme-caption {
  display: none;
}

/* Stamps */
.stamp-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
}

.stamp-card {
  display: grid;
  gap: 14px;
  align-content: start;
  margin: 0;
}

.stamp {
  position: relative;
  padding: 10px;
  background: var(--sheet);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle 5px at 0 0, #0000 96%, #000 100%) 0 0 / 15px 15px round;
  mask:
    linear-gradient(#000 0 0) content-box,
    radial-gradient(circle 5px at 0 0, #0000 96%, #000 100%) 0 0 / 15px 15px round;
}

.stamp-shadow {
  filter: drop-shadow(0 12px 18px rgba(11, 30, 70, 0.18));
}

.stamp .scene {
  --scene-paper: var(--sheet);
  aspect-ratio: 5 / 4;
  max-width: 100%;
  outline: 1px solid var(--rule);
  outline-offset: -1px;
}

.denomination {
  position: absolute;
  right: 22px;
  top: 20px;
  font: 820 26px / 1 var(--display);
  font-stretch: 72%;
  color: var(--print);
  background: var(--sheet);
  padding: 4px 7px 3px;
}

.stamp-card h3 {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 760;
  font-stretch: 84%;
  line-height: 1.1;
}

.stamp-card p {
  color: var(--ink-soft);
  font-size: 17px;
}

/* Shortcut list */
.keys {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 5vw, 72px);
  margin: 0;
}

.keys > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 18px;
  padding-block: 22px;
  border-top: 1px solid var(--rule);
}

.keys dt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
  font-size: 18px;
}

.keys dd {
  margin: 0;
  display: grid;
  gap: 4px;
}

.keys h3 {
  font-size: 21px;
  font-weight: 700;
  font-stretch: 92%;
}

.keys p {
  color: var(--ink-soft);
  font-size: 17px;
}

/* Data declaration */
.declaration {
  background: var(--sheet);
  border-top: 1px solid var(--rule);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--rule);
}

th {
  font: 700 15px / 1.3 var(--text);
  color: var(--ink-soft);
}

td:first-child {
  font-weight: 700;
  min-width: 10rem;
}

.never {
  margin-top: 36px;
  max-width: var(--measure);
  font-size: 19px;
}

.limited-use {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
  font-size: 15.5px;
  color: var(--ink-soft);
}

/* Finale */
.finale {
  background: linear-gradient(var(--paper), var(--print) 40%);
}

.finale .wrap {
  display: grid;
  gap: 22px;
  justify-items: start;
  padding-block: clamp(150px, 20vw, 260px) clamp(170px, 22vw, 300px);
  color: var(--on-print);
}

.finale h2 {
  max-width: 14ch;
}

.finale p {
  max-width: 40ch;
  font-size: 20px;
  color: var(--on-print-soft);
}

/* Early-access form */
.signup {
  display: grid;
  gap: 18px;
  width: min(100%, 40rem);
  margin-top: 6px;
}

.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signup input[type="email"] {
  flex: 1 1 16rem;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--on-print);
  font: 400 18px / 1 var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.signup input[type="email"]::placeholder {
  color: var(--on-print-soft);
  opacity: 0.8;
}

.signup input[type="email"]:focus-visible {
  outline: 3px solid var(--print-paper);
  outline-offset: 2px;
}

.signup button {
  border: 0;
  cursor: pointer;
}

.signup button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.signup fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--on-print);
}

.signup legend {
  width: 100%;
  margin-bottom: 8px;
  font-weight: 700;
}

.signup legend span {
  font-weight: 400;
  color: var(--on-print-soft);
}

.signup fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 17px;
  cursor: pointer;
}

.signup input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--beak);
}

.finale .signup-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--on-print);
}

.signup-status[data-state="error"]::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--beak);
}

.signup.joined fieldset,
.signup.joined .signup-row {
  opacity: 0.55;
}

.finale .signup-note {
  margin: 0;
  font-size: 15px;
}

.finale .signup-note a {
  color: var(--on-print);
}

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

/* Prose pages */
.prose {
  max-width: calc(var(--measure) + 48px);
  margin-inline: 0;
  padding-block: clamp(24px, 5vw, 64px) 96px;
}

.prose > * + * {
  margin-top: 1em;
}

.prose h1 {
  font-size: clamp(44px, 6.4vw, 80px);
  font-weight: 830;
  font-stretch: 70%;
  line-height: 0.94;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: 30px;
  font-weight: 780;
  font-stretch: 80%;
  line-height: 1.1;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 21px;
  font-weight: 700;
  font-stretch: 92%;
}

.prose .meta {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 16px;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose table {
  font-size: 16px;
}

.prose code {
  font:
    0.86em / 1.4 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 0.05em 0.35em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

.callout {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 18px 22px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-soft);
}

.home .site-footer {
  border-top: 0;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 32px;
  padding-block: 28px 44px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.site-footer a {
  color: var(--ink-soft);
}

@media (max-width: 960px) {
  .demo .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .stamp-row {
    grid-template-columns: minmax(0, 1fr);
    max-width: 30rem;
  }

  .keys {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-window figcaption {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .wrap {
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
  }

  .site-nav {
    gap: 16px;
  }

  .site-nav .optional {
    display: none;
  }

  .showcase-controls .views {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    border-radius: 22px;
  }

  .views span {
    display: flex;
    justify-content: center;
    padding-inline: 10px;
  }

  .chips {
    gap: 0;
  }

  .chip-label {
    width: 40px;
  }

  .inbox li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding-inline: 16px;
  }

  .inbox li .subject {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .inbox-head,
  .inbox-foot {
    padding-inline: 16px;
  }

  .keys > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .declaration thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .declaration tr {
    display: grid;
    gap: 6px;
    padding-block: 16px;
    border-bottom: 1px solid var(--rule);
  }

  .declaration td {
    padding: 0;
    border: 0;
  }

  .declaration td:first-child {
    min-width: 0;
    font-family: var(--display);
    font-size: 20px;
  }

  .declaration td + td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--ink-soft);
  }
}

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

  .inbox li.leaving {
    animation: none;
    opacity: 0;
  }
}
