/* XRPline — explorer-grade UI (XRPSCAN × TRONSEC), cyan brand, dark/light */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060b16;
  --bg-2: #0a1220;
  --bg-elevated: #0e1728;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-solid: #101a2c;
  --surface-hover: rgba(255, 255, 255, 0.06);
  --fg: #eef5ff;
  --muted: #8fa3b8;
  --cyan: #00e5ff;
  --cyan-dim: #00b4cc;
  --cyan-glow: rgba(0, 229, 255, 0.32);
  --cyan-soft: rgba(0, 229, 255, 0.12);
  --ok: #2fe6a6;
  --warn: #f5c15a;
  --danger: #ff5a78;
  --border: rgba(140, 180, 220, 0.12);
  --border-strong: rgba(0, 229, 255, 0.28);
  --launch-bg: #ffffff;
  --launch-fg: #070b14;
  --shadow-panel: 0 24px 64px rgba(0, 0, 0, 0.45);
  --grid-line: rgba(0, 229, 255, 0.045);
  --header-bg: rgba(6, 11, 22, 0.78);
  --metric-glow: rgba(0, 229, 255, 0.08);
  --input-bg: rgba(0, 0, 0, 0.28);
  --theme-color: #060b16;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fa;
  --bg-2: #eef2f7;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-hover: #f3f6fb;
  --fg: #1a2332;
  --muted: #5c6b7e;
  --cyan: #0b7ea8;
  --cyan-dim: #096a8f;
  --cyan-glow: rgba(11, 126, 168, 0.16);
  --cyan-soft: rgba(11, 126, 168, 0.09);
  --ok: #0a8f64;
  --warn: #a87a00;
  --danger: #c6284a;
  --border: rgba(20, 40, 70, 0.09);
  --border-strong: rgba(11, 126, 168, 0.28);
  --launch-bg: #1a2332;
  --launch-fg: #ffffff;
  --shadow-panel: 0 1px 2px rgba(20, 40, 70, 0.04), 0 8px 24px rgba(20, 40, 70, 0.06);
  --grid-line: rgba(20, 80, 120, 0.05);
  --header-bg: rgba(245, 247, 250, 0.9);
  --metric-glow: rgba(11, 126, 168, 0.05);
  --input-bg: #f8fafc;
  --theme-color: #f5f7fa;
}

:root {
  --radius: 12px;
  --radius-sm: 10px;
  --radius-btn: 10px;
  /* Explorer-readable stack (XRPSCAN vibe) — avoid ultra-bold display faces */
  --font-display: "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1180px;
  --header-h: 64px;
  --ease: 200ms cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --text-balance: 65ch;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

@media (min-width: 768px) {
  body {
    font-size: 1.0625rem;
    line-height: 1.65;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 80% -10%, var(--metric-glow), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 40%, rgba(30, 90, 180, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 60% 40% at 70% 0%, rgba(0, 137, 163, 0.08), transparent 50%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 40%, var(--bg-2) 100%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--cyan-dim);
}

[data-theme="dark"] a:hover {
  color: #7af0ff;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #041018;
  padding: 0.75rem 1rem;
  z-index: 1000;
}

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

.wrap {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 640px) {
  .wrap {
    width: min(100% - 2.5rem, var(--max));
  }
}

/* Ambient */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.4;
  will-change: transform;
}

.ambient-orb--a {
  width: min(48vw, 480px);
  height: min(48vw, 480px);
  top: -10%;
  right: -6%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.35), transparent 70%);
  animation: orb-a 24s var(--ease-out) infinite alternate;
}

.ambient-orb--b {
  width: min(40vw, 400px);
  height: min(40vw, 400px);
  bottom: 8%;
  left: -10%;
  background: radial-gradient(circle, rgba(40, 100, 200, 0.28), transparent 70%);
  animation: orb-b 30s var(--ease-out) infinite alternate;
}

[data-theme="light"] .ambient-orb {
  opacity: 0.22;
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
}

