/* SwipeAndSwap marketing site, built from the SwipeAndSwap Brand Guide:
   Cream pages, Ink type, Swap Red for the brand, and Volt as the one spark
   (the header's Swap Pill, and one moment further down). Archivo throughout,
   Archivo Black at wide width for display.

   Interaction rules from the guide:
   - Hover comes toward you: fills bloom out from the exact point the pointer
     enters, controls swell slightly and lean toward the pointer, nav links get a
     marker painted in from the side the pointer came from.
   - Labels never move, nothing lifts upward, nothing retreats.
   - Only things you can click, tap, or drag react to the pointer.
   Accessibility: WCAG 2.2 AA. Text 4.5:1 (3:1 at 24px+), non-text 3:1, visible
   focus that sticky bars never cover, 44px targets, reduced motion honored. */

/* Archivo, subset to WOFF2 by script. The browser downloads only the ranges a
   page uses, so English pages load just the Latin file. */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens ----------------------------------------------------------------- */

:root {
  --cream: #fff6e7;
  --cream-raised: #fbe8c8;
  --cream-deep: #f3dcb6;
  --paper: #fffdf9;
  --edge: #eedcbf;
  --edge-strong: #8c7a72;
  --ink: #1a1214;
  --ink-2: #2a1f21;
  --ink-soft: #5e4b47;
  --on-ink-soft: #c9b8ae;
  --red: #f5023c;
  --red-text: #d0002f;
  --red-deep: #b8002a;
  --volt: #d4ff2a;
  --go: #0b7a44;
  --cash: #a84a06;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-btn: 12px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --ui: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fill: cubic-bezier(0.76, 0, 0.24, 1);

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 44px);
  --header-h: 76px;
  --sticker-shadow: 3px 4px 0 var(--ink);

  /* Names the listing and store pages (rendered by the API) still use. */
  --page: var(--cream);
  --raised: var(--cream-raised);
  --lift: var(--cream-deep);
  --edge-lit: var(--edge-strong);
  --ink-dim: var(--ink-soft);
  --muted: var(--ink-soft);
  --accent: var(--red-text);
  --accent-deep: var(--red-deep);
  --accent-wash: #ffe3e8;
  --radius: var(--r-lg);
  --radius-sm: var(--r-btn);
  --ease: var(--out);

  /* Roles that keep their colour whatever the page's scheme: cream type on
     ink, red and dark clay; ink type on Volt; and the ink panels, footer,
     and clay, which dark mode lifts off its darker ground. */
  --on-dark: #fff6e7;
  --ink-fixed: #1a1214;
  --slab: #1a1214;
  --slab-2: #2a1f21;
  --slab-line: #4a3a3d;
  --slab-hover: #3b2d30;
  --clay: #f6e2c2;
  --clay-dark: #2e2123;
  --go-fill: #0b7a44;
  --field: #fff;
  --placeholder: #76655f;
  --status-bg: #ffe3e8;
  --status-ink: #8f0020;
  --header-glass: rgba(255, 246, 231, 0.9);
  --chapter-glass: rgba(255, 246, 231, 0.94);

  color-scheme: light;
}

/* Dark mode follows the device. The marketing pages opt in on <html>; the
   API's listing and store pages share this sheet and stay light. The ground
   steps up in three tones (ground, surface, raised clay), so ink panels and
   the footer sit raised on it instead of vanishing. Same palette as the app. */
@media (prefers-color-scheme: dark) {
  :root[data-scheme='auto'] {
    --cream: #1a1214;
    --cream-raised: #2e2123;
    --cream-deep: #3a2d30;
    --paper: #221a1c;
    --edge: #3a2d30;
    --edge-strong: #8c7a72;
    --ink: #fff6e7;
    --ink-2: #fff6e7;
    --ink-soft: #cbbfb4;
    --on-ink-soft: #cbbfb4;
    --red-text: #ff4d6d;
    --go: #4fcf8a;
    --cash: #f29a52;
    --accent-wash: #3a1820;

    --slab: #2e2123;
    --slab-2: #3a2d30;
    --slab-line: #54434a;
    --slab-hover: #46373a;
    --clay: #2e2123;
    --clay-dark: #3a2d30;
    --field: #1a1214;
    --placeholder: #a8998f;
    --status-bg: #3a1820;
    --status-ink: #ff8fa3;
    --header-glass: rgba(26, 18, 20, 0.88);
    --chapter-glass: rgba(26, 18, 20, 0.92);

    color-scheme: dark;
  }
}

/* Base ------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  overflow-x: clip;
  background: var(--cream);
}

@media (pointer: fine) {
  html {
    overscroll-behavior: none;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font:
    1.0625rem/1.6 'Archivo',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--red-text);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

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

a,
button,
label,
summary {
  touch-action: manipulation;
}

/* Everything you can click shows the pointer, including its inner spans and
   decorative layers. Disabled controls and the draggable deck card set their
   own cursors below. */
a[href],
a[href] *,
button:not(:disabled),
button:not(:disabled) *,
summary,
summary *,
label[for],
select,
input[type='range'],
input[type='checkbox'],
input[type='radio'],
[role='button'],
[role='tab'] {
  cursor: pointer;
}

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

.site-footer :focus-visible,
.dark :focus-visible,
.closing :focus-visible {
  outline-color: var(--volt);
}

main:focus {
  outline: none;
}

::selection {
  background: var(--ink);
  color: var(--cream);
}

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

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--r-btn);
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 200ms var(--out);
}

.skip:focus-visible {
  transform: none;
  outline-color: var(--volt);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.num {
  font-variant-numeric: tabular-nums;
}

.dot {
  color: var(--red);
}

/* Shared icon sizing for <svg class="ico"><use href="#i-…"/></svg>. */
.ico {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

/* Buttons ---------------------------------------------------------------- */
/* The fill blooms out from --bx/--by (where the pointer entered); the button
   swells 3.5% toward you and leans toward the pointer (--mx/--my). The label
   stays exactly where it is; the arrow redraws itself. */

.button {
  --bx: 50%;
  --by: 50%;
  --mx: 0px;
  --my: 0px;
  --bloom: var(--red-deep);
  --lip: #a80026;
  --drop: rgba(245, 2, 60, 0.45);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  overflow: hidden;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--red);
  color: #fff;
  font-size: 1.1875rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -4px 0 var(--lip),
    0 12px 26px -14px var(--drop);
  transform: translate3d(var(--mx), var(--my), 0);
  transition:
    transform 340ms var(--out),
    box-shadow 340ms var(--out),
    color 220ms var(--ui);
}

.button::before {
  content: '';
  position: absolute;
  left: var(--bx);
  top: var(--by);
  z-index: -1;
  width: 260%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bloom);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 600ms var(--out);
}

/* A band of light that sweeps across on hover. */
.button::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.32) 48%,
    rgba(255, 255, 255, 0.08) 56%,
    transparent 70%
  );
  transform: translateX(-110%);
  transition: transform 0s;
}

.button .ico {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.button:active {
  transform: translate3d(var(--mx), calc(var(--my) + 2px), 0) scale(0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 var(--lip),
    0 4px 10px -6px var(--drop);
  transition-duration: 120ms;
}

.button-sm {
  min-height: 44px;
  padding: 0 18px;
  font-size: 1rem;
}

.button-lg {
  min-height: 64px;
  padding: 0 32px;
  font-size: 1.25rem;
}

.button-ghost {
  --bloom: var(--ink);
  --lip: var(--edge-strong);
  --drop: rgba(26, 18, 20, 0.3);
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2px var(--edge-strong),
    inset 0 -4px 0 var(--edge-strong),
    0 12px 24px -16px var(--drop);
}

.button-ink {
  --bloom: var(--red-deep);
  --lip: #000;
  --drop: rgba(26, 18, 20, 0.5);
  background: var(--ink);
  color: var(--cream);
}

.button-cream {
  --bloom: var(--ink-fixed);
  --lip: #e3cfae;
  --drop: rgba(26, 18, 20, 0.45);
  background: var(--on-dark);
  color: var(--ink-fixed);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    transform: translate3d(var(--mx), var(--my), 0) scale(1.04);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      inset 0 -4px 0 var(--lip),
      0 20px 36px -16px var(--drop);
  }

  .button:hover::before {
    transform: translate(-50%, -50%) scale(1);
  }

  .button:hover::after {
    transform: translateX(110%);
    transition: transform 900ms var(--out) 80ms;
  }

  .button:hover .ico {
    animation: arrow-loop 620ms var(--out);
  }

  .button-ghost:hover,
  .button-cream:hover {
    color: var(--cream);
  }

  .button-ghost:hover {
    box-shadow:
      inset 0 0 0 2px var(--ink),
      inset 0 -4px 0 #000,
      0 20px 36px -18px var(--drop);
  }
}

/* The arrow slips out to the right and comes back in from the left. */
@keyframes arrow-loop {
  0% {
    transform: translateX(0);
  }
  45% {
    transform: translateX(16px);
    opacity: 0;
  }
  46% {
    transform: translateX(-16px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Icons draw themselves on hover. The dash pattern exists only while the
   animation runs, so at rest every icon is solid, whatever its length. */
@keyframes draw {
  from {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
  }

  to {
    stroke-dasharray: 120;
    stroke-dashoffset: 0;
  }
}

/* Text links: always underlined (never color alone), and a Volt marker paints
   in behind them on hover from the side the pointer came from. */
.text-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* The quiet third way into the home hero, under its two buttons. */
.hero-more {
  display: inline-flex;
  margin-top: 18px;
}

.text-link .ico {
  width: 18px;
  height: 18px;
  color: var(--red-text);
  stroke-width: 2.2;
}

.text-link {
  transition:
    text-decoration-color 220ms var(--ui),
    text-decoration-thickness 220ms var(--ui);
}

@media (hover: hover) and (pointer: fine) {
  .text-link:hover {
    text-decoration-color: var(--ink);
    text-decoration-thickness: 3px;
  }

  .text-link:hover .ico {
    animation: draw 560ms var(--out);
  }
}

/* Links inside running text (prose, legal pages, FAQ answers, fine print):
   always underlined, and on hover a Volt marker paints in behind the words
   while the text turns ink. */
main :is(p, td, dd) a:not([class]),
.legal li a:not([class]),
.perks li a:not([class]) {
  border-radius: 3px;
  color: var(--red-text);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  background: linear-gradient(var(--volt), var(--volt)) no-repeat left center / 0% 100%;
  transition:
    background-size 420ms var(--fill),
    color 200ms var(--ui),
    text-decoration-color 200ms var(--ui);
}

@media (hover: hover) and (pointer: fine) {
  main :is(p, td, dd) a:not([class]):hover,
  .legal li a:not([class]):hover,
  .perks li a:not([class]):hover {
    background-size: 100% 100%;
    color: var(--ink-fixed);
    text-decoration-color: var(--ink-fixed);
  }
}

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-glass);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow 300ms var(--ui);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--edge);
}

.site-header .bar {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--wrap);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0
    max(var(--gutter), env(safe-area-inset-left));
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  font-size: 1.3125rem;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.wordmark .mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.mark rect {
  fill: var(--red);
}

.mark .wedge {
  fill: var(--on-dark);
}

/* The wordmark: Swipe and Swap in Swap Red, And in ink. */
.wordmark .text {
  color: var(--red);
}

.wordmark .and {
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
}

/* Nav links: the mark's two wedges. On hover (or keyboard focus) a red wedge
   is pressed in from the left, head first, and an ink one from the right,
   passing under the word like the logo's wedges. The current page keeps both
   drawn and turns red; hovering it nudges the wedges past each other. The
   word never moves. */
.nav-label {
  position: relative;
  display: inline-block;
}

.nav-label::before,
.nav-label::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  height: 0.5em;
  pointer-events: none;
  transition:
    clip-path 460ms var(--out),
    transform 360ms var(--out);
}

.nav-label::before {
  bottom: -0.3em;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M0 0.4V7.6L7 4.9H8V3.1H7Z' fill='%23F5023C'/%3E%3C/svg%3E")
      left center / 0.5em 0.5em no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M0 3.1L100 3.75V4.25L0 4.9Z' fill='%23F5023C'/%3E%3C/svg%3E")
      0.48em center / calc(100% - 0.48em) 0.5em no-repeat;
  clip-path: inset(0 100% 0 0);
}

.nav-label::after {
  bottom: -0.62em;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M8 0.4V7.6L1 4.9H0V3.1H1Z' fill='%231A1214'/%3E%3C/svg%3E")
      right center / 0.5em 0.5em no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M100 3.1L0 3.75V4.25L100 4.9Z' fill='%231A1214'/%3E%3C/svg%3E")
      left center / calc(100% - 0.48em) 0.5em no-repeat;
  clip-path: inset(0 0 0 100%);
  transition-delay: 70ms;
}

.nav-link[aria-current='page'] {
  color: var(--red-text);
}

.nav-link[aria-current='page'] .nav-label::before,
.nav-link[aria-current='page'] .nav-label::after,
.nav-link:focus-visible .nav-label::before,
.nav-link:focus-visible .nav-label::after {
  clip-path: inset(0 0 0 0);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover .nav-label::before,
  .nav-link:hover .nav-label::after {
    clip-path: inset(0 0 0 0);
  }

  .nav-link[aria-current='page']:hover .nav-label::before {
    transform: translateX(5px);
  }

  .nav-link[aria-current='page']:hover .nav-label::after {
    transform: translateX(-5px);
  }
}

.nav .button {
  margin-left: 8px;
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--r-btn);
  background: transparent;
  cursor: pointer;
}

.burger {
  display: grid;
  gap: 6px;
  width: 22px;
}

.burger i {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 300ms var(--out);
}

.menu-toggle[aria-expanded='true'] .burger i:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .burger i:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (max-width: 899px) {
  .menu-toggle {
    display: grid;
  }

  /* The open menu covers the whole screen below the header, so the page
     never shows through underneath it. */
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 8px max(var(--gutter), env(safe-area-inset-left))
      max(28px, env(safe-area-inset-bottom));
    background: var(--cream);
    overflow-y: auto;
    overscroll-behavior: contain;
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition:
      clip-path 460ms var(--fill),
      visibility 0s linear 460ms;
  }

  /* Lock scrolling on the root only: overflow on <body> would make it the
     header's scroll container, and the sticky header (with the close
     button) would scroll away when the menu opens part way down a page. */
  .menu-open {
    overflow: hidden;
  }

  .nav.is-open {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition:
      clip-path 460ms var(--fill),
      visibility 0s;
  }

  .nav-link {
    min-height: 60px;
    padding: 0 4px;
    border-bottom: 1px solid var(--edge);
    font-size: 1.5rem;
    font-weight: 800;
    font-stretch: 112%;
    letter-spacing: -0.03em;
  }

  .nav-label::before {
    bottom: -0.16em;
  }

  .nav-label::after {
    bottom: -0.4em;
  }

  .nav .button {
    min-height: 56px;
    margin: 28px 0 0;
    font-size: 1.125rem;
  }
}

/* Phones show the name, not the mark: it reads at a glance where the small
   tile doesn't. 22px keeps the red "And" at large-text size for contrast. */
