/*
  TK Store. One style sheet for every page.

  The look comes from the TK logo: a white and cyan wordmark on pure black, with
  its cyan and magenta channels split off like an analog signal out of
  registration. That split is used on display type and on the plan bars only,
  never on body text, and it holds still unless someone acts (plus one moment
  when the home page loads). Every graphic is data: the plan bars are the daily
  allowances, the meter bars what one dollar buys, both from the catalog.

  Type: Hubot Sans (display, 2rem and up; wide for words, condensed for
  figures), Atkinson Hyperlegible Next (text and every heading under 2rem),
  Atkinson Hyperlegible Mono (amounts to send, addresses, ids: slashed zero),
  and the digits of Mona Sans ("TK Figures": prices and allowances get a plain
  zero, through unicode-range). All OFL, served from /fonts with their licences.
*/

@font-face {
  font-family: "Hubot Sans";
  src: url("../fonts/hubot-sans-latin-wdth-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

/* Mona Sans, digits, $ and ¢ only: a plain zero for prices and allowances (Hubot and Atkinson slash theirs) */
@font-face {
  font-family: "TK Figures";
  src: url("../fonts/mona-sans-latin-wdth-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0024, U+0030-0039, U+00A2;
}

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

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

:root {
  color-scheme: dark;

  /* the logo's colours */
  --black: #000000; /* signal black: the page */
  --white: #ececea; /* K white: text */
  --cyan: #5ee8ea; /* T cyan: action, chosen, bars */
  --pink: #ff2bd6; /* split magenta: savings, the split */

  /* derived */
  --grey: #a1a1aa; /* raster grey: secondary text */
  --grey-dim: #8a8a93; /* tertiary text, still 4.5:1 on panels */
  --panel: #0e0e11;
  --panel-2: #17171c;
  --line: #2a2a32;
  --line-strong: #45454f; /* dividers */
  --edge: #66666f; /* the edge of a control: 3:1 or more on black and panels */
  --cyan-ink: #001a1b; /* text on cyan */
  --cyan-wash: #06201f; /* chosen ground */
  --red: #ff5c5c;
  --red-bg: #2a0508;
  --red-text: #ffe3e3;

  --font-display: "TK Figures", "Hubot Sans", "Arial Black", "Segoe UI", system-ui, sans-serif;
  --font-text: "TK Figures", "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* the logo's split, as a text shadow */
  --split: -0.035em 0 0 var(--pink), 0.035em 0 0 var(--cyan);

  --r-control: 8px;
  --r-panel: 16px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1200px;
  --header-h: 64px;
}

/* ------------------------------------------------------------ base */

/* hidden means hidden, whatever display a component sets */
[hidden] {
  display: none !important;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body > main {
  flex: 1 0 auto;
}

body.has-cart {
  padding-bottom: 6.5rem;
}

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

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 850;
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.8rem, 1.2rem + 3.4vw, 3.25rem);
}

h2 {
  font-size: clamp(2rem, 1.4rem + 1.8vw, 2.6rem);
}

h3 {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-wrap: balance;
}

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

.nowrap {
  white-space: nowrap;
}

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

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

strong,
b {
  font-weight: 700;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

::selection {
  background: var(--pink);
  color: var(--black);
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--cyan);
  color: var(--cyan-ink);
  font-weight: 700;
  border-radius: var(--r-control);
}

.skip-link:focus {
  top: 1rem;
}

.muted {
  color: var(--grey);
}

.fine {
  color: var(--grey);
  font-size: 0.9rem;
  max-width: 66ch;
}

.help {
  color: var(--grey);
  font-size: 0.95rem;
  max-width: 62ch;
  margin: 0.75rem 0 0;
}

.empty {
  color: var(--grey);
}

.text-link,
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-weight: 700;
}

.text-link .icon,
.link-arrow .icon {
  width: 1em;
  height: 1em;
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.55rem 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

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

.btn-primary {
  background: var(--cyan);
  color: var(--cyan-ink);
}

.btn-primary:hover {
  background: var(--white);
}

.btn-primary:disabled {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--grey);
}

.btn-ghost {
  border-color: var(--edge);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-quiet {
  min-height: 40px;
  padding-inline: 0;
  color: var(--grey);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.btn-quiet:hover {
  color: var(--white);
}

.btn-sm {
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  font-size: 0.95rem;
}

.btn-lg {
  min-height: 54px;
  padding-inline: 1.6rem;
  font-size: 1.1rem;
}

.btn-quiet.btn-sm {
  padding-inline: 0;
}

.btn-copy {
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  border-color: var(--edge);
  font-size: 0.95rem;
}

.btn-copy:hover {
  border-color: var(--cyan);
}

.btn-copy.is-copied {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-price {
  font-weight: 800;
  color: var(--cyan);
}

/* ------------------------------------------------------------ notices */

.notice {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--panel);
  max-width: 76ch;
}

.notice-warn {
  border-color: var(--edge);
}

.notice > .icon {
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: -0.2em;
}

.notice-error {
  border-color: var(--red);
  background: var(--red-bg);
  color: var(--red-text);
}

.notice-error a {
  color: var(--white);
}

/* ------------------------------------------------------------ header and footer */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--black);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--white);
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 28px;
}

.brand-word {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--grey);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--r-control);
}

.site-nav a:hover {
  color: var(--cyan);
}

.site-nav a[aria-current="page"] {
  color: var(--cyan);
}