@keyframes orb-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-5%, 7%, 0) scale(1.1); }
}

@keyframes orb-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(7%, -4%, 0) scale(1.12); }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 120;
  background: linear-gradient(90deg, transparent, var(--cyan), #7af0ff);
  pointer-events: none;
  will-change: width;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.site-header .header-inner {
  position: relative;
}

/* Mobile: [Brand] …… [EN][theme][Menu]
   Desktop: [Brand] [nav…] [EN][theme][Open app]
   Roadmap: hide nav CTA below 960px */
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
  min-width: 0;
  padding-top: env(safe-area-inset-top, 0);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.015em;
  flex-shrink: 0;
  order: 1;
  max-width: none;
}

.brand span {
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav {
  display: none;
  gap: 0.15rem 1rem;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
  order: 2;
}

.nav > a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.2rem;
  transition: color var(--ease);
  white-space: nowrap;
}

.nav > a:hover {
  color: var(--fg);
}

/* Push controls to the right edge on mobile */
.header-utils {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  order: 3;
  margin-left: auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  order: 4;
  flex-shrink: 0;
}

/* Anti-грабль: CTA in header only from tablet/desktop */
@media (max-width: 959px) {
  .header-utils .btn-launch,
  .header-utils [data-open-app] {
    display: none !important;
  }

  .lang-menu summary {
    min-width: 40px;
    padding: 0 0.55rem;
  }
}

@media (min-width: 980px) {
  .brand {
    font-size: 1.05rem;
    gap: 0.65rem;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .header-utils {
    margin-left: 0.5rem;
    gap: 0.45rem;
  }
}

.nav.is-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  padding: 1rem 1.25rem 1.35rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  gap: 0.65rem;
  box-shadow: var(--shadow-panel);
  z-index: 60;
  flex: none;
  justify-content: flex-start;
}

/* Lang */
.lang-menu {
  position: relative;
}

.lang-menu summary {
  list-style: none;
  cursor: pointer;
  min-height: 40px;
  min-width: 44px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  user-select: none;
}

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

.lang-menu summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}

.lang-menu[open] summary {
  color: var(--fg);
  border-color: var(--border-strong);
}

.lang-menu__list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-panel);
  display: grid;
  gap: 0.15rem;
  z-index: 60;
}

.lang-menu__list a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.lang-menu__list a:hover {
  background: var(--cyan-soft);
  color: var(--cyan);
}

/* Theme toggle */
.theme-toggle {
  width: 44px;
  height: 40px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--ease), background var(--ease);
}

