/* ==========================================================================================================
   ROVA checkout layer: /buy, /order, /manage (OWNER: checkout). Design: Review/screens/redesign/DIRECTION.md
   ("Clear water", the wallet-app pay screen). One step per screen, one centred card, one live status.

   Self-contained on purpose: these pages load only tokens.css (the --rova-* brand tokens, light + dark, whatever
   rule picks the theme) and this file. Every colour below is a --rova-* token or mixed from one, so the pages follow
   the site's palette and theme switch without their own theme rules. No inline styles anywhere (CSP 'self'): the
   scripts only set custom properties (--p, the timer bar) on elements.
   ========================================================================================================== */

/* ---------------------------------------------------------------- Geist (SIL OFL, self-hosted; same files as the site) */
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/geist-latin-wght.woff2") format("woff2");
  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: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/geist-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

/* ---------------------------------------------------------------- the checkout's names for the brand tokens */
.co {
  --co-page: var(--rova-page);
  --co-card: var(--rova-surface);
  --co-ink: var(--rova-ink);
  --co-ink-2: var(--rova-ink-2);
  --co-muted: var(--rova-muted);
  --co-line: var(--rova-line);
  --co-line-2: color-mix(in oklab, var(--rova-ink) 22%, var(--rova-surface));
  --co-mist: var(--rova-mist, color-mix(in oklab, var(--rova-ink) 5%, var(--rova-surface)));
  --co-mist-2: var(--rova-mist-2, color-mix(in oklab, var(--rova-ink) 9%, var(--rova-surface)));
  --co-btn: var(--rova-btn, var(--rova-ink));
  --co-btn-ink: var(--rova-btn-ink, var(--rova-page));
  --co-accent: var(--rova-accent-text, var(--rova-accent));
  --co-accent-soft: var(--rova-accent-soft);
  --co-live: var(--rova-success);
  --co-live-soft: var(--rova-success-soft);
  --co-warn: var(--rova-warning);
  --co-warn-soft: var(--rova-warning-soft);
  --co-danger: var(--rova-danger);
  --co-danger-soft: var(--rova-danger-soft);
  --co-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 14px 44px -14px rgb(0 0 0 / .2);
  --co-mono: var(--rova-font-mono, ui-monospace, "Cascadia Mono", Consolas, monospace);
  --co-gut: 16px;
  --co-w: 820px;          /* the pay card */
  --co-w-narrow: 640px;   /* /buy, /manage, the resume form */
  --co-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------------------------------------------------------------- base (these pages load no kit reset) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.co {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--co-page) 0, color-mix(in oklab, var(--rova-ink) 2.5%, var(--co-page)) 100%) var(--co-page);
  color: var(--co-ink); font: 400 16px/1.5 var(--rova-font-sans, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.co *, .co *::before, .co *::after { box-sizing: border-box; }
.co :where(h1, h2, h3, h4, p, ol, ul, dl, dd, figure, fieldset, legend, blockquote) { margin: 0; padding: 0; }
.co :where(ol, ul) { list-style: none; }
.co :where(h1, h2, h3, h4) { font-weight: 600; }
.co :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
.co :where(button) { background: none; border: 0; padding: 0; cursor: pointer; }
.co :where(img, svg) { display: block; max-width: 100%; }
.co :where(a) { color: inherit; }
.co :where(fieldset) { border: 0; min-width: 0; }
.co :where(p, li, dd) { text-wrap: pretty; }
.co [hidden] { display: none !important; }
.co :focus { outline: none; }
.co :focus-visible { outline: 2px solid var(--rova-focus); outline-offset: 2px; }
.co ::selection { background: color-mix(in oklab, var(--rova-focus) 34%, transparent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.co-copy-buffer { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; font-size: 16px; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--co-mono); }

.co-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- the minimal header (logo + theme; scrolls away) */
.co-skip { position: absolute; left: 12px; top: 12px; z-index: 50; padding: 12px 18px; border-radius: 999px; background: var(--co-ink); color: var(--co-page);
  font-weight: 600; text-decoration: none; transform: translateY(-160%); transition: transform .15s var(--co-ease); }
.co-skip:focus-visible { transform: none; }
.co-head {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; max-width: 1240px; margin: 0 auto; min-height: 72px;
  padding: env(safe-area-inset-top, 0px) max(var(--co-gut), env(safe-area-inset-right, 0px)) 0 max(var(--co-gut), env(safe-area-inset-left, 0px));
}
.co-logo { display: inline-flex; align-items: center; min-height: 44px; margin-left: -6px; padding: 0 6px; border-radius: 10px; text-decoration: none; }
.co-logo svg { height: 34px; width: auto; }
.co-logo .lg-b { fill: var(--rova-brand, var(--rova-c-kingfisher)); }
.co-logo .lg-w { fill: var(--co-ink); }
.co-theme { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--co-muted); transition: color .15s, background-color .15s; }
.co-theme svg { width: 20px; height: 20px; }
/* the same moon / sun icon as the home page: the sun shows in dark (it switches to light), the moon in light */
.co-theme svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.co-theme .i-moon { display: none; }
:root[data-theme="light"] .co-theme .i-moon { display: block; }
:root[data-theme="light"] .co-theme .i-sun { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .co-theme .i-moon { display: block; }
  :root:not([data-theme="dark"]) .co-theme .i-sun { display: none; }
}
@media (hover: hover) and (pointer: fine) { .co-theme:hover { color: var(--co-ink); background: var(--co-mist); } }
@media (min-width: 768px) { .co { --co-gut: 32px; } .co-head { min-height: 80px; } }

/* ---------------------------------------------------------------- page frame */
.co-main { flex: 1 0 auto; width: 100%; padding: 4px max(var(--co-gut), env(safe-area-inset-right, 0px)) 56px max(var(--co-gut), env(safe-area-inset-left, 0px)); }
.co-main :where(.co-steps, .co-title, .co-card, .co-below, .co-save-note, .co-open, .co-quiet, .co-links) { margin-inline: auto; }
.co-foot {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 18px;
  padding: 12px var(--co-gut) calc(20px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--co-muted);
}
.co-foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.co-foot span { display: inline-flex; align-items: center; min-height: 44px; }
@media (hover: hover) and (pointer: fine) { .co-foot a:hover { color: var(--co-ink); text-decoration: underline; text-underline-offset: 3px; } }

/* the 3-step indicator (Coin, Pay, Key) */
.co-steps { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--co-muted); }
.co-step { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.co-step-n { position: relative; width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; flex: none;
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--co-mist-2); color: var(--co-muted); }
.co-step[data-state="done"] .co-step-n, .co-step[aria-current="step"] .co-step-n { background: var(--co-ink); color: var(--co-page); }
.co-step[data-state="done"] .co-step-n { font-size: 0; }
.co-step[data-state="done"] .co-step-n::after { content: ""; width: 9px; height: 5px; margin-top: -2px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.co-step[aria-current="step"] { color: var(--co-ink); font-weight: 600; }
.co-step[aria-current="step"] .co-step-n { box-shadow: 0 0 0 4px var(--co-mist-2); }
.co-step-rule { width: 44px; height: 1px; background: var(--co-line); flex: none; }
.co-steps[data-muted] .co-step[aria-current="step"] .co-step-n { background: var(--co-mist-2); color: var(--co-muted); }

/* the title over the card */
.co-title { text-align: center; margin-top: 26px; max-width: 680px; }
.co-title h1 { font-size: 34px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 620; text-wrap: balance; }
.co-title p { margin-top: 8px; color: var(--co-muted); font-size: 16px; text-wrap: balance; }
.co-title p b { color: var(--co-ink); font-weight: 600; }
.co-title .co-soon { margin-top: 6px; font-size: 14px; } /* data-soon: remove with the first macOS/Linux build */
.co-title p s { text-decoration-thickness: 1.5px; }
@media (max-width: 639px) {
  .co-steps { gap: 8px; font-size: 13px; } .co-step-rule { width: 18px; }
  .co-title { margin-top: 20px; } .co-title h1 { font-size: 28px; } .co-title p { font-size: 15px; }
}

/* ---------------------------------------------------------------- the card */
.co-card {
  width: 100%; max-width: var(--co-w); margin-top: 26px; background: var(--co-card); color: var(--co-ink);
  border: 1px solid var(--co-line); border-radius: 24px; box-shadow: var(--co-shadow);
}
.co-card--narrow { max-width: var(--co-w-narrow); }
.co-pad { padding: 24px 26px; }
.co-card > .co-pad + .co-pad { border-top: 1px solid var(--co-line); }
@media (max-width: 639px) { .co-card { border-radius: 20px; margin-top: 20px; } .co-pad { padding: 18px; } }

/* ---------------------------------------------------------------- buttons (one black pill per screen + quiet pills) */
.co-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font-size: 16px; font-weight: 550; letter-spacing: -0.01em; line-height: 1.2; text-align: center;
  text-decoration: none; white-space: nowrap; user-select: none;
  transition: background-color .15s var(--co-ease), color .15s var(--co-ease), transform .12s var(--co-ease), opacity .15s;
}
.co-btn--primary { background: var(--co-btn); color: var(--co-btn-ink); }
.co-btn--quiet { background: var(--co-mist); color: var(--co-ink); }
.co-btn--chip { min-height: 44px; padding: 0 14px; gap: 6px; font-size: 14px; background: var(--co-mist); color: var(--co-ink); }
.co-btn--chip .co-i { width: 16px; height: 16px; }
.co-btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.co-btn--lg { min-height: 54px; font-size: 17px; }
.co-btn--block { display: flex; width: 100%; white-space: normal; }
.co-btn:active:not([disabled]) { transform: scale(.98); }
.co-btn[disabled], .co-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.co-btn.is-done { color: var(--co-live); }
.co-btn--primary.is-done { color: var(--co-btn-ink); }
@media (hover: hover) and (pointer: fine) {
  .co-btn--primary:not([disabled]):hover { background: color-mix(in oklab, var(--co-btn) 84%, var(--co-btn-ink)); }
  .co-btn--quiet:not([disabled]):hover, .co-btn--chip:not([disabled]):hover { background: var(--co-mist-2); }
}
.co-link { color: var(--co-ink); font-weight: 550; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklab, var(--co-ink) 35%, transparent); }
@media (hover: hover) and (pointer: fine) { .co-link:hover { text-decoration-color: currentColor; } }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 479px) { .row-actions > .co-btn { flex: 1 1 auto; } }