.auth-slot {
  display: flex;
  align-items: center;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.25rem 0.8rem 0.25rem 0.3rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.user-chip:hover {
  border-color: var(--cyan);
}

.user-name {
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.avatar-blank {
  display: inline-grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--cyan);
  font-weight: 800;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 1.15rem;
}

.avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
}

.site-footer {
  margin-top: clamp(4rem, 8vw, 7rem);
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 56ch;
}

.footer-brand img {
  width: auto;
  height: 30px;
}

.footer-brand p {
  margin: 0;
  color: var(--grey);
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  font-weight: 700;
}

.footer-nav a[data-invite="tk"] {
  color: var(--cyan);
}

/* ------------------------------------------------------------ page structure */

.section {
  padding-top: clamp(3.5rem, 6vw, 5rem);
}

.section > .wrap > h2 {
  margin-bottom: 1.75rem;
}

.section-lede {
  max-width: 58ch;
  margin: 0.9rem 0 0;
  color: var(--grey);
  font-size: 1.1rem;
}

/* pages filled in by a request keep the footer below the fold while they load, so nothing jumps */
#order-root,
#account-root {
  min-height: 70vh;
}

.page-head {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 1.75rem;
}

.lede {
  max-width: 54ch;
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------ home: hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: 1.5rem clamp(2rem, 4vw, 4rem);
  padding-top: 2.5rem;
}

.hero-title {
  font-size: clamp(3rem, 1rem + 5.5vw, 5.75rem);
  font-stretch: 125%;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-wrap: initial;
}

/* the three services: each one picks its plans below */
.hero-word {
  display: block;
  width: fit-content;
  color: var(--white);
  text-decoration: none;
  text-shadow: var(--split);
  animation: tk-tune 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-word:hover {
  color: var(--cyan);
}

.hero-word:nth-child(2) {
  animation-delay: 0.06s;
}

.hero-word:nth-child(3) {
  animation-delay: 0.12s;
}

.hero-tail {
  display: block;
  max-width: 34ch;
  margin-top: 1.1rem;
  font-family: var(--font-text);
  font-stretch: 100%;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--grey);
}

/* the colour channels come into register once, as the page loads */
@keyframes tk-tune {
  0% {
    text-shadow: -0.16em 0 0 var(--pink), 0.16em 0 0 var(--cyan);
    opacity: 0.35;
  }
  60% {
    opacity: 1;
  }
  100% {
    text-shadow: var(--split);
    opacity: 1;
  }
}

.hero-copy {
  position: relative;
  isolation: isolate;
}

/* a large, still, ghosted TK mark behind the hero's right column (decoration only) */
.hero-mark {
  position: absolute;
  z-index: -1;
  right: -2rem;
  bottom: 55%;
  width: min(30rem, 120%);
  height: auto;
  opacity: 0.1;
  pointer-events: none;
}

.hero-copy .lede {
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.hero-trust {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  color: var(--grey);
  font-size: 0.95rem;
}

.hero-trust .icon {
  margin-top: 0.2em;
  color: var(--cyan);
}

/* ------------------------------------------------------------ home: plans */

.plans-section {
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.plans-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 2.25rem;
}

.switch {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--panel);
}

.switch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.switch-btn:hover {
  color: var(--cyan);
}

.switch-btn[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--cyan-ink);
}

.switch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.plans-root {
  min-height: 12rem;
}

/* The rack: one panel, one column per tier. Pro (the owners' "Most popular") is lifted out of it. */
.rack {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--panel);
}

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.6rem 1.5rem 1.5rem;
  border-left: 1px solid var(--line);
}

.tier:first-child {
  border-left: 0;
}

.tier.is-featured,
.tier.is-featured:first-child,
.tier.is-featured:last-child {
  border-radius: var(--r-panel);
}

.tier.is-featured {
  z-index: 1;
  margin: -12px 0;
  padding-top: calc(1.6rem + 10px);
  padding-bottom: calc(1.5rem + 12px);
  border: 1px solid var(--edge);
  border-top: 3px solid var(--cyan);
  border-radius: var(--r-panel);
  background: var(--panel-2);
}

.tier.is-featured + .tier {
  border-left: 0;
}

.tier.is-chosen {
  box-shadow: inset 0 0 0 2px var(--white);
}

/* the rack is rounded: its outer cells carry its corners, so a filled or outlined cell never squares one off */
.tier:first-child {
  border-radius: var(--r-panel) 0 0 var(--r-panel);
}

.tier:last-child {
  border-radius: 0 var(--r-panel) var(--r-panel) 0;
}

.tier-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-stretch: 125%;
  font-weight: 850;
  line-height: 1;
}

.tier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.75rem;
  margin: 0.75rem 0 0;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--grey);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
}

/* the owners' label: a white fill */
.tag--hot {
  border-color: var(--white);
  background: var(--white);
  color: var(--black);
}

/* a computed value claim: magenta, the colour of value */
.tag--best {
  border-color: var(--pink);
  color: var(--pink);
}

.tier-daily {
  display: flex;
  flex-direction: column;
  margin: 1.25rem 0 0;
}

