/* ==========================================================================
   Freedom Lend — design system
   Scuro, futuristico, ad alto contrasto. Testo sempre leggibile (WCAG AA).
   ========================================================================== */

:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --surface: rgba(16, 22, 40, 0.72);
  --surface-2: rgba(24, 32, 56, 0.8);
  --surface-solid: #0e1424;
  --border: rgba(150, 165, 255, 0.12);
  --border-strong: rgba(150, 165, 255, 0.26);

  --text: #eef2ff;
  --text-2: #b4bdd9;
  --text-3: #8791b0;

  --accent: #2ef2c8;
  --accent-2: #7c5cff;
  --accent-3: #36a9ff;
  --grad: linear-gradient(120deg, #2ef2c8 0%, #36a9ff 50%, #7c5cff 100%);
  --grad-soft: linear-gradient(120deg, rgba(46, 242, 200, 0.16), rgba(124, 92, 255, 0.16));

  --ok: #2ef2a0;
  --warn: #ffc857;
  --danger: #ff5c7a;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(46, 242, 200, 0.35), 0 10px 40px -10px rgba(46, 242, 200, 0.45);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font);
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--accent);
  color: #03110d;
  padding: 8px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  left: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.small {
  font-size: 0.875rem;
}

.mono,
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -------------------------------------------------------------------------- */
/* Sfondo animato                                                              */
/* -------------------------------------------------------------------------- */

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  opacity: 0.55;
}

.bg-glow {
  position: fixed;
  inset: -20vmax;
  z-index: -4;
  background:
    radial-gradient(40vmax 30vmax at 15% 10%, rgba(46, 242, 200, 0.12), transparent 60%),
    radial-gradient(45vmax 35vmax at 90% 20%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(40vmax 30vmax at 50% 100%, rgba(54, 169, 255, 0.1), transparent 60%);
  animation: glow-drift 28s ease-in-out infinite alternate;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(150, 165, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 165, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  pointer-events: none;
}

@keyframes glow-drift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(2vmax, -2vmax, 0) rotate(8deg);
  }
}

/* -------------------------------------------------------------------------- */
/* Topbar                                                                      */
/* -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(5, 7, 13, 0.72);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none !important;
}

.brand-mark {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 12px rgba(46, 242, 200, 0.35));
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-name span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 2px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.nav a {
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  background: rgba(150, 165, 255, 0.08);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 11px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.mode-pill:hover {
  border-color: var(--accent);
}

.mode-pill .dot,
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 rgba(255, 200, 87, 0.6);
  animation: pulse 2s infinite;
}

.mode-pill.is-chain .dot {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(46, 242, 160, 0.6);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.menu-btn {
  display: none;
}

/* Ticker prezzi */
.ticker {
  border-top: 1px solid var(--border);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  gap: 40px;
  width: max-content;
  padding: 6px 0;
  animation: ticker 40s linear infinite;
  font-size: 0.8rem;
}

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

.ticker-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--text-2);
  white-space: nowrap;
}

.ticker-item strong {
  color: var(--text);
  font-weight: 600;
}

.up {
  color: var(--ok);
}