/* ---------------------------------------------------------------- notices (calm tinted blocks, never boxes in boxes) */
.notice { padding: 14px 16px; border-radius: 14px; background: var(--co-mist); font-size: 15px; line-height: 1.5; color: var(--co-ink); }
.notice--warning { background: var(--co-warn-soft); }
.notice--danger { background: var(--co-danger-soft); }
.notice--success { background: var(--co-live-soft); }
.notice--info { background: var(--co-accent-soft); }
.notice__title { font-weight: 600; }
.notice p + p { margin-top: 4px; }
.notice .row-actions { margin-top: 12px; }
.co-muted { color: var(--co-muted); }
.co-small { font-size: 14px; line-height: 1.5; }

/* ---------------------------------------------------------------- form fields */
.co-field + .co-field { margin-top: 16px; }
.co-field > label { display: block; font-weight: 550; font-size: 15px; }
.co-field > label span { color: var(--co-muted); font-weight: 400; }
.co-input {
  display: block; width: 100%; min-height: 50px; margin-top: 8px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--co-line-2); background: var(--co-page); color: var(--co-ink); font-size: 16px; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
.co-input::placeholder { color: color-mix(in oklab, var(--co-muted) 75%, transparent); }
.co-input:focus-visible { outline: none; border-color: var(--rova-focus); box-shadow: 0 0 0 3px color-mix(in oklab, var(--rova-focus) 30%, transparent); }
.co-input[aria-invalid="true"] { border-color: var(--co-danger); }
.co-input--mono { font-family: var(--co-mono); letter-spacing: .02em; }
.co-help { margin-top: 8px; font-size: 14px; color: var(--co-muted); line-height: 1.45; }
.co-error { margin-top: 8px; font-size: 14px; color: var(--co-danger); font-weight: 550; line-height: 1.45; }
.co-form-msg:not(:empty) { margin-top: 16px; }