/* the dominant number: what you get every day */
.tier-daily-num {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: clamp(3.25rem, 1.6rem + 2.6vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.tier-unit {
  margin-top: 0.3rem;
  color: var(--white);
  font-weight: 700;
}

/* the allowance strip: its length is this tier's share of the biggest daily allowance; split like the logo */
.tier-strip {
  position: relative;
  display: block;
  height: 8px;
  margin: 0.85rem 0 0.6rem;
  background: var(--panel-2);
}

.tier.is-featured .tier-strip {
  background: var(--black);
}

.tier-strip-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: max(4px, calc(var(--share, 0) * 100%));
  background: var(--cyan);
  box-shadow: -3px -2px 0 var(--pink);
}

.tier-strip-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -3px;
  width: 1px;
  background: var(--cyan);
}

.tier.is-locked .tier-strip-fill {
  background: var(--edge);
  box-shadow: none;
}

.tier.is-locked .tier-strip-fill::after {
  background: var(--edge);
}

.tier-total {
  margin: 0;
  color: var(--grey);
  font-size: 0.95rem;
}

.tier-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.5rem;
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.tier-price-num {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 850;
  font-size: 2rem;
  line-height: 1;
}

.tier-price-note {
  color: var(--grey);
  font-size: 0.95rem;
}

.tier-rate {
  margin: 0.5rem 0 0;
  color: var(--grey);
  font-size: 0.95rem;
}

.tier-rate strong {
  color: var(--white);
}

/* the computed saving, staged as display type */
.tier-save {
  display: flex;
  flex-direction: column;
  margin: 1rem 0 0;
}

.tier-save-value {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--pink);
}

.tier-save-rest {
  margin-top: 0.2rem;
  color: var(--grey);
  font-size: 0.9rem;
}

/* the step up from the tier below, or what the cheapest plan is for */
.tier-step {
  margin: 1rem 0 0;
  color: var(--white);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.4;
}

.tier-action {
  margin-top: auto;
  padding-top: 1.4rem;
}

.tier-add {
  width: 100%;
  border-color: var(--edge);
}

.tier-add:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* the featured tier's call to action is the one filled button in the rack */
.tier.is-featured .tier-add {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--cyan-ink);
}

.tier.is-featured .tier-add:hover {
  border-color: var(--white);
  background: var(--white);
}

/* chosen: white, with a tick, whichever tier it is */
.tier .tier-add.is-chosen {
  border-color: var(--white);
  background: var(--white);
  color: var(--black);
}

.tier-locked {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px dashed var(--edge);
  border-radius: var(--r-control);
  color: var(--grey);
  font-size: 0.92rem;
}

.tier-locked .icon {
  margin-top: 0.15em;
}

/* changing service re-registers the figures, like a changed channel (switched off for reduced motion) */
.rack.is-tuning .tier-daily-num,
.rack.is-tuning .tier-price-num {
  animation: tk-retune 0.26s steps(3, end) both;
}

@keyframes tk-retune {
  0% {
    text-shadow: -0.12em 0 0 var(--pink), 0.12em 0 0 var(--cyan);
    transform: translateX(3px);
  }
  50% {
    text-shadow: 0.08em 0 0 var(--pink), -0.08em 0 0 var(--cyan);
    transform: translateX(-2px);
  }
  100% {
    text-shadow: none;
    transform: none;
  }
}

/* the meter: what one dollar buys on each tier (a longer bar is more) */
.meter {
  margin: 2.75rem 0 0;
  padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}

.meter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 0.6rem;
}

.meter-head h3 {
  font-size: 1.2rem;
}

.meter-head p {
  margin: 0;
  color: var(--grey);
  font-size: 0.95rem;
}

.meter-table {
  width: 100%;
  border-collapse: collapse;
}

.meter-row th,
.meter-row td {
  padding: 0.35rem 0;
  vertical-align: middle;
  text-align: left;
}

.meter-row th {
  width: 6.5rem;
  padding-right: 1rem;
  font-weight: 700;
}

.meter-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.meter-track {
  flex: 1;
  min-width: 4rem;
  height: 12px;
  background: var(--panel-2);
}

.meter-fill {
  display: block;
  height: 100%;
  width: calc(var(--share, 0) * 100%);
  background: var(--grey-dim);
}

.meter-row.is-cheaper .meter-fill {
  background: var(--cyan);
  box-shadow: -3px -2px 0 var(--pink);
}

.meter-value {
  min-width: 4.5rem;
  font-family: var(--font-display);
  font-stretch: 90%;
  font-weight: 800;
  font-size: 1.15rem;
  text-align: right;
}

.meter-note {
  width: 17rem;
  padding-left: 1.5rem;
  color: var(--grey);
  font-size: 0.92rem;
}

.meter-row td.meter-note {
  padding-left: 1.5rem;
}

.meter-note--less {
  color: var(--pink);
  font-weight: 700;
}

.upgrade-note {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 2rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--edge);
  border-radius: var(--r-panel);
}

.upgrade-icon {
  flex: none;
  margin-top: 0.2em;
  color: var(--cyan);
}

.upgrade-line {
  margin: 0;
  font-size: 1.1rem;
}

.plans-hint p {
  margin: 0.2rem 0 0;
  color: var(--grey);
}

.upgrade-list {
  list-style: none;
  margin-top: 0.3rem;
  display: grid;
  gap: 0.2rem;
}

.rules {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin-top: 1.75rem;
  color: var(--grey);
  font-size: 0.95rem;
}

.rules strong {
  display: block;
  color: var(--white);
}

/* ------------------------------------------------------------ home: two ways to pay */

.ways {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.way {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--panel);
}

.way h3 {
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.way p {
  max-width: 52ch;
}

.way .btn {
  margin-top: auto;
}

.coin-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
}

