/* Docket: a desk, a stack of paper cards, and two stamp inks. */

@font-face {
  font-family: 'Anybody';
  src: url('/fonts/anybody.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson';
  src: url('/fonts/atkinson.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --desk: #c9d2de;
  --desk-edge: #b5c1d0;
  --on-desk: #121826;
  --on-desk-2: #475269;
  --paper: #fbfbf9;
  --paper-2: #eef1f5;
  --ink: #141a26;
  --ink-2: #505b70;
  --rule: #dce1e8;
  --left: #c7402b; /* vermilion stamp ink */
  --right: #2448c8; /* cobalt stamp ink */
  --skip: #5b6477;
  /* Stamp inks as they read on the desk (lighter in the dark). */
  --left-on-desk: var(--left);
  --right-on-desk: var(--right);
  --card-shadow: 0 1px 0 rgb(20 26 38 / 0.05), 0 18px 36px -18px rgb(20 26 38 / 0.45);
  --display: 'Anybody', 'Arial Narrow', sans-serif;
  --body: 'Atkinson', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 16px;
  color-scheme: light;
}

/* Dark: follows the system unless the Appearance preference says otherwise. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --desk: #1b2432;
    --desk-edge: #283347;
    --on-desk: #e6ebf2;
    --on-desk-2: #9aa6ba;
    /* Cards stay paper in the dark, dimmed a touch, so agent HTML always has the same ground. */
    --paper: #e8ecf1;
    --paper-2: #d9dfe7;
    --rule: #c9d1db;
    --card-shadow: 0 1px 0 rgb(0 0 0 / 0.25), 0 22px 44px -18px rgb(0 0 0 / 0.8);
    --left-on-desk: #f07a63;
    --right-on-desk: #8ea6ff;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --desk: #1b2432;
  --desk-edge: #283347;
  --on-desk: #e6ebf2;
  --on-desk-2: #9aa6ba;
  /* Cards stay paper in the dark, dimmed a touch, so agent HTML always has the same ground. */
  --paper: #e8ecf1;
  --paper-2: #d9dfe7;
  --rule: #c9d1db;
  --card-shadow: 0 1px 0 rgb(0 0 0 / 0.25), 0 22px 44px -18px rgb(0 0 0 / 0.8);
  --left-on-desk: #f07a63;
  --right-on-desk: #8ea6ff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  overflow: hidden;
  background: var(--desk);
  color: var(--on-desk);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

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

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

/* ---------- Top bar ---------- */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 6px;
}
.bar-btn[hidden] {
  display: none;
}

/* Project chips: scroll sideways when there are many. */
.projects {
  display: flex;
  flex-basis: 100%;
  gap: 8px;
  margin: 2px calc(-1 * var(--gutter)) 0;
  padding: 2px var(--gutter) 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.projects[hidden] {
  display: none;
}
.chip {
  display: inline-flex;
  flex: none;
  align-items: baseline;
  gap: 6px;
  border: 1.5px solid var(--desk-edge);
  border-radius: 99px;
  padding: 4px 12px;
  background: none;
  color: var(--on-desk);
  font-size: 14px;
  white-space: nowrap;
}
.chip b {
  color: var(--on-desk-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed='true'] {
  border-color: var(--on-desk);
  background: var(--on-desk);
  color: var(--desk);
}
.chip[aria-pressed='true'] b {
  color: var(--desk);
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 880;
  font-stretch: 58%;
  line-height: 1;
  letter-spacing: -0.01em;
}

.count {
  margin: 0;
  flex: 1;
  color: var(--on-desk-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.bar-btn {
  border: 0;
  background: none;
  padding: 6px 2px;
  color: var(--on-desk);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* ---------- Stack ---------- */

.stage {
  position: relative;
  min-height: 0;
  padding: 8px var(--gutter) 0;
}

.stack {
  position: relative;
  height: 100%;
}

.card {
  --depth: 0;
  position: absolute;
  inset: 0 0 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--card-shadow);
  transform: translateY(calc(var(--depth) * 11px)) scale(calc(1 - var(--depth) * 0.04));
  transform-origin: 50% 100%;
  transition:
    transform 0.32s var(--ease),
    opacity 0.32s var(--ease);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.card[data-depth='1'] {
  --depth: 1;
}
.card[data-depth='2'] {
  --depth: 2;
  opacity: 0.75;
}
.card:not([data-depth='0']) > * {
  visibility: hidden;
}
.card.dragging {
  transition: none;
  cursor: grabbing;
}
.card.leaving {
  z-index: 50 !important;
  pointer-events: none;
}

.card-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 16px 18px 0;
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
}
.card-meta .agent {
  font-weight: 700;
  color: var(--ink);
}
.card-meta .project {
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta .project:not(:empty)::before {
  content: '/ ';
  color: var(--rule);
}
.card-meta time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.card-title {
  margin: 6px 0 0;
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display);
  font-size: clamp(22px, 6.4vw, 28px);
  font-weight: 720;
  font-stretch: 84%;
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 18px 8px;
  touch-action: pan-y;
  user-select: text;
  -webkit-user-select: text;
}
.card.dragging .card-body {
  user-select: none;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 18px 14px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

.lean {
  margin: 0;
  color: var(--ink-2);
}
.lean b {
  font-weight: 700;
}
.ink-left {
  color: var(--left);
}
.ink-right {
  color: var(--right);
}
.ink-extra {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.note-toggle {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.note {
  flex-basis: 100%;
  min-height: 64px;
  resize: vertical;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 15px;
  user-select: text;
}
.note:focus {
  border-color: var(--right);
  outline: none;
}

/* ---------- The stamp ---------- */

/* The stamp lands on the side of the card that stays on screen as it moves. */
.stamp {
  --s: 1.3;
  --tilt: -10deg;
  --x: 0%;
  position: absolute;
  top: 26%;
  left: 20px;
  z-index: 3;
  max-width: calc(100% - 40px);
  opacity: 0;
  pointer-events: none;
  color: var(--right);
  transform: translate(var(--x), -50%) rotate(var(--tilt)) scale(var(--s));
  transform-origin: 30% 50%;
  mix-blend-mode: multiply;
}
.stamp[data-side='left'] {
  --tilt: 9deg;
  left: auto;
  right: 20px;
  transform-origin: 70% 50%;
  color: var(--left);
}
.stamp[data-side='skip'],
.stamp[data-side='third'],
.stamp[data-side='fourth'] {
  --tilt: -3deg;
  --x: -50%;
  left: 50%;
  transform-origin: 50% 50%;
  color: var(--skip);
}
/* Third and fourth options stamp in black ink. */
.stamp[data-side='third'],
.stamp[data-side='fourth'] {
  --tilt: 4deg;
  color: var(--ink);
}
.stamp span {
  display: block;
  overflow: hidden;
  padding: 0.14em 0.3em 0.06em;
  border: 0.085em solid currentColor;
  border-radius: 0.12em;
  box-shadow:
    inset 0 0 0 0.05em var(--paper),
    inset 0 0 0 0.095em currentColor;
  font-family: var(--display);
  font-size: clamp(34px, 11vw, 50px);
  font-weight: 900;
  font-stretch: 56%;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  /* Ink grain: stamped, not printed. */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4.2 3.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4.2 3.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-size: 220px;
  mask-size: 220px;
}
.stamp.slam {
  animation: slam 0.2s cubic-bezier(0.5, 0, 0.75, 0) both;
}
@keyframes slam {
  from {
    opacity: 0;
    transform: translate(var(--x), -50%) rotate(var(--tilt)) scale(1.6);
  }
  to {
    opacity: 1;
    transform: translate(var(--x), -50%) rotate(var(--tilt)) scale(1);
  }
}

/* ---------- Actions ---------- */

.actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  padding: 6px var(--gutter) calc(12px + env(safe-area-inset-bottom));
}
.actions[hidden] {
  display: none;
}

.rule {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 60px;
  border: 0;
  border-radius: 16px;
  padding: 6px 10px;
  background: var(--right);
  color: #fff;
  transition:
    transform 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.rule[data-side='left'] {
  background: var(--left);
}
.rule-label {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 760;
  font-stretch: 76%;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
/* Non-breaking spaces keep the arrow with its word when the label wraps. */
.rule[data-side='left'] .rule-label::before {
  content: '←\00a0';
}
.rule[data-side='right'] .rule-label::after {
  content: '\00a0→';
}
.rule.armed,
.rule:active {
  transform: scale(1.04);
  box-shadow: 0 0 0 3px var(--desk), 0 0 0 5px currentColor;
}
.rule[data-side='left'].armed {
  box-shadow: 0 0 0 3px var(--desk), 0 0 0 5px var(--left);
}
.rule[data-side='right'].armed {
  box-shadow: 0 0 0 3px var(--desk), 0 0 0 5px var(--right);
}

.extras {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
}
.extras[hidden],
.extra[hidden] {
  display: none;
}
.extra {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  border: 2px solid var(--on-desk);
  border-radius: 14px;
  padding: 4px 10px;
  background: none;
  color: var(--on-desk);
  transition: transform 0.15s var(--ease);
}
.extra:active {
  transform: scale(1.03);
}
.extra .rule-label {
  font-size: 17px;
}

.skip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  border: 2px solid var(--desk-edge);
  border-radius: 16px;
  padding: 4px 10px;
  background: none;
  color: var(--on-desk);
  font-weight: 700;
  line-height: 1.15;
}
.skip small {
  color: var(--on-desk-2);
  font-size: 11.5px;
  font-weight: 400;
}

/* ---------- Toast & connection ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  box-shadow: 0 12px 30px -10px rgb(0 0 0 / 0.5);
  transform: translateX(-50%);
  animation: rise 0.22s var(--ease);
}
.toast[hidden] {
  display: none;
}
#toast-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#toast-undo {
  border: 0;
  border-radius: 9px;
  padding: 6px 12px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}
#toast-undo[hidden] {
  display: none;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

.live {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  z-index: 60;
  margin: 0;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  transform: translateX(-50%);
}
.live[hidden] {
  display: none;
}

/* ---------- Empty, pair, offline ---------- */

.notice {
  position: absolute;
  inset: 0 var(--gutter) 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8px 12vh;
  max-width: 30rem;
}
.notice[hidden] {
  display: none;
}
.notice h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(34px, 11vw, 48px);
  font-weight: 860;
  font-stretch: 60%;
  line-height: 1;
}
.notice p {
  margin: 0 0 12px;
  color: var(--on-desk-2);
}
.notice code {
  color: var(--on-desk);
  font-weight: 700;
}

.pair-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.pair-form input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--desk-edge);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
}
.pair-form button {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  background: var(--right);
  color: #fff;
  font-weight: 700;
}
.error {
  color: var(--left) !important;
  font-weight: 700;
}
.notice .primary {
  align-self: flex-start;
  margin: 6px 0 14px;
}
.notice .fine {
  font-size: 14px;
}
.primary {
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  background: var(--right);
  color: #fff;
  font-weight: 700;
}
.primary:disabled {
  opacity: 0.6;
}

/* ---------- History sheet ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  background: rgb(10 14 22 / 0.45);
}
.sheet[hidden] {
  display: none;
}
.sheet-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 40rem;
  max-height: 94dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 auto;
  border-radius: 20px 20px 0 0;
  background: var(--desk);
  animation: sheet-in 0.28s var(--ease);
}
@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px var(--gutter) 8px;
}
.sheet-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 860;
  font-stretch: 60%;
}

.history-list {
  margin: 0;
  padding: 0 var(--gutter) 12px;
  list-style: none;
}
.h-outcome {
  grid-column: 2;
  margin: 4px 0 0;
  font-size: 14px;
}
.h-actions {
  grid-column: 2;
  display: flex;
  gap: 18px;
  margin-top: 2px;
}
.mini-stamp.waiting {
  color: var(--on-desk);
  border-style: dashed;
}

/* ---------- Manage: tabs, filters, preferences ---------- */

.tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin: 0 var(--gutter) 10px;
  padding: 4px;
  border-radius: 14px;
  background: var(--desk-edge);
}
.tabs [role='tab'] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  padding: 8px 6px;
  background: none;
  color: var(--on-desk-2);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.tabs [role='tab'][aria-selected='true'] {
  background: var(--desk);
  color: var(--on-desk);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}
.tab-panel {
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
}
.tab-panel[hidden] {
  display: none;
}
.tab-panel .history-list,
.tab-panel .device-list {
  padding: 0;
}
.panel-intro {
  margin: 0 0 10px;
  color: var(--on-desk-2);
  font-size: 14px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.filters input {
  grid-column: 1 / -1;
}
.filters input,
.filters select,
.pref-row select {
  min-width: 0;
  border: 2px solid var(--desk-edge);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--paper);
  color: var(--ink);
}

.row-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 16px;
}
.mini-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.prefs h3 {
  margin: 16px 0 6px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 860;
  font-stretch: 60%;
}
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--desk-edge);
}
.pref-row small {
  display: block;
  color: var(--on-desk-2);
  font-size: 13px;
}
.pref-group {
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--desk-edge);
}
.pref-group legend {
  float: left;
  width: 100%;
  margin-bottom: 6px;
}
.pref-group label {
  display: flex;
  clear: both;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  color: var(--on-desk-2);
}
input[type='checkbox'][role='switch'] {
  appearance: none;
  flex: none;
  position: relative;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 99px;
  background: var(--desk-edge);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
input[type='checkbox'][role='switch']::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
  transition: transform 0.2s var(--ease);
}
input[type='checkbox'][role='switch']:checked {
  background: var(--right);
}
input[type='checkbox'][role='switch']:checked::after {
  transform: translateX(18px);
}
.pref-group input[type='radio'] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--right);
}
.h-outcome.claimed {
  color: var(--on-desk-2);
}