/* ================================================================ /buy: pick a coin */
.co-pick { padding: 10px; }
.co-pick-status { padding: 16px; }
.co-pick-status .co-muted { text-align: center; }
.co-opt-row { position: relative; border-radius: 16px; }
.co-opt-row + .co-opt-row { margin-top: 2px; }
.co-opt {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 22px; align-items: center; gap: 4px 14px;
  min-height: 56px; padding: 10px 14px; border-radius: 16px; cursor: pointer; transition: background-color .15s;
}
.co-opt-name { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.co-opt-name span { color: var(--co-muted); font-weight: 400; }
.co-opt-facts { display: flex; gap: 0 .3em; justify-content: flex-end; flex-wrap: wrap; font-size: 14px; color: var(--co-muted); text-align: right; font-variant-numeric: tabular-nums; }
.co-opt-facts .is-costly { color: var(--co-warn); }
.co-radio { width: 22px; height: 22px; border-radius: 99px; border: 1.5px solid var(--co-line-2); display: grid; place-items: center; transition: border-color .15s, background-color .15s; }
.co-opt-row input:checked + .co-opt { background: var(--co-mist); }
.co-opt-row input:checked + .co-opt .co-radio { border-color: var(--co-ink); background: var(--co-ink); }
.co-opt-row input:checked + .co-opt .co-radio::after { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--co-page); }
.co-opt-row input:focus-visible + .co-opt { outline: 2px solid var(--rova-focus); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) { .co-opt-row input:not(:checked) + .co-opt:hover { background: color-mix(in oklab, var(--rova-ink) 3%, var(--co-card)); } }

