@import url('tokens.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg-canvas); color: var(--fg-primary); }

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* Fluid display type — applies globally to h1/h2/h3 so hero copy never
   busts narrow viewports. Per-page overrides still win when set inline. */
h1 { font-size: clamp(2rem, 4.4vw + 0.4rem, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.625rem, 2.6vw + 0.5rem, 2.5rem); line-height: 1.15; }
h3 { font-size: clamp(1.25rem, 1.4vw + 0.7rem, 1.75rem); line-height: 1.2; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container { max-width: var(--container-wide); margin: 0 auto; padding: 0 32px; }
.container.narrow { max-width: var(--container); }
.container.prose  { max-width: var(--container-narrow); }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-bleed { padding: 96px 32px; }
@media (max-width: 1024px) {
  .section { padding: 80px 0; }
  .section-bleed { padding: 80px 28px; }
  .container, .section-bleed { padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 720px) {
  .section, .section-bleed { padding: 56px 0; }
  .section-sm { padding: 48px 0; }
  .container, .section-bleed { padding-left: 20px; padding-right: 20px; }
}

/* Generic responsive grid helpers — used by inline 3- and 4-col grids on
   marketing pages so they actually collapse on tablet and mobile. */
.r-cols-2, .r-cols-3, .r-cols-4 { display: grid; gap: 32px; }
.r-cols-2 { grid-template-columns: repeat(2, 1fr); }
.r-cols-3 { grid-template-columns: repeat(3, 1fr); }
.r-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .r-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .r-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .r-cols-2, .r-cols-3, .r-cols-4 { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Type helpers ───────────────────────────────────────────────────────── */
em.accent, .accent { color: var(--fg-accent); font-style: italic; font-weight: inherit; }
.h-display { font-family: var(--font-display); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-accent);
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--eu-gold-600); }
.eyebrow.both::after { content: ''; width: 28px; height: 1px; background: var(--eu-gold-600); }
.eyebrow.dark { color: var(--eu-gold-500); }
.gold-rule { width: 32px; height: 1px; background: var(--eu-gold-600); display: block; }
.eu-mono { font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-muted); letter-spacing: 0.06em; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-nav.on-dark {
  background: rgba(11, 30, 63, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--fg-on-dark);
}
.nav-inner {
  max-width: var(--container-wide); margin: 0 auto; padding: 20px 32px;
  display: flex; align-items: center; gap: 40px;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem;
  letter-spacing: 0.18em; color: inherit; text-decoration: none;
}
.nav-logo .dot { color: var(--eu-gold-600); margin: 0 1px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--fg-secondary);
  padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.site-nav.on-dark .nav-links a { color: rgba(250, 248, 244, 0.78); }
.nav-links a:hover { color: var(--fg-primary); }
.site-nav.on-dark .nav-links a:hover { color: var(--fg-on-dark); }
.nav-links a.active {
  color: var(--fg-primary); border-bottom-color: var(--eu-gold-600);
}
.site-nav.on-dark .nav-links a.active { color: var(--fg-on-dark); }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-inner { padding: 16px 20px; gap: 16px; }
  .nav-logo { font-size: 1rem; }
  /* On mobile, hide the in-bar CTA — it lives inside the drawer instead. */
  .site-nav .nav-inner > .btn { display: none; }
  .nav-toggle { display: inline-flex !important; }
}

/* ── Mobile nav toggle + drawer ────────────────────────────────────────── */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: auto;
  background: transparent; border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); color: inherit; cursor: pointer;
  transition: border-color var(--duration-fast), color var(--duration-fast);
}
.nav-toggle:hover { border-color: var(--eu-navy-700); color: var(--eu-navy-700); }
.site-nav.on-dark .nav-toggle { border-color: rgba(250, 248, 244, 0.32); color: var(--fg-on-dark); }
.site-nav.on-dark .nav-toggle:hover { border-color: var(--eu-gold-600); color: var(--eu-gold-500); }