@media (max-width: 520px) {
  .wordmark {
    font-size: 1.375rem;
  }

  .wordmark .mark {
    display: none;
  }
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  background-color: var(--slab);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image:
    radial-gradient(70% 90% at 0% 100%, rgba(245, 2, 60, 0.2), transparent 62%),
    radial-gradient(50% 60% at 100% 0%, rgba(245, 2, 60, 0.08), transparent 70%);
  color: var(--on-ink-soft);
  font-size: 1rem;
}

/* The footer is crowned by an arcade: solid ink arches rising out of it, so
   the frieze is the footer's own top edge, not a line floating above it. */
.foot-arcade {
  height: 46px;
  margin-top: clamp(80px, 12vw, 160px);
  margin-bottom: -1px;
  background: url('/img/orn/arcade.svg') repeat-x 0 100% / 56px 46px;
}

/* The footer's graphic: the mark's two wedges, blown up and passing each
   other. As the footer scrolls in, the top one slides right and the bottom
   one slides left, so the swap plays out behind the wordmark. */
.site-footer::before,
.site-footer::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: clamp(300px, 42vw, 620px);
  aspect-ratio: 2 / 1;
  background: no-repeat center / contain;
  pointer-events: none;
}

.site-footer::before {
  top: 10%;
  right: -3%;
  background-image: url('/img/orn/foot-wedge-top.svg');
  transform: translateX(calc(var(--drift, 0px) * 0.8 - 80px));
}

.site-footer::after {
  bottom: 2%;
  left: -3%;
  background-image: url('/img/orn/foot-wedge-bot.svg');
  transform: translateX(calc(80px - var(--drift, 0px) * 0.8));
}

.foot-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 64px max(var(--gutter), env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

.foot-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 36px clamp(36px, 7vw, 96px);
}

.foot-col h2 {
  margin-bottom: 14px;
  color: var(--on-dark);
  font-size: 1rem;
  font-weight: 750;
  font-stretch: 100%;
  letter-spacing: 0;
}

.foot-col ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--on-dark);
  text-decoration: underline;
  text-decoration-color: rgba(255, 246, 231, 0.4);
  text-underline-offset: 4px;
  transition: text-decoration-color 200ms var(--ui);
}

@media (hover: hover) and (pointer: fine) {
  .foot-col a:hover {
    text-decoration-color: var(--volt);
    text-decoration-thickness: 2px;
  }
}

.foot-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--on-dark);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 246, 231, 0.4);
  text-underline-offset: 4px;
  transition: text-decoration-color 200ms var(--ui);
}

.legal-line .company {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 246, 231, 0.4);
  text-underline-offset: 4px;
  transition:
    color 200ms var(--ui),
    text-decoration-color 200ms var(--ui);
}

@media (hover: hover) and (pointer: fine) {
  .foot-button:hover,
  .legal-line .company:hover {
    color: var(--on-dark);
    text-decoration-color: var(--volt);
    text-decoration-thickness: 2px;
  }
}

/* Cookie consent: a card pinned to the bottom corner, never over the hero's
   middle. Accept and Reject carry equal weight, as EU guidance asks. */
.consent {
  position: fixed;
  z-index: 80;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  max-width: 420px;
  /* Bottom left on wide screens: out of the way of the page's own actions,
     where small banners get the most interaction (Utz et al., CCS 2019). */
  margin-right: auto;
  padding: 22px 22px 18px;
  border-radius: var(--r-lg, 20px);
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--edge),
    0 24px 60px -20px rgba(26, 18, 20, 0.45);
  color: var(--ink);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 300ms var(--ui),
    transform 420ms var(--out);
}

.consent.is-open {
  opacity: 1;
  transform: none;
}

.consent-title {
  font-size: 1.1875rem;
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}

.consent-body {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Equal weight for both choices (EDPB and CNIL: refusing must be as easy and
   as visible as accepting). Allow sits on the right, where the confirming
   action usually is; No Thanks comes first. */
.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.consent-actions .button {
  justify-content: center;
}

.consent-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--red-text);
  font-size: 0.875rem;
  font-weight: 650;
  text-underline-offset: 3px;
}

/* App Store and Google Play: the official badges, unmodified, at 48px tall
   (the stores ask for at least 40). They only react once they are links. */
.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 28px;
}

.store-badge {
  display: inline-flex;
  border-radius: 10px;
}

.store-badge img {
  display: block;
  width: auto;
  height: 48px;
}

.store-badge.is-live {
  transition:
    transform 260ms var(--out),
    box-shadow 260ms var(--ui);
}

@media (hover: hover) and (pointer: fine) {
  .store-badge.is-live:hover {
    box-shadow: 0 14px 28px -14px rgba(26, 18, 20, 0.6);
    transform: scale(1.04);
  }
}

.store-badge.is-live:focus-visible {
  outline: 3px solid var(--red-text);
  outline-offset: 3px;
}

.closing .stores {
  margin-top: 22px;
}

.stores-stack {
  flex-direction: column;
  align-items: flex-start;
  margin-top: 4px;
}

.stores-stack .store-badge img {
  height: 42px;
}

/* Language: native pages, then Google Translate for every other language. */
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.langs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(255, 246, 231, 0.55);
  color: var(--on-dark);
  font-weight: 650;
  text-decoration: none;
}

.langs a[aria-current='true'] {
  background: var(--on-dark);
  color: var(--slab);
  box-shadow: none;
}

.translate {
  margin-top: 12px;
  max-width: 340px;
}

.translate summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--on-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 246, 231, 0.4);
  text-underline-offset: 4px;
  list-style: none;
  cursor: pointer;
}

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

.translate summary .ico {
  width: 18px;
  height: 18px;
  transition: transform 300ms var(--out);
}

.translate[open] summary .ico {
  transform: rotate(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .translate summary:hover {
    text-decoration-color: var(--volt);
  }
}

.translate ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 16px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.translate a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--on-dark);
  text-decoration: underline;
  text-decoration-color: rgba(255, 246, 231, 0.35);
  text-underline-offset: 4px;
}

.translate .fine {
  margin-top: 8px;
  font-size: 0.875rem;
}

/* The giant wordmark: not a link, so it doesn't react to the pointer. Its
   letters rise into place once when it scrolls into view. */
.giant {
  display: flex;
  justify-content: space-between;
  margin: clamp(48px, 8vw, 96px) 0 20px;
  color: var(--on-dark);
  font-size: clamp(2.25rem, 9.4vw, 8rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.05em;
  line-height: 0.8;
  white-space: nowrap;
  user-select: none;
}

.giant span {
  display: inline-block;
  color: var(--red);
}

.giant .and {
  color: var(--on-dark);
}

.js .giant span {
  opacity: 0;
  transform: translateY(40%);
  transition:
    opacity 600ms var(--ui),
    transform 900ms var(--out);
  transition-delay: calc(var(--i, 0) * 40ms);
}

.js .giant.in span {
  opacity: 1;
  transform: none;
}

.legal-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 246, 231, 0.2);
}

/* Section scaffolding ------------------------------------------------------ */

.section {
  padding-top: clamp(80px, 11vw, 150px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.h-section {
  /* A fixed cap, not ch: ch shrinks with the font, which would stop the
     no-lone-word fit in site.js from ever helping. */
  max-width: 820px;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.lede {
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
}

.page-hero {
  padding-top: clamp(48px, 8vw, 110px);
  padding-bottom: clamp(48px, 7vw, 96px);
}

.page-hero h1 {
  max-width: 960px;
  font-size: clamp(2.875rem, 7.4vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.93;
}

.page-hero .lede {
  margin-top: 26px;
}

.page-hero .lede + .actions {
  margin-top: 32px;
}

/* Inner page heroes: each page's title stands beside a figure of its own,
   drawn from the homepage's vocabulary. How It Works climbs a ziggurat of
   its five steps; Safety opens a glazed gate; About presses the mark into
   clay; the 404 breaks that tablet in two. On phones the figure follows the
   title, smaller, and the mosaic behind it (a large drawing) stays off. */
.page-hero,
.not-found {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .page-hero,
  .not-found {
    grid-template-columns: minmax(0, 1fr) clamp(280px, 28vw, 400px);
    column-gap: clamp(32px, 4vw, 64px);
    align-items: center;
  }
}

/* A <picture> that only swaps in a dark-mode source: no box of its own, so
   the image inside lays out exactly as it would on its own. */
.scheme-pic {
  display: contents;
}

.page-hero .mosaic,
.mosaic-panel .mosaic {
  display: none;
}

/* How It Works: five terraces on a mosaic floor, the first step at the
   base, with the shrine on top haloed by the mosaic's sun. */
.hero-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  height: 300px;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: url('/img/orn/tesserae.svg') 0 0 / 168px 168px;
  box-shadow:
    inset 0 0 0 1px var(--edge),
    0 40px 80px -60px rgba(26, 18, 20, 0.55);
}

.ziggurat {
  --step: 40px;
  display: grid;
  justify-items: center;
  filter: drop-shadow(0 18px 22px rgba(26, 18, 20, 0.3));
}

.ziggurat .tier {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  height: var(--step);
  padding-top: 7px;
  background: var(--slab) url('/img/orn/arches-cream.svg') repeat-x 0 3px / 20px 10px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.35);
  color: var(--on-dark);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ziggurat .tier b {
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.ziggurat .tier:nth-child(2) {
  width: 38%;
}

.ziggurat .tier:nth-child(3) {
  width: 52%;
}

.ziggurat .tier:nth-child(4) {
  width: 66%;
}

.ziggurat .tier:nth-child(5) {
  width: 80%;
}

.ziggurat .tier:nth-child(6) {
  width: 94%;
}

/* The shrine: glazed cream, with a red doorway, set against the sun. */
.ziggurat .shrine {
  position: relative;
  width: 18%;
  height: calc(var(--step) * 1.1);
  border-radius: 6px 6px 0 0;
  background: var(--on-dark);
  box-shadow:
    inset 0 -5px 0 rgba(120, 70, 40, 0.16),
    0 0 0 2px var(--slab);
}

.ziggurat .shrine::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 34%;
  height: 62%;
  border-radius: 50% 50% 0 0 / 80% 80% 0 0;
  background: var(--red);
  translate: -50% 0;
}

/* Trade pages: a clay tablet that records one trade, give above and get
   below, pressed slightly askew onto the tesserae. */
.trade-panel {
  align-items: center;
  justify-items: center;
  padding: 24px;
}

.trade-tablet {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(88%, 300px);
  padding: 26px 24px 22px;
  rotate: -3deg;
  text-align: center;
  filter: drop-shadow(0 24px 24px rgba(26, 18, 20, 0.25));
}

.tt-side {
  display: grid;
  gap: 2px;
}

.tt-label {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 700;
}

.tt-item {
  font-size: 1.125rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tt-value {
  color: var(--red-text);
  font-weight: 800;
}

.tt-swap {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 8px 16px -6px rgba(245, 2, 60, 0.6);
  color: #fff6e7;
}

.tt-swap .ico {
  width: 20px;
  height: 20px;
  rotate: 90deg;
}

.tt-cash {
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.8125rem;
  font-weight: 800;
}

@media (min-width: 960px) {
  .trade-tablet {
    width: min(78%, 300px);
    padding: 34px 28px 28px;
  }

  .tt-item {
    font-size: 1.3125rem;
  }
}

/* How trading a category works: numbered steps, then the fees. */
.trade-steps {
  display: grid;
  gap: 18px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.trade-steps li {
  position: relative;
  padding-inline-start: 52px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
  counter-increment: step;
}

.trade-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: 0.05em;
  color: var(--red-text);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.prose > p {
  color: var(--ink-soft);
}

.prose a:not([class]),
.trade-more a:not([class]) {
  color: var(--red-text);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 200ms var(--ui);
}

.prose a:not([class]):hover,
.trade-more a:not([class]):hover {
  color: var(--ink);
}

/* Checklists written on the tablets. */
.tablet-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.tablet-list li {
  position: relative;
  padding-inline-start: 22px;
  line-height: 1.5;
}

.tablet-list li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  background: var(--red);
  -webkit-mask: url('/img/orn/star.svg') center / contain no-repeat;
  mask: url('/img/orn/star.svg') center / contain no-repeat;
}

.tablet-light .tablet-list li {
  color: var(--ink-soft);
}

.tablet-dark .tablet-list li {
  color: var(--on-ink-soft);
}

.trade-more {
  max-width: 68ch;
  margin-top: 32px;
  color: var(--ink-soft);
}

/* Safety: a glazed gate after the Ishtar Gate. On wide screens the mosaic's
   sun fills its opening; on phones a glazed rosette does. */
.gate {
  position: relative;
  isolation: isolate;
  width: min(100%, 240px);
  aspect-ratio: 4 / 5;
  filter: drop-shadow(0 30px 28px rgba(26, 18, 20, 0.22));
}

.gate::before,
.gate::after {
  content: '';
  position: absolute;
  inset: 0;
}

.gate::before {
  z-index: -2;
  background:
    url('/img/orn/rosette-red.svg') 50% 64% / 30% no-repeat,
    url('/img/orn/tesserae.svg') 0 0 / 120px 120px;
  -webkit-mask: url('/img/orn/gate-open.svg') center / 100% 100% no-repeat;
  mask: url('/img/orn/gate-open.svg') center / 100% 100% no-repeat;
}

.gate::after {
  background: url('/img/orn/gate.svg') center / 100% 100% no-repeat;
}

/* About: the mark pressed into a tablet of light clay. */
.clay-face {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 6;
}

.clay-face .tablet-mark {
  width: 64%;
  height: auto;
}

.mark-tablet {
  width: min(100%, 200px);
  rotate: -3deg;
}

/* The 404: the same tablet, broken across, its two wedges apart. */
.broken-tablet {
  display: grid;
  width: min(100%, 200px);
  filter: drop-shadow(0 30px 26px rgba(26, 18, 20, 0.22));
}

.broken-tablet .shard {
  grid-area: 1 / 1;
}

.broken-tablet .clay-face {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset -10px -12px 26px rgba(120, 70, 40, 0.14),
    inset 0 0 0 1px rgba(120, 80, 50, 0.14);
}

.shard-a {
  clip-path: polygon(
    0 0,
    100% 0,
    100% 47%,
    86% 53%,
    71% 46%,
    56% 55%,
    42% 48%,
    27% 56%,
    13% 49%,
    0 54%
  );
  translate: -10px -14px;
  rotate: -5deg;
}

.shard-b {
  clip-path: polygon(
    0 54%,
    13% 49%,
    27% 56%,
    42% 48%,
    56% 55%,
    71% 46%,
    86% 53%,
    100% 47%,
    100% 100%,
    0 100%
  );
  translate: 12px 16px;
  rotate: 4deg;
}

@media (min-width: 960px) {
  .hero-panel {
    height: auto;
    aspect-ratio: 5 / 6;
  }

  .hero-panel .mosaic,
  .gate .mosaic {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }

  .ziggurat {
    --step: 46px;
  }

  .ziggurat .tier {
    font-size: 1.0625rem;
  }

  .gate {
    width: 100%;
    max-width: 400px;
    justify-self: center;
  }

  .gate .mosaic {
    object-position: 50% 64%;
    -webkit-mask: url('/img/orn/gate-open.svg') center / 100% 100% no-repeat;
    mask: url('/img/orn/gate-open.svg') center / 100% 100% no-repeat;
  }

  .mark-tablet,
  .broken-tablet {
    width: min(88%, 340px);
    justify-self: center;
  }
}

/* Home: hero ------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  padding-top: clamp(28px, 5vw, 56px);
  padding-bottom: clamp(32px, 5vw, 64px);
}

.hero h1 {
  font-size: clamp(2.625rem, 10vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.hero h1 .w {
  display: inline-block;
}

/* Titles end in Shamash's eight-pointed star instead of a full stop. The period
   stays in the text for anything that reads it. */
h1 .dot {
  display: inline-block;
  width: 0.26em;
  height: 0.26em;
  margin-left: 0.05em;
  overflow: hidden;
  background: var(--red);
  color: transparent;
  text-indent: 1em;
  vertical-align: baseline;
  -webkit-mask: url('/img/orn/star.svg') center / contain no-repeat;
  mask: url('/img/orn/star.svg') center / contain no-repeat;
}

.hero .lede {
  margin: 30px 0 40px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

@media (min-width: 960px) {
  /* The copy sits a little above centre, with a clear gutter before the
     phone so the headline never runs into it. */
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    column-gap: clamp(48px, 6vw, 96px);
    min-height: min(720px, calc(100svh - var(--header-h)));
    padding-top: clamp(32px, 4vw, 64px);
    padding-bottom: clamp(48px, 6vw, 96px);
  }

  .hero h1 {
    font-size: clamp(2.625rem, 3.9vw, 3.625rem);
    white-space: nowrap;
  }

  .hero .lede {
    margin: 36px 0 48px;
  }
}

/* The 3D phone stage --------------------------------------------------------- */
/* phone3d.js renders a three.js phone into a canvas here. Until it does (or
   without WebGL or JavaScript), a poster rendering of the same phone shows. */

.stage {
  position: relative;
  height: clamp(540px, 60vw, 780px);
}

.stage canvas,
.spin-stage canvas,
.phone-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.phone-poster {
  object-fit: contain;
  transition: opacity 700ms var(--ui);
}

.is-3d .phone-poster {
  opacity: 0;
}

/* The rosette the phone stands in front of: a glazed-brick rosette drawn in
   line, with an offset second line, turning very slowly. Desktop only;
   phones keep the compact hero. */
.stage .rosette-hero {
  display: none;
}

@media (min-width: 960px) {
  .stage .rosette-hero {
    display: block;
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: min(720px, 118%);
    aspect-ratio: 1;
    overflow: visible;
    translate: -50% -50%;
    rotate: 45deg;
    animation: rosette-turn 180s linear infinite;
  }

  .stage {
    isolation: isolate;
  }
}

@keyframes rosette-turn {
  from {
    rotate: 45deg;
  }

  to {
    rotate: 405deg;
  }
}

.stage .floor {
  position: absolute;
  bottom: 4%;
  left: 50%;
  width: 46%;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(26, 18, 20, 0.22), transparent);
  transform: translateX(-50%);
}

/* Textures: each kind of surface gets its own, never one pattern everywhere.
   - .tex-tesserae  a plain field of mosaic tiles (some visuals)
   - .tex-clay      a light clay tablet, pressed by hand (other visuals)
   - dark panels: soft Swap Red light from one corner
   - the footer: the mark's two wedges, oversized, sliding past each other
   - the red closing panel alone carries the glazed rosettes
   - the 3D phone's stage is a mosaic; the cash card rests on a dark tablet */
.tex-tesserae {
  background: url('/img/orn/tesserae.svg') 0 0 / 168px 168px;
}

/* Light clay: a warm ground with fine grain, a lit upper edge, and corners
   that are round the way a hand presses them, never quite even. */
.tex-clay,
.chapter .visual.tex-clay,
.form-card.tex-clay {
  background-color: var(--clay);
  background-image:
    url('/img/orn/grain-ink.svg'),
    radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, 0.45), transparent 60%),
    linear-gradient(165deg, transparent 55%, rgba(120, 70, 40, 0.08));
  background-size:
    220px 220px,
    auto,
    auto;
  border-radius: 38px 30px 42px 34px / 34px 40px 30px 44px;
}

/* Category band: a tilted ink band whose words slide with the scroll. */
.band {
  position: relative;
  width: 112vw;
  margin-top: clamp(24px, 4vw, 48px);
  margin-left: -6vw;
  padding: 44px 0;
  overflow: hidden;
  background: var(--slab);
  transform: rotate(-2deg);
}

/* The band is a glazed-tile frieze: a run of small arches borders it top
   and bottom, inside the ink. */
.band::before,
.band::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: url('/img/orn/arches-cream.svg') repeat-x 0 0 / 28px 14px;
  pointer-events: none;
}