/* the recommended row: bigger, first, preselected */
.co-opt--top { grid-template-columns: 44px minmax(0, 1fr) 22px; padding: 16px; min-height: 84px; }
.co-opt--top .co-ico { width: 44px; height: 44px; }
.co-opt--top .co-ico img { width: 24px; height: 24px; }
.co-opt--top .co-opt-name { font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.co-opt-sub { grid-column: 2; font-size: 14px; color: var(--co-muted); line-height: 1.45; }
.co-opt--top .co-radio { grid-column: 3; grid-row: 1 / span 2; }
.co-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; background: var(--co-accent-soft);
  color: var(--co-accent); font-size: 12.5px; font-weight: 600; letter-spacing: 0; }
.co-list-label { margin: 14px 14px 6px; font-size: 13.5px; font-weight: 550; color: var(--co-muted); }

/* "Show 9 more networks" */
.co-more { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; width: 100%; min-height: 56px; margin-top: 2px; padding: 10px 14px 10px 64px;
  border-radius: 16px; text-align: left; color: var(--co-ink); transition: background-color .15s; }
.co-more-t { font-weight: 600; font-size: 15px; }
.co-more-s { grid-column: 1; font-size: 13.5px; color: var(--co-muted); }
.co-more .co-i { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; color: var(--co-muted); }
@media (hover: hover) and (pointer: fine) { .co-more:hover { background: color-mix(in oklab, var(--rova-ink) 3%, var(--co-card)); } }
@media (max-width: 559px) { .co-more { padding-left: 56px; padding-right: 12px; } }

/* the selected method's details: its pros and cons, short */
.co-opt-more { padding: 6px 14px 14px 64px; font-size: 14px; line-height: 1.45; color: var(--co-ink-2); }
.co-opt--top + .co-opt-more { padding-left: 76px; }
.co-pc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.co-pc ul { display: grid; gap: 4px; align-content: start; }
@media (max-width: 559px) { .co-pc { grid-template-columns: minmax(0, 1fr); } }
.co-pc li { position: relative; padding-left: 20px; }
.co-pc li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 2px; border-radius: 2px; background: var(--co-muted); }
.co-pc li.is-pro::before { left: 3px; top: .38em; width: 9px; height: 5px; background: none; border-radius: 0; border-left: 2px solid var(--co-live); border-bottom: 2px solid var(--co-live); transform: rotate(-45deg); }
.co-opt-more .co-muted { margin-top: 6px; }

/* phones: the facts go under the name */
@media (max-width: 559px) {
  .co-pick { padding: 6px; }
  .co-opt { grid-template-columns: 32px minmax(0, 1fr) 22px; gap: 2px 12px; padding: 10px 12px; }
  .co-opt .co-ico { grid-row: 1 / span 2; width: 32px; height: 32px; }
  .co-opt-facts { grid-column: 2; grid-row: 2; justify-content: flex-start; text-align: left; font-size: 13.5px; }
  .co-opt .co-radio { grid-column: 3; grid-row: 1 / span 2; }
  .co-opt--top { grid-template-columns: 40px minmax(0, 1fr) 22px; padding: 14px 12px; }
  .co-opt--top .co-ico { width: 40px; height: 40px; }
  .co-opt-more, .co-opt--top + .co-opt-more { padding: 2px 12px 12px 56px; }
  .co-list-label { margin-inline: 12px; }
}

.co-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 99px; background: var(--co-mist); flex: none; overflow: hidden; }
.co-ico img { width: 20px; height: 20px; object-fit: contain; }
.co-ico-letter { font-size: 14px; font-weight: 650; color: var(--co-ink-2); }
input:checked + .co-opt .co-ico { background: var(--co-card); }

.co-exchange { display: flex; gap: 10px; margin: 10px 14px 6px; padding-top: 14px; border-top: 1px solid var(--co-line); font-size: 14px; color: var(--co-muted); line-height: 1.5; }
.co-exchange .co-i { margin-top: 2px; color: var(--co-ink); }
.co-exchange b { color: var(--co-ink); font-weight: 600; }
@media (max-width: 559px) { .co-exchange { margin-inline: 12px; } }

.co-buy-form { padding: 22px 24px 24px; border-top: 1px solid var(--co-line); }
.co-turnstile { margin-top: 16px; min-height: 0; }
.co-turnstile:not(:empty) { min-height: 65px; }
.co-buy-form .co-btn--lg { margin-top: 20px; }
.co-form-foot { margin-top: 12px; font-size: 14px; color: var(--co-muted); text-align: center; text-wrap: balance; }
@media (max-width: 639px) { .co-buy-form { padding: 18px; } }

.co-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin-top: 14px; font-size: 14px; color: var(--co-muted); }
.co-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .co-links a:hover { color: var(--co-ink); text-decoration: underline; text-underline-offset: 3px; } }

/* an order already open in this browser (above the /buy card) */
.co-open { width: 100%; max-width: var(--co-w-narrow); margin-top: 22px; display: grid; gap: 8px; }
.co-open-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 16px;
  background: var(--co-accent-soft); font-size: 14.5px; }