.device-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.device-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--desk-edge);
}
.device-list li.h-empty {
  display: block;
  color: var(--on-desk-2);
}
.device-actions {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}
.device-actions[hidden],
.add-link[hidden] {
  display: none;
}
.add-link p {
  margin: 12px 0 6px;
  color: var(--on-desk-2);
  font-size: 14px;
}
.add-link input {
  width: 100%;
  margin-bottom: 8px;
  border: 2px solid var(--desk-edge);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}
.history-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--desk-edge);
}
.history-list .h-empty {
  display: block;
  color: var(--on-desk-2);
}
.mini-stamp {
  grid-row: span 3;
  min-width: 78px;
  max-width: 110px;
  margin-top: 2px;
  overflow: hidden;
  padding: 3px 6px 1px;
  border: 2px solid currentColor;
  border-radius: 4px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 880;
  font-stretch: 58%;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-3deg);
}
.mini-stamp.left {
  color: var(--left-on-desk);
}
.mini-stamp.right {
  color: var(--right-on-desk);
}
.mini-stamp.skip,
.mini-stamp.cancelled {
  color: var(--on-desk-2);
}
.mini-stamp.extra {
  color: var(--on-desk);
}
.h-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
}
.h-meta {
  margin: 0;
  color: var(--on-desk-2);
  font-size: 13px;
}
.h-note {
  margin: 4px 0 0;
  font-size: 14px;
  font-style: italic;
}

/* ---------- /pair page on the computer ---------- */

.pair-page {
  display: block;
  height: auto;
  min-height: 100vh;
  overflow: auto;
}
.pair-page main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 48px 24px;
}
.pair-page h2 {
  margin: 28px 0 4px;
  font-family: var(--display);
  font-size: 40px;
  font-weight: 860;
  font-stretch: 60%;
  line-height: 1;
}
.pair-page p {
  color: var(--on-desk-2);
}
.codes {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0;
}
.codes figure {
  margin: 0;
  width: min(280px, 100%);
}
.codes svg {
  display: block;
  width: 100%;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}
.codes figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
}
.fine {
  font-size: 14px;
}

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
  .stage,
  .actions {
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