.coin-chip {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

/* ------------------------------------------------------------ home: how it works */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 4rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--cyan);
  text-shadow: -3px 0 0 var(--pink);
}

.steps h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.steps p {
  margin: 0;
  color: var(--grey);
}

.steps .step-fact {
  margin-top: 0.6rem;
  color: var(--white);
  font-weight: 700;
}

.faq-row-lead {
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--grey);
  font-weight: 700;
}

.faq-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 2rem;
}

.faq-row a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0.5rem 0;
  color: var(--cyan);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.faq-row a:hover {
  color: var(--cyan);
}

/* the FAQ answer about the login: what Discord shares, what we never see */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.split-col {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
}

.split-col h3 {
  margin-bottom: 0.75rem;
  color: var(--white);
  font-size: 1.05rem;
}

.tick-list,
.cross-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.tick-list li,
.cross-list li {
  position: relative;
  padding-left: 1.7rem;
}

.tick-list li::before,
.cross-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 1em;
  height: 1em;
  -webkit-mask: url("../img/check.svg") center / contain no-repeat;
  mask: url("../img/check.svg") center / contain no-repeat;
  background: var(--cyan);
}

.cross-list li::before {
  -webkit-mask-image: url("../img/cross.svg");
  mask-image: url("../img/cross.svg");
  background: var(--grey);
}

/* ------------------------------------------------------------ cart bar */

.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--black);
  border-top: 2px solid var(--cyan);
  box-shadow: 0 -2px 0 var(--pink);
}

.cart-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding-block: 0.6rem;
}

.cart-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.9rem;
  margin: 0;
  min-width: 0;
}

.cart-count {
  font-weight: 700;
}

.cart-total {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 850;
  font-size: 1.4rem;
  color: var(--cyan);
}

.cart-names {
  flex-basis: 100%;
  color: var(--grey);
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

/* ------------------------------------------------------------ checkout */

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.checkout-steps {
  display: grid;
  gap: 1rem;
  counter-reset: none;
}

#pay-form {
  display: grid;
  gap: 1rem;
}

.step {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--panel);
}

.step h2 {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-text);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.step-num {
  font-stretch: 75%;
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 0.8;
  color: var(--cyan);
  text-shadow: -2px 0 0 var(--pink);
}

.cart-lines {
  list-style: none;
  display: grid;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.cart-line:first-child {
  border-top: 0;
  padding-top: 0;
}

.cart-line-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.cart-line-main strong {
  font-weight: 800;
  font-size: 1.1rem;
}

.cart-line-kind {
  flex-basis: 100%;
  color: var(--grey);
  font-size: 0.92rem;
}

.cart-line-price {
  display: grid;
  justify-items: end;
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 850;
  font-size: 1.3rem;
}

.cart-line.has-problem .cart-line-price {
  color: var(--grey);
}

.not-in-total {
  font-family: var(--font-text);
  font-stretch: 100%;
  font-size: 0.85rem;
  font-weight: 700;
}

.cart-line-problem {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-control);
  background: var(--red-bg);
  color: var(--red-text);
  font-size: 0.95rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.chip--active {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--cyan-ink);
}

.chip--active::after,
.chip--ticket::before {
  content: "";
  flex: none;
  width: 0.95em;
  height: 0.95em;
  background: currentColor;
  -webkit-mask: url("../img/check.svg") center / contain no-repeat;
  mask: url("../img/check.svg") center / contain no-repeat;
}

/* needs a person: white outline and a warning sign (magenta is kept for value) */
.chip--ticket {
  border-color: var(--white);
  color: var(--white);
}

.chip--ticket::before {
  -webkit-mask-image: url("../img/alert.svg");
  mask-image: url("../img/alert.svg");
}

.chip--waiting {
  border-color: var(--cyan);
  color: var(--cyan);
}

.chip--cancelled {
  color: var(--grey);
}

.account-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.account-line p {
  flex: 1 1 16rem;
  margin: 0;
}

#account-box > p {
  max-width: 62ch;
}

/* the steps are drawn once the cart, the login and the coins are known, so nothing jumps on the way */
.checkout-grid.is-loading {
  visibility: hidden;
}

#checkout-banner {
  max-width: none;
}

.checkout-loading {
  margin: 0 0 1rem;
  color: var(--grey);
}

.coin-fieldset,
.confirm-box {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.coin-fieldset:disabled,
.confirm-box:disabled {
  opacity: 0.5;
}

.coin-group + .coin-group {
  margin-top: 1.5rem;
}

.coin-group-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.coin-group-title span {
  color: var(--grey);
  font-size: 0.92rem;
}

.coin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.6rem;
}

.coin-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.coin-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.coin-body {
  display: grid;
  gap: 0.1rem;
  height: 100%;
  min-height: 84px;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--edge);
  border-radius: var(--r-control);
  background: var(--black);
  transition: border-color 0.15s ease;
}

.coin-option:hover .coin-body {
  border-color: var(--grey);
}

.coin-code {
  font-weight: 800;
  font-size: 1.15rem;
}

.coin-net {
  font-weight: 700;
}

.coin-std {
  color: var(--grey);
  font-size: 0.88rem;
}