.co-open-row b { font-weight: 600; }
.co-open-row .co-btn { flex: none; }

/* ================================================================ /order: the pay card */
.co-pay-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 16px 20px; border-bottom: 1px solid var(--co-line); }
.co-coin { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; padding: 0 12px 0 6px; border-radius: 999px;
  background: var(--co-mist); font-weight: 600; font-size: 15.5px; white-space: nowrap; transition: background-color .15s; }
.co-coin .co-ico { width: 32px; height: 32px; background: var(--co-card); }
.co-coin .co-ico img { width: 18px; height: 18px; }
.co-coin small { color: var(--co-muted); font-weight: 400; font-size: 14px; }
.co-coin .co-i { width: 16px; height: 16px; color: var(--co-muted); transition: transform .2s var(--co-ease); }
.co-coin[aria-expanded="true"] .co-i { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { button.co-coin:hover { background: var(--co-mist-2); } }
.co-total { color: var(--co-muted); font-size: 14.5px; white-space: nowrap; }
.co-total b { color: var(--co-ink); font-weight: 600; font-size: 16px; }

.co-change { padding: 16px 20px; border-bottom: 1px solid var(--co-line); font-size: 14.5px; line-height: 1.5; }
/* quiet buttons on a mist block keep their edge */
:where(.co-sign, .co-device-confirm) :is(.co-btn--quiet, .co-btn--chip) { background: var(--co-card); }
.co-change .row-actions { margin-top: 12px; }
.co-net { display: flex; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--co-line); font-size: 14px; color: var(--co-muted); line-height: 1.45; }
.co-net .co-i { margin-top: 1px; color: var(--co-ink); }
.co-net b { color: var(--co-ink); font-weight: 600; }

.co-pay-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; }
.co-vals { padding: 6px 26px; border-right: 1px solid var(--co-line); min-width: 0; container-type: inline-size; }
.co-val { padding: 18px 0; }
.co-val + .co-val { border-top: 1px solid var(--co-line); }
.co-val-k { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; color: var(--co-muted); font-size: 14.5px; }
.co-val-k h2, .co-val-k h3 { font-size: inherit; font-weight: 450; color: inherit; }
.co-amount { margin-top: 6px; font-size: 44px; font-size: clamp(24px, 9.5cqi, 44px); font-weight: 620; letter-spacing: -0.03em; line-height: 1.12;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.co-amount mark { background: var(--co-accent-soft); color: inherit; border-radius: 8px; padding: 0 3px; margin: 0 -1px; }
.co-amount small { font-size: .5em; font-weight: 550; color: var(--co-muted); letter-spacing: -0.01em; margin-left: .2em; white-space: nowrap; }
.co-hint { margin-top: 8px; font-size: 13.5px; color: var(--co-muted); line-height: 1.45; }
.co-hint b { color: var(--co-ink); font-weight: 600; }
.co-addr { margin-top: 8px; font-family: var(--co-mono); font-size: 16px; line-height: 1.65; color: var(--co-muted); letter-spacing: .01em; }
.co-addr .addr-mid, .co-addr .addr-end { margin-right: .55em; }
.co-addr .addr-end { color: var(--co-ink); font-weight: 700; }
.co-memo { margin-top: 8px; font-family: var(--co-mono); font-size: 18px; font-weight: 650; letter-spacing: .03em; overflow-wrap: anywhere; }

.co-scan { padding: 22px 22px; display: grid; gap: 14px; align-content: start; justify-items: center; text-align: center; }
.co-qr { width: 100%; max-width: 188px; padding: 10px; background: #FFFFFF; border-radius: 14px; border: 1px solid var(--co-line); }
.co-qr svg { width: 100%; height: auto; }
.co-scan .co-btn { width: 100%; }
.co-scan p { font-size: 13.5px; color: var(--co-muted); line-height: 1.45; }

/* the live status row + its thin bar */
.co-status { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 16px 22px 0; border-top: 1px solid var(--co-line); }
.co-status-l { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; min-width: 0; }
.co-dot { width: 10px; height: 10px; border-radius: 99px; flex: none; background: var(--co-live); box-shadow: 0 0 0 5px var(--co-live-soft); }
.co-status[data-tone="progress"] .co-dot { animation: co-pulse 2.4s ease-in-out infinite; }
.co-status[data-tone="warn"] .co-dot { background: var(--co-warn); box-shadow: 0 0 0 5px var(--co-warn-soft); }
.co-status[data-tone="muted"] .co-dot { background: var(--co-muted); box-shadow: 0 0 0 5px var(--co-mist-2); }
.co-status[data-tone="danger"] .co-dot { background: var(--co-danger); box-shadow: 0 0 0 5px var(--co-danger-soft); }
.co-status-t { font-variant-numeric: tabular-nums; color: var(--co-muted); font-size: 15px; white-space: nowrap; }
.co-status-t b { color: var(--co-ink); font-weight: 600; }
.co-status-t.is-low b { color: var(--co-warn); }
.co-status-sub { padding: 6px 22px 0 42px; font-size: 14px; color: var(--co-muted); line-height: 1.5; }
.co-status-sub .co-btn { margin-top: 10px; }
.co-track { margin: 14px 22px 20px; height: 3px; border-radius: 9px; background: var(--co-mist-2); overflow: hidden; }
.co-track i { display: block; height: 100%; width: 100%; border-radius: 9px; background: var(--co-ink); transform-origin: left center; transform: scaleX(var(--p, 1)); transition: transform 1s linear; }
.co-track.is-low i { background: var(--co-warn); }
.co-track.is-busy i { width: 34%; transform: none; animation: co-slide 1.6s var(--co-ease) infinite; }
.co-track.is-off { visibility: hidden; height: 0; margin-top: 0; margin-bottom: 16px; }
@keyframes co-pulse { 0%, 100% { box-shadow: 0 0 0 5px var(--co-live-soft); } 50% { box-shadow: 0 0 0 8px color-mix(in oklab, var(--co-live-soft) 40%, transparent); } }
@keyframes co-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(310%); } }