.down {
  color: var(--danger);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* -------------------------------------------------------------------------- */
/* Layout                                                                      */
/* -------------------------------------------------------------------------- */

main {
  outline: none;
  min-height: 70vh;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page {
  padding: 48px 0 80px;
  animation: page-in 0.6s var(--ease) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.page-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 6px;
}

.page-head p {
  margin: 0;
  color: var(--text-2);
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

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

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

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

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wrap {
  flex-wrap: wrap;
}

/* -------------------------------------------------------------------------- */
/* Card                                                                        */
/* -------------------------------------------------------------------------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.card-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, #2ef2c8 80%, #7c5cff 90%, transparent 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin-border 6s linear infinite;
  pointer-events: none;
  opacity: 0.9;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes spin-border {
  to {
    --angle: 360deg;
  }
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.card-sub {
  color: var(--text-2);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.card-hover {
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.card-hover:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 60px -24px rgba(46, 242, 200, 0.25);
}

/* Statistiche */
.stat {
  padding: 20px 22px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-foot {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* -------------------------------------------------------------------------- */
/* Pulsanti                                                                    */
/* -------------------------------------------------------------------------- */

.btn {
  --h: 46px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  text-decoration: none !important;
  transition: transform 0.2s var(--ease), box-shadow 0.3s, background 0.2s, border-color 0.2s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  --h: 38px;
  padding: 0 16px;
  font-size: 0.875rem;
  border-radius: 10px;
}

.btn-lg {
  --h: 54px;
  padding: 0 28px;
  font-size: 1rem;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--grad);
  background-size: 200% 100%;
  color: #04110e;
  box-shadow: 0 8px 30px -10px rgba(46, 242, 200, 0.6);
}

.btn-primary:hover:not([disabled]) {
  background-position: 100% 0;
  box-shadow: 0 10px 40px -8px rgba(54, 169, 255, 0.6);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.btn-primary:hover:not([disabled])::after {
  transform: translateX(120%);
}

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

.btn-ghost:hover:not([disabled]) {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.btn-danger {
  background: rgba(255, 92, 122, 0.14);
  border-color: rgba(255, 92, 122, 0.5);
  color: #ffd6de;
}

.btn-danger:hover:not([disabled]) {
  background: rgba(255, 92, 122, 0.24);
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------------------------------------------------- */
/* Form                                                                        */
/* -------------------------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field + .field {
  margin-top: 18px;
}

.label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.label .hint {
  font-weight: 400;
  color: var(--text-3);
  font-size: 0.8rem;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(5, 8, 16, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(46, 242, 200, 0.12);
}

.input-wrap.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 92, 122, 0.12);
}

.input {
  flex: 1;
  min-width: 0;
  height: 54px;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.2rem;
}

.input::placeholder {
  color: var(--text-3);
}

.input-suffix {
  font-weight: 600;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.max-btn {
  background: rgba(46, 242, 200, 0.12);
  border: 1px solid rgba(46, 242, 200, 0.35);
  color: var(--accent);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.max-btn:hover {
  background: rgba(46, 242, 200, 0.2);
}

.field-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-3);
}

.field-error {
  color: var(--danger);
  font-size: 0.82rem;
  min-height: 1.1em;
}

select.select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 50px;
  padding: 0 40px 0 14px;
  border-radius: var(--radius-sm);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4bdd9' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px,
    rgba(5, 8, 16, 0.7);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

select.select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(46, 242, 200, 0.12);
}

/* Segmented control */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: rgba(5, 8, 16, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.segmented button {
  flex: 1;
  min-width: 56px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-pressed="true"] {
  background: var(--grad-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(46, 242, 200, 0.4);
}

/* Slider */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) var(--fill, 50%), rgba(150, 165, 255, 0.18) var(--fill, 50%));
  outline: none;
  cursor: pointer;
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(46, 242, 200, 0.15), 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s;
}

.range::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
}

.range:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

/* -------------------------------------------------------------------------- */
/* Riepiloghi, badge, token                                                    */
/* -------------------------------------------------------------------------- */

.summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(5, 8, 16, 0.45);
  padding: 6px 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.9rem;
}

.summary-row + .summary-row {
  border-top: 1px dashed var(--border);
}

.summary-row dt,
.summary-row .k {
  color: var(--text-2);
}

.summary-row dd,
.summary-row .v {
  margin: 0;
  font-family: var(--font-mono);
  text-align: right;
}

.summary-row.total .v,
.summary-row.total dd {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

.badge-ok {
  color: var(--ok);
  border-color: rgba(46, 242, 160, 0.4);
  background: rgba(46, 242, 160, 0.08);
}

.badge-warn {
  color: var(--warn);
  border-color: rgba(255, 200, 87, 0.4);
  background: rgba(255, 200, 87, 0.08);
}

.badge-danger {
  color: var(--danger);
  border-color: rgba(255, 92, 122, 0.45);
  background: rgba(255, 92, 122, 0.1);
}

.badge-muted {
  color: var(--text-2);
  border-color: var(--border-strong);
  background: rgba(150, 165, 255, 0.06);
}

.badge-info {
  color: var(--accent-3);
  border-color: rgba(54, 169, 255, 0.4);
  background: rgba(54, 169, 255, 0.08);
}

.token {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.token-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.token-pair {
  display: inline-flex;
}

.token-pair .token-icon + .token-icon {
  margin-left: -8px;
  box-shadow: 0 0 0 2px var(--surface-solid);
}

.addr {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-2);
}

.addr-you {
  color: var(--accent);
}

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

.hero {
  padding: clamp(48px, 9vw, 110px) 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}

.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-2);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  color: var(--text-2);
  font-size: 0.875rem;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-trust svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}

/* Visual: nucleo orbitale */
.orb {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 480px);
  margin: 0 auto;
}

.orb svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orb .ring {
  transform-origin: 50% 50%;
  transform-box: view-box;
}

.orb .r1 {
  animation: rotate 26s linear infinite;
}

.orb .r2 {
  animation: rotate 18s linear infinite reverse;
}

.orb .r3 {
  animation: rotate 38s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.orb-core {
  animation: breathe 5s ease-in-out infinite;
  transform-origin: 50% 50%;
  transform-box: view-box;
}

@keyframes breathe {
  50% {
    transform: scale(1.04);
    filter: brightness(1.2);
  }
}

.float-card {
  position: absolute;
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  color: var(--text-2);
  animation: float 7s ease-in-out infinite;
}

.float-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
}

.float-card.fc1 {
  top: 12%;
  left: -4%;
}

.float-card.fc2 {
  bottom: 14%;
  right: -2%;
  animation-delay: -3s;
}

.float-card.fc3 {
  bottom: 2%;
  left: 10%;
  animation-delay: -5s;
}

@keyframes float {
  50% {
    transform: translateY(-12px);
  }
}

/* Sezioni home */
.section {
  padding: 64px 0;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
}

.section-head p {
  color: var(--text-2);
}

.step {
  padding: 28px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
  margin-bottom: 18px;
}

.step-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step h3 {
  font-size: 1.2rem;
}

.step p {
  color: var(--text-2);
  font-size: 0.95rem;
  margin: 0;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-list li {
  display: flex;
  gap: 12px;
  color: var(--text-2);
}

.check-list li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304110e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 13px no-repeat,
    var(--grad);
}

.audience-card h3 {
  font-size: 1.5rem;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
}

.fee-table th,
.fee-table td {
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.fee-table th {
  color: var(--text-3);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fee-table td:last-child,
.fee-table th:last-child {
  text-align: right;
}

.fee-table td .muted {
  display: block;
  font-size: 0.82rem;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 4px;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .faq-body {
  padding: 0 4px 20px;
  color: var(--text-2);
  max-width: 760px;
}

.cta-band {
  text-align: center;
  padding: 56px 24px;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
}

/* -------------------------------------------------------------------------- */
/* Mercato                                                                     */
/* -------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

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

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.chip[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(46, 242, 200, 0.55);
  background: rgba(46, 242, 200, 0.1);
}

.toolbar .spacer {
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table th button {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.table th button:hover,
.table th button[data-active="true"] {
  color: var(--text);
}

.table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.92rem;
}

.table tbody tr {
  transition: background 0.2s;
  animation: row-in 0.5s var(--ease) both;
}

.table tbody tr:hover {
  background: rgba(150, 165, 255, 0.04);
}

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

.table .num-cell {
  font-family: var(--font-mono);
  white-space: nowrap;
}

.table .apr {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
}

.no-anim .table tbody tr,
.no-anim.table-wrap tbody tr {
  animation: none;
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-2);
}

.empty svg {
  width: 44px;
  height: 44px;
  stroke: var(--text-3);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 12px;
}

.empty h3 {
  color: var(--text);
  font-size: 1.1rem;
}

/* Barra disponibilità */
.bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(150, 165, 255, 0.14);
  overflow: hidden;
  margin-top: 6px;
  width: 120px;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--grad);
  border-radius: inherit;
  transition: width 0.8s var(--ease);
}

/* -------------------------------------------------------------------------- */
/* LTV / salute                                                                */
/* -------------------------------------------------------------------------- */

.health {
  position: relative;
  margin: 8px 0 4px;
}

.health-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2ef2a0 0%, #2ef2c8 45%, #ffc857 72%, #ff5c7a 100%);
  opacity: 0.9;
}

.health-marker {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 20px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(5, 7, 13, 0.9), 0 0 16px rgba(255, 255, 255, 0.6);
  transform: translateX(-50%);
  transition: left 0.6s var(--ease);
}

.health-liq {
  position: absolute;
  top: -8px;
  bottom: -8px;
  width: 0;
  border-left: 2px dashed var(--danger);
}

.health-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 10px;
}

.gauge {
  display: grid;
  place-items: center;
  position: relative;
}

.gauge svg {
  width: 100%;
  max-width: 220px;
}

.gauge-value {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-value strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.gauge-value span {
  font-size: 0.75rem;
  color: var(--text-2);
}

.gauge-arc {
  transition: stroke-dashoffset 0.7s var(--ease), stroke 0.4s;
}

/* -------------------------------------------------------------------------- */
/* Portafoglio                                                                 */
/* -------------------------------------------------------------------------- */

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.tabs button {
  background: transparent;
  border: 0;
  padding: 10px 18px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 500;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: var(--grad-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

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

.loan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.loan-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1rem;
}

.countdown {
  font-family: var(--font-mono);
}

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

.claim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.claim-row + .claim-row {
  border-top: 1px solid var(--border);
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(54, 169, 255, 0.35);
  background: rgba(54, 169, 255, 0.07);
  color: var(--text-2);
  font-size: 0.9rem;
}

.notice svg {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: var(--accent-3);
  fill: none;
  stroke-width: 2;
  margin-top: 1px;
}

.notice.warn {
  border-color: rgba(255, 200, 87, 0.4);
  background: rgba(255, 200, 87, 0.07);
}

.notice.warn svg {
  stroke: var(--warn);
}

.notice.danger {
  border-color: rgba(255, 92, 122, 0.45);
  background: rgba(255, 92, 122, 0.08);
}

.notice.danger svg {
  stroke: var(--danger);
}

.notice strong {
  color: var(--text);
}

/* -------------------------------------------------------------------------- */
/* Modale                                                                      */
/* -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 4, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.25s ease both;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(20, 28, 50, 0.97), rgba(10, 14, 26, 0.98));
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(46, 242, 200, 0.08);
  animation: modal-in 0.4s var(--ease) both;
}

.modal-wide {
  width: min(760px, 100%);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-head h2 {
  font-size: 1.4rem;
  margin: 0;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
}

/* -------------------------------------------------------------------------- */
/* Toast                                                                       */
/* -------------------------------------------------------------------------- */

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(14, 20, 36, 0.96);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: toast-in 0.4s var(--ease) both;
  font-size: 0.9rem;
}

.toast.out {
  animation: toast-out 0.3s ease both;
}

.toast-icon {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
}

.toast-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast.ok .toast-icon svg {
  stroke: var(--ok);
}

.toast.err .toast-icon svg {
  stroke: var(--danger);
}

.toast.info .toast-icon svg {
  stroke: var(--accent-3);
}

.toast strong {
  display: block;
  margin-bottom: 2px;
}

.toast .muted {
  font-size: 0.85rem;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

/* -------------------------------------------------------------------------- */
/* Simulatore demo                                                             */
/* -------------------------------------------------------------------------- */

.sim {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: rgba(10, 14, 26, 0.94);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.85rem;
  animation: modal-in 0.5s var(--ease) both;
}

.sim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
}

.sim-head strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
}

.sim-head svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-2);
  fill: none;
  stroke-width: 2;
  transition: transform 0.3s;
}

