/* ==========================================================================
   dexr.pro — Linegrid design system
   One family (Space Grotesk), hairline rules, numbered sections, one accent.
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, 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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.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;
}

:root {
  --paper: #FBFBF8;
  --paper-2: #F4F4EE;
  --ink: #15171C;
  --ink-2: #565A62;
  --ink-3: #9A9DA4;
  --line: #E4E2DA;
  --line-strong: #CFCDC4;
  --accent: #E8490F;
  --accent-deep: #C63A0A;
  --glass: rgba(251, 251, 248, 0.66);
  --font: 'Space Grotesk', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
  --nav-h: 64px;
  --ease-out: cubic-bezier(0.22, 0.61, 0.21, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* faint global ledger grid, pure decoration */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(21, 23, 28, 0.025) 1px, transparent 1px);
  background-size: clamp(72px, 8.5vw, 128px) 100%;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

::selection { background: var(--accent); color: #fff; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 560; letter-spacing: -0.02em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Small engineering-doc primitives
   -------------------------------------------------------------------------- */

.cap {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1.5px;
  background: var(--accent);
}

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(36px, 5vw, 64px);
}
.sec-head h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* --------------------------------------------------------------------------
   Floating pill nav
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(var(--wrap), calc(100% - 28px));
  border-radius: 999px;
  /* brand wash: the full pill carries the light mesh-gradient artwork */
  background: #FBFBF8 url('../img/brand-nav.jpg') center / cover no-repeat;
  /* 2px oversize: the artwork always bleeds past the cap edges, so a
     sub-pixel seam of the fallback color can never show at the ends */
  background-size: calc(100% + 2px) auto;
  border: 1px solid rgba(21, 23, 28, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 18px 44px -22px rgba(21, 23, 28, 0.25);
  transition: box-shadow 0.35s var(--ease-out);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 14px 12px 22px;
  transition: padding 0.35s var(--ease-out);
}
.nav.scrolled .nav-inner { padding-block: 7px; }
.nav.scrolled {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 14px 34px -18px rgba(21, 23, 28, 0.32);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  position: relative;
  padding: 8px 13px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--ink); background: rgba(21, 23, 28, 0.05); }