.coin-option input:checked + .coin-body {
  border-color: var(--cyan);
  background: var(--cyan-wash);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.coin-option input:checked + .coin-body .coin-code {
  color: var(--cyan);
}

.coin-option input:focus-visible + .coin-body {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.coin-fieldset:disabled .coin-option {
  cursor: not-allowed;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  background: var(--black);
  cursor: pointer;
}

.check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check-mark {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  margin-top: 0.05rem;
  border: 2px solid var(--white);
  border-radius: 6px;
}

.check input:checked + .check-mark {
  border-color: var(--cyan);
  background: var(--cyan);
}

.check input:checked + .check-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 7px;
  height: 14px;
  border: solid var(--cyan-ink);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.check input:focus-visible + .check-mark {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.check-text {
  font-weight: 700;
  font-size: 1.08rem;
}

.confirm-box:disabled .check {
  cursor: not-allowed;
}

.turnstile-box {
  margin-top: 1.25rem;
}

.todo {
  min-height: 1.5em;
  margin: 1.1rem 0 0.75rem;
  color: var(--grey);
}

#submit {
  width: 100%;
}

.form-status {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  padding: 0.85rem 1rem;
  border: 1px solid var(--red);
  border-radius: var(--r-control);
  background: var(--red-bg);
  color: var(--red-text);
}

.form-status .icon {
  margin-top: 0.2em;
}

.form-status a {
  color: var(--white);
}

.checkout-aside {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}

.aside-title {
  margin-bottom: 1rem;
  font-family: var(--font-text);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0;
}

.summary-lines {
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.summary-lines li,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.summary-total {
  align-items: baseline;
  margin: 1rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
  font-weight: 700;
}

.summary-total strong {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 880;
  font-size: 2rem;
  color: var(--cyan);
}

.summary-total strong.is-empty {
  color: var(--grey);
}

.aside-sub {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.05rem;
}

.mini-steps {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
  color: var(--grey);
  font-size: 0.95rem;
}

.mini-steps li::marker {
  color: var(--cyan);
  font-weight: 700;
}

.aside-ways {
  margin-top: 1.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

.aside-ways p {
  color: var(--grey);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------ order page */

.order-meta {
  margin: 0.75rem 0 0;
  color: var(--grey);
}

/* ids keep the slashed zero of the mono face */
.order-ref {
  font-family: var(--font-mono);
  color: var(--white);
  font-weight: 700;
}

/* until the order has loaded its heading is not shown: the first drawn state decides the layout */
.order-loading .page-head {
  visibility: hidden;
}

/* while it loads, only the loading line shows: the footer and the (empty) order area are not drawn, so when the
   order arrives nothing that was on screen jumps down (no layout shift) */
.order-loading #order-root,
.order-loading .site-footer {
  visibility: hidden;
}

.order-loading #order-root > [role="status"] {
  visibility: visible;
}

/* after paying, every state reads as one centred column (the track too) */
.order-narrow .page-head,
.order-narrow #conn-note,
.order-narrow #order-root {
  max-width: 760px;
  margin-inline: auto;
}

.order-narrow .status-panel,
.order-narrow .order-items {
  max-width: none;
}

.order-track {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 2rem;
}

.track-step {
  position: relative;
  display: grid;
  gap: 0.6rem;
  padding-right: 1rem;
  color: var(--grey);
  font-size: 0.95rem;
  font-weight: 700;
}

.track-step::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 30px;
  right: 4px;
  height: 2px;
  background: var(--line-strong);
}

.track-step:last-child::after {
  display: none;
}

.track-step.is-done::after {
  background: var(--cyan);
}

.track-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--black);
}

.track-dot .icon {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

.track-step.is-done,
.track-step.is-now,
.track-step.is-alert {
  color: var(--white);
}

.track-step.is-done .track-dot {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--cyan-ink);
}

.track-step.is-now .track-dot {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 5px var(--black), inset 0 0 0 14px var(--cyan);
}

/* needs a person: white and an exclamation, not the value colour */
.track-step.is-alert .track-dot {
  border-color: var(--white);
  box-shadow: inset 0 0 0 5px var(--black), inset 0 0 0 14px var(--white);
}

/* the current step in words: what narrow screens show instead of the labels */
.track-now {
  display: none;
}

.pay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.pay-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

/* the payment slip: amount, network and address as rows of one panel */
.slip {
  border: 1px solid var(--edge);
  border-radius: var(--r-panel);
  background: var(--panel);
}

.slip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem clamp(1.25rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--line);
}

.slip-title {
  font-family: var(--font-text);
  font-stretch: 100%;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.slip-row {
  padding: 1.25rem clamp(1.25rem, 3vw, 1.75rem);
}

.slip-row + .slip-row {
  border-top: 1px solid var(--line);
}

/* the order cannot take a payment any more: the values that would start one fade back (the QR image, the amount,
   the address); every label, line and button stays at full contrast */
.pay.is-timeup .qr-svg,
.pay.is-timeup .amount-line {
  opacity: 0.45;
}

/* the address is body-size text, so it greys out by colour instead (6.1:1 on black, still AA) */
.pay.is-timeup .address,
.pay.is-timeup .addr-edge {
  color: var(--grey-dim);
}

/* "Time is up": no empty bar under it */
.timer.is-up .timer-bar {
  display: none;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
  color: var(--grey);
  font-size: 0.95rem;
  font-weight: 700;
}

.amount-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.75rem;
  margin: 0 0 1rem;
}

.amount-figure {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.2rem + 5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.amount-coin {
  font-weight: 800;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2rem);
  color: var(--cyan);
}

.amount-sub {
  margin: 1rem 0 0;
  color: var(--grey);
  font-size: 0.95rem;
  max-width: 60ch;
}