.theme-toggle:hover {
  border-color: var(--border-strong);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.theme-toggle__icon--sun {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
}

.theme-toggle__icon--moon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 14.5A8.5 8.5 0 1 1 9.5 3 7 7 0 0 0 21 14.5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 14.5A8.5 8.5 0 1 1 9.5 3 7 7 0 0 0 21 14.5z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-launch {
  min-height: 40px;
  padding: 0.5rem 1.1rem;
  background: var(--launch-bg);
  color: var(--launch-fg) !important;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.btn-launch:hover {
  filter: brightness(1.05);
  color: var(--launch-fg) !important;
}

.btn-primary {
  background: var(--cyan);
  color: #041018 !important;
  border: none;
  text-decoration: none;
  box-shadow: 0 0 28px var(--cyan-glow);
}

.btn-primary:hover {
  filter: brightness(1.08);
  color: #041018 !important;
}

/* Wallet / Sign — always cyan primary (wins over .btn-ghost) */
.btn.xrpl-wallet-connect,
button.xrpl-wallet-connect,
.btn-ghost.xrpl-wallet-connect,
.btn-primary.xrpl-wallet-connect {
  background: var(--cyan) !important;
  color: #041018 !important;
  border: 1px solid transparent !important;
  text-decoration: none;
  box-shadow: 0 0 28px var(--cyan-glow);
  font-weight: 600;
}

.btn.xrpl-wallet-connect:hover,
button.xrpl-wallet-connect:hover,
.btn-ghost.xrpl-wallet-connect:hover {
  filter: brightness(1.1);
  background: #7af0ff !important;
  color: #041018 !important;
}

.btn-sign,
button.btn-sign.xrpl-wallet-connect {
  min-height: 36px !important;
  padding: 0.4rem 0.9rem !important;
  font-size: 0.8125rem !important;
  white-space: nowrap;
  background: var(--cyan) !important;
  color: #041018 !important;
  border: 1px solid transparent !important;
  box-shadow: 0 0 18px var(--cyan-glow);
  font-weight: 600;
}

.btn-sign:hover,
button.btn-sign.xrpl-wallet-connect:hover {
  filter: brightness(1.1);
  background: #7af0ff !important;
  color: #041018 !important;
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn.xrpl-wallet-connect,
[data-theme="light"] button.xrpl-wallet-connect {
  box-shadow: 0 4px 14px rgba(11, 126, 168, 0.28);
}

.btn-ghost {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border);
}

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
  justify-content: center;
  align-items: center;
}

.cta-row .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.prose .cta-row,
.cta-band .cta-row {
  justify-content: flex-start;
}

@media (max-width: 559px) {
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-row .btn {
    width: 100%;
  }
}

.hero-split .cta-row {
  justify-content: flex-start;
}

/* ——— Hero center (TRONSEC-like) ——— */
.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
  isolation: isolate;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 10%, transparent 72%);
  z-index: -1;
  pointer-events: none;
}

.hero-floor {
  position: absolute;
  left: 50%;
  bottom: -5%;
  width: 140%;
  height: 45%;
  transform: translateX(-50%) perspective(600px) rotateX(58deg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to top, transparent, #000 30%, transparent 90%);
  opacity: 0.7;
  z-index: -1;
  pointer-events: none;
}

.hero-center {
  text-align: center;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.hero-center .brand-mark {
  width: min(72px, 18vw);
  height: auto;
  margin: 0 auto 1.35rem;
  filter: drop-shadow(0 0 28px var(--cyan-glow));
}

.hero-center h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.8vw, 2.75rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 auto 0.9rem;
  text-wrap: balance;
  max-width: 22ch;
  color: var(--fg);
}

.hero-center .lede {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0 auto;
  max-width: min(38rem, var(--text-balance));
  line-height: 1.65;
}

@media (min-width: 768px) {
  .hero-center .lede {
    font-size: 1.0625rem;
    line-height: 1.7;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(47, 230, 166, 0.55);
  animation: live-pulse 1.8s ease-in-out infinite;
}

/* Lookup bar — XRPSCAN-style search card */
.lookup-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 1.75rem auto 0;
  max-width: 560px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

@media (min-width: 560px) {
  .lookup-bar {
    flex-direction: row;
    align-items: stretch;
  }
}

.lookup-bar input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  border: none;
  background: transparent;
  color: var(--fg);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

.lookup-bar input::placeholder {
  color: var(--muted);
  font-family: var(--font-body);
  opacity: 1;
}

.lookup-bar input:focus {
  outline: none;
}

.lookup-bar .btn {
  border-radius: 0;
  min-height: 48px;
  padding-inline: 1.25rem;
  box-shadow: none;
  font-weight: 600;
}

@media (min-width: 560px) {
  .lookup-bar .btn {
    min-height: 52px;
  }
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.35rem;
}

.hero-tag {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Split hero (legacy) */
.hero-split {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-split {
    grid-template-columns: 1.05fr 0.95fr;
    min-height: calc(78vh - var(--header-h));
  }
}

.hero-copy .brand-mark {
  width: min(88px, 22vw);
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 32px var(--cyan-glow));
}

.hero-split h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 2.65rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 16ch;
}

.hero-split .lede {
  color: var(--muted);
  max-width: 36rem;
  margin: 0;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
}

.stat-pill strong {
  color: var(--cyan);
}

/* Phone mock */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: min(100%, 340px);
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, var(--bg-elevated), var(--bg));
  box-shadow: var(--shadow-panel), 0 0 60px var(--metric-glow);
  padding: 0.65rem;
  position: relative;
  animation: phone-float 7s var(--ease-out) infinite alternate;
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.2);
}