.nav-links a[aria-current] { color: var(--ink); }
.nav-links a[aria-current]::after {
  content: '';
  position: absolute;
  left: 13px; right: 13px; bottom: 3px;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(120deg, #D63E0A 0%, #E8490F 55%, #FF6B2E 100%);
  color: #FFF7F2;
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px -12px rgba(232, 73, 15, 0.55);
  transition: filter 0.25s ease, transform 0.25s var(--ease-out);
}
.nav-cta:hover { filter: brightness(1.1); }
.nav-cta .arr { color: #FFD9C7; transition: transform 0.25s var(--ease-out); }
.nav-cta:hover .arr { transform: translateX(3px); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--ink);
  margin-inline: auto;
  position: relative;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
  content: '';
}
.nav-toggle span::before { position: absolute; top: -5px; left: 0; }
.nav-toggle span::after { position: absolute; top: 5px; left: 0; }
body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

.nav-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  border-radius: 24px;
  background: #FBFBF8 url('../img/brand-nav.jpg') center / cover no-repeat;
  background-size: calc(100% + 2px) auto;
  border: 1px solid rgba(21, 23, 28, 0.08);
  box-shadow: 0 24px 50px -24px rgba(21, 23, 28, 0.3);
  padding: 10px;
  flex-direction: column;
}
.nav-menu a {
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-menu a:hover { background: rgba(21, 23, 28, 0.05); color: var(--ink); }
.nav-menu a[aria-current] { color: var(--ink); }
.nav-menu a[aria-current]::after { content: ''; width: 22px; height: 2px; background: var(--accent); }
body.menu-open .nav-menu { display: flex; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-cta { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 550;
  letter-spacing: 0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-out), background 0.25s ease,
              border-color 0.25s ease, color 0.25s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.btn .arr { transition: transform 0.3s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

.btn-ink {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 16px 30px -18px rgba(21, 23, 28, 0.55);
}
.btn-ink:hover { background: #000; box-shadow: 0 20px 38px -18px rgba(21, 23, 28, 0.6); }
.btn-ink .arr { color: var(--accent); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-glass {
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: rgba(21, 23, 28, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--ink);
}
.btn-glass:hover { border-color: var(--ink); }

.magnetic { transition: transform 0.18s ease-out; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(48px, 9vh, 110px));
  padding-bottom: clamp(40px, 6vw, 80px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-copy .eyebrow { margin-bottom: 26px; }
.hero-copy h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.99;
  letter-spacing: -0.04em;
  font-weight: 590;
  margin-bottom: 28px;
}
.hero-copy h1 .brk { color: var(--accent); }
.hero-sub {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 52ch;
  margin-bottom: 38px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 46ch;
}
.hero-note::before {
  content: '';
  flex: none;
  width: 14px;
  height: 2px;
  background: var(--accent);
  transform: translateY(-3px);
}

/* the 3D scene is boxed into the right half, hard-clipped — no divider line:
   the artwork floats on the paper like the page-head figures do */
.hero-media { position: relative; }
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 640px;
  overflow: hidden;
}
.hero-canvas, .hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-canvas { display: none; }
.hero-visual.is-live .hero-canvas { display: block; }
.hero-visual.is-live .hero-fallback { display: none; }
.hero-fallback {
  object-fit: contain;
  object-position: center;
  padding: 6%;
}
@media (max-width: 899px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual {
    aspect-ratio: 16 / 9;
    margin-top: 12px;
  }
}
/* phones: the hero artwork drops out entirely and the copy takes the stage —
   tablets (761–899px) keep the stacked 16:9 visual above */
@media (max-width: 760px) {
  .hero-media { display: none; }
}

/* --------------------------------------------------------------------------
   Stats strip
   -------------------------------------------------------------------------- */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
/* one full-width row of small facts. When the row is wider than the screen,
   site.js drifts it back and forth (ping-pong); when it fits, it centers. */
.stats-strip {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.stats-strip::-webkit-scrollbar { display: none; }
.stats-strip.is-fit { justify-content: center; overflow-x: hidden; }
.stat {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
  padding: 16px 26px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; }
.stat .num {
  font-size: 21px;
  font-weight: 590;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat .num sup { font-size: 0.5em; font-weight: 500; color: var(--accent); margin-left: 2px; }
.stat .lbl { font-size: 12.5px; color: var(--ink-2); letter-spacing: 0.02em; }

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.section { padding-block: clamp(72px, 10vw, 130px); position: relative; z-index: 1; }

.rule-row {
  display: grid;
  grid-template-columns: 76px 220px 1fr auto;
  gap: clamp(18px, 3vw, 44px);
  align-items: center;
  padding: clamp(26px, 3vw, 36px) 0;
  border-top: 1px solid var(--line);
  transition: background 0.25s ease;
}
.rule-row:first-child { border-top: 0; }
.rule-row:hover { background: rgba(21, 23, 28, 0.025); }
.rule-row img { width: 58px; height: 58px; }
.rule-row h3 { font-size: clamp(19px, 2vw, 23px); font-weight: 560; letter-spacing: -0.02em; margin: 0; }
.rule-row p { font-size: 15px; color: var(--ink-2); line-height: 1.6; margin: 0; max-width: 56ch; }
.rule-row .r-proof {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
@media (max-width: 860px) {
  .rule-row { grid-template-columns: 52px 1fr; }
  .rule-row img { width: 44px; height: 44px; }
  .rule-row p { grid-column: 2; }
  .rule-row .r-proof { display: none; }
}

/* --------------------------------------------------------------------------
   Providers band
   -------------------------------------------------------------------------- */

.providers { background: var(--paper-2); border-block: 1px solid var(--line); }
.provider-row {
  display: grid;
  grid-template-columns: 70px 1fr 1.4fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  transition: background 0.25s ease;
}
.provider-row:first-of-type { border-top: 0; }
.provider-row:hover { background: rgba(21, 23, 28, 0.025); }
.provider-row .p-idx { font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.provider-row .p-name { font-size: clamp(20px, 2.2vw, 26px); font-weight: 560; letter-spacing: -0.02em; }
.provider-row .p-desc { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.provider-row .p-tag { white-space: nowrap; }
@media (max-width: 760px) {
  .provider-row { grid-template-columns: 44px 1fr; }
  .provider-row .p-desc { grid-column: 2; }
  .provider-row .p-tag { display: none; }
}

/* provider tiles with icons (About page) */
.prov-tile { align-items: center; }
.prov-tile .p-icon { width: 44px; height: 44px; border-radius: 50%; }
.prov-tile .p-name { font-size: clamp(18px, 2vw, 22px); }
@media (max-width: 760px) {
  .prov-tile { grid-template-columns: 44px 1fr auto; }
  .prov-tile .p-desc { grid-column: 2 / -1; }
}

/* reputation score — dormant state; the live feed fills these in (assets/js/api.js).
   Pure type, no pill: small caps + a tiny ember square, like a spec-sheet marker. */
.rep-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rep-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--accent);
  flex: none;
}

/* --------------------------------------------------------------------------
   Manifesto
   -------------------------------------------------------------------------- */

.manifesto { text-align: left; }
.manifesto blockquote {
  margin: 0;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 590;
  max-width: 16ch;
}
.manifesto blockquote em { font-style: normal; color: var(--accent); }
.manifesto-lines {
  margin-top: clamp(30px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 44px);
  max-width: 980px;
}
.manifesto-lines p {
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
}
.manifesto-lines p b { display: block; color: var(--ink); font-weight: 560; margin-bottom: 4px; }
@media (max-width: 760px) { .manifesto-lines { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   CTA block — the one big liquid-glass panel
   -------------------------------------------------------------------------- */

.cta-panel {
  position: relative;
  border-radius: 28px;
  padding: clamp(44px, 7vw, 88px) clamp(28px, 6vw, 80px);
  background: var(--paper-2) url("../img/cta-ember.jpg") center / cover no-repeat;
  border: 1px solid rgba(21, 23, 28, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 40px 80px -40px rgba(21, 23, 28, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta-panel.cta-bumble { background-image: url("../img/cta-bumble.jpg"); }
.cta-panel.cta-sky { background-image: url("../img/cta-sky.jpg"); }
.cta-panel.cta-mist { background-image: url("../img/cta-mist.jpg"); background-position: center 16%; }
.cta-panel.cta-spectrum { background-image: url("../img/cta-spectrum.jpg"); }
.cta-panel.cta-dark { border-color: rgba(255, 255, 255, 0.16); }
.cta-panel.cta-dark h2 { color: #FAFAF5; }
.cta-panel.cta-dark .cap { color: rgba(250, 250, 245, 0.68); }
.cta-panel h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 15ch;
}
.cta-panel .cap { display: block; margin-bottom: 16px; color: rgba(21, 23, 28, 0.62); }
.cta-panel.cta-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(10, 10, 14, 0.5), rgba(10, 10, 14, 0.12) 55%, transparent 75%);
  pointer-events: none;
}
.cta-panel.cta-dark > * { position: relative; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

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

.footer {
  margin-top: clamp(60px, 8vw, 110px);
  padding: clamp(40px, 5vw, 64px) 0 34px;
  position: relative;
  z-index: 1;
  background: #15171C url('../img/brand-footer.jpg') center / cover no-repeat;
  color: #F2F1EC;
}
/* legibility scrim over the brand flow — the artwork is near-black by design,
   so this only settles the hues behind the text */
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 14, 0.38);
  pointer-events: none;
}
.footer > .wrap { position: relative; z-index: 1; }
.footer .footer-brand .t { color: #F2F1EC; }
.footer .footer-brand .cap { color: rgba(242, 241, 236, 0.6); }
.footer .footer-links a { color: rgba(242, 241, 236, 0.78); }
.footer .footer-links a:hover { color: #FFF; border-color: rgba(255, 255, 255, 0.35); }
.footer .footer-bottom { border-top-color: rgba(255, 255, 255, 0.16); }
.footer .footer-bottom .pledge { color: rgba(242, 241, 236, 0.66); }
.footer .footer-bottom .cap { color: rgba(242, 241, 236, 0.5); }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 34px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand .t { font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.footer-brand .cap { display: block; margin-top: 2px; }
.footer-links { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-links a {
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.footer-links a:hover { color: var(--ink); border-color: var(--line-strong); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom .pledge { color: var(--ink-2); font-size: 13.5px; letter-spacing: 0.04em; }
.footer-bottom .pledge i { font-style: normal; color: var(--accent); padding-inline: 2px; }

/* --------------------------------------------------------------------------
   Subpages
   -------------------------------------------------------------------------- */

.page-head {
  padding-top: calc(var(--nav-h) + clamp(56px, 10vh, 120px));
  padding-bottom: clamp(40px, 6vw, 72px);
}
.page-head h1 {
  font-size: clamp(40px, 5.6vw, 68px);
  letter-spacing: -0.04em;
  line-height: 1.0;
  font-weight: 590;
  max-width: 18ch;
  margin-top: 24px;
}
.page-head .lede {
  margin-top: 22px;
  font-size: clamp(17px, 1.7vw, 19.5px);
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.62;
}

/* page-head figure: line-art visual sitting right of the copy (same family as
   the about hero). Stacks above the copy on tablets, drops out on phones —
   same treatment as .hero-media. */
.page-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 72px);
}
.page-head-media img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 899px) {
  .page-head-grid { grid-template-columns: 1fr; }
  .page-head-media {
    order: -1;
    max-width: 380px;
  }
}
@media (max-width: 760px) {
  .page-head-media { display: none; }
}

.doc-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(34px, 4.5vw, 56px);
  border-top: 1px solid var(--line);
}
/* grid children must be allowed to shrink below their content's intrinsic
   width — otherwise long code lines / tables push the whole row past the
   viewport on mobile instead of scrolling inside their own box */
.doc-row > *, .page-head-grid > * { min-width: 0; }
.doc-row h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.025em; }
.doc-row .d-body p { color: var(--ink-2); max-width: 68ch; }
.doc-row .d-body p:last-child { margin-bottom: 0; }
.doc-row .d-body strong { color: var(--ink); font-weight: 560; }
@media (max-width: 760px) { .doc-row { grid-template-columns: 1fr; gap: 14px; } }

.tick-list { list-style: none; margin: 18px 0 0; padding: 0; }
.tick-list li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15.5px;
}
.tick-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 20px;
  width: 14px; height: 2px;
  background: var(--accent);
}
.tick-list li b { color: var(--ink); font-weight: 560; }

/* steps (docs "how it works") */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(26px, 3.4vw, 40px) 0;
  border-bottom: 1px solid var(--line);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 300;
  color: var(--ink-3);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.02em; margin-bottom: 10px; }
.step h3 .hl { color: var(--accent); }
.step p { color: var(--ink-2); max-width: 66ch; margin: 0; }
.step .cap { display: block; margin-top: 14px; }

/* code block */
.code {
  background: #14161B;
  border-radius: 16px;
  padding: 22px 24px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  color: #D8DBE0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 50px -30px rgba(21, 23, 28, 0.5);
}
.code pre { margin: 0; font-family: var(--font); font-weight: 450; letter-spacing: 0.01em; }
.code .c-prompt { color: #767B84; user-select: none; }
.code .c-key { color: #9BE3C5; }
.code .c-str { color: #F2C094; }
.code .c-num { color: #E8A0BF; }
.code .c-com { color: #6A7078; }
.code .c-acc { color: #FF7A3D; }
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 12px;
}
.code-head .cap { color: var(--ink-3); }

/* parameter table */
.ptable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ptable th, .ptable td {
  text-align: left;
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ptable th { font-size: 12px; letter-spacing: 0.01em; color: var(--ink-3); font-weight: 500; }
.ptable td:first-child { font-weight: 560; white-space: nowrap; }
.ptable td:last-child { color: var(--ink-2); }
.ptable .req { color: var(--accent); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; }

@media (max-width: 760px) {
  .code { font-size: 12.5px; padding: 18px; border-radius: 14px; }
  .ptable { font-size: 13.5px; }
  .ptable th, .ptable td { padding: 11px 10px 11px 0; }
}

/* guide cards */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.guide {
  background: var(--paper);
  padding: clamp(24px, 3vw, 34px);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  transition: background 0.25s ease;
}
.guide:hover { background: var(--paper-2); }
.guide .g-no { font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.guide h3 { font-size: 19px; letter-spacing: -0.015em; margin: 14px 0 8px; }
.guide p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.guide .g-go { margin-top: auto; padding-top: 18px; font-size: 13px; font-weight: 560; letter-spacing: 0.01em; color: var(--ink); }
.guide .g-go i { font-style: normal; color: var(--accent); }
@media (max-width: 860px) { .guide-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   App — dark quote/swap experience
   Same design language, palette flipped: token overrides do most of the work.
   -------------------------------------------------------------------------- */

body.app-dark {
  --paper: #0C0D10;
  --paper-2: #12141A;
  --ink: #F2F1EC;
  --ink-2: rgba(242, 241, 236, 0.62);
  --ink-3: rgba(242, 241, 236, 0.38);
  --line: rgba(242, 241, 236, 0.13);
  --line-strong: rgba(242, 241, 236, 0.26);
  --glass: rgba(12, 13, 16, 0.6);
  background: #0A0B0E url('../img/app-bg.jpg') center / cover no-repeat fixed;
}
body.app-dark::before { display: none; } /* ledger grid lives in the bg art */

/* the app nav carries the dark-ember brand pill — minimal header: brand +
   Exit app only, both in warm off-white to read on the ember artwork */
.app-dark .nav {
  /* dark-ember base color: any sub-pixel seam at the pill's caps shows
     ember, never the near-white fallback (the "white bits" at the ends) */
  background-color: #341608;
  background-image: url('../img/brand-nav-dark.jpg');
  background-size: calc(100% + 2px) auto;
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.75);
}
.app-dark .nav.scrolled {
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.8);
}
.app-dark .nav .brand { color: #FFF7F2; }
.app-dark .nav-cta { margin-left: auto; } /* no nav-links on the app — Exit sits right */

/* --- layout --- */
body.app-dark {
  display: flex;
  flex-direction: column;
  min-height: 100dvh; /* app fits the viewport — no scroll unless content grows */
}
.app-main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
}
.swap-wrap {
  width: min(540px, 100%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- swap widget --- */
.swap-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px; /* every container gets the same air the quote button always had */
  border-radius: 24px;
  padding: 12px;
  background: rgba(18, 20, 26, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(242, 241, 236, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 50px 100px -50px rgba(0, 0, 0, 0.9);
}
.swap-box {
  border-radius: 16px;
  padding: 16px 18px 14px;
  background: rgba(242, 241, 236, 0.04);
  border: 1px solid rgba(242, 241, 236, 0.07);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.swap-box:focus-within {
  border-color: rgba(232, 73, 15, 0.55);
  background: rgba(242, 241, 236, 0.055);
}
.sb-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.sb-label { font-size: 12.5px; color: var(--ink-3); letter-spacing: 0.02em; }
.sb-est { font-size: 11.5px; color: var(--ink-3); }
.sb-row { display: flex; align-items: center; gap: 12px; }
.amt-in, .amt-out {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font);
  font-size: clamp(26px, 6vw, 32px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
  padding: 0;
}
.amt-in::placeholder { color: var(--ink-3); }
.amt-out { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.asset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  background: rgba(242, 241, 236, 0.08);
  border: 1px solid rgba(242, 241, 236, 0.1);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.asset-btn:hover { background: rgba(242, 241, 236, 0.13); }
.asset-btn img, .ab-glyph { width: 24px; height: 24px; border-radius: 50%; }
.ab-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(242, 241, 236, 0.1);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
}
.asset-btn svg { color: var(--ink-3); }

.flip-btn {
  position: relative;
  z-index: 2;
  width: 38px; height: 38px;
  margin: -25px auto; /* straddle the 12px gap, overlapping both boxes evenly */
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1B1E26;
  border: 1px solid rgba(242, 241, 236, 0.14);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.35s var(--ease-out);
}
.flip-btn:hover { color: var(--accent); border-color: rgba(232, 73, 15, 0.6); }

.dest-box {
  border-radius: 16px;
  padding: 13px 18px 14px;
  background: rgba(242, 241, 236, 0.04);
  border: 1px solid rgba(242, 241, 236, 0.07);
  transition: border-color 0.2s ease;
}
.dest-box:focus-within { border-color: rgba(232, 73, 15, 0.55); }
.dest-box .sb-label { display: block; margin-bottom: 4px; }
.dest-box input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--ink);
  padding: 0;
}
.dest-box input::placeholder { color: var(--ink-3); }

.quote-btn {
  width: 100%;
  margin-top: 0; /* the widget's flex gap provides the separation now */
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.25s var(--ease-out);
}
.quote-btn:hover:not(:disabled) { background: var(--accent-deep); }
.quote-btn:active:not(:disabled) { transform: scale(0.985); }
.quote-btn:disabled { opacity: 0.4; cursor: default; }

/* --- route cards --- */
.route-list { display: flex; flex-direction: column; gap: 12px; }
.route-empty { color: var(--ink-3); font-size: 14px; text-align: center; padding: 22px 0; margin: 0; }
.route-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 18px;
  background: rgba(18, 20, 26, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid rgba(242, 241, 236, 0.09);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.85);
}
.route-card.rc-best { border-color: rgba(232, 73, 15, 0.55); }
.rc-tag {
  position: absolute;
  top: -9px; left: 16px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.rc-icon { width: 38px; height: 38px; border-radius: 50%; }
.rc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rc-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-sub { font-size: 12.5px; color: var(--ink-3); }
.rc-out { text-align: right; }
.rc-out b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.rc-out span { font-size: 11px; color: var(--ink-3); }
.rc-use {
  padding: 9px 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(242, 241, 236, 0.22);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.rc-use:hover { background: var(--ink); color: var(--paper); border-color: transparent; }

@media (max-width: 560px) {
  .route-card { grid-template-columns: 34px 1fr auto; }
  .rc-icon { width: 34px; height: 34px; }
  .rc-use { grid-column: 1 / -1; justify-self: stretch; }
}

/* --- pay instructions --- */
.pay-panel {
  border-radius: 18px;
  padding: 22px;
  background: rgba(18, 20, 26, 0.85);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid rgba(232, 73, 15, 0.4);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.pay-panel h3 { font-size: 18px; letter-spacing: -0.015em; margin-bottom: 8px; }
.pp-note { font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.pp-note b { color: var(--ink); }
.pp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(242, 241, 236, 0.05);
  border: 1px solid rgba(242, 241, 236, 0.08);
  margin-top: 8px;
}
.pp-label { flex-shrink: 0; width: 118px; font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.02em; }
.pp-row code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  flex-shrink: 0;
  padding: 6px 13px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(242, 241, 236, 0.2);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.copy-btn.ok { color: var(--accent); border-color: rgba(232, 73, 15, 0.6); }
.pp-expiry { font-size: 12.5px; color: var(--ink-3); margin: 14px 0 0; }
.pp-expiry b { color: var(--ink-2); font-weight: 600; }
@media (max-width: 560px) {
  .pp-label { width: 86px; }
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   App — History button + drawer (order book lives in the browser only)
   -------------------------------------------------------------------------- */

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.app-dark .nav-cta { margin-left: 0; } /* .nav-actions takes over the auto margin */
.nav-ghost {
  background: transparent;
  border: 1px solid rgba(242, 241, 236, 0.28);
  color: #FFF7F2;
  box-shadow: none;
  cursor: pointer;
  font-family: var(--font);
}
.nav-ghost:hover { filter: none; border-color: rgba(242, 241, 236, 0.55); }
.h-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.history-scrim {
  position: fixed;
  inset: 0;
  z-index: 150; /* above the pill nav (z-100) — the drawer owns the screen */
  background: rgba(6, 7, 9, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.history {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 160;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 22px 20px 20px;
  overflow-y: auto;
  background: rgba(14, 16, 21, 0.96);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  backdrop-filter: blur(20px) saturate(1.1);
  border-left: 1px solid rgba(242, 241, 236, 0.12);
  box-shadow: -40px 0 80px -40px rgba(0, 0, 0, 0.9);
  color: #F2F1EC;
  animation: h-slide 0.28s var(--ease-out);
}
@keyframes h-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.history[hidden] { display: none; } /* author display beats the UA [hidden] rule — restore it */
.h-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.h-head h3 { margin: 0; font-size: 18px; letter-spacing: -0.015em; }
.h-head-actions { display: flex; align-items: center; gap: 8px; }
.h-clear, .h-close {
  background: transparent;
  border: 1px solid rgba(242, 241, 236, 0.18);
  color: rgba(242, 241, 236, 0.62);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.h-clear { padding: 5px 12px; }
.h-close { width: 28px; height: 28px; font-size: 15px; line-height: 1; }
.h-clear:hover, .h-close:hover { color: #F2F1EC; border-color: rgba(242, 241, 236, 0.4); }
.h-note { font-size: 12px; color: rgba(242, 241, 236, 0.38); margin: 0 0 16px; }
.h-recover { margin-bottom: 18px; }
.h-recover .sb-label { display: block; margin-bottom: 6px; }
.h-recover-row { display: flex; gap: 8px; }
.h-recover-row select, .h-recover-row input {
  background: rgba(242, 241, 236, 0.05);
  border: 1px solid rgba(242, 241, 236, 0.12);
  border-radius: 10px;
  color: #F2F1EC;
  font-family: var(--font);
  font-size: 12.5px;
  padding: 9px 10px;
  outline: 0;
}
.h-recover-row select { flex-shrink: 0; max-width: 118px; }
.h-recover-row select option { background: #14161B; color: #F2F1EC; }
.h-recover-row input { flex: 1; min-width: 0; }
.h-recover-row input::placeholder { color: rgba(242, 241, 236, 0.38); }
.h-recover-row input:focus, .h-recover-row select:focus { border-color: rgba(232, 73, 15, 0.55); }
.h-track-btn {
  flex-shrink: 0;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--accent);
  border: 0;
  color: #fff;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.h-track-btn:hover:not(:disabled) { background: var(--accent-deep); }
.h-track-btn:disabled { opacity: 0.4; cursor: default; }
.h-list { display: flex; flex-direction: column; gap: 10px; }
.h-empty { font-size: 13px; color: rgba(242, 241, 236, 0.38); text-align: center; padding: 26px 8px; margin: 0; }
.h-order {
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(242, 241, 236, 0.045);
  border: 1px solid rgba(242, 241, 236, 0.09);
}
.h-row { display: flex; align-items: center; gap: 11px; }
.h-icon { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.h-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.h-pair { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.h-sub { font-size: 11.5px; color: rgba(242, 241, 236, 0.38); }
.h-detail { font-size: 12px; color: rgba(242, 241, 236, 0.62); margin: 9px 0 0; overflow-wrap: anywhere; }
/* per-order figures: received value (+ USD) and fees */
.h-figs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 9px 0 0; }
.h-fig { display: flex; flex-direction: column; gap: 1px; }
.h-fig-k { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(242, 241, 236, 0.34); }
.h-fig-v { font-size: 13px; font-weight: 560; color: var(--paper, #f2f1ec); font-variant-numeric: tabular-nums; }
.h-fig-v em { font-style: normal; color: rgba(242, 241, 236, 0.55); font-weight: 500; margin-left: 2px; }
/* server receipt line (recover/delete) */
.h-receipt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 9px 0 0; font-size: 12px; }
.h-rc-id { color: rgba(242, 241, 236, 0.5); }
.h-rc-id code { font-size: 11px; color: rgba(242, 241, 236, 0.72); }
.h-rc-note { color: rgba(242, 241, 236, 0.38); }
.h-rc-done { color: #6fe3a5; font-weight: 560; }
.h-rc-del {
  background: transparent; border: 1px solid rgba(255, 141, 122, 0.4); color: #ff8d7a;
  font-family: var(--font); font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.h-rc-del:hover { background: #ff8d7a; color: #15171C; }
.h-rc-del[disabled] { opacity: 0.6; cursor: default; }
.h-explorer { display: inline-block; font-size: 12px; color: var(--accent); text-decoration: none; margin-top: 7px; }
.h-explorer:hover { text-decoration: underline; }
.h-tx { display: flex; gap: 8px; margin-top: 10px; }
.h-tx input {
  flex: 1;
  min-width: 0;
  background: rgba(242, 241, 236, 0.05);
  border: 1px solid rgba(242, 241, 236, 0.12);
  border-radius: 9px;
  color: #F2F1EC;
  font-family: var(--font);
  font-size: 12px;
  padding: 7px 10px;
  outline: 0;
}
.h-tx input::placeholder { color: rgba(242, 241, 236, 0.38); }
.h-tx input:focus { border-color: rgba(232, 73, 15, 0.55); }
.h-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 11px;
  color: rgba(242, 241, 236, 0.38);
}
.h-meta code {
  font-family: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  display: inline-block;
  vertical-align: bottom;
}
.h-remove {
  background: transparent;
  border: 0;
  color: rgba(242, 241, 236, 0.38);
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}
.h-remove:hover { color: #ff8d7a; }

/* --- status badges --- */
.ts-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: rgba(242, 241, 236, 0.08);
  color: rgba(242, 241, 236, 0.62);
  border: 1px solid rgba(242, 241, 236, 0.14);
}
.ts-awaiting_tx { color: #f5c86b; border-color: rgba(245, 200, 107, 0.35); background: rgba(245, 200, 107, 0.08); }
.ts-pending_deposit { color: #f5c86b; border-color: rgba(245, 200, 107, 0.35); background: rgba(245, 200, 107, 0.08); }
.ts-processing { color: #7cc4ff; border-color: rgba(124, 196, 255, 0.35); background: rgba(124, 196, 255, 0.08); }
.ts-success { color: #6fe3a5; border-color: rgba(111, 227, 165, 0.35); background: rgba(111, 227, 165, 0.08); }
.ts-refunded { color: #f5c86b; border-color: rgba(245, 200, 107, 0.35); background: rgba(245, 200, 107, 0.08); }
.ts-failed { color: #ff8d7a; border-color: rgba(255, 141, 122, 0.35); background: rgba(255, 141, 122, 0.08); }
.ts-unknown { color: rgba(242, 241, 236, 0.62); }
.ts-selected { color: #cdb4ff; border-color: rgba(205, 180, 255, 0.35); background: rgba(205, 180, 255, 0.08); }

/* --- pay panel extras --- */
.pp-refund { margin-top: 12px; }
.pp-help { font-size: 12px; color: rgba(242, 241, 236, 0.38); margin: 6px 0 0; }
.pp-go { margin-top: 14px; }
.pp-status {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 11px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(242, 241, 236, 0.09);
}
.pp-status-note { font-size: 12px; color: rgba(242, 241, 236, 0.38); }
.h-open-link {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-family: var(--font);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
}
.h-open-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .history { width: 100%; border-left: 0; }
  .nav-cta { padding: 9px 14px; font-size: 13px; }
}

/* --- maintenance gate (all pages; site.js injects when /api/status says so) --- */
.gate-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f5c86b;
  color: #3d2e05;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}
.app-dark .gate-bar { background: #8a6a1f; color: #fff3d6; }

/* --- blog & guides --- */
/* provider-rows that are links (blog index, about#blog) */
a.provider-row { text-decoration: none; color: inherit; }
a.provider-row:hover .p-name { text-decoration: underline; }

/* back link at the foot of guide/post pages */
.g-back-row { margin-top: 48px; }
.g-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}
.g-back:hover { opacity: 1; text-decoration: underline; }

/* --- footer onion address (full-width first row inside footer-bottom) --- */
.footer-onion {
  flex-basis: 100%;
  order: -1;
  margin-bottom: 6px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: rgba(242, 241, 236, 0.5);
}
.footer-onion code {
  font-family: inherit;
  word-break: break-all;
  color: rgba(242, 241, 236, 0.66);
  user-select: all;
}

/* --- asset picker popup --- */
.ap-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 11, 14, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.ap-overlay[hidden] { display: none; }
.ap-box {
  width: min(680px, 100%);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: rgba(18, 20, 26, 0.97);
  border: 1px solid rgba(242, 241, 236, 0.12);
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}
.ap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.ap-title { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.ap-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(242, 241, 236, 0.16);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ap-close:hover { background: rgba(242, 241, 236, 0.1); color: var(--ink); }
.ap-body {
  display: grid;
  grid-template-columns: 176px 1fr;
  flex: 1;
  min-height: 0;
}
.ap-chains {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
}
.ap-chains::-webkit-scrollbar { width: 6px; }
.ap-chains::-webkit-scrollbar-thumb { background: rgba(242, 241, 236, 0.14); border-radius: 3px; }
.ap-chain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ap-chain:hover { background: rgba(242, 241, 236, 0.06); color: var(--ink); }
.ap-chain.on { background: var(--ink); color: var(--paper); }
.ap-chain.on .ap-cc { color: var(--paper); opacity: 0.7; }
.ap-cc { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.ap-main { display: flex; flex-direction: column; min-height: 0; }
.ap-search {
  margin: 12px 12px 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(242, 241, 236, 0.16);
  background: rgba(242, 241, 236, 0.05);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}
.ap-search:focus { border-color: var(--line-strong); }
.ap-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 12px;
}
.ap-list::-webkit-scrollbar { width: 8px; }
.ap-list::-webkit-scrollbar-thumb { background: rgba(242, 241, 236, 0.14); border-radius: 4px; }
.ap-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ap-row:hover { background: rgba(242, 241, 236, 0.06); }
.ap-row.sel { background: rgba(232, 73, 15, 0.13); }
.ap-row img { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.ap-row .ab-glyph { width: 26px; height: 26px; font-size: 12.5px; }
.ap-tt { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.ap-nm {
  flex: 1;
  font-size: 13px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-cb {
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(242, 241, 236, 0.14);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.ap-empty { padding: 22px; text-align: center; color: var(--ink-3); font-size: 13.5px; margin: 0; }

@media (max-width: 640px) {
  .ap-box { max-height: 84vh; }
  .ap-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ap-chains {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 10px;
  }
  .ap-chain { flex-shrink: 0; }
}

/* --- quote stage (flip + slide-in) ---------------------------------------
   Two faces in one grid cell: quotes (front) and pay instructions (back).
   .is-flipped rotates the pair 180deg around Y; back's initial rotation
   hides it via backface-visibility. Route cards enter with a right-slide,
   staggered by inline animation-delay set in app.js. */
.swap-wrap.stage {
  width: min(1040px, 100%);
  display: grid;
  perspective: 1600px;
}
.stage-face {
  grid-area: 1 / 1;
  min-width: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.4, 0.05, 0.2, 1);
}
.stage-front {
  display: grid;
  grid-template-columns: minmax(0, 540px) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}
.stage:not(.has-quotes) .stage-front { grid-template-columns: minmax(0, 540px); }
.route-list:empty { display: none; }
.stage-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
}
.stage.is-flipped .stage-front { transform: rotateY(-180deg); }
.stage.is-flipped .stage-back { transform: rotateY(0deg); }

/* route card entrance — right-slide; one-shot class re-added per batch */
.route-list.rl-in .route-card { animation: q-slide 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
@keyframes q-slide { from { transform: translateX(56px); opacity: 0; } to { transform: none; opacity: 1; } }

/* mobile: stack; the same right-slide entry still applies under the widget */
@media (max-width: 940px) {
  .stage-front,
  .stage:not(.has-quotes) .stage-front { grid-template-columns: 1fr; }
}

/* reduced motion: flip degrades to a visibility swap, slides disabled */
@media (prefers-reduced-motion: reduce) {
  .stage-face { transition: none; }
  .stage-front { visibility: visible; }
  .stage-back { visibility: hidden; }
  .stage.is-flipped .stage-front { visibility: hidden; }
  .stage.is-flipped .stage-back { visibility: visible; }
  .stage-face { transform: none !important; }
  .route-list.rl-in .route-card { animation: none; }
}

/* --- guide shots --- */
.g-shot { float: right; width: min(46%, 460px); margin: 4px 0 18px 26px;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #15171C; }
.g-shot img { display: block; width: 100%; height: auto; }
.g-shot-paper { background: var(--paper); }
.g-shot figcaption { padding: 10px 14px; font-size: 12px; letter-spacing: .02em;
  color: var(--ink-2); background: var(--paper-2); border-top: 1px solid var(--line); }
.g-shot-wide { float: none; width: 100%; max-width: 780px; margin: 20px 0 4px; }
.d-body > .g-shot:first-child { margin-top: 0; }
.d-body::after { content: ""; display: block; clear: both; }
@media (max-width: 940px) {
  .g-shot { float: none; width: 100%; max-width: 560px; margin: 16px 0 8px; }
  .g-shot-wide { max-width: 100%; }
}

/* --- live tracker stepper --------------------------------------------------
   The 4-node lifecycle rail rendered on the pay face (and by renderPayStatus).
   Steps: Selected → Deposit → Swapping → Settled. Done steps fill orange, the
   active step pulses, the connector between steps fills as progress advances.
   Terminal tones (refunded/failed) recolor the final done step. */
.tracker {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: tk;
}
.tk-step {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  counter-increment: tk;
  min-width: 0;
}
/* connector line to the previous node */
.tk-step::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 50%;
  left: -50%;
  height: 2px;
  background: rgba(242, 241, 236, 0.14);
  z-index: 0;
}
.tk-step:first-child::before { display: none; }
.tk-dot {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background: #1b1d22;
  border: 2px solid rgba(242, 241, 236, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(242, 241, 236, 0.5);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.tk-dot::after { content: counter(tk); }
.tk-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(242, 241, 236, 0.42);
  text-align: center;
  white-space: nowrap;
  transition: color 0.3s ease;
}
/* completed steps: filled connector + solid dot */
.tk-step.is-done::before { background: var(--accent); }
.tk-step.is-done .tk-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tk-step.is-done .tk-dot::after { content: "✓"; }
.tk-step.is-done .tk-label { color: rgba(242, 241, 236, 0.72); }
/* active step: hollow orange ring, pulsing, number kept */
.tk-step.is-active .tk-dot {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 0 rgba(232, 73, 15, 0.45);
  animation: tk-pulse 1.8s ease-out infinite;
}
.tk-step.is-active .tk-label { color: var(--ink); } /* not --paper: app-dark flips --paper to near-black */
@keyframes tk-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 73, 15, 0.4); }
  70% { box-shadow: 0 0 0 7px rgba(232, 73, 15, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 73, 15, 0); }
}
/* terminal tones recolor the final done step + its connector */
.tracker.tk-refunded .tk-step.is-final .tk-dot,
.tracker.tk-refunded .tk-step.is-final::before { background: #f5c86b; border-color: #f5c86b; }
.tracker.tk-refunded .tk-step.is-final .tk-dot { color: #15171C; }
.tracker.tk-refunded .tk-step.is-final .tk-dot::after { content: "↩"; }
.tracker.tk-failed .tk-step.is-final .tk-dot,
.tracker.tk-failed .tk-step.is-final::before { background: #ff8d7a; border-color: #ff8d7a; }
.tracker.tk-failed .tk-step.is-final .tk-dot { color: #15171C; }
.tracker.tk-failed .tk-step.is-final .tk-dot::after { content: "✕"; }
/* status row under the rail */
.tk-status { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
@media (max-width: 520px) {
  .tk-label { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-step.is-active .tk-dot { animation: none; }
}

/* --- unavailable route card ------------------------------------------------
   A provider that refused to build instructions for the picked route is
   greyed and its button disabled, with the refusal shown in the sub-line. */
.route-card.rc-dead { opacity: 0.5; border-color: rgba(242, 241, 236, 0.1); }
.route-card.rc-dead .rc-use[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
  border-color: rgba(255, 141, 122, 0.4);
  color: #ff8d7a;
}
.route-card.rc-dead .rc-use[disabled]:hover { background: transparent; color: #ff8d7a; }

/* --- wallet pay (evm-calldata) ---------------------------------------------
   One-click pay through the user's own EIP-1193 wallet; manual calldata stays
   available in a collapsible fallback for hardware/other wallets. */
.wp-status { margin-top: 10px; min-height: 18px; }
.wp-msg { display: inline-block; font-size: 12.5px; line-height: 1.5; }
.wp-msg.wp-ok { color: #6fe3a5; }
.wp-msg.wp-warn { color: #f5c86b; }
.pp-manual { margin-top: 14px; border-top: 1px solid rgba(242, 241, 236, 0.09); padding-top: 12px; }
.pp-manual > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2, rgba(242, 241, 236, 0.62));
  list-style: none;
  user-select: none;
}
.pp-manual > summary::-webkit-details-marker { display: none; }
.pp-manual > summary::before { content: "▸ "; color: var(--accent); }
.pp-manual[open] > summary::before { content: "▾ "; }
.pp-manual > summary:hover { color: var(--paper); }
.pp-manual .pp-row { margin-top: 10px; }

/* --- per-provider quote countdown ------------------------------------------
   Each route card shows its own "valid m:ss" in the sub-line; it counts down
   live and turns amber near expiry, then the quote silently re-runs. */
.rc-exp { font-variant-numeric: tabular-nums; }
.rc-exp-low { color: #e0a83a; }
.rc-exp-dead { color: rgba(242, 241, 236, 0.4); }

/* --- recent swaps feed -----------------------------------------------------
   Anonymized rolling list on the homepage + app: pair · ~$ · outcome · age.
   No identifiers — the server never stores an address or txid. */
.recent-section .recent-head { margin-bottom: 16px; }
.recent-section .recent-head h2 { margin: 0 0 4px; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: var(--paper-2, rgba(21, 23, 28, 0.03));
  border: 1px solid var(--line, rgba(21, 23, 28, 0.08));
}
.rs-pair { font-weight: 640; letter-spacing: 0.01em; }
.rs-usd { color: var(--ink-2, #565A62); font-weight: 560; }
.rs-dot { width: 8px; height: 8px; border-radius: 999px; background: #9aa; justify-self: end; }
.rs-dot.rs-success { background: #2eb872; }
.rs-dot.rs-refunded { background: #e0a83a; }
.rs-dot.rs-failed { background: #e0603a; }
.rs-oc { color: var(--ink-2, #565A62); font-size: 12.5px; text-transform: lowercase; }
.rs-age { color: var(--ink-3, #9A9DA4); font-size: 12.5px; white-space: nowrap; }
.rs-empty, .rs-skeleton { color: var(--ink-3, #9A9DA4); font-size: 13.5px; padding: 12px 2px; list-style: none; }

/* app page is dark — recolor the rows against the dark ground */
.app-recent { width: min(1040px, 100%); margin: 26px auto 0; }
.app-recent-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.app-recent-sub { font-size: 12px; color: rgba(242, 241, 236, 0.4); }
.app-recent .rs-row {
  background: rgba(242, 241, 236, 0.03);
  border-color: rgba(242, 241, 236, 0.09);
  color: var(--paper, #f2f1ec);
}
.app-recent .rs-usd { color: rgba(242, 241, 236, 0.62); }
.app-recent .rs-oc { color: rgba(242, 241, 236, 0.5); }
.app-recent .rs-age { color: rgba(242, 241, 236, 0.38); }
.app-recent .rs-empty { color: rgba(242, 241, 236, 0.4); }
@media (max-width: 560px) {
  .rs-row { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 4px; }
  .rs-oc { display: none; }
}

/* --- empty pay panel: kill stray bar ---
   Until a route is picked the back face holds an EMPTY #payPanel; its bordered
   box paints as a thin full-width bar under some 3D/backface quirks (and for
   reduced-motion users before the visibility swap). :empty hides it until JS
   fills it on flip. */
.pay-panel:empty { display: none; }

/* --- reputation tier colors + external ratings ---
   Hydration (app.js hydrateRep, about.js — external, CSP-safe) tags each badge
   with rep-a/b/c/d/f from the live tier letter; the marker square and the text
   take the tier color. The dormant "rep —" state keeps the plain ink look.
   .p-ext is the third-party ratings line under a provider's About row. */
.rep-badge.rep-a { color: #2e9e5b; }
.rep-badge.rep-a::before { background: #2e9e5b; }
.rep-badge.rep-b { color: #7c9a2e; }
.rep-badge.rep-b::before { background: #7c9a2e; }
.rep-badge.rep-c { color: #c9871b; }
.rep-badge.rep-c::before { background: #c9871b; }
.rep-badge.rep-d { color: #c96a1b; }
.rep-badge.rep-d::before { background: #c96a1b; }
.rep-badge.rep-f { color: var(--accent); }
.rep-badge.rep-f::before { background: var(--accent); }
.prov-tile .p-ext {
  grid-column: 3;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin: 0;
}
@media (max-width: 760px) {
  .prov-tile .p-ext { grid-column: 2 / -1; }
}

/* --- api-docs swagger --- */
/* Seats the vendored Swagger UI in the page. The UI ships its own styling;
   these rules only kill the chrome that fights the site shell and map its
   grays onto our palette. Swagger's own class names are its public API. */
.api-docs-wrap {
  padding-block: clamp(20px, 3vw, 40px);
}
.api-docs.swagger-ui,
.api-docs .swagger-ui {
  font-family: inherit;
  color: var(--ink);
}
.api-docs .swagger-ui .wrapper {
  padding: 0;
  max-width: none;
}
.api-docs .swagger-ui .scheme-container {
  background: transparent;
  box-shadow: none;
  padding: 0 0 12px;
}
.api-docs .swagger-ui .info { margin: 0 0 24px; }
.api-docs .swagger-ui .info .title {
  font-family: inherit;
  color: var(--ink);
}
.api-docs .swagger-ui .info p,
.api-docs .swagger-ui .info li,
.api-docs .swagger-ui .info a { color: var(--ink-2); }
.api-docs .swagger-ui .opblock-tag {
  font-family: inherit;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.api-docs .swagger-ui .opblock .opblock-summary-description,
.api-docs .swagger-ui .opblock .opblock-summary-path { font-family: inherit; }
.api-docs .swagger-ui .opblock-summary-path { color: var(--ink); }
.api-docs .swagger-ui .btn,
.api-docs .swagger-ui input,
.api-docs .swagger-ui select,
.api-docs .swagger-ui textarea { font-family: inherit; }
.api-docs .swagger-ui .loading .loading-container { color: var(--ink-2); }
@media (max-width: 760px) {
  .api-docs-wrap { overflow-x: auto; }
}

/* --- v2.4 pay-face polish: order heading, live expiry chips, tracker eta ---
   The pay panel is headed by the dexr order id ("Order dexr_…"), quote/deposit
   windows count down in live chips, and the tracker says when the next step
   happens. Also: two-step armed state for destructive buttons, and the
   history drawer facelift. */

/* order id heading on the pay face */
.pp-order { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-bottom: 2px; }
.pp-order code {
  font-family: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(232, 73, 15, 0.1);
  border: 1px solid rgba(232, 73, 15, 0.28);
  border-radius: 7px;
  padding: 2px 8px;
  letter-spacing: 0.01em;
}
.pp-order-sub { font-size: 12px; color: var(--ink-3); margin: 0 0 12px; letter-spacing: 0.02em; }

/* live expiry chips — quote lifetime on the intro, deposit window on the instructions */
.pp-exp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  margin-right: 2px;
  border-radius: 999px;
  background: rgba(242, 241, 236, 0.06);
  border: 1px solid rgba(242, 241, 236, 0.14);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pp-exp-low { border-color: rgba(245, 200, 107, 0.55); color: #f5c86b; background: rgba(245, 200, 107, 0.08); }
.pp-exp-dead { border-color: rgba(255, 141, 122, 0.5); color: #ff8d7a; background: rgba(255, 141, 122, 0.07); }

/* when-does-the-next-step-happen line under the tracker */
.tk-eta { font-size: 12px; color: var(--ink-3); margin: 9px 0 0; line-height: 1.55; }
.tk-eta b { color: var(--ink-2); font-weight: 600; }

/* two-step destructive buttons — first tap arms, second fires */
.is-armed {
  background: rgba(255, 141, 122, 0.14) !important;
  border-color: rgba(255, 141, 122, 0.65) !important;
  color: #ff8d7a !important;
}

/* --- history drawer facelift ------------------------------------------------
   Cards get a calmer surface + hover lift; the receipt row becomes its own
   section with the purge button pushed to the far edge so it can't share a
   mis-tap with the row's text; "remove" sits dimmer, away from it. */
.h-fig-v { color: var(--ink); } /* was var(--paper): near-black on app-dark */
.h-order {
  background: linear-gradient(180deg, rgba(242, 241, 236, 0.055), rgba(242, 241, 236, 0.03));
  border-color: rgba(242, 241, 236, 0.11);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.h-order:hover { border-color: rgba(242, 241, 236, 0.18); }
.h-receipt {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(242, 241, 236, 0.08);
  justify-content: space-between;
}
.h-rc-del { margin-left: auto; padding: 4px 12px; }
.h-meta { padding-top: 2px; }
.h-remove { opacity: 0.75; }
.h-remove:hover { opacity: 1; }
.h-clear.is-armed, .h-remove.is-armed, .h-rc-del.is-armed { font-weight: 700; }

/* --- app container facelift ---------------------------------------------------
   Pay panel + swap widget: quieter borders, deeper layered shadow, a faint
   top sheen — same dark-glass language as the brochure's cards. */
.pay-panel {
  border-radius: 20px;
  border: 1px solid rgba(242, 241, 236, 0.1);
  border-top-color: rgba(232, 73, 15, 0.42);
  background: linear-gradient(180deg, rgba(24, 26, 33, 0.9), rgba(16, 18, 23, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 30px 60px -30px rgba(0, 0, 0, 0.85),
    0 60px 120px -60px rgba(0, 0, 0, 0.7);
}
.swap-widget {
  background: linear-gradient(180deg, rgba(24, 26, 33, 0.85), rgba(15, 17, 22, 0.8));
  border-color: rgba(242, 241, 236, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 30px 60px -32px rgba(0, 0, 0, 0.85),
    0 60px 120px -60px rgba(0, 0, 0, 0.65);
}
.swap-box { background: rgba(242, 241, 236, 0.045); border-color: rgba(242, 241, 236, 0.09); }
.pp-row { background: rgba(242, 241, 236, 0.055); border-color: rgba(242, 241, 236, 0.1); }

/* --- provider report popup --------------------------------------------------
   About > Providers: clicking a tile opens this small dialog with the full
   trust report (assets/js/about.js). Paper card over a dimmed field, hairline
   feature ledger, points chips in green/ember. */
body.pr-open { overflow: hidden; }
.pr-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(21, 23, 28, 0.44);
  backdrop-filter: blur(3px);
}
.pr-overlay[hidden] { display: none; }
.pr-card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(84vh, 780px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 70px -25px rgba(21, 23, 28, 0.45);
  padding: 26px 28px 20px;
}
.pr-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.pr-close:hover { color: var(--accent); border-color: var(--accent); }
.pr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.pr-icon { width: 44px; height: 44px; border-radius: 50%; }
.pr-title { display: flex; flex-direction: column; gap: 4px; }
.pr-title h3 { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.pr-ext { font-size: 12px; color: var(--ink-3); margin: 4px 0 0; }
.pr-h {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 20px 0 8px;
}
.pr-feats { list-style: none; margin: 0; padding: 0; }
.pr-feat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.pr-feat:first-child { border-top: 0; }
.pr-pts { font-variant-numeric: tabular-nums; font-weight: 620; white-space: nowrap; }
.pr-pos { color: #2e9e5b; }
.pr-neg { color: var(--accent); }
.pr-incidents { list-style: none; margin: 0; padding: 0; }
.pr-incidents li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pr-incidents li:first-child { border-top: 0; }
.pr-inc-year { font-size: 12px; font-weight: 620; font-variant-numeric: tabular-nums; }
.pr-inc-sum { font-size: 13px; color: var(--ink-2); margin: 2px 0 0; }
.pr-sev {
  flex: none;
  align-self: flex-start;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  margin-top: 1px;
}
.pr-sev-minor { background: rgba(46, 158, 91, 0.12); color: #2e9e5b; }
.pr-sev-moderate { background: rgba(201, 135, 27, 0.14); color: #b0760f; }
.pr-sev-severe { background: rgba(232, 73, 15, 0.12); color: var(--accent); }
.pr-none { font-size: 13px; color: var(--ink-2); margin: 0; }
.pr-notes { margin: 0; padding-left: 18px; }
.pr-notes li { font-size: 13px; color: var(--ink-2); margin: 4px 0; }
.pr-src { font-size: 11.5px; color: var(--ink-3); margin: 22px 0 0; }
.pr-src code { font-size: 11px; }
.pr-loading { font-size: 13px; color: var(--ink-3); margin: 26px 0; text-align: center; }
/* clickable provider tiles */
.prov-clickable { cursor: pointer; transition: background 0.15s var(--ease-out); }
.prov-clickable:hover { background: rgba(21, 23, 28, 0.04); }
.prov-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* --- history drawer: accordion rows -----------------------------------------
   v2.5 redesign: orders collapse to a one-line summary (icon, pair, provider ·
   time, status pill, chevron) and expand on tap. The receipt state shows in
   the summary as a mini chip so purged/held is visible without opening. */
.h-order {
  border: 1px solid rgba(242, 241, 236, 0.09);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(242, 241, 236, 0.035), rgba(242, 241, 236, 0.015));
  overflow: hidden;
  padding: 0;              /* padding lives on .h-row / .h-body in the accordion */
}
.h-order:hover { border-color: rgba(242, 241, 236, 0.16); }
.h-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  cursor: pointer;
  user-select: none;
}
.h-row:focus-visible { outline: 2px solid rgba(232, 73, 15, 0.6); outline-offset: -2px; }
.h-chev {
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid rgba(242, 241, 236, 0.4);
  border-bottom: 1.5px solid rgba(242, 241, 236, 0.4);
  transform: rotate(45deg);
  transition: transform 0.18s var(--ease-out);
  margin-left: 2px;
}
.h-order.is-open .h-chev { transform: rotate(-135deg); }
.h-body { display: none; padding: 0 14px 13px; }
.h-order.is-open .h-body { display: block; }
.h-order.is-open .h-row { padding-bottom: 10px; }
.h-body > *:first-child { border-top: 1px solid rgba(242, 241, 236, 0.08); padding-top: 11px; }
.h-body > .h-figs:first-child { padding-top: 12px; }
/* summary-line receipt state */
.h-rc-mini {
  font-size: 9.5px;
  font-weight: 620;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(242, 241, 236, 0.5);
  border: 1px solid rgba(242, 241, 236, 0.18);
  border-radius: 99px;
  padding: 1px 7px;
  vertical-align: 1px;
}
.h-rc-mini-done {
  font-size: 9.5px;
  font-weight: 620;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6fe3a5;
}
/* expanded receipt block reads as its own sub-card */
.h-receipt {
  background: rgba(242, 241, 236, 0.045);
  border: 1px solid rgba(242, 241, 236, 0.09);
  border-radius: 10px;
  padding: 9px 12px;
}

/* --- picker rail: grown universe ------------------------------------------
   v2.5 unions every provider's tokens — 15+ chains overflow the rail at
   laptop heights. Compact rows so the common case fits without scrolling;
   thin styled scrollbar beyond webkit; .more (toggled in app.js) casts a
   bottom shadow while chains sit below the fold so a row sliced mid-height
   reads as "scroll", never as cut off. */
.ap-chains {
  gap: 1px;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 241, 236, 0.25) transparent;
}
.ap-chains.more { box-shadow: inset 0 -18px 14px -14px rgba(0, 0, 0, 0.85); }
.ap-chain { flex-shrink: 0; padding: 6px 10px; font-size: 12.5px; }

/* --- v2.6 Seam app shell ----------------------------------------------------
   The app page rebuilt on the Seam design (design-preview/redesign/m18-seam*):
   the page is cut diagonally — near-black above, the ember artwork flooding
   the floor — and one paper card on the seam carries the whole swap through
   quote → pay → track. The card flips its own tokens to the light palette, so
   rules written with var(--ink)/var(--line) follow automatically; only rules
   that hardcode the dark rgba(242,241,236,…) palette are overridden below.
   Picker = the chosen Grid (p12): full-screen dim+blur, chain rail down the
   left, universe as a tile grid. Rec bar = quiet line above the card. */

/* shell: plain near-black + the flood; app-bg.jpg no longer ships on /app */
body.app-dark { background: #0A0B0E; }
.app-dark .flood {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('../img/app-flood.jpg') center / cover no-repeat;
  clip-path: polygon(100% 22%, 100% 100%, 0 100%, 0 72%);
  opacity: 0.95;
  animation: seam-drift 90s ease-in-out infinite alternate;
}
@keyframes seam-drift { from { background-position: 49% 52%; } to { background-position: 53% 46%; } }

/* nav loses the pill chrome — plain words on the black */
.app-dark .nav {
  background: none;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.app-dark .nav.scrolled { box-shadow: none; }
.app-dark .nav .brand { color: #F4F2EC; }
.app-dark .nav-counter {
  font-size: 11.5px;
  color: rgba(244, 242, 236, 0.35);
  font-variant-numeric: tabular-nums;
  margin-right: 2px;
  white-space: nowrap;
}
.app-dark .nav-counter b { color: rgba(244, 242, 236, 0.62); font-weight: 650; }
@media (max-width: 720px) { .app-dark .nav-counter { display: none; } }

/* rec bar — the last five settled swaps, above the card, in the black */
.app-dark .rec {
  width: 100%;
  max-width: 440px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  row-gap: 6px;
  font-size: 11.5px;
  color: rgba(244, 242, 236, 0.3);
  font-variant-numeric: tabular-nums;
}
.app-dark .rec .lbl {
  width: 100%;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(244, 242, 236, 0.3);
}
.app-dark .rec .s { display: inline-flex; align-items: center; gap: 5px; color: rgba(244, 242, 236, 0.55); white-space: nowrap; }
.app-dark .rec .s .ic { width: 15px; height: 15px; border-radius: 50%; display: block; }
.app-dark .rec .s .arr { color: rgba(244, 242, 236, 0.22); font-size: 11px; }
.app-dark .rec .s b { color: #F4F2EC; font-weight: 650; }
.app-dark .rec .s .ago { color: rgba(244, 242, 236, 0.3); font-size: 10.5px; margin-left: 2px; }
.app-dark .rec .sep { color: rgba(244, 242, 236, 0.13); }
.app-dark .rec .s.new { animation: recin 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
@keyframes recin { from { opacity: 0; transform: translateY(-9px) scale(0.9); filter: blur(2px); } }
.app-dark .rec .rec-empty { font-size: 11px; color: rgba(244, 242, 236, 0.3); }

/* the card: one paper surface on the seam, both stage faces share it.
   Token flip — everything inside the card reads light by default. */
.app-dark .swap-wrap.stage {
  width: min(440px, 100%);
  gap: 0;
  animation: seam-rise 0.55s cubic-bezier(0.2, 0.7, 0.25, 1) both;
}
@keyframes seam-rise { from { opacity: 0; transform: translateY(16px); } }
.app-dark .stage-face {
  --ink: #15171C;
  --ink-2: rgba(21, 23, 28, 0.62);
  --ink-3: rgba(21, 23, 28, 0.4);
  --line: rgba(21, 23, 28, 0.1);
  --line-strong: rgba(21, 23, 28, 0.25);
  --paper-2: #F4F4EE;
  background: #FBFBF8;
  color: #15171C;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 50px 110px -30px rgba(0, 0, 0, 0.65);
}
.app-dark .stage-front,
.app-dark .stage:not(.has-quotes) .stage-front { grid-template-columns: 1fr; gap: 0; }
/* the pay face carries less than the quote face — don't stretch the paper to
   the front's height; hug the content and sit at the top of the cell */
.app-dark .stage-back { align-self: start; justify-self: stretch; }

/* quote face interior */
.app-dark .swap-widget {
  background: none;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 0;
  border-radius: 0;
  gap: 10px;
}
.app-dark .chead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.app-dark .chead b { font-size: 15px; font-weight: 650; }
.app-dark .chead-note { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.app-dark .swap-box {
  background: rgba(21, 23, 28, 0.04);
  border-color: rgba(21, 23, 28, 0.09);
  border-radius: 15px;
  padding: 12px 15px 11px;
}
.app-dark .swap-box:focus-within { border-color: rgba(232, 73, 15, 0.55); background: rgba(21, 23, 28, 0.05); }
.app-dark .sb-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; }
.app-dark .amt-in, .app-dark .amt-out { font-size: clamp(24px, 6vw, 28px); font-weight: 560; }
.app-dark .asset-btn {
  background: #fff;
  border-color: rgba(21, 23, 28, 0.1);
  padding: 6px 11px 6px 6px;
  font-size: 13.5px;
}
.app-dark .asset-btn:hover { background: #fff; border-color: rgba(232, 73, 15, 0.55); }
.app-dark .asset-btn img, .app-dark .ab-glyph { width: 21px; height: 21px; }
.app-dark .ab-glyph { background: rgba(21, 23, 28, 0.08); font-size: 11px; }
.app-dark .flip-btn {
  width: 32px;
  height: 32px;
  margin: -21px auto; /* straddle the 10px widget gap */
  background: #fff;
  border-color: rgba(21, 23, 28, 0.14);
  font-size: 12px;
}
.app-dark .dest-box {
  background: rgba(21, 23, 28, 0.04);
  border-color: rgba(21, 23, 28, 0.09);
  border-radius: 13px;
  padding: 10px 15px 11px;
}
.app-dark .dest-box:focus-within { border-color: rgba(232, 73, 15, 0.55); }
.app-dark .dest-box input { font-size: 13.5px; }

/* ink CTA (ember on hover) */
.app-dark .swap-widget .quote-btn,
.app-dark .pay-panel .quote-btn {
  margin-top: 4px;
  padding: 14px;
  border-radius: 999px;
  background: #15171C;
  font-size: 15px;
  font-weight: 650;
}
.app-dark .swap-widget .quote-btn:hover:not(:disabled),
.app-dark .pay-panel .quote-btn:hover:not(:disabled) { background: var(--accent); }
.app-dark .swap-widget .quote-btn:disabled { opacity: 0.35; }

/* routes render as hairline rows inside the card, not separate cards */
.app-dark .route-list { gap: 0; }
.app-dark .route-card {
  grid-template-columns: 20px 1fr auto auto;
  gap: 10px;
  padding: 11px 2px;
  border: 0;
  border-top: 1px solid rgba(21, 23, 28, 0.09);
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.app-dark .rc-tag {
  position: static;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}
.app-dark .rc-icon { width: 20px; height: 20px; }
.app-dark .rc-name { font-size: 13px; }
.app-dark .rc-sub { font-size: 11.5px; color: var(--ink-3); }
.app-dark .rc-out b { font-size: 13.5px; color: var(--ink); }
.app-dark .rc-out span { font-size: 10px; color: var(--ink-3); }
.app-dark .rc-use {
  background: none;
  border: 0;
  padding: 4px 0 4px 10px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.app-dark .rc-use:hover:not(:disabled) { text-decoration: underline; }
.app-dark .rc-use:disabled { color: var(--ink-3); }
.app-dark .route-empty { color: var(--ink-3); padding: 14px 0 6px; }

/* ---- pay face: the panel is the card — its own chrome goes away ---- */
.app-dark .pay-panel {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 0;
}
.app-dark .pay-panel h3 { font-size: 16px; }
.app-dark .pp-order code {
  background: rgba(232, 73, 15, 0.07);
  border-color: rgba(232, 73, 15, 0.3);
}
.app-dark .pp-row {
  background: rgba(21, 23, 28, 0.045);
  border-color: rgba(21, 23, 28, 0.1);
}
.app-dark .copy-btn { border-color: rgba(21, 23, 28, 0.2); color: var(--ink-2); }
.app-dark .copy-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.app-dark .copy-btn.ok { color: var(--accent); border-color: rgba(232, 73, 15, 0.55); }
.app-dark .pp-help { color: var(--ink-3); }
.app-dark .pp-status { border-top-color: rgba(21, 23, 28, 0.09); }
.app-dark .pp-status-note { color: var(--ink-3); }
.app-dark .pp-exp {
  background: rgba(21, 23, 28, 0.05);
  border-color: rgba(21, 23, 28, 0.14);
}
/* the rate line rides between the CTA and the tracker — give the whole line
   a soft surface so the chip never floats on bare paper */
.app-dark .pp-expiry {
  background: rgba(21, 23, 28, 0.04);
  border: 1px solid rgba(21, 23, 28, 0.08);
  border-radius: 11px;
  padding: 8px 11px;
}
.app-dark .pp-expiry .pp-exp { background: rgba(21, 23, 28, 0.06); }
.app-dark .pp-exp-low { border-color: rgba(176, 116, 16, 0.5); color: #9A6B12; background: rgba(224, 168, 58, 0.12); }
.app-dark .pp-exp-dead { border-color: rgba(179, 38, 30, 0.4); color: #B3261E; background: rgba(179, 38, 30, 0.06); }
.app-dark .tk-eta b { color: var(--ink-2); }

/* amount band + QR on the deposit face */
.app-dark .pp-amount-band { display: flex; align-items: center; gap: 16px; margin: 8px 0 12px; }
.app-dark .pp-qr {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  padding: 7px;
  background: #fff;
  border: 1px solid rgba(21, 23, 28, 0.12);
  border-radius: 12px;
}
.app-dark .pp-qr canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.app-dark .pp-big { font-size: 24px; font-weight: 620; letter-spacing: -0.02em; line-height: 1.15; }
.app-dark .pp-big small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 5px; }
.app-dark .pp-addr-block {
  border: 1px dashed rgba(21, 23, 28, 0.28);
  border-radius: 14px;
  padding: 11px 14px;
  margin-top: 8px;
}
.app-dark .pp-addr-block .pp-row { background: none; border: 0; padding: 4px 0; margin-top: 0; }
.app-dark .pp-addr-block .pp-row + .pp-row { border-top: 1px dashed rgba(21, 23, 28, 0.14); }

/* tracker + badges, light */
.app-dark .tk-step::before { background: rgba(21, 23, 28, 0.12); }
.app-dark .tk-dot { background: #fff; border-color: rgba(21, 23, 28, 0.25); color: rgba(21, 23, 28, 0.45); }
.app-dark .tk-step.is-done .tk-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.app-dark .tk-step.is-done .tk-label { color: rgba(21, 23, 28, 0.6); }
.app-dark .tk-label { color: rgba(21, 23, 28, 0.42); }
.app-dark .tracker.tk-refunded .tk-step.is-final .tk-dot,
.app-dark .tracker.tk-refunded .tk-step.is-final::before { background: #DFA93A; border-color: #DFA93A; }
.app-dark .tracker.tk-failed .tk-step.is-final .tk-dot,
.app-dark .tracker.tk-failed .tk-step.is-final::before { background: #D2503C; border-color: #D2503C; }
.app-dark .tracker.tk-failed .tk-step.is-final .tk-dot { color: #fff; }
.app-dark .ts-badge { background: rgba(21, 23, 28, 0.05); border-color: rgba(21, 23, 28, 0.14); color: var(--ink-2); }
.app-dark .ts-awaiting_tx, .app-dark .ts-pending_deposit,
.app-dark .ts-refunded { color: #9A6B12; border-color: rgba(224, 168, 58, 0.45); background: rgba(224, 168, 58, 0.1); }
.app-dark .ts-processing { color: #2A6FBF; border-color: rgba(42, 111, 191, 0.35); background: rgba(42, 111, 191, 0.08); }
.app-dark .ts-success { color: #1F9D57; border-color: rgba(31, 157, 87, 0.4); background: rgba(31, 157, 87, 0.08); }
.app-dark .ts-failed { color: #B3261E; border-color: rgba(179, 38, 30, 0.35); background: rgba(179, 38, 30, 0.07); }
.app-dark .ts-unknown { color: var(--ink-2); }
.app-dark .ts-selected { color: #6D3FD1; border-color: rgba(109, 63, 209, 0.35); background: rgba(109, 63, 209, 0.07); }

/* wallet pay, light */
.app-dark .wp-msg.wp-ok { color: #1F9D57; }
.app-dark .wp-msg.wp-warn { color: #9A6B12; }
.app-dark .pp-manual { border-top-color: rgba(21, 23, 28, 0.09); }
.app-dark .pp-manual > summary:hover { color: var(--ink); }
.app-dark .txsum {
  margin-top: 12px;
  border: 1px dashed rgba(21, 23, 28, 0.25);
  border-radius: 14px;
  padding: 10px 14px;
}
.app-dark .txsum .pp-row { background: none; border: 0; padding: 4px 0; margin-top: 0; }
.app-dark .txsum .pp-row + .pp-row { border-top: 1px dashed rgba(21, 23, 28, 0.14); }

/* ---- the picker: Grid (p12) — dim+blur, chain rail left, tiles right ---- */
.app-dark .ap-overlay {
  padding: 60px 20px;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.app-dark .fp-dim {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 14, 0.6);
  -webkit-backdrop-filter: blur(7px) saturate(1.1);
  backdrop-filter: blur(7px) saturate(1.1);
  animation: seam-dimin 0.3s ease both;
}
@keyframes seam-dimin { from { opacity: 0; } }
.app-dark .ap-box {
  --ink: #15171C;
  --ink-2: rgba(21, 23, 28, 0.62);
  --ink-3: rgba(21, 23, 28, 0.4);
  --line: rgba(21, 23, 28, 0.1);
  --line-strong: rgba(21, 23, 28, 0.25);
  position: relative;
  width: min(660px, 100%);
  max-height: 100%;
  background: #FBFBF8;
  color: #15171C;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 60px 130px -25px rgba(0, 0, 0, 0.75), 0 8px 24px -8px rgba(0, 0, 0, 0.4);
  animation: seam-fpin 0.45s cubic-bezier(0.2, 0.8, 0.26, 1) both;
}
@keyframes seam-fpin { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
.app-dark .ap-head { padding: 19px 22px 0; border-bottom: 0; justify-content: flex-start; align-items: baseline; }
.app-dark .ap-title { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.app-dark .ap-count { margin-left: 10px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.app-dark .ap-close {
  width: auto;
  height: auto;
  margin-left: auto;
  background: none;
  border: 0;
  font-size: 17px;
  color: var(--ink-3);
  padding: 2px 4px;
}
.app-dark .ap-close:hover { background: none; color: var(--accent); }
.app-dark .ap-body {
  grid-template-columns: 148px 1fr;
  margin-top: 14px;
  border-top: 1px solid rgba(21, 23, 28, 0.08);
}

/* the chain rail, down the left */
.app-dark .ap-chains {
  gap: 2px;
  padding: 12px 8px;
  border-right: 1px solid rgba(21, 23, 28, 0.08);
  scrollbar-color: rgba(21, 23, 28, 0.25) transparent;
}
.app-dark .ap-chains::-webkit-scrollbar-thumb { background: rgba(21, 23, 28, 0.18); }
.app-dark .ap-chains.more { box-shadow: inset 0 -18px 14px -14px rgba(21, 23, 28, 0.35); }
.app-dark .ap-chain {
  position: relative;
  justify-content: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.app-dark .ap-chain:hover { background: rgba(21, 23, 28, 0.04); color: var(--ink-2); }
.app-dark .ap-chain img { width: 21px; height: 21px; border-radius: 50%; flex-shrink: 0; }
.app-dark .ap-chain .ap-all {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.5px dashed var(--ink-3);
  flex-shrink: 0;
  display: block;
}
.app-dark .ap-chain .ap-cn { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-dark .ap-chain .ap-cc { margin-left: auto; font-size: 10px; color: var(--ink-3); }
.app-dark .ap-chain.on { background: rgba(232, 73, 15, 0.07); color: var(--accent); }
.app-dark .ap-chain.on::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.app-dark .ap-chain.on .ap-cc { color: var(--accent); opacity: 1; }

/* right side: rounded search, popular strip, tile grid */
.app-dark .fp-search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 13px 16px 0;
  background: #fff;
  border: 1px solid rgba(21, 23, 28, 0.12);
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.app-dark .fp-search:focus-within { border-color: rgba(232, 73, 15, 0.55); }
.app-dark .ap-search {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13.5px;
  caret-color: var(--accent);
}
.app-dark .fp-pop {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-dark .fp-pop::-webkit-scrollbar { display: none; }
.app-dark .fpop {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid rgba(21, 23, 28, 0.12);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  font-size: 12px;
  font-weight: 600;
  color: #15171C;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.app-dark .fpop img { width: 17px; height: 17px; border-radius: 50%; display: block; }
.app-dark .fpop .ab-glyph { width: 17px; height: 17px; font-size: 9px; }
.app-dark .fpop:hover { border-color: var(--accent); transform: translateY(-1px); }
.app-dark .ap-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-content: start;
  padding: 12px 16px 14px;
  -webkit-mask-image: linear-gradient(#000 94%, transparent);
  mask-image: linear-gradient(#000 94%, transparent);
}
.app-dark .ap-list::-webkit-scrollbar-thumb { background: rgba(21, 23, 28, 0.18); }
.app-dark .ap-row {
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(21, 23, 28, 0.1);
  border-radius: 13px;
  padding: 10px 11px;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.app-dark .ap-row:hover { background: #fff; border-color: var(--accent); transform: translateY(-1px); }
.app-dark .ap-row.sel { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 73, 15, 0.15); }
.app-dark .ap-row.sel .ap-tt { color: var(--accent); }
.app-dark .ap-row img, .app-dark .ap-row .ab-glyph { width: 25px; height: 25px; }
.app-dark .ap-tcol { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.app-dark .ap-tt { font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em; }
.app-dark .ap-nm { font-size: 9.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-dark .ap-empty { grid-column: 1 / -1; }
.app-dark .fp-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px 12px;
  border-top: 1px solid rgba(21, 23, 28, 0.08);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.app-dark .fp-foot .keys { display: flex; gap: 12px; }
.app-dark .fp-foot .keys b {
  font-weight: 400;
  border: 1px solid rgba(21, 23, 28, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9.5px;
  font-family: ui-monospace, 'Cascadia Mono', 'JetBrains Mono', monospace;
}

/* picker on small screens: rail collapses to a chip row, tiles go 2-up */
@media (max-width: 640px) {
  .app-dark .ap-overlay { padding: 12px; }
  .app-dark .ap-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .app-dark .ap-chains {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(21, 23, 28, 0.08);
    padding: 8px 10px;
  }
  .app-dark .ap-chain { flex-shrink: 0; }
  .app-dark .ap-chain.on::before { display: none; }
  .app-dark .ap-list { grid-template-columns: repeat(2, 1fr); }
  .app-dark .fp-foot .keys { display: none; }
}

/* footer: stage-flavored line left, onion right, sitting on the artwork */
.app-dark .app-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 26px 22px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(36, 17, 7, 0.85);
}
.app-dark .app-foot .foot-onion { font-variant-numeric: tabular-nums; }

/* history drawer + scrim stay above the flood (they keep their v2.4 skin) */
.app-dark .history { z-index: 260; }
.app-dark .history-scrim { z-index: 250; }

@media (prefers-reduced-motion: reduce) {
  .app-dark .flood, .app-dark .swap-wrap.stage, .app-dark .ap-box,
  .app-dark .fp-dim, .app-dark .rec .s.new { animation: none !important; }
}

/* --- quote-face overflow fix ------------------------------------------------
   The Seam override above set the front face's grid column to plain 1fr —
   that is minmax(auto, 1fr), so the column floored at the amount input's
   intrinsic min-content (~473px at the big clamp font) and spilled 33px past
   the 440px paper: the asset pills, the head note, and the Get-quote button
   painted over the flood. minmax(0, 1fr) removes the floor; the amount
   inputs already shrink (flex: 1 + min-width: 0). */
.app-dark .stage-front,
.app-dark .stage:not(.has-quotes) .stage-front { grid-template-columns: minmax(0, 1fr); }
.app-dark .stage-face .swap-widget { min-width: 0; }

/* --- best-rate tag grid fix ---------------------------------------------------
   The Seam override above made .rc-tag position: static, but renderRoutes emits
   the tag as the route card's FIRST child — it became grid item #1, squatting in
   the 20px icon column as an ember sliver (the base rule's ember background was
   never overridden, and the ember-on-ember text was invisible), crushing
   .rc-icon to zero width and shifting every column one slot right. Take the tag
   back out of the grid: a small paper chip straddling the card's top hairline
   with ember uppercase text (Seam typography); the icon column is restored. */
.app-dark .rc-tag {
  position: absolute;
  top: -8px;
  left: 12px;
  padding: 1px 7px;
  background: #FBFBF8;
  border-radius: 999px;
}

/* --- seam route rows --------------------------------------------------------
   v2.6 quote rows rebuilt on the m18 mockup: one quiet line per route —
   selection dot, receive amount, provider · fees total · eta — with ALL the
   exchange detail (fee lines, floor, rate, rep, settle, warnings) behind the
   ⓘ hover/tap. The row is the selector; the one CTA ("Swap with X →") acts
   on the selected row. Replaces the old card innards (icon/name/sub/use). */
.app-dark .route-card.rl-row {
  grid-template-columns: 10px auto 1fr;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  transition: background 0.15s ease;
}
.app-dark .rl-row:hover { background: rgba(21, 23, 28, 0.03); }
.app-dark .rl-row:focus-visible { outline: 2px solid rgba(232, 73, 15, 0.55); outline-offset: -2px; }
.app-dark .rl-row.rc-dead { opacity: 0.45; cursor: default; }
.app-dark .rl-row.rc-sel { background: rgba(232, 73, 15, 0.045); }

.app-dark .rc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(21, 23, 28, 0.14);
  justify-self: center;
}
.app-dark .rl-row.rc-sel .rc-dot { background: var(--accent); }

.app-dark .rl-row .rc-out { text-align: left; color: var(--ink-3); font-size: 11px; }
.app-dark .rl-row .rc-out b {
  display: inline;
  font-size: 13.5px;
  font-weight: 620;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-right: 5px;
}

.app-dark .rc-meta { justify-self: end; text-align: right; color: var(--ink-2); font-size: 12px; }
.app-dark .rc-meta b { color: var(--ink); font-weight: 600; }

/* the ⓘ + its popover: hover on the wrapper keeps the card open while the
   pointer reads it; tap toggles .open for touch (JS closes the others) */
.app-dark .rc-inf { position: relative; display: inline-flex; margin-left: 7px; vertical-align: middle; }
.app-dark .rc-i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(21, 23, 28, 0.28);
  background: none;
  color: var(--ink-3);
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-dark .rc-i:hover { border-color: rgba(232, 73, 15, 0.6); color: var(--accent); }
.app-dark .rc-info {
  display: none;
  position: absolute;
  right: -6px;
  top: calc(100% + 8px);
  z-index: 6;
  width: 236px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FBFBF8;
  border: 1px solid rgba(21, 23, 28, 0.12);
  box-shadow: 0 18px 40px -18px rgba(21, 23, 28, 0.35);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
  cursor: default;
}
.app-dark .rc-inf:hover .rc-info,
.app-dark .rc-inf.open .rc-info,
.app-dark .rc-i:focus-visible + .rc-info { display: block; }
.app-dark .rc-info p { margin: 0 0 6px; }
.app-dark .rc-info p:last-child { margin-bottom: 0; }
.app-dark .rc-info .rc-fees { font-variant-numeric: tabular-nums; }
.app-dark .rc-info .rc-dim { color: var(--ink-3); font-size: 10.5px; }
.app-dark .rc-info .rc-warn { color: #b45a0a; }

/* countdown chip now rides the card head (rows no longer carry their own) */
.app-dark .chead-note .rc-exp-low { color: #b45a0a; }
.app-dark .chead-note .rc-exp-dead { color: var(--ink-3); }

@media (max-width: 560px) {
  .app-dark .route-card.rl-row { grid-template-columns: 10px 1fr; }
  .app-dark .rl-row .rc-meta { grid-column: 2; justify-self: start; text-align: left; }
  .app-dark .rc-info { width: min(236px, 68vw); }
}

/* --- seam app header (m18 nav) ------------------------------------------------
   The app page drops the brochure's floating pill nav: plain text, in flow —
   brand left (it IS the exit), Find order / History as bare links center,
   the settled counter dim at the right end. */
.app-dark .nav.app-nav {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 26px 6px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 13px;
}
.app-dark .h-count[hidden] { display: none; }
.app-dark .nav.app-nav .brand { gap: 9px; font-size: 15.5px; font-weight: 700; letter-spacing: -0.02em; color: #F4F2EC; }
.app-dark .nav.app-nav .brand img { width: 22px; height: 22px; }
.app-dark .an-links { display: flex; align-items: center; gap: 20px; }
.app-dark .an-link {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 13px;
  color: rgba(244, 242, 236, 0.55);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-dark .an-link:hover { color: rgba(244, 242, 236, 0.92); }
.app-dark .an-counter { font-size: 11.5px; color: rgba(244, 242, 236, 0.4); font-variant-numeric: tabular-nums; }
.app-dark .an-counter b { font-weight: 650; color: rgba(244, 242, 236, 0.62); }
/* in-flow nav: the fixed-pill headroom on .app-main goes away */
.app-dark .app-main { padding-top: 10px; }
@media (max-width: 560px) {
  .app-dark .nav.app-nav { padding: 18px 18px 4px; gap: 12px; }
  .app-dark .an-links { gap: 14px; }
  .app-dark .an-link { font-size: 12.5px; }
  /* the ⓘ popover anchors to the whole ROW, not the ⓘ — full-width inside
     the card, never clipped at the screen edge */
  .app-dark .rl-row { position: relative; }
  .app-dark .rc-inf { position: static; }
  .app-dark .rc-info { left: 0; right: 0; width: auto; }
}

/* --- rc-info polish: the ⓘ card reads like a ledger, not a wrapped sentence ---
   Fees become a label/value table (values never wrap mid-token), sections
   divide with hairlines, the disclaimer drops a size. And when the ⓘ sits
   near the viewport floor, .rc-up flips the card above the row. */
.app-dark .rc-info {
  width: 248px;
  padding: 13px 14px;
  font-size: 12px;
  line-height: 1.5;
  /* long warning lists (CCE) scroll INSIDE the card — never grow the page */
  max-height: min(46vh, 380px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.app-dark .rc-info .rc-fh { margin: 0 0 5px; font-weight: 600; color: var(--ink); }
.app-dark .rc-info .rc-ft {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(21, 23, 28, 0.08);
}
.app-dark .rc-info .rc-fee { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; }
.app-dark .rc-info .rc-fee span { color: var(--ink-3); }
.app-dark .rc-info .rc-fee b { font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-dark .rc-up .rc-info { top: auto; bottom: calc(100% + 8px); }

/* hover is a PEEK, not a trap: an open-below popover overlaps the next row's
   controls; if it caught pointer events, parking the cursor there would keep
   the row above hovered forever — its ⓘ becomes unclickable. So hover-shown
   cards are pointer-transparent; only the tap-pinned (.open) card takes
   events, which is what makes its long content scrollable/selectable. */
.app-dark .rc-info { pointer-events: none; }
.app-dark .rc-inf.open .rc-info { pointer-events: auto; }

/* mobile rows: no hover, no room — the row shows ONLY the rating beside the
   provider (fees/eta stay behind the ⓘ, which taps open) */
.app-dark .rc-rep { display: none; }
@media (max-width: 560px) {
  .app-dark .rl-row .rc-det { display: none; }
  .app-dark .rl-row .rc-rep { display: inline-flex; margin-left: 2px; }
}

/* --- nojs footer entry (v2.7) — the zero-JavaScript flow lives in the footer
   chrome site-wide: struck-JS mark + link to nojs.dexr.pro (the onion serves
   only that flow) --- */
.footer-links a.f-nojs {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.footer-links a.f-nojs img {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  display: block;
}
