:root {
  --bg: #0d0e11;
  --surface: #15171c;
  --surface-2: #1b1e25;
  --line: #2a2e37;
  --text: #e6e8ee;
  --dim: #8b909c;
  --faint: #6b7079;
  --ghost: #5f646e;
  --ghost-dim: #4c505a;
  --line-strong: #4a4e57;
  --on-accent: #16130c;
  /* the brass of an engraved wall label; paired triplet so it composes with alpha */
  --accent-rgb: 210, 172, 106;
  --accent: rgb(var(--accent-rgb));
  --warn-rgb: 226, 108, 92;
  --warn: rgb(var(--warn-rgb));

  --rail-w: 232px;
  --plaque-w: 62ch;
  /* Both payment exhibits render the form as a row of digit wheels, and a card
     number reads as one row or it doesn't read as a card number — so they agree
     on the size that keeps sixteen of them on a line. */
  --wheel-size: clamp(13px, 3.7vw, 30px);

  /* Low to high, so the order is the system: the scrim dims for the rail it
     sits under, and the skip link outranks both because a focused one that
     something covers is no way out at all. A modal <dialog> needs no tier —
     showModal puts it in the top layer, above every one of these. */
  --z-scrim: 10;
  --z-rail: 20;
  --z-skip: 100;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

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

/* Browsers hand form controls a font of their own, so this is the one rule
   that has to undo it — a category rather than a list of the controls the site
   happens to use today, since that drift arrives by omission. The shorthand is
   the right instrument here: `.btn` sets its own size and leans on the page's
   line-height, which `font-family` alone would take back to the UA's. */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

body,
h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: rgba(var(--accent-rgb), 0.3);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  /* clipped rather than hidden: a live region removed from the accessibility
     tree announces nothing */
  clip-path: inset(50%);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

#stage:focus {
  outline: none;
}

/* The small uppercase caption over a field, a control, or a run of either.
   Colour and size stay with the surface: the plaque's is dimmer and the status
   strip's shrinks on a phone. */
.eyebrow {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.btn {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease);
}

.btn:hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb), 0.55);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

.iconbtn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  color: var(--dim);
  cursor: pointer;
}

.iconbtn:hover {
  color: var(--text);
}

.noscript {
  max-width: var(--plaque-w);
  margin: 48px auto;
  padding: 0 24px;
  color: var(--dim);
}

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