/* a calm message panel in the card (seen / underpaid / late / review / cancelled) */
.co-state { padding: 22px 26px 6px; }
.co-state h2 { font-size: 20px; letter-spacing: -0.015em; line-height: 1.25; }
.co-state p { margin-top: 8px; color: var(--co-ink-2); font-size: 15px; line-height: 1.55; }
.co-state .co-muted { color: var(--co-muted); }
.co-state .notice { margin-top: 14px; }
.co-state + .co-status { margin-top: 18px; }
.co-state .co-big { font-size: 40px; color: var(--co-ink); font-weight: 620; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: 6px; }
.co-state .co-big small { font-size: .45em; color: var(--co-muted); font-weight: 500; letter-spacing: 0; margin-left: .3em; }
.co-details { border-top: 1px solid var(--co-line); }
.co-details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 22px;
  font-size: 14.5px; font-weight: 550; color: var(--co-muted); cursor: pointer; }
.co-details > summary::-webkit-details-marker { display: none; }
.co-details > summary .co-i { width: 16px; height: 16px; transition: transform .2s var(--co-ease); }
.co-details[open] > summary .co-i { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .co-details > summary:hover { color: var(--co-ink); } }
.co-suggest { margin: 18px 22px 0; }
.co-gap { height: 18px; }

/* under the card: the one quiet rule + Save order link + Need help? */
.co-below { width: 100%; max-width: var(--co-w); margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px 24px; }
.co-rule { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--co-muted); line-height: 1.5; max-width: 480px; }
.co-rule .co-i { margin-top: 1px; color: var(--co-ink); }
.co-rule b { color: var(--co-ink); font-weight: 600; }
.co-below-acts { display: flex; gap: 8px; flex: none; margin-left: auto; }
.co-save-note { width: 100%; max-width: var(--co-w); margin-top: 12px; }
.co-save-note .co-linkbox { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--co-card); font-family: var(--co-mono); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
@media (max-width: 719px) {
  .co-below { flex-direction: column; align-items: stretch; }
  .co-rule { max-width: none; }
  .co-below-acts .co-btn { flex: 1 1 0; }
}

/* phones and narrow tablets: one column, Open in wallet first and big, the QR smaller under it */
@media (max-width: 719px) {
  .co-pay-top { padding: 12px 14px; }
  .co-net { padding: 12px 16px; }
  .co-change { padding: 14px 16px; }
  .co-pay-body { grid-template-columns: minmax(0, 1fr); }
  .co-vals { border-right: 0; padding: 2px 18px; }
  .co-addr { font-size: 15px; }
  .co-scan { border-top: 1px solid var(--co-line); padding: 18px; grid-template-columns: 112px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; gap: 14px 16px; }
  .co-scan .co-btn { grid-column: 1 / -1; order: -1; min-height: 54px; font-size: 17px; }
  .co-scan .co-qr { width: 112px; padding: 6px; border-radius: 10px; }
  .co-scan > .co-muted:only-child { grid-column: 1 / -1; }
  .co-status { padding: 14px 16px 0; }
  .co-status-sub { padding: 6px 16px 0; }
  .co-track { margin: 12px 16px 16px; }
  .co-state { padding: 18px 18px 4px; }
  .co-details > summary { padding: 12px 16px; }
  .co-suggest { margin: 16px 16px 0; }
}
@media (max-width: 359px) {
  .co-vals { padding-inline: 14px; }
  .co-scan { grid-template-columns: 92px minmax(0, 1fr); padding: 14px; }
  .co-scan .co-qr { width: 92px; }
  .co-addr { font-size: 14px; }
}

