/* =========================================================
   ARBITRUM Stake — design system
   Dual theme: light (default) + dark via [data-theme]
   ========================================================= */

:root {
  /* ---- Brand accents (shared) — Arbitrum-style blues ---- */
  --accent: #2d9cf0;        /* sky blue */
  --accent-2: #1b6fe3;      /* deep blue */
  --on-accent: #ffffff;

  /* ---- Light theme ---- */
  --bg: #eef2f8;
  --bg-glow-1: rgba(45, 156, 240, 0.18);
  --bg-glow-2: rgba(27, 111, 227, 0.16);
  --bg-glow-3: rgba(45, 156, 240, 0.06);
  --grid: rgba(28, 40, 75, 0.045);

  --surface: #ffffff;
  --card-bg: linear-gradient(180deg, #ffffff, #fbfcff);
  --field-bg: #f3f6fb;
  --hover-bg: #eef2fa;
  --inset-hi: rgba(255, 255, 255, 0.9);

  --header-bg: rgba(255, 255, 255, 0.72);
  --footer-bg: rgba(20, 30, 60, 0.03);

  --text: #1a1f2e;
  --strong: #0c1019;
  --muted: #66708a;
  --line: rgba(22, 32, 64, 0.1);
  --line-strong: rgba(22, 32, 64, 0.16);

  --accent-soft: rgba(45, 156, 240, 0.12);
  --accent-soft-border: rgba(45, 156, 240, 0.28);

  --up: #16a85a;
  --up-soft: rgba(22, 168, 90, 0.12);
  --up-soft-border: rgba(22, 168, 90, 0.3);
  --down: #e5484d;

  --warning-bg: rgba(255, 176, 32, 0.12);
  --warning-border: rgba(255, 176, 32, 0.4);
  --warning-text: #8a5800;

  --shadow: 0 26px 64px rgba(28, 42, 80, 0.12);
  --soft-shadow: 0 16px 40px rgba(28, 42, 80, 0.08);
  --accent-shadow: 0 16px 34px rgba(27, 111, 227, 0.3);

  color-scheme: light;
  font-family:
    Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

[data-theme="dark"] {
  --accent: #3aa9f5;
  --accent-2: #4f86ff;
  --on-accent: #ffffff;

  --bg: #0a0f1c;
  --bg-glow-1: rgba(45, 156, 240, 0.24);
  --bg-glow-2: rgba(79, 134, 255, 0.22);
  --bg-glow-3: rgba(45, 156, 240, 0.1);
  --grid: rgba(255, 255, 255, 0.035);

  --surface: #141c2e;
  --card-bg: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    ),
    #141c2e;
  --field-bg: rgba(255, 255, 255, 0.06);
  --hover-bg: rgba(255, 255, 255, 0.05);
  --inset-hi: rgba(255, 255, 255, 0.08);

  --header-bg: rgba(10, 15, 28, 0.72);
  --footer-bg: rgba(0, 0, 0, 0.24);

  --text: #f3f6fc;
  --strong: #ffffff;
  --muted: #93a0ba;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);

  --accent-soft: rgba(58, 169, 245, 0.14);
  --accent-soft-border: rgba(58, 169, 245, 0.32);

  --up: #34d399;
  --up-soft: rgba(52, 211, 153, 0.14);
  --up-soft-border: rgba(52, 211, 153, 0.32);
  --down: #fb7185;

  --warning-bg: rgba(255, 209, 102, 0.08);
  --warning-border: rgba(255, 209, 102, 0.34);
  --warning-text: #ffe4a0;

  --shadow: 0 26px 90px rgba(0, 0, 0, 0.5);
  --soft-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  --accent-shadow: 0 18px 38px rgba(58, 169, 245, 0.3);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, var(--bg-glow-1), transparent 34rem),
    radial-gradient(circle at 88% 2%, var(--bg-glow-2), transparent 36rem),
    radial-gradient(circle at 50% 58%, var(--bg-glow-3), transparent 46rem),
    var(--bg);
  letter-spacing: -0.012em;
  transition:
    background 320ms ease,
    color 320ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

/* ---------------- Header / nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(22px) saturate(150%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 16px 0;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--strong);
}

.brand strong {
  display: block;
  font-family: "Space Grotesk", Manrope, sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  filter: drop-shadow(0 8px 18px rgba(27, 111, 227, 0.32));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--strong);
  background: var(--hover-bg);
}

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

.nav-cta {
  margin-left: 6px;
}

.nav-bar-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--field-bg);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--strong);
  transition:
    transform 220ms ease,
    opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* shared pill control look for toggles */
.language-toggle,
.theme-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-left: 2px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  background: var(--field-bg);
  box-shadow: inset 0 1px 0 var(--inset-hi);
  font-weight: 800;
  letter-spacing: -0.02em;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.language-toggle:hover,
.theme-toggle:hover {
  border-color: var(--accent-soft-border);
  color: var(--strong);
  transform: translateY(-2px);
}

.language-toggle .active {
  color: var(--strong);
}

.language-toggle .divider {
  color: var(--muted);
  opacity: 0.6;
}

.theme-toggle {
  min-width: 44px;
  font-size: 1rem;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 2px;
  padding: 9px 16px;
  border: 1px solid var(--accent-soft-border);
  border-radius: 999px;
  color: var(--strong);
  background: var(--accent-soft);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---------------- Layout ---------------- */
.page {
  width: min(1200px, calc(100% - 36px));
  margin: 0 auto;
  padding: 38px 0 78px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

/* ---- Ankr-style blue hero + logo marquee ---- */
.ankr-hero {
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  border-radius: 30px;
  padding: clamp(46px, 7vw, 88px) clamp(22px, 5vw, 64px) 26px;
  color: #ffffff;
  text-align: center;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.ankr-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.ankr-bg svg {
  width: 100%;
  height: 100%;
}

.ankr-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 70% at 50% 28%, rgba(10, 28, 70, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(8, 24, 64, 0.1), rgba(8, 20, 56, 0.45));
}

.ankr-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

.ankr-inner .eyebrow.light {
  margin: 0 auto 18px;
  color: #eaf2ff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.ankr-hero h1 {
  color: #ffffff;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}

.ankr-hero h1 span {
  display: inline;
  -webkit-text-fill-color: currentColor;
  color: #bcd6ff;
  background: none;
}

.ankr-sub {
  max-width: 620px;
  margin: 0 auto 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  line-height: 1.6;
}

.ankr-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.ghost-light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.8);
}

.ankr-trust {
  margin: clamp(28px, 5vw, 48px) 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.marquee {
  position: relative;
  margin-top: 16px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 44px;
  animation: marquee 26s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
}

.marquee-item .coin-icon {
  width: 34px;
  height: 34px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.marquee-item strong {
  letter-spacing: 0.02em;
}

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

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.band-start {
  min-height: 58px;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #102338;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.band-start:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.26);
}

.cta-arrow {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.band-start:hover .cta-arrow {
  transform: translateX(4px);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid var(--accent-soft-border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin: 18px 0 20px;
  color: var(--strong);
  font-size: clamp(2.9rem, 6.6vw, 6rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: 800;
}

h1 span {
  display: block;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  margin-bottom: 12px;
  color: var(--strong);
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
}

h3 {
  margin-bottom: 8px;
  color: var(--strong);
  font-size: 1.15rem;
  font-weight: 800;
}

.lead {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--strong);
  background: var(--surface);
  font-weight: 700;
  box-shadow: var(--soft-shadow);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.btn:hover {
  border-color: var(--accent-soft-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.primary {
  border-color: transparent;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--accent-shadow);
}

.btn.primary:hover {
  box-shadow: 0 22px 44px rgba(27, 111, 227, 0.36);
}

.btn.block {
  width: 100%;
}

/* ---------------- Stats ---------------- */
.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--field-bg);
  box-shadow: inset 0 1px 0 var(--inset-hi);
}

.stat strong {
  display: block;
  margin-bottom: 6px;
  color: var(--strong);
  font-size: 1.55rem;
  font-weight: 800;
}

.stat span,
.muted {
  color: var(--muted);
}

/* ---------------- Market dashboard ---------------- */
.yield-card {
  padding: 28px;
}

.market-dashboard {
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) minmax(0, 1.14fr);
  gap: 22px;
  margin-top: 22px;
  align-items: stretch;
}

.market-dashboard > .card {
  min-height: 520px;
}

.live-market-card {
  padding: 28px;
}

.market-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.market-card-heading h2,
.yield-card h2 {
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
}

.rank-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.rank-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--field-bg);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.rank-item:hover {
  border-color: var(--accent-soft-border);
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow);
}

.rank-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
  font-size: 0.88rem;
}

.asset-symbol {
  color: var(--strong);
  font-weight: 900;
  letter-spacing: 0.03em;
}

.positive {
  color: var(--up);
  font-weight: 800;
}

.negative {
  color: var(--down);
  font-weight: 800;
}

.market-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--accent-soft-border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--accent-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.market-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: var(--up);
  box-shadow: 0 0 14px var(--up);
}

/* ---------------- Sections / grids ---------------- */
.section {
  margin-top: 42px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

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

/* ---------------- Cards ---------------- */
.mini-card,
.step-card,
.policy-card,
.faq-item,
.table-wrap,
.form-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--soft-shadow);
}