.network-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0;
}

.network-name strong {
  font-weight: 800;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem);
}

.network-name .std {
  color: var(--grey);
}

.address {
  display: block;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--edge);
  border-radius: var(--r-control);
  background: var(--black);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.addr-edge {
  color: var(--cyan);
  font-weight: 800;
}

.exact-warning {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 2px solid var(--red);
  border-radius: var(--r-panel);
  background: var(--red-bg);
  color: var(--red-text);
  --accent: var(--red);
}

.exact-warning-title {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: var(--white);
  font-family: var(--font-text);
  font-stretch: 100%;
  font-weight: 800;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  letter-spacing: 0;
  line-height: 1.25;
}

.exact-warning-title .icon {
  margin-top: 0.1em;
  color: var(--red);
}

.exact-list {
  display: grid;
  gap: 0.55rem;
  padding-left: 1.2rem;
}

.exact-list li::marker {
  color: var(--red);
}

.exact-list strong {
  color: var(--white);
}

.exact-foot {
  margin: 1rem 0 0;
}

.exact-foot a {
  color: var(--white);
}

/* at time-up this one line is the whole red box (the heading, the list and the foot are hidden) */
.exact-late,
.exact-late-more {
  --late-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem); /* the line's size, which the link below reads to sit under the text, not the icon */
}

.exact-late {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  color: var(--white);
  font-size: var(--late-size);
  font-weight: 700;
  line-height: 1.4;
}

.exact-late .icon {
  flex: none;
  margin-top: 0.15em;
  color: var(--red);
}

.exact-late a {
  color: var(--white);
}

/* a small link under the line: the rule behind "we still match". It is indented by what the icon takes in front of the text
   (the icon is 1.15em of the line, then the 0.6rem gap), so it starts where the words above it start. */
.exact-late-more {
  margin: 0.4rem 0 0;
  padding-left: calc(var(--late-size) * 1.15 + 0.6rem);
  font-size: 0.95rem;
}

.exact-late-more a {
  color: var(--white);
}

.pay-side {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: grid;
  gap: 1rem;
}

/* "Held for 26:39" in the slip's header, with a thin bar */
.timer {
  display: grid;
  gap: 0.4rem;
  min-width: 11rem;
}

.timer-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--grey);
  font-weight: 700;
}

.timer-line .icon {
  color: var(--cyan);
}

.countdown {
  margin-left: 0.15rem;
  font-family: var(--font-display);
  font-stretch: 90%;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--white);
}

.timer-bar {
  height: 4px;
  background: var(--panel-2);
  overflow: hidden;
}

.timer-bar-fill {
  display: block;
  height: 100%;
  background: var(--cyan);
  transform-origin: left center;
  transform: scaleX(var(--left, 1));
  transition: transform 1s linear;
}

.timer.is-low .timer-bar-fill {
  background: var(--white);
}

/* time is up: grey bar, white figures */
.timer.is-up .timer-bar-fill {
  background: var(--grey);
}

.timer.is-up .timer-line .icon {
  color: var(--grey);
}

.qr {
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--panel);
}

.qr-svg {
  width: min(100%, 280px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 6px;
}

.qr figcaption,
.qr-missing {
  margin-top: 0.85rem;
  color: var(--grey);
  font-size: 0.92rem;
}

.qr-missing {
  margin: 0;
}

.live-status {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  color: var(--grey);
  font-size: 0.95rem;
}

.dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--cyan);
  animation: tk-live 1.6s ease-in-out infinite;
}

/* the live dot: the page is checking for the payment */
@keyframes tk-live {
  50% {
    opacity: 0.25;
  }
}

.status-panel {
  max-width: 820px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--panel);
}

.status-panel h2 {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-text);
  font-stretch: 100%;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1.25;
}

.status-panel > p {
  max-width: 64ch;
}

.status-panel--paid[data-state="active"] {
  border-color: var(--cyan);
}

.status-panel--paid[data-state="ticket"],
.status-panel--review {
  border-color: var(--white);
}

.status-panel--review h2 .icon {
  color: var(--white);
}

.paid-lead {
  color: var(--grey);
}

.confirm-progress {
  display: block;
  width: 100%;
  height: 12px;
  margin: 1.5rem 0 0.75rem;
  border: 0;
  background: var(--panel-2);
  appearance: none;
  -webkit-appearance: none;
}

.confirm-progress::-webkit-progress-bar {
  background: var(--panel-2);
}

.confirm-progress::-webkit-progress-value {
  background: var(--cyan);
}

.confirm-progress::-moz-progress-bar {
  background: var(--cyan);
}

.confirm-text {
  font-weight: 800;
  font-size: 1.25rem;
}

.tx-line {
  display: grid;
  gap: 0.25rem;
  margin: 1rem 0;
}

.tx-id {
  overflow-wrap: normal;
  word-break: normal;
  color: var(--white);
}

.payment-recap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.payment-recap summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

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

.payment-recap summary::before {
  content: "+";
  width: 1ch;
  color: var(--cyan);
  font-size: 1.3rem;
}

.payment-recap[open] summary::before {
  content: "\2212";
}

.payment-recap dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.4rem 1.25rem;
  margin: 0.5rem 0 0;
}

.payment-recap dt {
  color: var(--grey);
}

.payment-recap dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.purchase-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.purchase {
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--black);
}

.purchase--active {
  border-color: var(--cyan);
}