/* ---------------------------------------------------------------- step 3: the key */
.co-keycard { padding: 26px 28px 28px; container-type: inline-size; }
.co-keycard .co-val-k { margin-bottom: 10px; }
.key-block .key { padding: 20px 16px; border-radius: 16px; background: var(--co-mist); font-family: var(--co-mono); font-size: 26px;
  font-size: clamp(14px, 4.9cqi, 28px); font-weight: 650; letter-spacing: .02em; text-align: center; overflow-wrap: anywhere; user-select: all; }
.co-key-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.co-key-acts .co-btn { flex: 1 1 180px; }
.co-key-note { margin-top: 12px; font-size: 14px; color: var(--co-muted); line-height: 1.5; }
.co-next { margin-top: 4px; display: grid; gap: 14px; counter-reset: next; }
.co-next li { counter-increment: next; position: relative; padding-left: 42px; font-size: 15px; line-height: 1.5; color: var(--co-ink-2); }
.co-next li b { display: block; color: var(--co-ink); font-weight: 600; }
.co-next li::before { content: counter(next); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center;
  background: var(--co-ink); color: var(--co-page); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.co-keycard + .co-pad h2 { font-size: 17px; margin-bottom: 14px; }
@media (max-width: 639px) { .co-keycard { padding: 20px 18px; } }

/* ---------------------------------------------------------------- Need help? (side panel; a bottom sheet on phones) */
.co-drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(460px, 100vw); max-width: 100vw; height: 100%; max-height: none;
  border: 0; border-left: 1px solid var(--co-line); background: var(--co-card); color: var(--co-ink);
  box-shadow: -24px 0 64px -24px rgb(0 0 0 / .35); overflow: hidden; overscroll-behavior: contain;
}
.co-drawer:not([open]) { display: none; }
.co-drawer[open] { display: flex; flex-direction: column; animation: co-in-side .26s var(--co-ease); }
.co-drawer::backdrop { background: rgb(8 12 18 / .4); animation: co-fade .2s ease; }
.co-scrim { position: fixed; inset: 0; z-index: 90; background: rgb(8 12 18 / .4); }
.co-drawer.is-fallback { z-index: 91; }
.co-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 10px 28px; flex: none; }
.co-drawer-head h2 { font-size: 22px; letter-spacing: -0.02em; font-weight: 620; }
.co-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 99px; color: var(--co-muted); flex: none; background: var(--co-mist); }
.co-icon-btn .co-i { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .co-icon-btn:hover { color: var(--co-ink); background: var(--co-mist-2); } }
.co-drawer-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.co-drawer-lead { color: var(--co-muted); font-size: 14.5px; line-height: 1.5; padding-bottom: 8px; }
.co-help-item { border-bottom: 1px solid var(--co-line); }
.co-help-item > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 14px 0;
  font-weight: 550; font-size: 15.5px; line-height: 1.35; cursor: pointer; }
.co-help-item > summary::-webkit-details-marker { display: none; }
.co-help-item > summary::after { content: "+"; flex: none; width: 20px; text-align: center; color: var(--co-muted); font-weight: 400; font-size: 22px; line-height: 1; }
.co-help-item[open] > summary::after { content: "\2212"; }
.co-help-body { padding-bottom: 18px; font-size: 14.5px; line-height: 1.55; color: var(--co-ink-2); }
.co-help-body > * + * { margin-top: 10px; }
.co-help-body .co-addr { font-size: 14px; }
.co-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 14.5px; }
.co-facts dt { color: var(--co-muted); }
.co-facts dd { text-align: right; overflow-wrap: anywhere; color: var(--co-ink); }
.co-facts dd.mono { font-size: 13px; }
.co-support { margin-top: 22px; display: grid; gap: 12px; }
.co-support p { font-size: 14px; color: var(--co-muted); line-height: 1.5; }
@keyframes co-in-side { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes co-in-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes co-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 699px) {
  .co-drawer { inset: auto 0 0 0; width: 100%; height: auto; max-height: 88vh; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--co-line);
    border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px -20px rgb(0 0 0 / .35); }
  .co-drawer[open] { animation: co-in-up .28s var(--co-ease); }
  .co-drawer-head { padding: 10px 12px 6px 20px; }
  .co-drawer-head::before { content: ""; position: absolute; left: 50%; top: 7px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--co-mist-2); }
  .co-drawer-body { padding: 0 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
}
html.co-locked, html.co-locked body { overflow: hidden; }

/* the claim form inside the drawer */
.co-claim > p + * { margin-top: 12px; }
.co-sign { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--co-mist); }
.co-sign h3 { font-size: 15px; }
.co-sign p { margin-top: 6px; }
.co-sign-text { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--co-card); font-family: var(--co-mono); font-size: 13px; overflow-wrap: anywhere; color: var(--co-ink); }
.co-sign details { margin-top: 10px; }
.co-sign details > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 550; color: var(--co-ink); }
.co-claim-result:not(:empty) { margin-top: 12px; }