.band::before {
  top: 12px;
}

.band::after {
  bottom: 12px;
  transform: scaleY(-1);
}

.band-track {
  display: flex;
  gap: 40px;
  width: max-content;
  color: var(--on-dark);
  font-size: clamp(1.75rem, 4.6vw, 3.75rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.04em;
  line-height: 1;
  /* A trailing gap the same as the others, so half the track is exactly one
     copy of the list and the loop has no seam. */
  padding-right: 40px;
  white-space: nowrap;
  animation: band-run 38s linear infinite;
  will-change: transform;
}

@keyframes band-run {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.band {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.band:focus-visible {
  outline: 3px solid var(--volt);
  outline-offset: 4px;
}

.band.is-paused .band-track,
.band.is-offscreen .band-track {
  animation-play-state: paused;
}

.band-track span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
}

/* Rosettes between the words. */
.band-track span::after {
  content: '';
  width: 0.62em;
  height: 0.62em;
  background: var(--red);
  -webkit-mask: url('/img/orn/rosette.svg') center / contain no-repeat;
  mask: url('/img/orn/rosette.svg') center / contain no-repeat;
}

/* Home: the spin story ----------------------------------------------------- */
/* The phone stays in view while three steps scroll past; between steps it
   spins a full turn and the screen on its far side becomes the next step.
   The scroll drives it, so it stops whenever you stop. */

.spin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

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

.spin-step {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 40px 0;
  border-top: 1px solid var(--edge);
}

.spin-step .n,
.step-n {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--red-text);
  font-size: 0.9375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Step labels start with a small stepped terrace. */
.spin-step .n::before,
.step-n::before {
  content: '';
  flex: none;
  width: 1.25em;
  height: 0.875em;
  background: var(--red);
  -webkit-mask: url('/img/orn/terrace.svg') center / contain no-repeat;
  mask: url('/img/orn/terrace.svg') center / contain no-repeat;
}

.spin-step h3 {
  font-size: clamp(2.25rem, 4.4vw, 3.625rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.spin-step p {
  max-width: 34ch;
  color: var(--ink-2);
  font-size: 1.1875rem;
}

.spin-step .mobile-visual {
  margin-top: 12px;
}

.spin-stage {
  display: none;
}

@media (min-width: 960px) {
  .spin-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 64px;
  }

  .spin-step {
    min-height: 80vh;
  }

  .spin-step:first-child {
    border-top: 0;
  }

  .spin-step .mobile-visual {
    display: none;
  }

  .spin-stage {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    display: grid;
    grid-column: 2;
    grid-row: 1;
    height: calc(100svh - var(--header-h) - 32px);
    min-height: 620px;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--r-xl);
    background: var(--cream);
  }

  /* The stage is a floor mosaic: a Shamash sun laid in tesserae inside a
     round medallion, on a plain tiled field. Until the 3D phone renders (or
     where it never does), a still of the phone stands on it. */
  .spin-stage .mosaic {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }

  .spin-stage .mock-phone {
    width: min(60%, 350px);
    height: auto;
    filter: drop-shadow(0 30px 40px rgba(26, 18, 20, 0.22));
  }

  .spin-stage:has(canvas) .mock-phone {
    display: none;
  }

  .spin-steps {
    grid-column: 1;
    grid-row: 1;
  }

  /* The step beside the phone reads in full ink with a red marker; the others
     step back to soft ink, which still holds 7.6:1 on cream. */
  .spin-step {
    position: relative;
  }

  .spin-step::before {
    content: '';
    position: absolute;
    inset-inline-start: -24px;
    top: 50%;
    width: 6px;
    height: 0;
    border-radius: 3px;
    background: var(--red);
    transform: translateY(-50%);
    transition: height 500ms var(--out);
  }

  .js .spin-step h3 {
    color: var(--ink-soft);
    transition: color 400ms var(--ui);
  }

  .js .spin-step.is-active h3 {
    color: var(--ink);
  }

  .js .spin-step.is-active::before {
    height: 120px;
  }
}

/* Status badges ------------------------------------------------------------- */
/* Flat, rounded, and filled: Traded and Confirmed in green, Trade Match in
   Volt. They pop in once when they appear. */

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--go-fill);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1;
}

.stamp::before {
  content: '';
  width: 12px;
  height: 7px;
  margin-top: -3px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg);
}

.stamp.volt {
  background: var(--volt);
  color: var(--ink-fixed);
}

.stamp.volt::before {
  display: none;
}

.js .stamp-land {
  opacity: 0;
  transform: scale(0.6);
}

.js .in .stamp-land,
.js .is-on .stamp-land,
.js .stamp-land.in {
  animation: pop 520ms var(--out) 240ms forwards;
}

@keyframes pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Swap card ---------------------------------------------------------------- */
/* An offer, the way a modern exchange shows it: what you give on paper, what
   you get on ink, and a round red swap button sitting on the seam. */

.swap-card {
  position: relative;
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
}

.swap-card .leg {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
}

.swap-card .give {
  background: var(--paper);
  box-shadow:
    inset 0 0 0 1px var(--edge),
    0 2px 4px rgba(26, 18, 20, 0.06),
    0 28px 56px -34px rgba(26, 18, 20, 0.5);
}

.swap-card .get {
  padding-top: 26px;
  background: var(--slab);
  color: var(--on-dark);
  box-shadow:
    0 2px 4px rgba(26, 18, 20, 0.12),
    0 34px 60px -30px rgba(26, 18, 20, 0.6);
}

.swap-card .label {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 650;
}

.swap-card .get .label,
.swap-card .get .meta {
  color: var(--on-ink-soft);
}

.swap-card .item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swap-card .thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--cream-raised);
}

.swap-card .get .thumb {
  background: var(--slab-2);
  color: var(--on-dark);
}

.swap-card .thumb {
  overflow: hidden;
}

.swap-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swap-card .thumb .ico {
  width: 28px;
  height: 28px;
  stroke-width: 1.75;
}

.swap-card strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 800;
}

.swap-card .meta {
  display: block;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.swap-card .value {
  margin-left: auto;
  font-size: 1.375rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.swap-card .cash-pill {
  justify-self: start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cream-raised);
  color: var(--cash);
  font-size: 0.875rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.swap-card .swap-badge {
  position: absolute;
  left: 50%;
  top: var(--seam, 50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  box-shadow:
    0 0 0 5px var(--cream),
    0 10px 22px -6px rgba(245, 2, 60, 0.6);
  color: #fff;
  transform: translate(-50%, -50%) rotate(90deg);
}

.swap-card .swap-badge .ico {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.chapter .visual .swap-card .swap-badge {
  box-shadow: 0 0 0 5px var(--paper);
}

/* The small one inside the phone's screen. */
.swap-card.mini {
  gap: 6px;
  width: 100%;
}

.swap-card.mini .leg {
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
}

.swap-card.mini .get {
  padding-top: 18px;
}

.swap-card.mini .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 800;
}

.swap-card.mini .cash-pill {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.swap-card.mini .swap-badge {
  width: 36px;
  height: 36px;
  box-shadow: 0 0 0 4px var(--cream);
}

.swap-card.mini .swap-badge .ico {
  width: 18px;
  height: 18px;
}

/* Panels: plain modern cards for everything else (a review, a delivery check,
   the hold calculator). A solid hairline divides them. */

.sheet {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow:
    inset 0 0 0 1px var(--edge),
    0 2px 4px rgba(26, 18, 20, 0.06),
    0 36px 70px -40px rgba(26, 18, 20, 0.55);
  color: var(--ink);
}

.sheet .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet .label {
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 650;
}

.sheet .item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.sheet .thumb {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--cream-raised);
}

.sheet .thumb .ico {
  width: 28px;
  height: 28px;
  stroke-width: 1.75;
}

.sheet strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 800;
}

.sheet .meta {
  display: block;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.sheet .value {
  margin-left: auto;
  font-size: 1.375rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.sheet .stamp {
  position: absolute;
  right: 20px;
  bottom: 18px;
}

.sheet:has(> .stamp) {
  padding-bottom: 76px;
}

.rule {
  height: 1px;
  margin: 18px 0;
  border: 0;
  background: var(--edge);
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-list .ico {
  width: 20px;
  height: 20px;
  color: var(--go);
  stroke-width: 2.2;
}

/* Home: try the deck ------------------------------------------------------- */

.try {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .try {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 80px;
  }
}

.deck {
  position: relative;
  justify-self: center;
  width: min(380px, 100%);
}

.deck-stack {
  position: relative;
  height: 480px;
  perspective: 1300px;
}

.card {
  --tx: 0px;
  --ty: 0px;
  --rot: 0deg;
  --rx: 0deg;
  --ry: 0deg;
  --s: 1;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--edge),
    0 34px 60px -38px rgba(26, 18, 20, 0.55);
  transform: translate3d(var(--tx), var(--ty), 0) rotate(var(--rot)) rotateX(var(--rx))
    rotateY(var(--ry)) scale(var(--s));
  transition: transform 600ms var(--out);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: grab;
}

.card:focus-visible {
  outline-offset: 4px;
  border-radius: var(--r-xl);
}

.card.is-dragging {
  cursor: grabbing;
  transition: none;
}

.card[data-depth='1'] {
  --s: 0.95;
  --ty: 18px;
  pointer-events: none;
}

.card[data-depth='2'] {
  --s: 0.9;
  --ty: 36px;
  pointer-events: none;
}

.card[data-depth='3'] {
  --s: 0.85;
  --ty: 36px;
  opacity: 0;
  pointer-events: none;
}

.card.is-gone {
  pointer-events: none;
  opacity: 0;
  transition:
    transform 520ms var(--out),
    opacity 520ms var(--out);
}

.card-art {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--cream-raised);
}

.card-art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card-art > .ico {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 40%;
  height: auto;
  stroke-width: 1.1;
}

/* Glare that follows the pointer on the top card (you can drag it). */
.card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 0%),
    rgba(255, 255, 255, 0.6),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 300ms var(--ui);
}

.card.is-tilting .card-art::after {
  opacity: 1;
}

/* Stickers: flat filled pills with a soft shadow. No borders, no tilt. */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 11px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 22px -10px rgba(26, 18, 20, 0.55);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.sticker.volt {
  background: var(--volt);
  color: var(--ink-fixed);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 10px 24px -10px rgba(90, 110, 0, 0.7);
}

.sticker .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.card .tag {
  position: absolute;
  top: 16px;
  left: 16px;
}

.card-body {
  padding: 18px 20px 20px;
}

.card-meta,
.card-who {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 6px;
}

.card-title h3 {
  min-width: 0;
  overflow: hidden;
  font-size: 1.3125rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title .price {
  color: var(--red-text);
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* Drag feedback: the card glows in the colour of the choice, a wash rises
   from the side it's heading to, and a solid chip with the icon grows in.
   Everything scales with how far you've dragged (--like / --pass, 0 to 1). */
.card {
  --like: 0;
  --pass: 0;
}

.card[data-depth='0'],
.card:not([data-depth]) {
  box-shadow:
    0 0 0 1px var(--edge),
    0 34px 60px -38px rgba(26, 18, 20, 0.55),
    0 0 0 calc(var(--like) * 3px) rgba(245, 2, 60, 0.85),
    0 28px 70px -24px rgba(245, 2, 60, calc(var(--like) * 0.75)),
    0 0 0 calc(var(--pass) * 3px) rgba(26, 18, 20, 0.85),
    0 28px 70px -24px rgba(26, 18, 20, calc(var(--pass) * 0.6));
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(255deg, rgba(245, 2, 60, calc(var(--like) * 0.42)), transparent 55%),
    linear-gradient(105deg, rgba(26, 18, 20, calc(var(--pass) * 0.5)), transparent 55%);
  pointer-events: none;
}

.card .verdict {
  position: absolute;
  top: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 12px;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 850;
  pointer-events: none;
}

.card .verdict .ico {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 50%;
  stroke-width: 2.4;
}

.card .v-like {
  right: 22px;
  background: var(--red);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 14px 30px -10px rgba(245, 2, 60, 0.85),
    0 0 0 calc(var(--like) * 8px) rgba(245, 2, 60, 0.2);
  opacity: var(--like);
  transform: scale(calc(0.6 + var(--like) * 0.4));
  transform-origin: right center;
}

.card .v-like .ico {
  background: #fff;
  color: var(--red);
  fill: var(--red);
  stroke: none;
}

.card .v-pass {
  right: 22px;
  background: var(--slab);
  color: var(--on-dark);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 231, 0.2),
    0 14px 30px -10px rgba(26, 18, 20, 0.8),
    0 0 0 calc(var(--pass) * 8px) rgba(26, 18, 20, 0.16);
  opacity: var(--pass);
  transform: scale(calc(0.6 + var(--pass) * 0.4));
  transform-origin: right center;
}

.card .v-pass .ico {
  background: var(--on-dark);
  color: var(--ink-fixed);
}

.deck-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 56px;
}

.round {
  --bx: 50%;
  --by: 50%;
  --bloom: var(--ink);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--edge-strong);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 300ms var(--out),
    color 200ms var(--ui);
}