.mini-card,
.step-card,
.policy-card,
.faq-item {
  padding: 24px;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.mini-card:hover,
.step-card:hover,
.policy-card:hover,
.faq-item:hover {
  border-color: var(--accent-soft-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.coin-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow:
    0 8px 20px rgba(27, 111, 227, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.coin-icon.has-image {
  overflow: hidden;
  background: #ffffff;
  padding: 6px;
}

.coin-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.asset-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asset-cell strong {
  color: var(--strong);
}

.asset-cell .coin-icon {
  width: 34px;
  height: 34px;
  padding: 5px;
}

/* ---------------- Tables ---------------- */
.table-wrap {
  overflow-x: auto;
  border-radius: 24px;
}

.embedded-table {
  margin-top: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
  border: 0;
}

.embedded-table table {
  min-width: 0;
  table-layout: fixed;
}

.embedded-table th,
.embedded-table td {
  padding: 15px 14px;
  font-size: 0.94rem;
}

.embedded-table th:nth-child(1),
.embedded-table td:nth-child(1) {
  width: 42%;
}

.embedded-table th:nth-child(2),
.embedded-table td:nth-child(2) {
  width: 24%;
}

.embedded-table th:nth-child(3),
.embedded-table td:nth-child(3) {
  width: 16%;
}

.embedded-table th:nth-child(4),
.embedded-table td:nth-child(4) {
  width: 18%;
}

.embedded-table .asset-cell {
  min-width: 0;
}

.embedded-table .asset-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.embedded-table .coin-icon {
  width: 32px;
  height: 32px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--text);
}

th {
  color: var(--muted);
  background: var(--field-bg);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: var(--hover-bg);
}

tr:last-child td {
  border-bottom: 0;
}

.step-number {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

/* ---------------- Footer ---------------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}

.footer-inner {
  display: grid;
  width: min(1180px, calc(100% - 36px));
  grid-template-columns: 1fr auto;
  gap: 18px;
  margin: 0 auto;
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner strong {
  color: var(--strong);
}

/* ---------------- Page hero ---------------- */
.page-hero {
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(140deg, var(--accent-soft), transparent 38%),
    var(--card-bg);
  box-shadow: var(--shadow);
}

/* ---------------- Forms / calculator ---------------- */
.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.auth {
  display: grid;
  gap: 24px;
  max-width: 540px;
  margin: 12px auto 0;
}

.auth-head {
  text-align: center;
}

.auth-head .eyebrow {
  margin-inline: auto;
}

.auth-head h1 {
  margin: 16px 0 12px;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  line-height: 1.02;
}

.auth-head .lead {
  margin-inline: auto;
  font-size: 1.02rem;
}

.auth-actions {
  margin-top: 14px;
}

.auth-actions .btn {
  flex: 1;
}

.form-card {
  padding: 26px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--field-bg);
  padding: 12px 14px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: var(--field-bg);
  padding: 10px 15px;
  font-weight: 700;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.segment:hover {
  border-color: var(--accent-soft-border);
  color: var(--strong);
  transform: translateY(-1px);
}

.segment.active {
  border-color: transparent;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
}

.result-card {
  position: sticky;
  top: 92px;
  padding: 26px;
  border: 1px solid var(--accent-soft-border);
  border-radius: 26px;
  background:
    linear-gradient(160deg, var(--accent-soft), transparent 60%),
    var(--card-bg);
  box-shadow: var(--soft-shadow);
}

.result-card p {
  color: var(--muted);
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.result-row:last-child {
  border-bottom: 0;
}

.result-row span {
  color: var(--muted);
}

.result-row strong {
  color: var(--strong);
  text-align: right;
}

/* ---------------- Article ---------------- */
.article {
  max-width: 920px;
  margin: 20px auto 0;
}

.article h2 {
  margin-top: 30px;
  font-size: 1.55rem;
  letter-spacing: -0.025em;
}

.article p,
.article li {
  color: var(--muted);
  line-height: 1.75;
}

.article ul,
.article ol {
  padding-left: 22px;
}

.notice {
  padding: 18px;
  border: 1px solid var(--warning-border);
  border-radius: 18px;
  color: var(--warning-text);
  background: var(--warning-bg);
  font-weight: 600;
}

/* ---------------- FAQ ---------------- */
.faq-item button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: var(--strong);
  background: transparent;
  padding: 0;
  text-align: left;
  font-weight: 800;
}

.faq-item button span:last-child {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.faq-item.open button span:last-child {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ---------------- Floating chat + toast ---------------- */
.contact-bubble {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #ffffff;
  background: #15181f;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  font-weight: 800;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.contact-bubble:hover {
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.42);
  transform: translateY(-3px);
}

.contact-bubble-icon {
  width: 30px;
  height: 30px;
}

.contact-bubble-status {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #15181f;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: contactPulse 2.2s ease-out infinite;
}

@keyframes contactPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 40;
  width: min(440px, calc(100% - 36px));
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

/* ---------------- Scroll reveal ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

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

/* ---------------- Dashboard / positions ---------------- */
.dashboard-hero .actions {
  margin-top: 22px;
}

.dashboard-summary {
  margin-top: 4px;
}

.position-list {
  display: grid;
  gap: 16px;
}

.position-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--soft-shadow);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.position-card:hover {
  border-color: var(--accent-soft-border);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.position-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.position-asset {
  display: flex;
  align-items: center;
  gap: 12px;
}

.position-asset .asset-symbol {
  font-size: 1.1rem;
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
}

.position-metric span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.position-metric strong {
  color: var(--strong);
  font-size: 1.05rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: currentColor;
}

.badge.pending {
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}

.badge.active,
.badge.matured {
  color: var(--up);
  background: var(--up-soft);
  border: 1px solid var(--up-soft-border);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--field-bg);
  overflow: hidden;
}

.progress > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.position-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.position-actions .btn {
  min-height: 42px;
  padding: 10px 18px;
}

.empty-state {
  display: grid;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
}

.empty-state .actions {
  margin-top: 12px;
}

/* ---------------- Trust section ---------------- */
.trust-stats {
  padding: 6px 28px;
  margin-bottom: 18px;
}

.trust-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.trust-stat:last-child {
  border-bottom: 0;
}

.trust-stat span {
  color: var(--muted);
  font-weight: 700;
}

.trust-stat strong {
  color: var(--strong);
  font-size: 1.3rem;
  font-weight: 800;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.trust-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--soft-shadow);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.trust-card:hover {
  border-color: var(--accent-soft-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.trust-icon {
  display: flex;
  margin-bottom: 20px;
}

.trust-icon svg {
  width: 94px;
  height: 94px;
  filter: drop-shadow(0 14px 26px rgba(27, 111, 227, 0.3));
}

/* ---------------- Admin ---------------- */
.admin-head {
  margin-top: 6px;
}

.admin-head h2 {
  margin-bottom: 8px;
}

/* ---------------- Admin wallet manager ---------------- */
.wallet-manager {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.wallet-edit-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(0, 2fr) auto;
  gap: 12px;
  align-items: center;
}

.wallet-edit-asset {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-edit-asset strong {
  display: block;
  color: var(--strong);
}

.wallet-edit-asset span {
  font-size: 0.82rem;
}

.wallet-edit-input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9rem;
}

.wallet-edit-row .btn {
  min-height: 44px;
  padding: 10px 18px;
}

@media (max-width: 640px) {
  .wallet-edit-row {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Deposit page ---------------- */
.deposit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.deposit-card {
  display: grid;
  gap: 18px;
}

.deposit-asset {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deposit-asset .asset-symbol {
  font-size: 1.1rem;
}

.qr-box {
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.qr-box img {
  display: block;
  border-radius: 8px;
}

.deposit-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.address-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--field-bg);
}

.address-box code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9rem;
  color: var(--strong);
}

.address-box .btn {
  min-height: 40px;
  padding: 9px 16px;
  flex: 0 0 auto;
}

.pending-text {
  color: var(--warning-text);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .market-dashboard,
  .calculator-layout,
  .deposit-layout,
  .trust-grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .grid.five,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 0;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-bar-actions {
    display: inline-flex;
  }

  .nav-links .language-toggle {
    display: none;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding-top: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav-cta,
  .user-pill {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .market-dashboard > .card {
    min-height: auto;
  }

  h1 {
    letter-spacing: -0.04em;
  }

  .result-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .nav {
    width: min(100% - 24px, 1180px);
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 0.9rem;
  }

  .section-heading {
    display: block;
  }

  h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .section {
    margin-top: 24px;
  }

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

  .position-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .rank-item {
    grid-template-columns: auto auto 1fr;
  }

  .rank-item > div:last-child {
    grid-column: 2 / -1;
  }

  .contact-bubble {
    right: 14px;
    bottom: 14px;
  }

  .ankr-hero {
    padding: 40px 18px 22px;
    border-radius: 24px;
  }

  .ankr-hero h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
  }

  .ankr-sub {
    font-size: 1rem;
    margin-bottom: 22px;
  }

  .ankr-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ankr-actions .btn {
    width: 100%;
  }

  .marquee-track {
    gap: 28px;
  }

  .marquee-item {
    font-size: 0.92rem;
  }
}