/* ================================================================ /order without a link, /buy's open orders */
.co-recent { display: grid; }
.co-recent li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.co-recent li + li { border-top: 1px solid var(--co-line); }
.co-recent-link { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; text-decoration: none; }
.co-recent-text { display: grid; min-width: 0; }
.co-recent-label { font-weight: 600; }
.co-recent-meta { font-size: 13.5px; color: var(--co-muted); line-height: 1.4; }
@media (hover: hover) and (pointer: fine) { a.co-recent-link:hover .co-recent-label { text-decoration: underline; text-underline-offset: 3px; } }
.co-card h2.co-h { font-size: 17px; letter-spacing: -0.01em; }
.co-quiet { width: 100%; max-width: var(--co-w-narrow); margin-top: 16px; text-align: center; font-size: 14px; color: var(--co-muted); line-height: 1.6; }

/* ================================================================ /manage: the computers on a key */
#devices > .co-pad + .co-pad { padding-top: 0; }
.co-moves { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--co-mist); }
.co-pips { display: flex; gap: 5px; flex: none; }
.co-pips span { width: 26px; height: 8px; border-radius: 99px; background: var(--co-mist-2); }
.co-pips span.is-left { background: var(--co-ink); }
.co-moves p { font-size: 14.5px; color: var(--co-muted); line-height: 1.45; }
.co-moves p b { color: var(--co-ink); font-weight: 600; }
.co-dev-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.co-dev-head h2 { font-size: 20px; letter-spacing: -0.015em; }
.co-dev-head p { margin-top: 4px; font-size: 14.5px; color: var(--co-muted); }
.co-devices { display: grid; }
.co-device { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 16px 0; }
.co-device + .co-device { border-top: 1px solid var(--co-line); }
.co-device-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--co-mist); color: var(--co-ink-2); }
.co-device-ico .co-i { width: 20px; height: 20px; }
.co-device-name { font-weight: 600; font-size: 15.5px; overflow-wrap: anywhere; }
.co-device-meta { font-size: 13.5px; color: var(--co-muted); line-height: 1.45; }
.co-device-confirm { grid-column: 1 / -1; margin-top: 8px; padding: 14px 16px; border-radius: 14px; background: var(--co-mist); font-size: 14.5px; line-height: 1.5; }
.co-device-confirm .row-actions { margin-top: 10px; }
.co-device--empty { grid-template-columns: 1fr; color: var(--co-muted); font-size: 15px; }
@media (max-width: 479px) {
  .co-device { grid-template-columns: 40px minmax(0, 1fr); }
  .co-device > .co-btn { grid-column: 1 / -1; width: 100%; margin-top: 6px; }
}
.co-facts-list { display: grid; gap: 8px; font-size: 14.5px; color: var(--co-muted); line-height: 1.5; }
.co-facts-list li { position: relative; padding-left: 20px; }
.co-facts-list li::before { content: ""; position: absolute; left: 4px; top: .65em; width: 5px; height: 5px; border-radius: 99px; background: var(--co-line-2); }

/* ---------------------------------------------------------------- phone landscape and other short screens: the card comes up */
@media (max-height: 520px) and (orientation: landscape) {
  .co-head { min-height: 56px; }
  .co-steps { margin-top: 0; }
  .co-title { margin-top: 8px; }
  .co-title h1 { font-size: 24px; }
  .co-title p { margin-top: 4px; font-size: 14px; }
  .co-card { margin-top: 14px; }
}

/* ---------------------------------------------------------------- reduced motion: everything rests */
@media (prefers-reduced-motion: reduce) {
  .co *, .co *::before, .co *::after, .co-drawer, .co-drawer::backdrop { animation: none !important; transition: none !important; }
  .co-track.is-busy i { width: 100%; opacity: .35; }
}
/* forced colours (Windows high contrast): keep the selected row and the bars visible */
@media (forced-colors: active) {
  .co-opt-row input:checked + .co-opt { outline: 2px solid Highlight; }
  .co-track i, .co-pips span.is-left { background: Highlight; }
}

/* TON-style payments: the comment is required, so it sits first on the card as a warning box (owner 2026-11-30) */
.co-val--memo { margin: 14px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--rova-warning, #8F5600);
  background: var(--rova-warning-soft, #FBF0DC); }
.co-val--memo + .co-val { border-top: 0; }
.co-val--memo h3 { color: var(--rova-ink); font-weight: 650; }
.co-val--memo .co-memo { font-size: 20px; font-weight: 650; letter-spacing: .02em; }
.co-hint--strong { color: var(--rova-ink); font-weight: 550; }