.round::before {
  content: '';
  position: absolute;
  left: var(--bx);
  top: var(--by);
  z-index: -1;
  width: 260%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bloom);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 560ms var(--out);
}

.round .ico {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}

.round.like {
  --bloom: var(--red-deep);
  width: 76px;
  height: 76px;
  background: var(--red);
  box-shadow: 0 16px 30px -14px rgba(245, 2, 60, 0.7);
  color: #fff;
}

.round.like .ico {
  fill: currentColor;
  stroke: none;
}

.round:active {
  transform: scale(0.92);
  transition-duration: 120ms;
}

@media (hover: hover) and (pointer: fine) {
  .round:hover {
    transform: scale(1.06);
    color: var(--cream);
  }

  .round:hover::before {
    transform: translate(-50%, -50%) scale(1);
  }
}

.deck-hint {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-align: center;
}

.match {
  position: absolute;
  inset: -10px;
  z-index: 5;
  display: grid;
  place-items: center;
  border-radius: calc(var(--r-xl) + 10px);
  background: rgba(26, 18, 20, 0.95);
  color: var(--on-dark);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 360ms var(--ui),
    visibility 0s linear 360ms;
}

.match.is-on {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 360ms var(--ui),
    visibility 0s;
}

.match-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 24px;
}

.match .stamp {
  padding: 14px 26px;
  font-size: 2.125rem;
  font-stretch: 112%;
  letter-spacing: -0.03em;
}

.match p {
  max-width: 24ch;
  color: var(--on-ink-soft);
}

/* Home: the value balance, on ink -------------------------------------------- */

.dark {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0;
  border-radius: var(--r-xl);
  background-color: var(--slab);
  background-image:
    radial-gradient(55% 70% at 100% 0%, rgba(245, 2, 60, 0.22), transparent 65%),
    radial-gradient(45% 60% at 0% 100%, rgba(255, 246, 231, 0.06), transparent 70%);
  color: var(--on-dark);
  box-shadow: 0 50px 90px -60px rgba(26, 18, 20, 0.7);
}

/* A full-bleed band: the dark panel runs edge to edge to break up the page,
   while its content stays on the page grid. */
.dark-full {
  padding: clamp(72px, 10vw, 140px) 0;
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 231, 0.06),
    0 -30px 60px -50px rgba(26, 18, 20, 0.5),
    0 30px 60px -50px rgba(26, 18, 20, 0.5);
}

.dark-full .balance {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-left));
}

.dark h2,
.dark h3 {
  color: var(--on-dark);
}

.dark .lede {
  color: var(--on-ink-soft);
}

.balance {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 64px);
}

@media (min-width: 960px) {
  .balance {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 72px;
  }
}

.balance .lede {
  margin-top: 18px;
}

.modes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 30px;
  padding: 4px;
  border-radius: 999px;
  background: var(--slab-2);
  box-shadow: inset 0 0 0 1px var(--slab-line);
}

.mode {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--on-dark);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 220ms var(--ui),
    color 220ms var(--ui);
}

.mode[aria-pressed='true'] {
  background: var(--on-dark);
  color: var(--ink-fixed);
}

/* The offer modes fit one row on phones: three equal segments. */
@media (max-width: 520px) {
  .modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .mode {
    padding: 0 4px;
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
  }
}

/* The narrowest phones let a label take two lines instead of overflowing. */
@media (max-width: 359px) {
  .mode {
    white-space: normal;
    line-height: 1.15;
  }
}

@media (hover: hover) and (pointer: fine) {
  .mode:not([aria-pressed='true']):hover {
    background: var(--slab-hover);
  }
}

.scale {
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-xl);
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.55);
}

/* The cash card rests on a clay tablet that tallies the trade in Babylonian
   numerals: one object, part of the layout, sharing the card's grid cell. */
.balance > div:first-child {
  grid-row: 1;
}

.balance .scale,
.plinth {
  grid-row: 2;
  grid-column: 1;
}

.balance .scale {
  position: relative;
  z-index: 1;
}

.plinth {
  position: relative;
  align-self: stretch;
  translate: -6px 44px;
  rotate: -1.8deg;
  scale: 0.98;
  border-radius: 38px 30px 42px 34px / 34px 40px 30px 44px;
  background-color: var(--clay-dark);
  background-image:
    url('/img/orn/grain.svg'), url('/img/orn/mottle.svg'),
    linear-gradient(160deg, rgba(255, 246, 231, 0.035), transparent 45%, rgba(0, 0, 0, 0.18));
  background-size:
    220px 220px,
    600px 600px,
    auto;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 246, 231, 0.08),
    inset 1.5px 0 0 rgba(255, 246, 231, 0.04),
    inset 5px 6px 14px rgba(255, 246, 231, 0.035),
    inset -8px -10px 22px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 40px 70px -40px rgba(0, 0, 0, 0.8);
}

.plinth-tally {
  position: absolute;
  left: 30px;
  bottom: 13px;
  width: auto;
  height: 19px;
}

@media (max-width: 959px) {
  .dark-full:has(.plinth) {
    padding-bottom: calc(clamp(72px, 10vw, 140px) + 36px);
  }
}

@media (min-width: 960px) {
  .balance .scale,
  .plinth {
    grid-row: 1;
    grid-column: 2;
  }

  .plinth {
    translate: -34px 46px;
    rotate: -2.6deg;
    scale: 1.03;
  }

  /* Right to left, the tablet peeks out on the other side. */
  .plinth:dir(rtl) {
    translate: 34px 46px;
    rotate: 2.6deg;
  }

  .plinth-tally {
    left: 42px;
    bottom: 15px;
    height: 24px;
  }
}

.scale-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.side {
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--edge);
  transition:
    opacity 300ms var(--ui),
    box-shadow 300ms var(--ui);
}

.side.is-muted {
  opacity: 0.4;
}

.side.is-even {
  box-shadow: inset 0 0 0 3px var(--go);
}

.side .label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 650;
}

.side .thumb {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
  border-radius: var(--r-sm);
  background: var(--cream-raised);
}

.side .thumb {
  overflow: hidden;
}

.side .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side .thumb .ico {
  width: 34px;
  height: 34px;
  stroke-width: 1.75;
}

.side strong {
  display: block;
  font-size: 1.0625rem;
  line-height: 1.25;
}

.side .value {
  display: block;
  margin-top: 6px;
  font-size: 1.75rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.side .plus {
  display: block;
  min-height: 22px;
  color: var(--cash);
  font-size: 0.9375rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.beam {
  position: relative;
  height: 10px;
  margin: 26px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--cream-deep);
}

.beam-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--red);
  transform: scaleX(var(--fill, 0.4));
  transform-origin: left;
  transition: transform 560ms var(--out);
}

.beam-mid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--ink);
}

.verdict {
  min-height: 32px;
  font-weight: 800;
}

.verdict .even {
  color: var(--go);
}

.verdict .off {
  color: var(--cash);
}

.cash-control {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.cash-control label {
  display: flex;
  justify-content: space-between;
  font-weight: 750;
}

.cash-control output {
  color: var(--cash);
  font-variant-numeric: tabular-nums;
}

input[type='range'] {
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type='range']:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input[type='range']::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--edge-strong);
}

input[type='range']::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--edge-strong);
}

input[type='range']::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  margin-top: -12px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
  -webkit-appearance: none;
  appearance: none;
  transition: transform 120ms var(--out);
}

input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}

input[type='range']:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

/* Ledger rows -------------------------------------------------------------- */
/* As links (home), an ink fill blooms out from the pointer across the row.
   As plain rows (Safety, About) they don't react at all. */

.ledger {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--edge);
}

.ledger-row {
  border-bottom: 1px solid var(--edge);
}

.ledger-row > a,
.ledger-row > div {
  --bx: 50%;
  --by: 50%;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 40px;
  align-items: center;
  overflow: hidden;
  padding: clamp(26px, 3.4vw, 42px) clamp(4px, 1vw, 16px);
  color: inherit;
  text-decoration: none;
}

.ledger-row h3 {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: clamp(1.75rem, 3.8vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  transition: color 300ms var(--ui);
}

/* A rosette leads each row. */
.ledger-row h3::before {
  content: '';
  flex: none;
  width: 0.9em;
  height: 0.9em;
  background: var(--red);
  -webkit-mask: url('/img/orn/rosette.svg') center / contain no-repeat;
  mask: url('/img/orn/rosette.svg') center / contain no-repeat;
}

.ledger-row p {
  max-width: 42ch;
  color: var(--ink-soft);
  transition: color 300ms var(--ui);
}

.ledger-row .go {
  display: none;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--edge-strong);
  color: var(--ink);
  transition:
    background-color 300ms var(--ui),
    box-shadow 300ms var(--ui),
    color 300ms var(--ui);
}

.ledger-row > div .go {
  box-shadow: none;
  background: var(--cream-raised);
  color: var(--red-text);
}

.ledger-row .go .ico {
}

.ledger-row > a::before {
  content: '';
  position: absolute;
  left: var(--bx);
  top: var(--by);
  z-index: -1;
  width: 240vw;
  max-width: 3000px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--slab);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 800ms var(--out);
}