.nav-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(11, 30, 63, 0.45); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(360px, 86vw);
  background: var(--bg-canvas); color: var(--fg-primary);
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  display: flex; flex-direction: column; padding: 18px 24px 28px;
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 24px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.nav-drawer-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  letter-spacing: 0.18em; color: var(--fg-primary); text-decoration: none;
}
.nav-drawer-logo .dot { color: var(--eu-gold-600); margin: 0 1px; }
.nav-drawer-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent; border: 0; border-radius: var(--radius-sm);
  color: var(--fg-secondary); cursor: pointer;
}
.nav-drawer-close:hover { background: var(--bg-sunken); color: var(--fg-primary); }
.nav-drawer-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-drawer-links a {
  display: block; padding: 14px 4px; font-size: 1.0625rem; font-weight: 500;
  color: var(--fg-primary); border-bottom: 1px solid var(--border-subtle);
  letter-spacing: 0.01em;
}
.nav-drawer-links a:last-child { border-bottom: 0; }
.nav-drawer-links a.active { color: var(--eu-navy-700); }
.nav-drawer-links a.active::after {
  content: ''; display: inline-block; width: 18px; height: 1px;
  background: var(--eu-gold-600); margin-left: 12px; vertical-align: middle;
}
.nav-drawer-cta { margin-top: 24px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; font-size: 0.9375rem; font-weight: 500;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background var(--duration-fast), color var(--duration-fast),
              border-color var(--duration-fast), box-shadow var(--duration-fast);
  white-space: nowrap;
}
.btn-primary { background: var(--eu-navy-700); color: var(--fg-on-dark); }
.btn-primary:hover { background: var(--eu-navy-800); color: var(--fg-on-dark); }
.btn-gold { background: var(--eu-gold-600); color: var(--eu-navy-900); }
.btn-gold:hover { background: var(--eu-gold-700); color: var(--eu-ivory); }
.btn-ghost { background: transparent; color: var(--fg-primary); border-color: var(--border-default); }
.btn-ghost:hover { border-color: var(--eu-navy-700); color: var(--eu-navy-700); }
.btn-ghost.on-dark { color: var(--fg-on-dark); border-color: rgba(250, 248, 244, 0.4); }
.btn-ghost.on-dark:hover { border-color: var(--eu-gold-600); color: var(--eu-gold-500); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: 0.8125rem; }
.btn-block { width: 100%; }
.btn .arrow::after { content: '→'; display: inline-block; transition: transform var(--duration-fast); }
.btn:hover .arrow::after { transform: translateX(3px); }

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 18px; }
.field label {
  display: block; font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-secondary);
  margin-bottom: 8px;
}
.input {
  width: 100%; padding: 13px 14px; font-size: 0.9375rem; font-family: inherit;
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  background: var(--bg-surface); color: var(--fg-primary);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.input:focus {
  outline: none; border-color: var(--eu-navy-700);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.18);
}
.input::placeholder { color: var(--fg-muted); }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  padding: 28px;
  transition: box-shadow var(--duration-base), transform var(--duration-base);
}
.card.hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-dark {
  background: var(--eu-navy-900); color: var(--fg-on-dark);
  border: 1px solid var(--eu-navy-800); border-radius: var(--radius-lg); padding: 28px;
}
@media (max-width: 720px) {
  .card-dark { padding: 32px 24px; }
  .card-dark[style*="64px 56px"] { padding: 36px 24px !important; }
  .card-dark[style*="60px 56px"] { padding: 32px 24px !important; }
  /* Cards in service grid trim padding too */
  .card { padding: 22px; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--eu-navy-900); color: var(--fg-on-dark); padding: 80px 0 40px; margin-top: 0; }