.phone-screen {
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 1.35rem 1rem 1.1rem;
}

[data-theme="light"] .phone-screen {
  background: #f7fafc;
}

.phone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.phone-bar .title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 650;
}

.phone-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(47, 230, 166, 0.5);
  animation: live-pulse 1.8s ease-in-out infinite;
}

.phone-bar .live-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes phone-float {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -10px, 0); }
}

.phone-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.phone-stat {
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.phone-stat span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.phone-stat strong {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.phone-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.phone-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.phone-table td {
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.phone-table tr:last-child td {
  border-bottom: none;
}

.phone-table .issuer {
  color: var(--muted);
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-table tbody tr.is-active td {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.phone-stat strong.is-flash,
.live-metric__value.is-flash,
.metric-card__value.is-flash {
  animation: value-flash 0.55s var(--ease-out);
}

@keyframes value-flash {
  0% { color: var(--cyan); text-shadow: 0 0 14px var(--cyan-glow); }
  100% { color: var(--fg); text-shadow: none; }
}

/* Metric cards — XRPSCAN vibe */
.metric-section {
  padding: 0.5rem 0 2.5rem;
}

.metric-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .metric-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  position: relative;
  padding: 1.15rem 1.1rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  min-height: 7.5rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.metric-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 20px rgba(20, 40, 70, 0.08);
}

[data-theme="dark"] .metric-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.metric-card__label {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.metric-card__value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  margin: 0;
  line-height: 1.2;
  padding-right: 4.5rem;
}

.metric-card__sub {
  margin: 0.4rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: 16rem;
}

.metric-card__spark {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  width: 76px;
  height: 30px;
  opacity: 0.9;
  color: var(--cyan);
}

/* Live strip */
.live-strip {
  border-block: 1px solid var(--border);
  background: linear-gradient(90deg, var(--metric-glow), transparent 40%, var(--metric-glow));
  padding: 0.85rem 0;
}

.live-strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.live-strip__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ok);
}

.live-strip__badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(47, 230, 166, 0.55);
  animation: live-pulse 1.8s ease-in-out infinite;
}

.live-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  flex: 1;
}

.live-metric {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.live-metric__label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-metric__value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

[data-theme="light"] .live-metric__value.is-flash,
[data-theme="light"] .metric-card__value.is-flash,
[data-theme="light"] .phone-stat strong.is-flash {
  animation: value-flash-light 0.55s var(--ease-out);
}

@keyframes value-flash-light {
  0% { color: var(--cyan-dim); text-shadow: none; }
  100% { color: var(--fg); text-shadow: none; }
}

.live-strip__meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
}

/* Rail */
.rail-section {
  padding: 1.5rem 0 2.25rem;
  border-block: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .rail-section {
  background: rgba(255, 255, 255, 0.5);
}

.rail-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
  font-weight: 600;
}

.rail {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.rail-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  animation: marquee 42s linear infinite;
}

.rail:hover .rail-track,
.rail:focus-within .rail-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.rail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color var(--ease), color var(--ease);
}

.rail-badge:hover {
  border-color: var(--border-strong);
  color: var(--cyan);
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }
}

.section-alt {
  background: rgba(0, 0, 0, 0.14);
  border-block: 1px solid var(--border);
}

[data-theme="light"] .section-alt {
  background: rgba(255, 255, 255, 0.55);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.section .bluf,
.section-head .bluf {
  color: var(--muted);
  max-width: min(40rem, var(--text-balance));
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
}

.section-head.center .bluf {
  margin-inline: auto;
}

.panel,
.panel-soft {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow-panel);
}