.ledger-row > a h3 {
  text-decoration: underline;
  text-decoration-color: var(--edge-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

@media (min-width: 800px) {
  .ledger-row > a,
  .ledger-row > div {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  }

  .ledger-row .go {
    display: grid;
  }
}

@media (hover: hover) and (pointer: fine) {
  .ledger-row > a:hover::before {
    transform: translate(-50%, -50%) scale(1);
  }

  .ledger-row > a:hover h3 {
    color: var(--on-dark);
    text-decoration-color: var(--volt);
  }

  .ledger-row > a:hover p {
    color: var(--on-ink-soft);
  }

  .ledger-row > a:hover .go {
    background: var(--volt);
    box-shadow: none;
    color: var(--ink-fixed);
  }

  .ledger-row > a:hover .go .ico {
    animation: draw 560ms var(--out);
  }
}

.ledger-row > a:focus-visible {
  outline-offset: -3px;
}

/* The Trade Ring ------------------------------------------------------------ */

.ring-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .ring-wrap {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 80px;
  }
}

.ring-copy h2 + p {
  margin-top: 18px;
}

.ring-copy p + p {
  margin-top: 14px;
}

.ring-copy .lede {
  margin-top: 18px;
}

.ring-copy .actions {
  margin-top: 26px;
}

.ring-figure {
  position: relative;
  box-shadow: 0 40px 80px -60px rgba(26, 18, 20, 0.5);
  margin: 0;
  padding: clamp(12px, 3vw, 32px) clamp(12px, 3vw, 32px) 76px;
  border-radius: var(--r-xl);
  background: var(--cream-raised);
}

.ring-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.ring-svg .track {
  fill: none;
  stroke: var(--edge-strong);
  stroke-width: 2;
  stroke-dasharray: 2 8;
  stroke-linecap: round;
}

.ring-svg .arc {
  fill: none;
  stroke: var(--red);
  stroke-width: 3.5;
  stroke-linecap: square;
  stroke-dasharray: var(--len, 300);
  stroke-dashoffset: var(--len, 300);
}

.ring-svg .head {
  fill: none;
  stroke: var(--red);
  stroke-width: 3.5;
  stroke-linecap: square;
  opacity: 0;
}

.ring-svg .node circle {
  fill: var(--paper);
  stroke: var(--edge-strong);
  stroke-width: 2;
}

.ring-svg .node.you circle {
  fill: var(--red);
  stroke: var(--red);
}

.ring-svg .node text {
  fill: var(--ink);
  font-size: 0.9375rem;
  font-weight: 800;
  text-anchor: middle;
}

.ring-svg .node .initial {
  font-size: 1.375rem;
}

.ring-svg .node.you .initial {
  fill: #fff;
}

.ring-svg .node .sub {
  fill: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.ring-svg .check {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.5) rotate(-30deg);
}

.ring-svg .check circle {
  fill: var(--go-fill);
}

.ring-svg .check path {
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: square;
}

.ring-svg .parcel {
  opacity: 0;
}

.ring-svg .parcel rect {
  fill: var(--volt);
  stroke: var(--ink-fixed);
  stroke-width: 1.75;
}

.ring-svg .a2,
.ring-svg .p2 {
  --d: 900ms;
}

.ring-svg .a3,
.ring-svg .p3 {
  --d: 1800ms;
}

.ring-svg .c2 {
  --cd: 1500ms;
}

.ring-svg .c3 {
  --cd: 2400ms;
}

.ring-svg .c1 {
  --cd: 3000ms;
}

.ring-figure.is-playing .arc {
  animation: drawline 900ms var(--out) forwards;
  animation-delay: var(--d, 0ms);
}

.ring-figure.is-playing .head {
  animation: fade 200ms var(--ui) forwards;
  animation-delay: calc(var(--d, 0ms) + 700ms);
}

.ring-figure.is-playing .parcel {
  animation: travel 1400ms linear forwards;
  animation-delay: var(--d, 0ms);
}

.ring-figure.is-playing .check {
  animation: tick 420ms var(--out) forwards;
  animation-delay: var(--cd, 2600ms);
}

/* Without JavaScript, show the finished ring. */
html:not(.js) .ring-svg .arc {
  stroke-dashoffset: 0;
}

html:not(.js) .ring-svg .head,
html:not(.js) .ring-svg .check {
  opacity: 1;
  transform: none;
}

@keyframes drawline {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fade {
  to {
    opacity: 1;
  }
}

@keyframes travel {
  0% {
    opacity: 0;
  }
  10%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes tick {
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.replay {
  --bx: 50%;
  --by: 50%;
  --bloom: var(--ink);
  position: absolute;
  right: 16px;
  bottom: 16px;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--edge-strong);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 750;
  cursor: pointer;
  transition: color 200ms var(--ui);
}

.replay::before {
  content: '';
  position: absolute;
  left: var(--bx);
  top: var(--by);
  z-index: -1;
  width: 260%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bloom);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 560ms var(--out);
}

.replay .ico {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

@media (hover: hover) and (pointer: fine) {
  .replay:hover {
    color: var(--cream);
  }

  .replay:hover::before {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Closing call to action -------------------------------------------------- */

.closing {
  position: relative;
  overflow: hidden;
  margin-top: clamp(80px, 11vw, 150px);
  padding: clamp(48px, 8vw, 110px) clamp(24px, 6vw, 80px);
  border-radius: var(--r-xl);
  background-color: var(--red);
  /* Glazed brick: pointed arches hang from the top edge, and rosettes are
     set in the field, drifting with the scroll. */
  background-image: url('/img/orn/frieze.svg'), url('/img/orn/glaze.svg');
  background-repeat: repeat-x, repeat;
  background-size:
    48px 40px,
    120px 120px;
  background-position:
    0 0,
    var(--drift, 0px) 0;
  color: #fff;
}

.closing h2 {
  position: relative;
  max-width: 760px;
  color: #fff;
  font-size: clamp(2.75rem, 7.2vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.closing .actions {
  position: relative;
  margin-top: 36px;
}

/* Touch screens repaint the blur behind sticky bars on every scroll frame, so
   they get a solid bar instead. */
@media (hover: none), (pointer: coarse) {
  .site-header,
  .chapter-nav {
    background: var(--cream);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Inner pages: chapters ---------------------------------------------------- */

.chapter-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--chapter-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}

.chapter-nav ol {
  position: relative;
  display: flex;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-left));
  overflow-x: auto;
  list-style: none;
  counter-reset: chapter;
  scrollbar-width: none;
}

.chapter-nav ol::-webkit-scrollbar {
  display: none;
}

.chapter-nav li {
  counter-increment: chapter;
  flex: none;
}

/* Numbered steps on a rail; the current one is ink with a red bar beneath. */
.chapter-nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-height: 56px;
  padding: 19px 18px 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms var(--ui);
}

.chapter-nav a:visited {
  color: var(--ink-soft);
}

.chapter-nav a::before {
  content: counter(chapter, decimal-leading-zero) / '';
  color: var(--edge-strong);
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  transition: color 200ms var(--ui);
}

/* Hover: a faint bar grows in from the centre, toward where the pointer is. */
.chapter-nav a::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--edge-strong);
  transform: scaleX(0);
  transition: transform 260ms var(--ui);
}

.chapter-nav a.is-active,
.chapter-nav a.is-active:visited {
  color: var(--ink);
}

.chapter-nav a.is-active::before {
  color: var(--red-text);
}

@media (hover: hover) and (pointer: fine) {
  .chapter-nav a:hover {
    color: var(--ink);
  }

  .chapter-nav a:not(.is-active):hover::after {
    transform: scaleX(1);
  }
}

.chapter-nav .chapter-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--red);
  transform-origin: left;
  transform: translateX(var(--bar-x, 0)) scaleX(var(--bar-w, 0));
  transition: transform 420ms var(--ui);
  pointer-events: none;
}

.chapter-nav:not(.has-bar) a.is-active::after {
  background: var(--red);
  transform: scaleX(1);
}

@media (forced-colors: active) {
  .chapter-nav a.is-active {
    text-decoration: underline;
  }
}

/* Jumps leave room for the header and the sticky chapter bar (WCAG 2.4.11). */
html:has(.chapter-nav) {
  scroll-padding-top: calc(var(--header-h) + 80px);
}

.chapter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px 80px;
  align-items: center;
  padding-top: clamp(64px, 9vw, 120px);
  scroll-margin-top: calc(var(--header-h) + 80px);
}

.chapter h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
}

.chapter .copy > p {
  max-width: 40ch;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.chapter .copy ul {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.chapter .copy li {
  position: relative;
  max-width: 46ch;
  padding-inline-start: 30px;
}

/* Each point is set off by the star, as in the legal pages' lists. */
.chapter .copy li::before {
  content: '';
  position: absolute;
  inset-inline-start: 2px;
  top: 0.42em;
  width: 13px;
  height: 13px;
  background: var(--red);
  -webkit-mask: url('/img/orn/star.svg') center / contain no-repeat;
  mask: url('/img/orn/star.svg') center / contain no-repeat;
}

/* How It Works numbers its chapters the way the homepage numbers its
   steps: a small stepped terrace, then the count. */
.step-n {
  display: flex;
  margin-bottom: 16px;
}

.chapter .visual {
  display: grid;
  place-items: center;
  min-height: 380px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--r-xl);
  background-color: var(--paper);
  box-shadow:
    inset 0 0 0 1px var(--edge),
    0 40px 80px -60px rgba(26, 18, 20, 0.55);
}

.chapter .visual.tex-clay,
.form-card.tex-clay {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset -8px -10px 22px rgba(120, 70, 40, 0.1),
    inset 0 0 0 1px rgba(120, 80, 50, 0.14),
    0 40px 80px -60px rgba(26, 18, 20, 0.55);
}

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

  .chapter.flip .visual {
    order: -1;
  }
}

.mini-card {
  width: min(290px, 100%);
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--edge),
    0 34px 60px -38px rgba(26, 18, 20, 0.55);
  transform: rotate(-3deg);
}

.mini-card .card-art {
  height: 210px;
}

.mini-card .card-body {
  padding: 14px 16px 16px;
}

.photo-strip {
  display: flex;
  gap: 10px;
}

.photo-strip span {
  display: grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: var(--cream-raised);
}

.photo-strip .ico {
  width: 44px;
  height: 44px;
  stroke-width: 1.5;
}

.listing-form {
  width: min(360px, 100%);
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--edge),
    0 34px 60px -38px rgba(26, 18, 20, 0.55);
}

.listing-form .fake-field {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-btn);
  box-shadow: inset 0 0 0 1.5px var(--edge-strong);
  font-weight: 650;
}

.listing-form .fake-field span {
  color: var(--ink-soft);
  font-weight: 500;
}

.spot-list {
  display: grid;
  gap: 10px;
  width: min(380px, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
}

.spot-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--edge);
}

.spot-list li:nth-child(2) {
  margin-left: 18px;
}

.spot-list li:nth-child(3) {
  margin-left: 36px;
}

.spot-list .ico {
  width: 26px;
  height: 26px;
  color: var(--red-text);
}

.spot-list strong {
  display: block;
}

.spot-list span {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

/* Scroll tilt: site.js sets --tilt from -1 (entering) to 1 (leaving). */
[data-tilt] {
  transform: perspective(1400px) rotateX(calc(var(--tilt, 0) * -7deg))
    rotateY(calc(var(--tilt, 0) * 4deg)) translateZ(0);
  transform-origin: 50% 60%;
  will-change: transform;
}

/* Pricing ----------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px 80px;
}

@media (min-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pricing-grid h3 {
  margin-bottom: 8px;
  font-size: 1.625rem;
  font-weight: 850;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.price-table th,
.price-table td {
  padding: 18px 0;
  border-bottom: 1px solid var(--edge);
  text-align: left;
  vertical-align: top;
}

.price-table th {
  font-weight: 650;
}

.price-table td:last-child {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.price-table td.free {
  color: var(--go);
}

.price-note {
  max-width: 60ch;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* FAQ --------------------------------------------------------------------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 80px;
}

@media (min-width: 960px) {
  .two-col {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .two-col > .h-section {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
  }
}

/* On inner pages, a title that sits beside its content is underlined with a
   short run of pointed arches, the rail that edges the bands and the footer.
   (The homepage keeps its headings plain.) */
:not(.page-index) > main .two-col > .h-section::after,
.legal-head h1::after {
  content: '';
  display: block;
  width: 112px;
  height: 16px;
  margin-top: 0.42em;
  background: url('/img/orn/arch-rule.svg') repeat-x 0 0 / 16px 16px;
}

.legal-head h1::after {
  margin-top: 22px;
}

.faq {
  border-top: 1px solid var(--edge);
}

.faq details {
  position: relative;
  border-bottom: 1px solid var(--edge);
  interpolate-size: allow-keywords;
}

/* Hover, keyboard focus, and the open question: the words turn red, the
   toggle fills red, and a red line draws along the row from the left. */
.faq details::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 520ms var(--out);
  pointer-events: none;
}

.faq details[open]::after {
  transform: scaleX(1);
}

.faq details[open] > summary,
.faq summary:focus-visible {
  color: var(--red-text);
}

.faq summary {
  transition: color 220ms var(--ui);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 18px 0;
  font-size: clamp(1.1875rem, 2vw, 1.4375rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  list-style: none;
  cursor: pointer;
}

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

.faq .pm {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--edge-strong);
  transition:
    transform 460ms var(--out),
    background-color 220ms var(--ui),
    box-shadow 220ms var(--ui);
}

.faq .pm::before,
.faq .pm::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  background: var(--ink);
  transition:
    transform 460ms var(--out),
    background-color 220ms var(--ui);
}

.faq .pm::after {
  transform: rotate(90deg);
}

.faq details[open] .pm {
  background: var(--red);
  box-shadow: 0 8px 18px -8px rgba(245, 2, 60, 0.7);
  transform: rotate(180deg);
}

.faq details[open] .pm::before,
.faq details[open] .pm::after {
  background: var(--on-dark);
}

.faq details[open] .pm::after {
  transform: rotate(0deg);
}

@media (hover: hover) and (pointer: fine) {
  .faq summary:hover {
    color: var(--red-text);
  }

  .faq details:has(> summary:hover)::after {
    transform: scaleX(1);
  }

  .faq summary:hover .pm {
    background: var(--red);
    box-shadow: 0 8px 18px -8px rgba(245, 2, 60, 0.7);
  }

  .faq summary:hover .pm::before,
  .faq summary:hover .pm::after {
    background: var(--on-dark);
  }

  .faq details[open] summary:hover .pm {
    background: var(--red-deep);
  }
}

.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 460ms var(--out),
    content-visibility 460ms allow-discrete;
}

.faq details[open]::details-content {
  block-size: auto;
}

.faq .answer {
  max-width: 62ch;
  padding: 0 0 26px;
  color: var(--ink-soft);
}

/* Safety: the hold calculator -------------------------------------------- */

.hold-calc {
  width: min(440px, 100%);
}

.hold-calc .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hold-calc .big {
  font-size: 2.75rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

/* About -------------------------------------------------------------------- */

.prose {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.prose p + p {
  margin-top: 16px;
}

/* Forms (the contact page) ------------------------------------------------- */

.join {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px 80px;
  align-items: start;
  padding-top: clamp(48px, 7vw, 96px);
}

@media (min-width: 960px) {
  .join {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}

.join-copy h1 {
  font-size: clamp(2.875rem, 6.6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.93;
}

.join-copy .lede {
  margin-top: 22px;
}

.perks {
  display: grid;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--edge);
}

.perks li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--edge);
  color: var(--ink-soft);
}

.perks .ico {
  color: var(--red-text);
}

.perks strong {
  display: block;
  color: var(--ink);
}

.form-card {
  position: relative;
  width: 100%;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--edge),
    0 44px 80px -56px rgba(26, 18, 20, 0.6);
}

.form-card h2 {
  font-size: 1.875rem;
  font-weight: 900;
}

.form-card .req-note {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.field label,
.field legend {
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 750;
}

.field .optional {
  color: var(--ink-soft);
  font-weight: 500;
}

.field input[type='text'],
.field input[type='email'] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--field);
  box-shadow: inset 0 0 0 2px var(--edge-strong);
  color: var(--ink);
  font-size: 1.0625rem;
  transition: box-shadow 200ms var(--ui);
}

.field input::placeholder {
  color: var(--placeholder);
}

.field input:focus-visible {
  outline: 2px solid var(--red-text);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.field input[aria-invalid='true'] {
  box-shadow: inset 0 0 0 3px var(--red-text);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 14px;
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1.4fr 1fr;
  }
}

.field-error {
  color: var(--red-text);
  font-size: 0.9375rem;
  font-weight: 650;
}

.field-error:empty {
  display: none;
}

fieldset.field {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-btn);
  background: var(--cream-raised);
  box-shadow: inset 0 0 0 2px var(--edge-strong);
}

.segmented label {
  position: relative;
  cursor: pointer;
}

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

.segmented span {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  transition:
    background-color 220ms var(--ui),
    color 220ms var(--ui);
}

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

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

@media (hover: hover) and (pointer: fine) {
  .segmented input:not(:checked):hover + span {
    background: var(--cream-deep);
  }
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile {
  margin-top: 24px;
  min-height: 65px;
}

.turnstile[hidden] {
  display: none;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.form-foot .fine {
  flex: 1 1 200px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--r-btn);
  background: var(--status-bg);
  color: var(--status-ink);
  font-weight: 700;
}

.form-status[hidden] {
  display: none;
}

.button[aria-busy='true'] {
  cursor: progress;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.button[aria-busy='true'] .spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Contact ------------------------------------------------------------------- */

@media (min-width: 560px) {
  .field-row-even {
    grid-template-columns: 1fr 1fr;
  }
}

/* Side by side, an error under one field never pushes its neighbor's box down. */
.field-row-even > .field {
  align-content: start;
}

.select {
  position: relative;
}

.select select {
  width: 100%;
  min-height: 52px;
  padding: 0 44px 0 16px;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--field);
  box-shadow: inset 0 0 0 2px var(--edge-strong);
  color: var(--ink);
  font-size: 1.0625rem;
  appearance: none;
  transition: box-shadow 200ms var(--ui);
}

.select select:invalid {
  color: var(--placeholder);
}

.select option {
  color: var(--ink);
}

.select .ico {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  color: var(--ink-soft);
  pointer-events: none;
  transition: color 200ms var(--ui);
}

.field textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--r-btn);
  background: var(--field);
  box-shadow: inset 0 0 0 2px var(--edge-strong);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.5;
  resize: vertical;
  transition: box-shadow 200ms var(--ui);
}