.footer-inner { max-width: var(--container-wide); margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 48px; }
@media (max-width: 1024px) {
  .site-footer { padding: 64px 0 32px; }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 0 28px; }
  .footer-inner .footer-brand { grid-column: 1 / -1; }
}
.footer-brand .nav-logo { color: var(--fg-on-dark); font-size: 1.25rem; }
.footer-brand p { color: rgba(250, 248, 244, 0.6); font-size: 0.875rem; margin-top: 16px; max-width: 280px; }
.footer-col h6 {
  font-family: var(--font-body); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--eu-gold-500);
  margin: 0 0 18px;
}
.footer-col a { display: block; color: rgba(250, 248, 244, 0.7); font-size: 0.875rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--eu-gold-500); }
.footer-bottom {
  max-width: var(--container-wide); margin: 60px auto 0; padding: 24px 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  color: rgba(250, 248, 244, 0.5); font-size: 0.8125rem;
}
@media (max-width: 880px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; padding: 0 20px; }
  .footer-bottom { padding: 24px 20px 0; margin-top: 40px; flex-direction: column; gap: 8px; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Hero variants ──────────────────────────────────────────────────────── */
.hero-night {
  position: relative; overflow: hidden;
  background: var(--eu-gradient-night); color: var(--fg-on-dark);
}
.hero-night .ring {
  position: absolute; border: 1px solid rgba(201, 169, 110, 0.22);
  border-radius: 50%; pointer-events: none;
}
.hero-night .ring.r1 { width: 360px; height: 360px; }
.hero-night .ring.r2 { width: 560px; height: 560px; border-color: rgba(201, 169, 110, 0.18); }
.hero-night .ring.r3 { width: 820px; height: 820px; border-color: rgba(201, 169, 110, 0.14); }
.hero-night .ring.r4 { width: 1120px; height: 1120px; border-color: rgba(201, 169, 110, 0.10); }
.hero-night .ring.r5 { width: 1480px; height: 1480px; border-color: rgba(201, 169, 110, 0.06); }
.hero-night-inner {
  position: relative; z-index: 1;
  max-width: var(--container-wide); margin: 0 auto; padding: 140px 32px 160px;
}
.hero-night h1 { font-size: clamp(2.25rem, 5.5vw, 4.75rem); margin: 24px 0 0; max-width: 16ch; color: var(--fg-on-dark); line-height: 1.05; }
.hero-night .lede {
  font-size: clamp(1rem, 1vw + 0.55rem, 1.125rem); line-height: 1.65; color: rgba(250, 248, 244, 0.72);
  margin: 28px 0 36px; max-width: 36rem;
}
.hero-night .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-night .cta-row .btn { min-height: 44px; }
@media (max-width: 1024px) {
  .hero-night-inner { padding: 112px 28px 128px; }
}
@media (max-width: 720px) {
  .hero-night-inner { padding: 88px 20px 96px; }
  .hero-night .lede { margin: 22px 0 28px; }
  .hero-night .cta-row .btn { flex: 1 1 auto; }
  .hero-night .ring.r1 { width: 280px; height: 280px; }
  .hero-night .ring.r2 { width: 420px; height: 420px; }
  .hero-night .ring.r3 { width: 580px; height: 580px; }
}

/* ── Service grid ───────────────────────────────────────────────────────── */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1024px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .service-grid { grid-template-columns: 1fr; gap: 16px; } }
.service-card { display: block; text-decoration: none; color: inherit; }
.service-card .num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-muted); }
.service-card h3 { margin: 14px 0 12px; font-size: 1.5rem; }
.service-card .gold-rule { margin-bottom: 16px; }
.service-card p { color: var(--fg-secondary); font-size: 0.9375rem; line-height: 1.6; margin: 0 0 18px; }
.service-card .learn-more { font-size: 0.8125rem; font-weight: 600; color: var(--eu-navy-700);
  letter-spacing: 0.04em; }

/* ── Quote band ─────────────────────────────────────────────────────────── */
.quote-band { background: var(--eu-ink); color: var(--fg-on-dark); }
.quote-band blockquote {
  margin: 0; max-width: 760px; padding: 0 32px; text-align: center;
}
.quote-band q {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.25; quotes: '"' '"';
}
.quote-band cite { display: block; margin-top: 20px; font-style: normal;
  font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--eu-gold-500); }

/* ── Team tile ──────────────────────────────────────────────────────────── */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 1024px) { .team-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (max-width: 720px)  { .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 420px)  { .team-grid { grid-template-columns: 1fr; } }
.team-tile .photo {
  aspect-ratio: 4 / 5; background: var(--eu-pearl); border-radius: var(--radius-md);
  position: relative; overflow: hidden;
  background-size: cover; background-position: center top;
  background-image: linear-gradient(135deg, var(--eu-navy-100), var(--eu-pearl));
}
.team-tile .photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(11, 30, 63, 0.10));
  pointer-events: none;
}
.team-tile .place { font-family: var(--font-mono); font-size: 0.6875rem;
  color: var(--fg-muted); letter-spacing: 0.18em; margin-top: 16px; }
.team-tile h4 { margin: 4px 0 2px; font-size: 1.25rem; }
.team-tile .role { font-size: 0.875rem; color: var(--fg-secondary); margin: 0; }

/* ── CTA band ───────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--eu-navy-900); color: var(--fg-on-dark);
  padding: 60px 56px; border-radius: var(--radius-lg);
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0; color: var(--fg-on-dark); font-size: clamp(1.5rem, 3vw, 2.5rem); flex: 1 1 320px; }
@media (max-width: 720px) {
  .cta-band { padding: 40px 28px; gap: 20px; }
  .cta-band .btn { width: 100%; }
}

/* ── Stat strip ─────────────────────────────────────────────────────────── */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  padding: 40px 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.stat .num { font-family: var(--font-display); font-size: clamp(1.625rem, 2.4vw, 2.25rem); line-height: 1; margin-bottom: 8px; }
.stat .label { font-size: 0.8125rem; color: var(--fg-secondary); }
@media (max-width: 720px) { .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 24px; } }