.panel-soft {
  padding: 1.5rem 1.4rem;
}

/* Bento / features */
.bento,
.feature-list,
.benefit-list {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 800px) {
  .bento {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: auto auto;
  }
  .bento > :first-child {
    grid-row: span 2;
  }
  .feature-list,
  .benefit-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Equal feature cards — no tall empty lead column */
.feature-grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 800px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch;
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow-panel);
  transition: border-color var(--ease), transform var(--ease);
  min-height: 0;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
}

.feature-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  flex: 1;
}

.feature-bullets {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
}

.feature-bullets li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.feature-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}

.cta-hook {
  margin: 0.85rem auto 0;
  max-width: 36rem;
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.5;
}

.hero-center .lede strong {
  color: var(--fg);
  font-weight: 600;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.75rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, var(--cyan-soft), transparent 55%),
    var(--surface-solid);
}

.cta-band strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.bento-card,
.feature-list li,
.benefit-list li {
  position: relative;
  padding: 1.6rem 1.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease), background var(--ease);
}

.bento-card:hover,
.feature-list li:hover,
.benefit-list li:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.bento-card--lead {
  background:
    linear-gradient(160deg, var(--cyan-soft), transparent 48%),
    var(--surface-solid);
  min-height: 100%;
}

.bento-card__icon,
.benefit-list .check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: var(--cyan-soft);
  color: var(--cyan);
}

.bento-card__icon svg,
.benefit-list .check svg {
  width: 18px;
  height: 18px;
}

.bento-card h3,
.feature-list h3,
.benefit-list h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.bento-card p,
.feature-list p,
.benefit-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.bento-card .mono {
  color: var(--cyan);
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  padding: 1.7rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.steps li strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--fg);
}

.steps li p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Story scrolly */
.story {
  padding: 4.5rem 0 5rem;
}

.story-grid {
  display: grid;
  gap: 2.5rem;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 960px) {
  .story-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
  }
  .story-sticky {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.story-figure {
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--cyan-soft), transparent 55%),
    var(--surface-solid);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-panel);
  min-height: 280px;
  display: grid;
  gap: 1rem;
}

.story-figure__kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
  margin: 0;
}

.story-figure__value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.story-figure__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.story-bars {
  display: grid;
  gap: 0.55rem;
}

.story-bar {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.story-bar__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.15);
  overflow: hidden;
}

.story-bar__fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  transition: width 0.7s var(--ease-out);
}

.story-figure[data-stage="0"] .story-bar:nth-child(1) .story-bar__fill { width: 28%; }
.story-figure[data-stage="0"] .story-bar:nth-child(2) .story-bar__fill { width: 12%; }
.story-figure[data-stage="0"] .story-bar:nth-child(3) .story-bar__fill { width: 8%; }
.story-figure[data-stage="1"] .story-bar:nth-child(1) .story-bar__fill { width: 62%; }
.story-figure[data-stage="1"] .story-bar:nth-child(2) .story-bar__fill { width: 48%; }
.story-figure[data-stage="1"] .story-bar:nth-child(3) .story-bar__fill { width: 34%; }
.story-figure[data-stage="2"] .story-bar:nth-child(1) .story-bar__fill { width: 18%; }
.story-figure[data-stage="2"] .story-bar:nth-child(2) .story-bar__fill { width: 10%; }
.story-figure[data-stage="2"] .story-bar:nth-child(3) .story-bar__fill { width: 6%; background: linear-gradient(90deg, var(--ok), #7affc8); }

.story-steps {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .story-step {
    min-height: 42vh;
    padding: 2.5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid var(--border);
  }
}

.story-step {
  padding: 1.5rem 0;
  opacity: 0.42;
  transition: opacity 0.35s var(--ease);
}

.story-step.is-active {
  opacity: 1;
}

.story-step__num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.story-step h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
}

.story-step p {
  margin: 0;
  color: var(--muted);
  max-width: 34rem;
}

/* Safety */
.safety-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .safety-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.safety-item {
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-solid);
}