.field textarea::placeholder {
  color: var(--placeholder);
}

.select select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--red-text);
  outline-offset: 2px;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.select select[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  box-shadow: inset 0 0 0 3px var(--red-text);
}

@media (hover: hover) and (pointer: fine) {
  .select:hover select:not([aria-invalid='true']) {
    box-shadow: inset 0 0 0 2px var(--ink);
  }

  .select:hover .ico {
    color: var(--ink);
  }
}

/* The error and the character count share one line, so neither moves the
   button when it appears. */
.field-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
}

.field-meta .field-error:empty {
  display: block;
}

.field-count {
  flex: none;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.field-count.is-over {
  color: var(--red-text);
  font-weight: 700;
}

/* The form and the thank-you share one grid cell, so sending never changes
   the card's height. */
.form-stack {
  display: grid;
}

.form-stack > form,
.form-stack > .sent {
  grid-area: 1 / 1;
  min-width: 0;
}

.sent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 360ms var(--out);
}

.form-stack.is-sent > form {
  visibility: hidden;
}

.form-stack.is-sent > .sent {
  visibility: visible;
  opacity: 1;
}

.sent-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  border-radius: 20px;
  background: var(--red);
  color: #fff;
  box-shadow:
    inset 0 -4px 0 #a80026,
    0 18px 34px -16px rgba(245, 2, 60, 0.7);
}

.sent-mark .ico {
  width: 30px;
  height: 30px;
  stroke-width: 2.6;
}

.sent h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
}

.sent h2:focus {
  outline: none;
}

.sent p {
  max-width: 38ch;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.sent strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.sent .button {
  margin-top: 28px;
}

.contact .perks a {
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Legal pages --------------------------------------------------------------- */

/* The page's tablet, then its title, then the text in one column; on wide
   screens the tablet and the contents share a column beside the text. */
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  column-gap: 20px;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) max(var(--gutter), env(safe-area-inset-right)) 0
    max(var(--gutter), env(safe-area-inset-left));
}

.legal-art {
  margin-bottom: 28px;
}

.legal-layout > .legal {
  min-width: 0;
}

.legal {
  counter-reset: section;
}

.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.legal-head h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.legal-head .note {
  margin: 18px 0 0;
  color: var(--ink-soft);
}

.legal h2 {
  margin: 48px 0 10px;
  font-size: 1.625rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  scroll-margin-top: calc(var(--header-h) + 16px);
  counter-increment: section;
}

/* Sections are numbered like the laws on a stele, and the contents beside
   them carry the same numbers. */
.legal h2::before {
  content: counter(section, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  color: var(--red-text);
  font-size: 0.8125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.legal h3 {
  margin: 28px 0 8px;
  font-size: 1.25rem;
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal p + p {
  margin-top: 12px;
}

.legal ul,
.legal ol {
  padding-inline-start: 22px;
}

.legal ul {
  list-style: none;
}

.legal ul > li {
  position: relative;
}

.legal ul > li::before {
  content: '';
  position: absolute;
  inset-inline-start: -20px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  background: var(--red);
  -webkit-mask: url('/img/orn/star.svg') center / contain no-repeat;
  mask: url('/img/orn/star.svg') center / contain no-repeat;
}

.legal li {
  margin: 8px 0;
}

.legal .note {
  margin: 0 0 28px;
  color: var(--ink-soft);
}

.legal table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.legal th,
.legal td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--edge);
  text-align: left;
  vertical-align: top;
}

/* On wide screens a legal page is a 72ch reading column with its contents in
   a column beside it that stays in view; the current section is marked with
   a Red Text rule. Phones keep the single column without the contents. */
.legal-toc {
  display: none;
}

@media (min-width: 1040px) {
  .legal-layout {
    grid-template-columns: 240px minmax(0, 72ch);
    column-gap: 72px;
    justify-content: center;
    max-width: none;
    padding-inline: var(--gutter);
  }

  .legal-art {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
    justify-self: center;
  }

  .legal-head {
    grid-column: 2;
    grid-row: 1;
  }

  .legal-layout > .legal {
    grid-column: 2;
    grid-row: 2;
  }

  .legal-toc {
    display: block;
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 64px);
    margin-top: 56px;
    overflow-y: auto;
  }
}

.legal-toc-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 750;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  border-inline-start: 1px solid var(--edge);
  list-style: none;
  counter-reset: toc;
}

.legal-toc li {
  counter-increment: toc;
}

.legal-toc a {
  position: relative;
  display: block;
  margin-inline-start: -1px;
  padding-block: 6px;
  padding-inline: 44px 0;
  border-inline-start: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
  transition:
    color 120ms var(--ui),
    border-color 200ms var(--ui);
}

.legal-toc a[aria-current='location'] {
  border-inline-start-color: var(--red-text);
  color: var(--ink);
  font-weight: 650;
}

/* The current section's rosette sits on the rail, centered on the rule. */
.legal-toc a::before {
  content: '';
  position: absolute;
  inset-inline-start: -7px;
  top: calc(6px + 0.675em - 6px);
  width: 12px;
  height: 12px;
  background: var(--red);
  -webkit-mask: url('/img/orn/rosette.svg') center / contain no-repeat;
  mask: url('/img/orn/rosette.svg') center / contain no-repeat;
  scale: 0;
  transition: scale 300ms var(--out);
}

.legal-toc a[aria-current='location']::before {
  scale: 1;
}

.legal-toc a::after {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 16px;
  top: 6px;
  color: var(--edge-strong);
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1.7;
  transition: color 120ms var(--ui);
}

.legal-toc a[aria-current='location']::after {
  color: var(--red-text);
}

@media (hover: hover) and (pointer: fine) {
  .legal-toc a:hover {
    color: var(--red-text);
  }
}

.translation-note {
  margin: 24px auto 0;
  padding: 12px 16px;
  border-radius: var(--r-btn);
  background: var(--cream-raised);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.not-found {
  padding-top: clamp(64px, 12vw, 150px);
}

.not-found h1 {
  font-size: clamp(4rem, 13vw, 10.625rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.85;
}

.not-found p {
  max-width: 32ch;
  margin: 26px 0 34px;
  color: var(--ink-soft);
  font-size: 1.25rem;
}

/* Inner pages: clay, glaze, and numerals ------------------------------------ */
/* Clay comes in two firings. Light clay carries the mark and documents; dark
   clay, like the homepage's tablet under the cash card, carries figures, with
   the numbers pressed in red in Babylonian numerals. Corners are round the
   way a hand presses them, never quite even. */
.clay-face,
.tablet-light,
.envelope,
.slate,
.letter {
  background-color: var(--clay);
  background-image:
    url('/img/orn/grain-ink.svg'),
    radial-gradient(120% 90% at 18% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(165deg, transparent 55%, rgba(120, 70, 40, 0.1));
  background-size:
    220px 220px,
    auto,
    auto;
  border-radius: 38px 30px 42px 34px / 34px 40px 30px 44px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset -10px -12px 26px rgba(120, 70, 40, 0.14),
    inset 0 0 0 1px rgba(120, 80, 50, 0.14),
    0 40px 70px -40px rgba(26, 18, 20, 0.5);
  color: var(--ink);
}

.tablet-dark,
.tally-tablet,
.slab,
.stele {
  border-radius: 38px 30px 42px 34px / 34px 40px 30px 44px;
  background-color: var(--clay-dark);
  background-image:
    url('/img/orn/grain.svg'), url('/img/orn/mottle.svg'),
    linear-gradient(160deg, rgba(255, 246, 231, 0.035), transparent 45%, rgba(0, 0, 0, 0.18));
  background-size:
    220px 220px,
    600px 600px,
    auto;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 246, 231, 0.08),
    inset 1.5px 0 0 rgba(255, 246, 231, 0.04),
    inset 5px 6px 14px rgba(255, 246, 231, 0.035),
    inset -8px -10px 22px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 40px 70px -40px rgba(0, 0, 0, 0.8);
  color: var(--on-dark);
}

.numeral {
  display: block;
  width: auto;
  height: 30px;
  overflow: visible;
}

/* A glazed band: the ink panel framed top and bottom by a rail of small
   arches, like the homepage's category band, holding a page's key section. */
.glaze {
  position: relative;
}

.glaze::before,
.glaze::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: url('/img/orn/arches-cream.svg') repeat-x 0 0 / 28px 14px;
  pointer-events: none;
}

.glaze::before {
  top: 22px;
}

.glaze::after {
  bottom: 22px;
  transform: scaleY(-1);
}

.glaze .section-head .lede {
  max-width: 34ch;
}

/* How It Works: what it costs, written on two tablets. */
.tablets {
  display: grid;
  gap: 32px;
  align-items: start;
}

@media (min-width: 960px) {
  .tablets {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 40px;
  }

  .tablet-dark {
    margin-top: 48px;
  }
}

.tablet {
  padding: clamp(24px, 3.4vw, 44px);
}

.tablet h3 {
  margin-bottom: 10px;
  font-size: 1.625rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.glaze .tablet-light h3 {
  color: var(--ink);
}

/* Rules between rows are pressed into the clay: a shadow, then a lit lip. */
.tablet .price-table th,
.tablet .price-table td {
  border-bottom: 0;
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(107, 58, 34, 0.2);
}

.tablet .price-table tr:last-child > * {
  box-shadow: none;
}

.tablet-dark .price-table th,
.tablet-dark .price-table td {
  box-shadow:
    inset 0 -1px 0 rgba(255, 246, 231, 0.06),
    inset 0 -2px 0 rgba(0, 0, 0, 0.55);
}

.tablet-dark .price-table th {
  font-weight: 650;
}

.tablet-dark .price-table td {
  color: var(--on-dark);
  font-size: 1.1875rem;
}

.tablet .price-table td {
  padding-inline-start: 16px;
}

.tablet .price-table th .numeral {
  display: inline-block;
  width: 56px;
  height: 26px;
  margin-inline-end: 10px;
  vertical-align: -6px;
}

.tablet-dark .price-note {
  color: var(--on-ink-soft);
}

/* Safety: the numbers behind every trade, on one dark tablet. */
.tally-tablet {
  display: grid;
  margin: 0;
  padding: 8px clamp(24px, 3.4vw, 44px);
}

.tally-tablet > div {
  display: grid;
  gap: 12px;
  padding: 26px 0;
}

.tally-tablet > div + div {
  box-shadow:
    inset 0 1px 0 rgba(0, 0, 0, 0.55),
    inset 0 2px 0 rgba(255, 246, 231, 0.06);
}

.tally-tablet dt {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}

.tally-tablet .numeral {
  height: 38px;
}

.tally-tablet .figure {
  color: var(--on-dark);
  font-size: clamp(2.125rem, 3.6vw, 2.875rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.tally-tablet dd {
  max-width: 30ch;
  margin: 0;
  color: var(--on-ink-soft);
}

@media (min-width: 1040px) {
  .tally-tablet {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 12px;
  }

  .tally-tablet > div {
    align-content: start;
    gap: 18px;
    padding: 40px 28px 44px;
  }

  .tally-tablet dt {
    display: grid;
    gap: 14px;
  }

  .tally-tablet > div + div {
    box-shadow:
      inset 1px 0 0 rgba(0, 0, 0, 0.55),
      inset 2px 0 0 rgba(255, 246, 231, 0.06);
  }

  .tally-tablet > div + div:dir(rtl) {
    box-shadow:
      inset -1px 0 0 rgba(0, 0, 0, 0.55),
      inset -2px 0 0 rgba(255, 246, 231, 0.06);
  }
}

/* About: the values, on the glazed band. */
.dark .ledger,
.dark .ledger-row {
  border-color: rgba(255, 246, 231, 0.14);
}

.dark .ledger-row p {
  color: var(--on-ink-soft);
}

.dark .ledger-row > div .go {
  background: var(--slab-2);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 231, 0.1);
  color: var(--red);
}

/* Contact: the form rests on a dark tablet, like the homepage's cash card,
   edged by a rolled seal. */
.on-slab {
  display: grid;
  margin-bottom: 44px;
}

.on-slab > * {
  grid-area: 1 / 1;
}

.on-slab > .form-card {
  position: relative;
  z-index: 1;
}

.slab {
  translate: -6px 40px;
  rotate: -1.8deg;
  background-image:
    url('/img/orn/seal.svg'), url('/img/orn/grain.svg'), url('/img/orn/mottle.svg'),
    linear-gradient(160deg, rgba(255, 246, 231, 0.035), transparent 45%, rgba(0, 0, 0, 0.18));
  background-repeat: repeat-x, repeat, repeat, no-repeat;
  background-position:
    18px calc(100% - 11px),
    0 0,
    0 0,
    0 0;
  background-size:
    88px 25px,
    220px 220px,
    600px 600px,
    auto;
}

@media (min-width: 960px) {
  .slab {
    translate: -30px 44px;
    rotate: -2.4deg;
  }

  .slab:dir(rtl) {
    translate: 30px 44px;
    rotate: 2.4deg;
  }
}

/* Early access: the form on the mosaic floor, on wide screens. */
@media (min-width: 960px) {
  .mosaic-panel {
    position: relative;
    isolation: isolate;
    display: grid;
    padding: 96px clamp(36px, 4vw, 60px) clamp(36px, 4vw, 60px);
    overflow: hidden;
    border-radius: var(--r-xl);
    background: url('/img/orn/tesserae.svg') 0 0 / 168px 168px;
    box-shadow: 0 40px 80px -60px rgba(26, 18, 20, 0.55);
  }

  /* Drawn twice as large, its sun rising behind the card's top edge, so the
     star's points and rays fan out on both sides of the form. */
  .mosaic-panel .mosaic {
    display: block;
    position: absolute;
    top: 40px;
    left: 50%;
    z-index: -1;
    width: 210%;
    max-width: none;
    height: auto;
    translate: -50% -50%;
    pointer-events: none;
  }

  .mosaic-panel > .form-card {
    box-shadow:
      0 0 0 1px var(--edge),
      0 50px 80px -40px rgba(26, 18, 20, 0.55);
  }
}

/* Legal and help pages: each one's tablet. */
.legal-layout > .legal {
  margin-top: 32px;
}

.legal-art > div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.inscription {
  display: block;
  width: 100%;
  height: auto;
}

/* The terms: a basalt stele, Shamash's star in its crown, the laws beneath. */
.stele {
  width: 64px;
  aspect-ratio: 3 / 4.4;
  align-content: start;
  gap: 6px;
  padding: 9px 9px 0;
  border-radius: 50% 50% 10px 12px / 26% 26% 6px 6px;
}

.stele-crown {
  justify-self: center;
  width: 34%;
  aspect-ratio: 1;
  background: var(--red);
  -webkit-mask: url('/img/orn/star.svg') center / contain no-repeat;
  mask: url('/img/orn/star.svg') center / contain no-repeat;
}

/* Privacy: a clay envelope, closed with a rolled seal. */
.envelope {
  width: 84px;
  aspect-ratio: 5 / 4;
  align-content: start;
  padding: 9px 9px 0;
}

.envelope .seal-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  height: 22%;
  background: url('/img/orn/seal-light.svg') repeat-x 0 50% / auto 100%;
  box-shadow:
    0 -1px 0 rgba(107, 58, 34, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Deleting an account: a tablet whose last lines have been smoothed away. */
.slate {
  width: 64px;
  aspect-ratio: 4 / 5;
  padding: 10px 9px;
}

/* Support: a letter, sealed with the rosette. */
.letter {
  width: 64px;
  aspect-ratio: 5 / 6;
  padding: 10px 9px;
}

.letter .letter-seal {
  position: absolute;
  inset-inline-end: 9%;
  bottom: 8%;
  width: 26%;
  aspect-ratio: 1;
  filter: drop-shadow(0 -1px 0 rgba(107, 58, 34, 0.45))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.7));
}

.letter .letter-seal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  -webkit-mask: url('/img/orn/rosette.svg') center / contain no-repeat;
  mask: url('/img/orn/rosette.svg') center / contain no-repeat;
}

@media (min-width: 1040px) {
  .stele {
    width: 150px;
    gap: 12px;
    padding: 16px 18px 0;
  }

  .envelope {
    width: 200px;
    padding: 22px 24px 0;
  }

  .slate {
    width: 160px;
    padding: 20px 18px;
  }

  .letter {
    width: 150px;
    padding: 20px 18px;
  }

  .legal-art > div {
    rotate: -2deg;
  }
}

/* Get the app ---------------------------------------------------------------- */
/* The call to action: every label sits in one grid cell, so the button is as
   wide as its longest label whichever one shows, and nothing moves when
   site.js swaps it. boot.js sets data-cta on <html> before first paint;
   without it (no JavaScript), Start Swapping shows. Labels that can't show on
   this device drop out of the cell, so a phone's button isn't sized for a
   computer's label. */
.cta-label {
  display: inline-grid;
}

.cta-v {
  display: inline-flex;
  grid-area: 1 / 1;
  align-items: center;
  justify-content: center;
  gap: 10px;
  visibility: hidden;
}

/* A little less padding, so a hero's two calls to action share a row. */
.button-lg.cta {
  padding: 0 26px;
}

.cta-v[data-v='default'],
:root[data-cta='app'] .cta-1 .cta-v[data-v='app'],
:root[data-cta='web'] .cta-1 .cta-v[data-v='web'],
:root[data-cta='desktop'] .cta-v[data-v='desktop'] {
  /* inherit, not visible: a closed phone menu hides its button. */
  visibility: inherit;
}

:root:is([data-cta='app'], [data-cta='web'])
  .cta-1
  .cta-v:is([data-v='default'], [data-v='desktop']),
:root:is([data-cta='app'], [data-cta='web']) .cta-2 .cta-v[data-v='desktop'],
:root[data-cta='desktop'] .cta-1 .cta-v:not([data-v='desktop']),
:root[data-cta='desktop'] .cta-2 .cta-v[data-v='default'] {
  display: none;
}

/* Where a block shows the store badges, they are the way to get the app, so
   it offers one button, not three. A phone gets its own store's badge first,
   then Use It on the Web, and no Get the App button; a computer gets Open
   SwipeAndSwap and both badges, and no Get It on Your Phone (the QR code
   lives on /get). The header keeps its one button. */
:root[data-cta='app'] :has(> .stores:not(.stores-stack)) > .actions .cta-1,
:root[data-cta='desktop'] :has(> .stores:not(.stores-stack)) > .actions .cta-2 {
  display: none;
}

:root[data-cta='app'][data-platform='ios'] .stores [data-store='googlePlay'],
:root[data-cta='app'][data-platform='android'] .stores [data-store='appStore'] {
  display: none;
}

:root[data-cta='app'] :has(> .stores:not(.stores-stack)) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

:root[data-cta='app'] :has(> .stores:not(.stores-stack)) > .stores {
  order: 1;
  margin-top: 8px;
}

:root[data-cta='app'] .page-hero :has(> .stores) > .stores {
  margin-top: 32px;
}

:root[data-cta='app'] :has(> .stores:not(.stores-stack)) > .actions {
  order: 2;
  margin-top: 16px;
}

:root[data-cta='app'] :has(> .stores:not(.stores-stack)) > .hero-more {
  order: 3;
}

:root[data-cta='app'] :has(> .stores:not(.stores-stack)) .store-badge img {
  height: 52px;
  width: auto;
}

/* The web app as a button under the store badges: the same width as the
   badges' column, so the three read as one set of ways in. */
.foot-col a.foot-web {
  margin-top: 12px;
  align-self: flex-start;
  min-height: 44px;
  color: var(--ink-fixed);
  text-decoration: none;
}

/* /get: the way in for this device first, on dark clay sealed along its
   foot; the other ways below as a short list; and on a computer, a code on
   a light clay tablet that opens this page on a phone. Which block leads is
   pure CSS off boot.js's marks, so the page never rearranges once drawn. */
.get {
  display: grid;
  gap: 36px;
  padding-top: clamp(40px, 7vw, 96px);
}

@media (min-width: 960px) {
  .get {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas:
      'copy qr'
      'pick qr';
    column-gap: clamp(48px, 7vw, 112px);
    row-gap: 40px;
    align-items: start;
  }

  .get-copy {
    grid-area: copy;
  }

  .get-pick {
    grid-area: pick;
  }

  .get-qr {
    grid-area: qr;
    align-self: center;
  }
}

/* Sized to its column (cqi), so the title always breaks as "Start Swapping /
   in a Minute." and the no-lone-word fit in site.js never has to shrink it,
   which would move everything under it. */
.get-copy {
  container-type: inline-size;
}

.get-copy h1 {
  font-size: clamp(2rem, 10.5cqi, 5.25rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.93;
}

.get-copy .lede {
  margin-top: 22px;
}

/* What it asks of you, as flat chips with a red glow (not links). */
.get-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.get-promises li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 11px;
  border-radius: 999px;
  background: var(--cream-raised);
  box-shadow:
    inset 0 -2px 0 var(--edge),
    0 8px 18px -10px rgba(245, 2, 60, 0.55);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 750;
}

.get-promises .ico {
  width: 18px;
  height: 18px;
  color: var(--red-text);
  stroke-width: 2.2;
}

.get-main {
  display: none;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 44px) calc(clamp(28px, 4vw, 44px) + 26px);
}