.purchase--ticket {
  border-color: var(--white);
}

.purchase-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.4rem;
}

.purchase-head strong {
  font-weight: 800;
  font-size: 1.1rem;
}

.purchase-kind {
  color: var(--grey);
  font-size: 0.92rem;
}

.purchase-detail {
  margin: 0;
  color: var(--grey);
}

/* what the bot noted: a bordered panel, not a left-stripe callout */
.purchase-reason {
  display: grid;
  gap: 0.2rem;
  margin: 0.75rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.purchase-reason .field-label {
  margin: 0;
}

.paid-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}

.ticket-box {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.ticket-box .order-number {
  margin-top: 0;
}

.ticket-box .btn {
  justify-self: start;
}

.order-number {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 1.25rem 0 0;
}

.order-number .field-label {
  flex-basis: 100%;
  margin: 0;
}

.order-number-id {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--edge);
  border-radius: var(--r-control);
  background: var(--black);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.order-items {
  max-width: 820px;
  margin-top: 2.5rem;
}

.order-items h2 {
  margin-bottom: 1rem;
  font-family: var(--font-text);
  font-stretch: 100%;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.order-items ul {
  list-style: none;
}

.order-items li,
.order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.order-items li .muted {
  font-size: 0.95rem;
}

.order-total {
  margin: 0;
  border-top: 1px solid var(--line-strong);
  font-weight: 700;
}

.order-total strong {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 880;
  font-size: 1.5rem;
}

/* ------------------------------------------------------------ account */

.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--panel);
}

.profile-text {
  flex: 1 1 14rem;
  min-width: 0;
}

.profile-name {
  margin: 0;
  font-weight: 800;
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}

.profile-id {
  margin: 0;
  color: var(--grey);
  font-size: 0.95rem;
}

.account-section + .account-section {
  margin-top: 3rem;
}

.account-section > h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