/* ── Side-by-side splits ────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; min-height: 0; } }

/* ── Misc ───────────────────────────────────────────────────────────────── */
.dot-sep { color: var(--fg-muted); margin: 0 10px; }
.subtle-rule { height: 1px; background: var(--border-subtle); border: 0; margin: 32px 0; }

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp var(--duration-slow) var(--ease-out) both; }
.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }
.delay-4 { animation-delay: 320ms; }

/* ── Dashboard ──────────────────────────────────────────────────────────── */
.dash-shell { display: flex; min-height: 100vh; }
.dash-sidebar { width: 240px; flex-shrink: 0; border-right: 1px solid var(--border-subtle);
  background: var(--bg-canvas); display: flex; flex-direction: column; padding: 24px 0;
  position: relative; }
.dash-sidebar-close { display: none; }
.dash-nav-toggle { display: none; width: 40px; padding: 0; }
.dash-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(11, 30, 63, 0.45); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.dash-backdrop.open { opacity: 1; pointer-events: auto; }
.dash-sidebar .nav-logo { padding: 0 24px 28px; font-size: 1rem; }
.dash-sidebar nav { padding: 0 12px; flex: 1; }
.dash-sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; font-size: 0.875rem; color: var(--fg-secondary);
  border-radius: var(--radius-sm); margin-bottom: 2px; border-left: 2px solid transparent;
}
.dash-sidebar nav a.active {
  background: var(--bg-sunken); color: var(--fg-primary); font-weight: 600;
  border-left-color: var(--eu-gold-600);
}
.dash-sidebar nav a:hover:not(.active) { background: var(--bg-sunken); color: var(--fg-primary); }
.dash-sidebar .advisor-card {
  margin: 16px 24px 0; padding-top: 18px; border-top: 1px solid var(--border-subtle);
}
.dash-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dash-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 32px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-canvas);
}
.dash-topbar .spacer { flex: 1; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--eu-navy-700);
  color: var(--fg-on-dark); display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em;
}
.dash-content { display: grid; grid-template-columns: 1.35fr 1fr; flex: 1; }
@media (max-width: 1080px) { .dash-content { grid-template-columns: 1fr; } }
.dash-hero {
  background: var(--eu-gradient-night); color: var(--fg-on-dark);
  padding: 56px 56px 48px; position: relative; overflow: hidden;
}
.dash-rail { padding: 48px 40px; background: var(--bg-sunken); border-left: 1px solid var(--border-subtle); }
.balance-label { color: rgba(250, 248, 244, 0.6); font-size: 0.8125rem; letter-spacing: 0.04em; }
.balance-num { font-family: var(--font-display); font-size: 4.25rem; line-height: 1; margin: 12px 0 0; letter-spacing: -0.02em; }
.balance-num .cents { font-size: 1.75rem; color: rgba(250, 248, 244, 0.55); }
.balance-change { color: var(--eu-gold-500); font-size: 0.9375rem; margin-top: 14px; }
.balance-change .delta { color: var(--eu-success); }
.range-tabs { display: inline-flex; border: 1px solid rgba(250, 248, 244, 0.2); border-radius: var(--radius-md); overflow: hidden; }
.range-tabs button { background: transparent; border: 0; padding: 7px 14px; font-size: 0.8125rem;
  color: rgba(250, 248, 244, 0.6); cursor: pointer; border-right: 1px solid rgba(250, 248, 244, 0.12); }
.range-tabs button:last-child { border-right: 0; }
.range-tabs button.active { background: rgba(250, 248, 244, 0.12); color: var(--fg-on-dark); }
.range-tabs.light { border-color: var(--border-default); }
.range-tabs.light button { color: var(--fg-secondary); border-right-color: var(--border-subtle); }
.range-tabs.light button.active { background: var(--eu-navy-900); color: var(--fg-on-dark); }

/* allocation legend */
.alloc-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 0; font-size: 0.875rem; border-bottom: 1px dashed var(--border-subtle); }
.alloc-row:last-child { border-bottom: 0; }
.alloc-swatch { width: 12px; height: 12px; border-radius: 2px; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut {
  width: 130px; height: 130px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(
    var(--eu-navy-700) 0 42%,
    var(--eu-gold-600) 42% 68%,
    var(--eu-success) 68% 84%,
    var(--eu-slate-400) 84% 100%
  );
  position: relative;
}
.donut::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; background: var(--bg-sunken); }

/* activity table */
.activity { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.activity-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); font-size: 0.875rem; align-items: center; }
.activity-row:last-child { border-bottom: 0; }
.activity-row .date { font-family: var(--font-mono); color: var(--fg-muted); font-size: 0.75rem; }
.activity-row .sub { color: var(--fg-muted); font-size: 0.75rem; margin-top: 2px; }
.activity-row .amount { font-family: var(--font-mono); font-size: 0.875rem; }
.activity-row .amount.pos { color: var(--eu-success); }
.activity-row .amount.neg { color: var(--eu-error); }