.get-main.slab {
  translate: none;
  rotate: none;
}

.get-main[data-for='web'],
:root[data-cta='app'][data-platform='ios'] .get-main[data-for='ios'],
:root[data-cta='app'][data-platform='android'] .get-main[data-for='android'] {
  display: block;
}

:root[data-cta='app']:is([data-platform='ios'], [data-platform='android'])
  .get-main[data-for='web'] {
  display: none;
}

.get-main h2 {
  color: var(--on-dark);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
}

.get-main p {
  max-width: 40ch;
  margin-top: 12px;
  color: var(--on-ink-soft);
  font-size: 1.125rem;
}

.get-main .store-badge,
.get-main .button {
  margin-top: 26px;
}

.get-main .store-badge img {
  height: 60px;
}

.get-main .get-alt {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 14px;
  color: var(--on-dark);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition:
    text-decoration-color 220ms var(--ui),
    text-decoration-thickness 220ms var(--ui);
}

.get-alt .ico {
  width: 18px;
  height: 18px;
  color: var(--red);
  stroke-width: 2.2;
}

@media (hover: hover) and (pointer: fine) {
  .get-main .get-alt:hover {
    text-decoration-color: var(--volt);
    text-decoration-thickness: 3px;
  }

  .get-alt:hover .ico {
    animation: draw 560ms var(--out);
  }
}

.get-more {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--edge);
}

.get-more li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  min-height: 76px;
  padding: 12px 0;
  border-bottom: 1px solid var(--edge);
  color: var(--ink-soft);
  font-weight: 650;
}

.get-more .store-badge img {
  height: 46px;
}

.get-more li[data-for='web'],
:root[data-cta='app'][data-platform='ios'] .get-more li[data-for='ios'],
:root[data-cta='app'][data-platform='android'] .get-more li[data-for='android'] {
  display: none;
}

:root[data-cta='app']:is([data-platform='ios'], [data-platform='android'])
  .get-more
  li[data-for='web'] {
  display: flex;
}

.get-pick [hidden] {
  display: none !important;
}

/* The code, pressed into light clay: on a computer at any width, and without
   JavaScript on a wide screen. The code itself keeps ink on cream in dark
   mode too, so every phone camera reads it. */
.get-qr {
  display: none;
  justify-items: center;
  gap: 28px;
  text-align: center;
}

:root[data-cta='desktop'] .get-qr {
  display: grid;
}

@media (min-width: 960px) {
  :root:not([data-cta]) .get-qr {
    display: grid;
  }
}

.qr-tablet {
  display: grid;
  place-items: center;
  width: min(100%, 360px);
  aspect-ratio: 5 / 6;
  rotate: -2deg;
}

/* 222px is 6px a module, so every module lands on whole pixels. */
.qr-tablet .qr {
  width: min(72%, 222px);
  height: auto;
  border-radius: 12px;
  box-shadow:
    0 0 0 6px rgba(120, 70, 40, 0.1),
    0 18px 30px -18px rgba(26, 18, 20, 0.55);
}

.qr-copy h2 {
  max-width: 18ch;
  margin: 0 auto;
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.qr-copy p {
  max-width: 34ch;
  margin: 12px auto 0;
  color: var(--ink-soft);
}

/* What happens next: four steps along one line, numbered in Babylonian. */
.get-steps {
  display: grid;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 820px) {
  .get-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }
}

.get-steps li {
  padding-top: 24px;
  border-top: 2px solid var(--slab-line);
}

.get-steps .numeral {
  height: 34px;
  margin-bottom: 18px;
}

.get-steps h3 {
  font-size: 1.375rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.get-steps p {
  margin-top: 10px;
  color: var(--on-ink-soft);
}

/* Reveals ------------------------------------------------------------------ */
/* Everything is visible without JavaScript. With it, each kind of element
   arrives its own way: headings rise word by word from behind a mask,
   visuals open like a shutter, cards drop and settle, rows stagger in. */

.js [data-reveal='lines'] .line {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.js [data-reveal='lines'] .line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1000ms var(--out);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.js [data-reveal='lines'].in .line > span {
  transform: none;
}

.js [data-reveal='wipe'] {
  clip-path: inset(0 0 0 100% round var(--r-xl));
  transition: clip-path 1100ms var(--fill);
}

.js [data-reveal='wipe'].in {
  clip-path: inset(0 0 0 0 round var(--r-xl));
}

.js [data-reveal='drop'] {
  opacity: 0;
  transform: translateY(-30px) rotate(-3deg);
  transition:
    opacity 500ms var(--ui),
    transform 1000ms var(--out);
}

.js [data-reveal='drop'].in {
  opacity: 1;
  transform: none;
}

.js [data-reveal='fade'] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 700ms var(--ui),
    transform 900ms var(--out);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js [data-reveal='fade'].in {
  opacity: 1;
  transform: none;
}

.js [data-reveal='stagger'] > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms var(--ui),
    transform 900ms var(--out);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.js [data-reveal='stagger'].in > * {
  opacity: 1;
  transform: none;
}

/* The hero's entrance: the words rise in, one after another. Pure CSS, so it
   starts with the first paint instead of waiting for site.js. */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(var(--rise, 18px));
  }
}

.hero h1 .w {
  --rise: 60%;
  animation: hero-rise 900ms var(--out) both;
}

.hero h1 .w:nth-child(2) {
  animation-delay: 90ms;
}

.hero h1 .w:nth-child(3) {
  animation-delay: 180ms;
}

.hero .lede {
  animation: hero-rise 800ms var(--out) 300ms both;
}

.hero .actions {
  animation: hero-rise 800ms var(--out) 380ms both;
}

/* Reduced motion ------------------------------------------------------------ */
/* Movement turns off; changes become short crossfades so state still reads. */

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

  .js [data-reveal],
  .js [data-reveal] *,
  .js .giant span,
  .button,
  .round,
  .card {
    transform: none !important;
    transition-property: opacity, color, background-color, box-shadow, clip-path !important;
    transition-duration: 150ms !important;
    transition-delay: 0ms !important;
  }

  .js [data-reveal='wipe'] {
    clip-path: none;
  }

  .band-track,
  [data-tilt] {
    transform: none !important;
  }

  .band-track {
    animation: none !important;
  }

  .spinner {
    animation: spin 1.2s linear infinite !important;
  }
}

/* Windows high contrast: keep the shapes that carry meaning. */
@media (forced-colors: active) {
  .button,
  .round,
  .mode,
  .segmented span {
    border: 2px solid ButtonText;
  }

  .button::before,
  .round::before,
  .replay::before,
  .ledger-row > a::before {
    display: none;
  }
}

/* Dark mode ---------------------------------------------------------------- */
/* The tokens at the top flip the page; these are the pieces that need more
   than a token: ornaments drawn as files, clay that was light, and controls
   whose fill inverts. Light clay turns to the dark clay of the homepage's
   tablet, and its pressed marks are restyled as dark presses. */