.sim.collapsed .sim-head svg {
  transform: rotate(180deg);
}

.sim-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
}

.sim.collapsed .sim-body {
  display: none;
}

.sim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.sim-row .btns {
  display: flex;
  gap: 6px;
}

.sim .btn {
  --h: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.sim-label {
  color: var(--text-2);
}

.sim-time {
  font-family: var(--font-mono);
  color: var(--text);
}

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

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

.footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 7, 13, 0.8);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px var(--gutter) 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-note {
  color: var(--text-2);
  border: 1px solid rgba(255, 200, 87, 0.3);
  background: rgba(255, 200, 87, 0.05);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

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


/* -------------------------------------------------------------------------- */
/* Tesoreria e grafici                                                         */
/* -------------------------------------------------------------------------- */

.nav a[hidden] {
  display: none;
}

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

.hero-figure {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-value {
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 4px 0 8px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex: none;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.82rem;
  color: var(--text-2);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend i,
.tip-row i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.chart {
  position: relative;
  width: 100%;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-svg .grid {
  stroke: rgba(150, 165, 255, 0.1);
  stroke-width: 1;
}

.chart-svg .axis {
  stroke: rgba(150, 165, 255, 0.28);
  stroke-width: 1;
}

.chart-svg .tick {
  fill: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
}

.chart-svg .hit {
  cursor: crosshair;
}

.chart-svg .hit.active {
  fill: rgba(150, 165, 255, 0.07);
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 210px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(10, 14, 26, 0.97);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  pointer-events: none;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 6px;
}

.tip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-2);
  padding: 2px 0;
}

.tip-row span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tip-row .mono {
  color: var(--text);
}

.tip-total {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 6px;
  color: var(--text);
  font-weight: 600;
}

.hbars {
  display: grid;
  gap: 12px;
}

.hbar-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
}

.hbar {
  height: 10px;
  border-radius: 999px;
  background: rgba(150, 165, 255, 0.1);
  overflow: hidden;
}

.hbar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #12a882;
  transition: width 0.8s var(--ease);
}