/* ── Dashboard — responsive ───────────────────────────────────────────── */
@media (max-width: 1280px) {
  .dash-hero { padding: 48px 40px 40px; }
  .dash-rail { padding: 40px 32px; }
  .balance-eth { font-size: 3.5rem !important; }
  .balance-num { font-size: 3.5rem; }
}

/* Tablet — sidebar becomes a drawer (off-canvas) */
@media (max-width: 960px) {
  .dash-nav-toggle { display: inline-flex !important; align-items: center; justify-content: center; }
  .dash-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(280px, 84vw);
    z-index: 90;
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--ease-out);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
  }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-sidebar-close {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: 14px; right: 14px;
    width: 40px; height: 40px;
    background: transparent; border: 0; border-radius: var(--radius-sm);
    color: var(--fg-secondary); cursor: pointer; z-index: 2;
  }
  .dash-sidebar-close:hover { background: var(--bg-sunken); color: var(--fg-primary); }
  .dash-sidebar .nav-logo { padding-top: 6px; }
  .dash-main { width: 100%; min-width: 0; }
  .dash-topbar { padding: 14px 20px; gap: 10px; }
  .dash-topbar .eth-spot { font-size: .6875rem; }
  .dash-content { grid-template-columns: 1fr; }
  .dash-rail { border-left: 0; border-top: 1px solid var(--border-subtle); }
}

/* Tablet portrait + small — dashboard hero compaction */
@media (max-width: 720px) {
  .dash-hero { padding: 36px 24px 32px; }
  .dash-rail { padding: 32px 22px; }
  .balance-eth { font-size: 2.5rem !important; gap: 10px !important; }
  .balance-eth .ticker { font-size: 1rem !important; }
  .balance-num { font-size: 2.5rem; }
  .balance-usd { font-size: .8125rem; }
  .balance-usd .sep { margin: 0 6px !important; }
  .dash-hero h1.balance-eth { flex-wrap: wrap; }

  /* Status pill below balance row on small screens */
  .dash-hero > div:first-of-type { flex-direction: column !important; gap: 14px; align-items: flex-start !important; }

  .hero-actions .btn { flex: 1 1 calc(50% - 6px); min-height: 44px; }

  .chart-svg { height: 160px !important; }

  /* KPI strip → stack, then 2-col */
  .dash-kpi {
    grid-template-columns: 1fr 1fr !important;
    gap: 18px !important;
    margin-top: 32px !important;
    padding-top: 24px !important;
  }
  .dash-kpi > div:nth-child(3) { grid-column: 1 / -1; }

  /* Donut + legend stack */
  .donut-wrap { flex-direction: column; align-items: stretch; gap: 18px; }
  .donut { margin: 0 auto; }

  /* Activity rows compact */
  .activity-row { grid-template-columns: 64px 1fr auto; gap: 10px; padding: 12px 14px; }

  /* Topbar trimming */
  .dash-topbar .eth-spot { display: none; }
  .breadcrumb { font-size: .6875rem; }
}

@media (max-width: 420px) {
  .dash-kpi { grid-template-columns: 1fr !important; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ── Modal — responsive (deposit / withdraw) ───────────────────────── */
@media (max-width: 640px) {
  .modal-back { padding: 12px; align-items: flex-end !important; }
  .modal {
    max-width: 100% !important; max-height: calc(100vh - 24px) !important;
    border-radius: var(--radius-lg) !important;
  }
  .modal-head { padding: 22px 22px 16px !important; }
  .modal-head h3 { font-size: 1.375rem !important; }
  .modal-body { padding: 20px 22px !important; }
  .modal-foot { padding: 16px 22px 20px !important; flex-direction: column-reverse !important; gap: 10px !important; }
  .modal-foot .btn { width: 100%; min-height: 44px; }
  .address-block { grid-template-columns: 1fr !important; }
  .address-block > div:last-child { align-items: flex-start !important; }
  .qr-box { width: 132px !important; height: 132px !important; }
  .amount-input input { font-size: 1.5rem !important; padding: 14px 70px 14px 14px !important; }
  .quick-amounts button { min-height: 32px; }
}

/* ── Body lock when any drawer/modal is open ────────────────────────── */
body.no-scroll { overflow: hidden; }

/* Ensure all interactive controls meet the 44px tap target on mobile */
@media (max-width: 720px) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .input, .field-mono { min-height: 44px; }
}