.safety-item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.safety-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Tables / app */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data th,
table.data td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data th {
  background: var(--surface-hover);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table.data tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-ok { background: rgba(47, 230, 166, 0.15); color: var(--ok); }
.badge-warn { background: rgba(245, 193, 90, 0.15); color: var(--warn); }
.badge-danger { background: rgba(255, 90, 120, 0.15); color: var(--danger); }

.app-shell {
  padding: 2.25rem 0 4.5rem;
}

.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab {
  min-height: 42px;
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
}

.tab[aria-selected="true"] {
  background: var(--cyan-soft);
  border-color: var(--border-strong);
  color: var(--cyan);
}

.app-shell .panel {
  display: none;
  padding: 1.35rem;
}

.app-shell .panel.is-active {
  display: block;
}

.stats {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

.stat .label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat .value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.field input {
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  word-break: break-all;
}

/* FAQ */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.7rem;
  background: var(--surface-solid);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

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

.faq details[open] summary {
  color: var(--cyan);
  margin-bottom: 0.55rem;
}

.faq details p {
  margin: 0;
  color: var(--muted);
}

/* Prose */
.prose {
  max-width: min(44rem, 100%);
}

@media (min-width: 960px) {
  .prose {
    max-width: 48rem;
  }
}

.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 1rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose p.bluf-lead,
.prose > p:first-of-type {
  color: var(--fg);
  font-size: 1.1rem;
}

.meta-line {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

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

.card-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-link {
  display: block;
  padding: 1.4rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--ease), transform var(--ease);
}

.card-link:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-link h2,
.card-link h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0 0 0.45rem;
  color: var(--fg);
}

.card-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
  background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .site-footer {
  background: #e8eef6;
}

.footer-grid {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
  }
}

.site-footer h2 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

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

.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.locale-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.15rem;
}

.locale-links a:hover {
  color: var(--cyan);
}

/* Cookie */
.cookie-notice {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 80;
  max-width: 420px;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-panel);
}

.cookie-notice[hidden] {
  display: none !important;
}

.cookie-notice p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Reveal / motion */
.motion-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.motion-ready .reveal.is-visible .reveal-child {
  animation: rise-in 0.55s var(--ease-out) both;
}

.motion-ready .reveal.is-visible .reveal-child:nth-child(2) { animation-delay: 0.07s; }
.motion-ready .reveal.is-visible .reveal-child:nth-child(3) { animation-delay: 0.14s; }
.motion-ready .reveal.is-visible .reveal-child:nth-child(4) { animation-delay: 0.21s; }

@keyframes rise-in {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: none; }
}

.motion-ready .hero-center > * {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  animation: hero-in 0.7s var(--ease-out) forwards;
}

.motion-ready .hero-center > *:nth-child(1) { animation-delay: 0.04s; }
.motion-ready .hero-center > *:nth-child(2) { animation-delay: 0.1s; }
.motion-ready .hero-center > *:nth-child(3) { animation-delay: 0.16s; }
.motion-ready .hero-center > *:nth-child(4) { animation-delay: 0.22s; }
.motion-ready .hero-center > *:nth-child(5) { animation-delay: 0.28s; }
.motion-ready .hero-center > *:nth-child(6) { animation-delay: 0.34s; }
.motion-ready .hero-center > *:nth-child(7) { animation-delay: 0.4s; }

@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

.status-line {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4em;
}