@media (max-width: 1020px) {
  .treasury-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .treasury-top .hero-figure {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .treasury-top {
    grid-template-columns: 1fr;
  }
}


/* -------------------------------------------------------------------------- */
/* Guida e pagine legali                                                       */
/* -------------------------------------------------------------------------- */

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 130px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border);
  padding-left: 4px;
}

.toc-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 12px 10px;
}

.toc button {
  background: none;
  border: 0;
  text-align: left;
  color: var(--text-2);
  font-size: 0.88rem;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.toc button:hover {
  color: var(--text);
  background: rgba(150, 165, 255, 0.07);
}

.prose {
  max-width: 760px;
}

.prose h1 {
  font-size: clamp(2rem, 4.4vw, 2.8rem);
}

.prose .lead {
  font-size: 1.1rem;
  color: var(--text-2);
  margin-bottom: 32px;
}

.prose section {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 120px;
}

.prose h2 {
  font-size: 1.45rem;
  margin-bottom: 14px;
}

.prose h2:focus {
  outline: none;
}

.prose h3 {
  font-size: 1.1rem;
  margin: 22px 0 10px;
}

.prose p,
.prose li,
.prose dd {
  color: var(--text-2);
}

.prose strong {
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 0 0 1em;
  display: grid;
  gap: 8px;
}

.prose ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  gap: 14px;
}