.plan-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.plan-card {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.75rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.plan-card h3 {
  font-size: 1.3rem;
}

.plan-card-body {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.plan-card-body p {
  margin: 0;
}

.plan-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  font-weight: 700;
}

.plan-end {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
}

.plan-end .field-label {
  margin: 0;
}

.plan-note-line {
  color: var(--grey);
  font-size: 0.95rem;
  max-width: 62ch;
}

.offer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.order-rows {
  list-style: none;
  border-top: 1px solid var(--line);
}

.order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.order-row-main {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.order-row-id {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.orders-sub {
  margin: 1.5rem 0 0.5rem;
  color: var(--grey);
  font-size: 1rem;
}

.orders-expired {
  margin-top: 0.5rem;
}

.orders-expired summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--grey);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

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

.orders-expired summary::before {
  content: "+";
  width: 1ch;
  color: var(--cyan);
  font-size: 1.3rem;
}

.orders-expired[open] summary::before {
  content: "\2212";
}

.order-row-meta {
  color: var(--white);
}

.order-row-date {
  color: var(--grey);
  font-size: 0.92rem;
}

.account-section .fine {
  margin-top: 1rem;
}

/* ------------------------------------------------------------ FAQ, terms, 404 */

.faq {
  max-width: 860px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 1rem 3rem 1rem 0;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--cyan);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq summary:hover {
  color: var(--cyan);
}

.answer {
  max-width: 68ch;
  padding: 0 0 1.25rem;
  color: var(--grey);
}

.answer strong {
  color: var(--white);
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin: 2.25rem 0 0.6rem;
  font-family: var(--font-text);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--grey);
}

.lost {
  padding: clamp(3rem, 8vw, 6rem) 0 2rem;
}

.lost-code {
  margin: 0 0 1rem;
  font-family: "Hubot Sans", "Arial Black", system-ui, sans-serif;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(5rem, 3rem + 12vw, 12rem);
  line-height: 0.85;
  text-shadow: -0.04em 0 0 var(--pink), 0.04em 0 0 var(--cyan);
}

.lost h1 {
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------ narrower screens */

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .hero-copy {
    max-width: 60ch;
  }

  .hero-mark {
    display: none;
  }

  .rack {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tier {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .tier:nth-child(-n + 2) {
    border-top: 0;
  }

  .tier:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .tier.is-featured {
    margin: 0;
    padding-top: calc(1.6rem - 2px);
    padding-bottom: 1.5rem;
    border-width: 3px 0 0;
  }

  /* two columns: the outer corners go to the cells that sit in them */
  .tier,
  .tier:first-child,
  .tier:last-child,
  .tier.is-featured,
  .tier.is-featured:first-child,
  .tier.is-featured:last-child {
    border-radius: 0;
  }

  .tier:nth-child(1) {
    border-top-left-radius: var(--r-panel);
  }

  .tier:nth-child(2) {
    border-top-right-radius: var(--r-panel);
  }

  .tier:nth-last-child(2):nth-child(odd) {
    border-bottom-left-radius: var(--r-panel);
  }

  .tier:last-child:nth-child(even) {
    border-bottom-right-radius: var(--r-panel);
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.25rem;
  }

  .faq-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* the coins fill the panel in even rows (two rows of three) */
  .coin-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .coin-chip {
    text-align: center;
  }

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

  .checkout-aside,
  .pay-side {
    position: static;
  }

  .meter-note,
  .meter-row td.meter-note {
    width: 14rem;
  }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .auth-slot {
    margin-left: auto;
  }

  .hero {
    gap: 1.25rem;
    padding-top: 2rem;
  }

  .plans-head {
    margin-bottom: 1.25rem;
  }

  .switch {
    display: flex;
    width: 100%;
  }

  .switch-btn {
    flex: 1;
    justify-content: center;
    padding: 0 0.5rem;
    font-size: 1rem;
  }

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

  .tier,
  .tier:nth-child(even) {
    border-left: 0;
  }

  .tier:nth-child(2) {
    border-top: 1px solid var(--line);
  }

  .tier.is-featured,
  .tier.is-featured:nth-child(2) {
    border-top: 3px solid var(--cyan);
  }

  .tier:nth-child(2),
  .tier:nth-last-child(2):nth-child(odd),
  .tier:last-child:nth-child(even) {
    border-radius: 0;
  }

  .tier:first-child {
    border-radius: var(--r-panel) var(--r-panel) 0 0;
  }

  .tier:last-child,
  .tier:last-child:nth-child(even) {
    border-radius: 0 0 var(--r-panel) var(--r-panel);
  }

  /* each tier is a row: name and price side by side, the figure and its strip under them */
  .tier {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
    padding: 1rem 1rem 1.1rem;
  }

  .section {
    padding-top: 2.75rem;
  }

  .tier-strip {
    margin: 0.55rem 0 0.4rem;
  }

  .tier-unit {
    margin-top: 0;
  }

  .tier-rate {
    margin-top: 0.2rem;
  }

  .tier-step {
    margin-top: 0.55rem;
  }

  .meter {
    margin-top: 1.75rem;
    padding: 0.9rem 1rem;
  }

  .way {
    padding: 1.25rem;
  }

  .upgrade-note {
    margin-top: 1.5rem;
    padding: 1rem;
  }

  .tier > * {
    grid-column: 1 / -1;
  }

  .tier-name {
    grid-column: 1;
    font-size: 2rem;
  }

  .tier-tags {
    grid-column: 1;
    min-height: 0;
    margin-top: 0.5rem;
  }

  .tier-tags:empty {
    display: none;
  }

  .tier-price {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: flex-end;
    justify-self: end;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: right;
  }

  .tier-price-note {
    font-size: 0.85rem;
  }

  .tier-daily {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.5rem;
    margin-top: 0.6rem;
  }

  .tier-daily-num {
    font-size: 3.25rem;
  }

  .tier-save {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.5rem;
    margin-top: 0.5rem;
  }

  .tier-save-value {
    font-size: 2rem;
  }

  .tier-action {
    padding-top: 0.85rem;
  }

  .meter-row {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    align-items: center;
    padding: 0.3rem 0;
  }

  .meter-row th,
  .meter-row td {
    padding: 0;
  }

  .meter-row th {
    width: auto;
  }

  .meter-note,
  .meter-row td.meter-note {
    grid-column: 2;
    width: auto;
    padding: 0.15rem 0 0;
    font-size: 0.88rem;
  }

  .meter-value {
    min-width: 3.75rem;
    font-size: 1.05rem;
  }

  .rules,
  .split,
  .steps,
  .ways {
    grid-template-columns: minmax(0, 1fr);
  }

  .rules {
    gap: 0.6rem;
    margin-top: 1rem;
    font-size: 0.92rem;
  }

  .steps {
    row-gap: 1.2rem;
  }

  .site-footer {
    margin-top: 3rem;
    padding: 2rem 0 2.25rem;
  }

  .steps li {
    padding: 0 0 0 3.25rem;
  }

  .steps li::before {
    font-size: 2.6rem;
  }

  .faq-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .faq-row-lead {
    margin-top: 1.5rem;
  }

  .steps .step-fact {
    margin-top: 0.35rem;
  }

  .faq-row a {
    min-height: 48px;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .cart-bar-row {
    gap: 0.75rem;
  }

  .cart-actions .btn-quiet {
    padding-inline: 0.4rem;
  }

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

  .coin-body {
    min-height: 72px;
    padding: 0.55rem 0.75rem;
    gap: 0;
  }

  .coin-std {
    font-size: 0.8rem;
  }

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

  .cart-line > .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .slip-head {
    align-items: stretch;
  }

  .timer {
    flex: 1 1 100%;
  }

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

  .order-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .paid-actions .btn-primary {
    flex: 1 1 100%;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.5rem;
    width: 100%;
  }
}

/* below 480 px the track is dots only, with one line naming the current step */
@media (max-width: 480px) {
  /* "Before you pay" as one column; the spacing below is trimmed so the home page stays under 4,800 px at 390 */
  .faq-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-row a {
    min-height: 44px;
  }

  .faq-row-lead {
    margin-top: 1.25rem;
  }

  .steps {
    row-gap: 1rem;
  }

  .section {
    padding-top: 2.25rem;
  }

  .section > .wrap > h2 {
    margin-bottom: 1.4rem;
  }

  .site-footer {
    margin-top: 2.25rem;
  }

  .order-track {
    margin-bottom: 0.6rem;
  }

  .track-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .track-now {
    display: block;
    margin: 0 0 1.5rem;
    font-weight: 700;
  }
}

@media (max-width: 420px) {
  .brand-word {
    display: none;
  }

  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-word,
  .rack.is-tuning .tier-daily-num,
  .rack.is-tuning .tier-price-num {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .hero-word {
    text-shadow: var(--split);
  }

  .rack.is-tuning .tier-daily-num,
  .rack.is-tuning .tier-price-num {
    text-shadow: none;
  }
}