.status-line.error { color: var(--danger); }
.status-line.ok { color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  .ambient-orb,
  .phone-frame,
  .phone-bar .dot,
  .hero-eyebrow .dot,
  .live-strip__badge::before,
  .rail-track {
    animation: none !important;
  }
  .rail-track {
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }
  .motion-ready .reveal,
  .motion-ready .reveal .reveal-child,
  .motion-ready .hero-center > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ——— Mobile layout pass (360px Samsung baseline) ——— */
@media (max-width: 767px) {
  :root {
    --header-h: 56px;
  }

  .wrap {
    width: min(100% - 1.5rem, var(--max));
  }

  .hero {
    padding: 1.75rem 0 1.35rem;
  }

  .hero-center {
    padding-inline: 0;
  }

  .hero-center h1 {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
    line-height: 1.2;
  }

  .hero-center .lede {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .hero-center .brand-mark {
    width: 52px;
    height: auto;
    margin-bottom: 0.85rem;
  }

  .hero-floor {
    display: none;
  }

  .cta-hook {
    font-size: 0.8125rem;
    padding-inline: 0.25rem;
  }

  .hero-tags {
    gap: 0.4rem;
    margin-top: 1.1rem;
  }

  .hero-tag {
    font-size: 0.72rem;
  }

  .live-strip__inner {
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    width: min(100% - 1.5rem, var(--max));
    padding: 0.65rem 0;
  }

  .live-strip__meta {
    margin-left: 0;
    width: 100%;
  }

  .live-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.75rem;
    width: 100%;
  }

  .metric-section {
    padding: 0.25rem 0 1.75rem;
  }

  .metric-card__value {
    padding-right: 0;
  }

  .metric-card__spark {
    position: static;
    margin-top: 0.65rem;
    display: block;
  }

  .section {
    padding: 2.25rem 0;
  }

  .section-head {
    margin-bottom: 1.15rem;
  }

  .bento-card,
  .feature-list li,
  .benefit-list li,
  .steps li,
  .card-link,
  .safety-item,
  .feature-card {
    padding: 1.15rem 1rem;
  }

  .cta-band {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.1rem 1rem;
  }

  .cta-band .cta-row {
    width: 100%;
  }

  .app-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .app-toolbar .btn {
    width: 100%;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    margin-inline: -0.25rem;
    border-radius: var(--radius-sm);
  }

  table.data {
    font-size: 0.8125rem;
  }

  table.data th,
  table.data td {
    padding: 0.55rem 0.45rem;
  }

  .story {
    padding: 2.25rem 0 2.5rem;
  }

  .story-step {
    opacity: 1;
  }

  .faq summary {
    font-size: 1rem;
    line-height: 1.4;
    min-height: 44px;
  }

  .site-footer {
    padding: 2.25rem 0 1.35rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1rem;
  }

  .prose {
    max-width: 100%;
  }

  .prose h1 {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  .prose p,
  .prose li {
    font-size: 1rem;
    line-height: 1.65;
  }

  .breadcrumbs {
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
  }

  .app-modal {
    padding: 0;
  }

  .app-modal__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: 0;
  }
}

/* Light theme: quieter cyan glow (XRPSCAN clarity) */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn.xrpl-wallet-connect,
[data-theme="light"] button.xrpl-wallet-connect {
  box-shadow: 0 2px 8px rgba(11, 126, 168, 0.22);
}

[data-theme="light"] .hero-grid {
  opacity: 0.55;
}

/* ——— App modal ——— */
body.app-modal-open {
  overflow: hidden;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0.75rem;
}

.app-modal[hidden] {
  display: none !important;
}

.app-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(6px);
}

.app-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  height: min(92vh, 920px);
  margin: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.app-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-solid);
  flex-shrink: 0;
}

.app-modal__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}

.app-modal__close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.app-modal__close:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.app-modal__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--bg);
}

/* Embed mode: strip chrome when loaded in modal iframe */
body.is-embed .site-header,
body.is-embed .site-footer,
body.is-embed .skip-link,
body.is-embed .ambient,
body.is-embed .ambient-canvas,
body.is-embed .scroll-progress {
  display: none !important;
}

body.is-embed .app-shell {
  padding-top: 0.75rem;
}

body.is-embed .breadcrumbs {
  display: none;
}