.prose ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  min-height: 32px;
}

.prose ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: #04110e;
  background: var(--grad);
}

.callout {
  border: 1px solid rgba(46, 242, 200, 0.3);
  background: rgba(46, 242, 200, 0.06);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  color: var(--text-2);
  margin: 16px 0;
}

.glossary {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px 20px;
  margin: 0;
}

.glossary dt {
  font-weight: 600;
  color: var(--text);
}

.glossary dd {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--text-2);
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }

  .glossary {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .glossary dd {
    margin-bottom: 10px;
  }
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                  */
/* -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .orb {
    width: min(100%, 380px);
  }

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

@media (max-width: 860px) {
  .menu-btn {
    display: inline-grid;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 12px var(--gutter) 18px;
    background: rgba(5, 7, 13, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
    border-radius: 10px;
  }

  .topbar-inner {
    gap: 12px;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat {
    padding: 16px;
  }

  .card {
    padding: 18px;
  }

  .modal {
    padding: 20px;
  }

  .brand-name {
    display: none;
  }

  #connect-btn {
    padding: 0 12px;
  }

  .float-card.fc1 {
    left: 0;
  }

  .float-card.fc2 {
    right: 0;
  }

  .hero-cta .btn {
    flex: 1;
  }

  .sim {
    width: auto;
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