@media (prefers-color-scheme: dark) {
  :root[data-scheme='auto'] .button-ink {
    --lip: #cbbfb4;
    --drop: rgba(0, 0, 0, 0.5);
  }

  :root[data-scheme='auto'] .site-footer .foot-arcade,
  :root[data-scheme='auto'] .foot-arcade {
    background-image: url('/img/orn/arcade-dark.svg');
  }

  :root[data-scheme='auto'] .hero-panel,
  :root[data-scheme='auto'] .tex-tesserae {
    background-image: url('/img/orn/tesserae-dark.svg');
  }

  :root[data-scheme='auto'] .gate::before {
    background:
      url('/img/orn/rosette-red.svg') 50% 64% / 30% no-repeat,
      url('/img/orn/tesserae-dark.svg') 0 0 / 120px 120px;
  }

  :root[data-scheme='auto'] .gate::after {
    background-image: url('/img/orn/gate-dark.svg');
  }

  :root[data-scheme='auto'] .ziggurat {
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.45));
  }

  :root[data-scheme='auto'] .ziggurat .tier {
    background-color: var(--slab-2);
  }

  /* Light clay, fired dark. */
  :root[data-scheme='auto'] :is(.tex-clay, .clay-face, .tablet-light, .envelope, .slate, .letter) {
    background-image:
      url('/img/orn/grain.svg'),
      radial-gradient(120% 90% at 18% 0%, rgba(255, 246, 231, 0.05), transparent 60%),
      linear-gradient(165deg, transparent 55%, rgba(0, 0, 0, 0.18));
  }

  :root[data-scheme='auto'] :is(.clay-face, .tablet-light, .envelope, .slate, .letter) {
    box-shadow:
      inset 0 1.5px 0 rgba(255, 246, 231, 0.08),
      inset 1.5px 0 0 rgba(255, 246, 231, 0.04),
      inset -8px -10px 22px rgba(0, 0, 0, 0.3),
      inset 0 0 0 1px rgba(0, 0, 0, 0.25),
      0 40px 70px -40px rgba(0, 0, 0, 0.8);
  }

  :root[data-scheme='auto'] .on-light .lit[fill] {
    fill: #fff6e7;
    fill-opacity: 0.1;
  }

  :root[data-scheme='auto'] .on-light .shade[fill] {
    fill: #0f0a0b;
    fill-opacity: 0.85;
  }

  :root[data-scheme='auto'] .on-light .lit[stroke] {
    stroke: #fff6e7;
    stroke-opacity: 0.07;
  }

  :root[data-scheme='auto'] .on-light .shade[stroke] {
    stroke: #0f0a0b;
    stroke-opacity: 0.75;
  }

  :root[data-scheme='auto'] .on-light .script {
    fill: #140d0e;
    fill-opacity: 0.9;
  }

  :root[data-scheme='auto'] .tablet .price-table th,
  :root[data-scheme='auto'] .tablet .price-table td {
    box-shadow:
      inset 0 -1px 0 rgba(255, 246, 231, 0.06),
      inset 0 -2px 0 rgba(0, 0, 0, 0.55);
  }

  :root[data-scheme='auto'] .tablet .price-table tr:last-child > * {
    box-shadow: none;
  }

  :root[data-scheme='auto'] .envelope .seal-band {
    background-image: url('/img/orn/seal.svg');
    box-shadow:
      0 -1px 0 rgba(0, 0, 0, 0.55),
      0 1px 0 rgba(255, 246, 231, 0.06);
  }

  :root[data-scheme='auto'] .letter .letter-seal {
    filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.7)) drop-shadow(0 1px 0 rgba(255, 246, 231, 0.12));
  }
}

@media (prefers-color-scheme: dark) and (min-width: 960px) {
  :root[data-scheme='auto'] .mosaic-panel {
    background-image: url('/img/orn/tesserae-dark.svg');
  }
}

@media (prefers-color-scheme: dark) and (hover: hover) and (pointer: fine) {
  :root[data-scheme='auto'] .button-ink:hover,
  :root[data-scheme='auto'] .button-cream:hover {
    color: var(--on-dark);
  }

  :root[data-scheme='auto'] .button-ghost:hover {
    box-shadow:
      inset 0 0 0 2px var(--ink),
      inset 0 -4px 0 #cbbfb4,
      0 20px 36px -18px var(--drop);
  }
}

/* Accessibility ------------------------------------------------------------- */
/* Two settings, chosen in the Accessibility panel (footer and phone menu) and
   applied by boot.js before first paint:
   - Larger Text: the root size steps up, and every type size is in rem, so
     all the words grow together. It multiplies the browser's own text size.
   - High Contrast: on, off, or following the device (prefers-contrast). Muted
     words darken (or lighten in dark mode) to 7:1, controls and cards get
     solid 2px edges, ornaments and glows step back from the words, links are
     underlined, and focus rings get thicker.
   Windows High Contrast (forced colors) is handled at the end. */

:root[data-text='lg'] {
  font-size: 125%;
}

:root[data-text='xl'] {
  font-size: 150%;
}

/* The buttons that open the panel need site.js, so they appear with it. */
[data-a11y-open] {
  display: none;
}

.has-a11y .foot-a11y {
  display: inline-flex;
}

.foot-a11y {
  gap: 8px;
}

.foot-a11y .ico {
  width: 20px;
  height: 20px;
}

/* Large text (this setting, or a large default size in the browser) wraps
   words onto a second line instead of spilling out of a control or card. */
.button {
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

.mode {
  line-height: 1.15;
  white-space: normal;
}

:root[data-text] .card-title h3 {
  white-space: normal;
}

:root[data-text] .modes {
  border-radius: 22px;
}

:root[data-text] .mode {
  padding-top: 6px;
  padding-bottom: 6px;
  border-radius: 18px;
}

/* The header keeps each link on one line. With large text on mid-width
   screens the wordmark steps down to the mark alone (its label still names
   it) so the links fit. The em query catches a large default size set in
   the browser: 53.3em is under 900px at the usual 16px. */
.nav-link,
.nav .button {
  white-space: nowrap;
}

@media (min-width: 900px) and (max-width: 1279px) {
  :root[data-text] .wordmark .text {
    display: none;
  }
}

@media (min-width: 900px) and (max-width: 53.3em) {
  .wordmark .text {
    display: none;
  }
}

/* The hero's title may take two lines when the words are bigger. */
:root[data-text] .hero h1 {
  white-space: normal;
}

/* The panel: a card on a dimmed page, a sheet from the bottom on phones. */
.a11y {
  width: calc(100% - 32px);
  max-width: 460px;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--ink);
  overscroll-behavior: contain;
}

.a11y::backdrop {
  background: rgba(26, 18, 20, 0.6);
}

.a11y-card {
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow:
    inset 0 0 0 1px var(--edge),
    0 30px 80px -30px rgba(0, 0, 0, 0.6);
}

.a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.a11y-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.625rem;
  letter-spacing: -0.03em;
}

.a11y-head h2 .ico {
  width: 28px;
  height: 28px;
  color: var(--red-text);
}

.a11y-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cream-raised);
  box-shadow:
    inset 0 0 0 2px var(--edge-strong),
    inset 0 -3px 0 var(--edge-strong);
  color: var(--ink);
  transition: background-color 200ms var(--ui);
}

.a11y-close .ico {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

@media (hover: hover) and (pointer: fine) {
  .a11y-close:hover {
    background: var(--cream-deep);
  }
}

.a11y-intro {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.5;
}

.a11y-group {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.a11y-group legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 1.0625rem;
  font-weight: 750;
}

.segmented.seg-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.a11y .segmented span {
  gap: 2px;
  min-height: 52px;
  padding: 6px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.a11y-aa {
  display: block;
  font-weight: 850;
  font-stretch: 112%;
  line-height: 1;
}

.a11y-aa-md {
  font-size: 1em;
}

.a11y-aa-lg {
  font-size: 1.3em;
}

.a11y-aa-xl {
  font-size: 1.6em;
}

.a11y-note {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.45;
}

.a11y-done {
  width: 100%;
  margin-top: 24px;
}

@media (max-width: 520px) {
  .a11y {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 24px);
    margin: auto 0 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }

  .a11y-card {
    padding: 22px max(20px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
}

/* High contrast: the palette. Dark mode's block below overrides each one. */
:root[data-contrast='more'] {
  --ink-soft: #3d2f2c;
  --on-ink-soft: #efe5dc;
  --red-text: #8f0020;
  --red-deep: #8f0020;
  --go: #05502c;
  --cash: #6a2c02;
  --placeholder: #4a3a36;
  --edge: #5e4b47;
  --edge-strong: #3d2f2c;
  --status-ink: #7a001b;
  --muted: var(--ink-soft);
  --header-glass: var(--cream);
  --chapter-glass: var(--cream);
  /* Red fills that carry words deepen so white type reads at 7:1. */
  --red-fill: #a8002a;
  --go-fill: #075c33;
}

@media (prefers-color-scheme: dark) {
  :root[data-scheme='auto'][data-contrast='more'] {
    --ink-soft: #efe5dc;
    --on-ink-soft: #efe5dc;
    --red-text: #ffb3c1;
    --red-deep: #8f0020;
    --go: #7fe0aa;
    --cash: #f8b47e;
    --placeholder: #d0c4ba;
    --edge: #a89a90;
    --edge-strong: #d0c4ba;
    --status-ink: #ffb3c1;
    --header-glass: var(--cream);
    --chapter-glass: var(--cream);
  }
}

/* Without JavaScript, the device's setting still deepens the palette. */
@media (prefers-contrast: more) {
  :root:not(.js) {
    --ink-soft: #3d2f2c;
    --on-ink-soft: #efe5dc;
    --red-text: #8f0020;
    --placeholder: #4a3a36;
    --edge: #5e4b47;
    --edge-strong: #3d2f2c;
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root[data-scheme='auto']:not(.js) {
    --ink-soft: #efe5dc;
    --on-ink-soft: #efe5dc;
    --red-text: #ffb3c1;
    --placeholder: #d0c4ba;
    --edge: #a89a90;
    --edge-strong: #d0c4ba;
  }
}

/* Links: underlined, thicker. */
:root[data-contrast='more']
  a[href]:not(.button, .wordmark, .store-badge, .skip, .nav-link, .ledger-row > a) {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

:root[data-contrast='more'] .nav-link[aria-current='page'] .nav-label {
  text-decoration: underline 3px;
  text-underline-offset: 6px;
}

/* Buttons: words on deep red, and a solid 2px edge. */
:root[data-contrast='more'] .button:not(.button-ink, .button-ghost, .button-cream) {
  background: var(--red-fill);
}

:root[data-contrast='more'] .button,
:root[data-contrast='more'] .round,
:root[data-contrast='more'] .replay,
:root[data-contrast='more'] .mode {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

:root[data-contrast='more'] :is(.dark, .closing, .site-footer, .slab) .button {
  outline-color: var(--on-dark);
}

/* Cards and panels: a solid edge. */
:root[data-contrast='more']
  :is(.swap-card, .form-card, .mini-card, .panel, .tablet, .consent, .a11y-card, .card) {
  outline: 2px solid var(--edge-strong);
  outline-offset: -2px;
}

:root[data-contrast='more'] .segmented,
:root[data-contrast='more'] .a11y-close {
  box-shadow: inset 0 0 0 2px var(--ink);
}

/* Ornaments, mosaics, and glows step back behind the words. */
:root[data-contrast='more'] .mosaic {
  opacity: 0.25;
}

:root[data-contrast='more'] .site-footer::before,
:root[data-contrast='more'] .site-footer::after {
  opacity: 0.25;
}

:root[data-contrast='more'] .site-footer {
  background-image: none;
}

/* The closing panel's words sit on deep red, its glaze faint. */
:root[data-contrast='more'] .closing {
  background-color: var(--red-fill);
  background-image: url('/img/orn/frieze.svg');
}

/* Focus: a thicker ring. */
:root[data-contrast='more'] :focus-visible {
  outline-width: 3px;
  outline-offset: 3px;
}

:root[data-contrast='more'] .button:focus-visible,
:root[data-contrast='more'] .card:focus-visible {
  outline: 3px solid var(--red-text);
  outline-offset: 3px;
}

/* Windows High Contrast and other forced colors: the system palette replaces
   ours, and box-shadows and backgrounds drop out, so every edge that was a
   shadow becomes a real border and indicators drawn as fills use system
   colors. */
@media (forced-colors: active) {
  .field input[type='text'],
  .field input[type='email'],
  .select select,
  .field textarea,
  .segmented,
  .a11y-close,
  .replay {
    border: 2px solid CanvasText;
  }

  .a11y-card,
  .consent,
  .form-card,
  .swap-card,
  .mini-card,
  .panel,
  .tablet,
  .card {
    outline: 2px solid CanvasText;
    outline-offset: -2px;
  }

  h1 .dot {
    forced-color-adjust: none;
    background: CanvasText;
  }

  .faq .pm {
    border: 2px solid CanvasText;
  }

  .faq .pm::before,
  .faq .pm::after {
    forced-color-adjust: none;
    background: CanvasText;
  }

  input[type='range'] {
    forced-color-adjust: none;
  }

  input[type='range']::-webkit-slider-runnable-track {
    background: CanvasText;
  }

  input[type='range']::-moz-range-track {
    background: CanvasText;
  }

  input[type='range']::-webkit-slider-thumb {
    border-color: Canvas;
    background: Highlight;
    box-shadow: 0 0 0 2px CanvasText;
  }

  input[type='range']::-moz-range-thumb {
    border-color: Canvas;
    background: Highlight;
  }

  .segmented input:checked + span {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }

  .burger i {
    forced-color-adjust: none;
    background: ButtonText;
  }

  .a11y::backdrop {
    background: rgba(0, 0, 0, 0.6);
  }

  :focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 3px;
  }

  .mark {
    forced-color-adjust: none;
  }

  .mark rect {
    fill: CanvasText;
  }

  .mark .wedge {
    fill: Canvas;
  }
}

/* Listing and store pages (rendered by the API at /l and /s) ----------------- */
/* These keep the original page frame: .top, .brand, .foot, and .button with
   .small and .secondary. */

.top,
.item-page,
.store-page,
.foot {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  color: var(--red);
  font-size: 1.375rem;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand span {
  color: var(--ink);
}

.button.small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--edge-lit);
}

.button.secondary::before {
  background: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .button.secondary:hover {
    color: #fff;
  }
}

.note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.item-page {
  padding-top: 8px;
  padding-bottom: 56px;
}

.item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.item-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--raised);
}

.item-title {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 4.4vw, 2.5rem);
  line-height: 1.1;
}

.item-value {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.item-value span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
}

.item-description {
  margin: 0 0 12px;
  white-space: pre-line;
}

.banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-weight: 700;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--edge-lit);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.tags.blue li {
  background: var(--accent-wash);
  box-shadow: none;
  color: var(--accent);
}

.panel {
  margin: 20px 0;
  padding: 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--raised);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.panel p {
  margin: 0;
}

.info {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.info li strong,
.info li span {
  display: block;
}

.info li strong {
  color: var(--ink);
}

.info li span {
  color: var(--muted);
  font-size: 0.9375rem;
}

.store {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--edge);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 200ms var(--ease);
}

.store:hover {
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px var(--edge-lit),
    0 12px 24px -20px rgba(22, 21, 20, 0.4);
}

.store img,
.store .initials {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.store strong,
.store .note {
  display: block;
  margin: 0;
}

.store .note {
  font-size: 0.875rem;
}

.initials {
  display: grid;
  place-items: center;
  background: var(--lift);
  color: var(--ink);
  font-weight: 800;
}

.initials.big,
.store-head .avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  font-size: 1.875rem;
  object-fit: cover;
}

.store-head {
  padding: 24px 0 32px;
  border-top: 0;
}

.store-head h1 {
  margin: 16px 0 4px;
  font-size: clamp(1.875rem, 5vw, 2.75rem);
}

.store-head .note {
  margin: 0 0 12px;
}

.badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
  padding: 24px 0 56px;
}

.tile {
  color: var(--ink);
  text-decoration: none;
}

.tile:hover {
  color: var(--ink);
}

.tile img,
.tile-blank {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--raised);
  object-fit: cover;
  transition: transform 300ms var(--ease);
}

.tile:hover img,
.tile:hover .tile-blank {
  transform: scale(1.02);
}

.tile strong,
.tile span {
  display: block;
}

.tile strong {
  font-size: 1.125rem;
  font-weight: 800;
}

.tile span {
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

@media (min-width: 720px) {
  .item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

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

/* Footer ----------------------------------------------------------------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--edge);
  color: var(--muted);
  font-size: 0.9375rem;
}

.foot p {
  margin: 0;
}

.foot a {
  color: var(--ink-dim);
  text-decoration: none;
}

.foot a:hover {
  color: var(--accent);
  text-decoration: underline;
}
