/* Estilos compartidos de Ballenas de XRP (páginas de exchanges, escrow, ETFs y seguridad cuántica) */
:root {
  --fog: #E4ECEE; --paper: #F4F8F8; --ink: #0E2A3B; --ink-soft: #4B6474; --line: #C5D3D8;
  --tide: #127A7A; --buoy: #F2B705; --down: #C4452B;
  /* colores de gráficos, validados (claro sobre #F4F8F8) */
  --c-pos: #008F86; --c-neg: #C4452B; --c-amber: #B86E00; --c-grid: #D5E0E3; --c-axis: #A9BCC3; --c-muted: #6B8290;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --text: 'Instrument Sans', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fog: #0B1F2C; --paper: #112B3B; --ink: #E3EEF0; --ink-soft: #93AAB5; --line: #23445A; --tide: #3FBFB5; --down: #E8775E;
    --c-pos: #1FA399; --c-neg: #D9603F; --c-amber: #C98500; --c-grid: #1C3A4C; --c-axis: #2E5266; --c-muted: #7F98A4;
  }
}
:root[data-theme="dark"] {
  --fog: #0B1F2C; --paper: #112B3B; --ink: #E3EEF0; --ink-soft: #93AAB5; --line: #23445A; --tide: #3FBFB5; --down: #E8775E;
  --c-pos: #1FA399; --c-neg: #D9603F; --c-amber: #C98500; --c-grid: #1C3A4C; --c-axis: #2E5266; --c-muted: #7F98A4;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--fog); color: var(--ink); font: 400 16px/1.5 var(--text); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--buoy); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px 56px; }
.num { font-variant-numeric: tabular-nums; }

/* Cabecera, buscador y menú */
.top { display: flex; align-items: center; gap: 12px 16px; padding: 16px 0 8px; flex-wrap: wrap; }
.brand { font: 800 26px/1 var(--display); text-decoration: none; margin: 0; }
.search { display: flex; gap: 8px; flex: 1 1 260px; max-width: 520px; min-width: 0; position: relative; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.search button { font: 600 14px var(--text); color: var(--paper); background: var(--tide); border: 0; border-radius: 10px; padding: 0 14px; cursor: pointer; }
.search-msg { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; color: var(--ink-soft); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; padding: 0 0 16px; font-size: 15px; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--tide); font-weight: 600; }
@media (max-width: 620px) { .search { flex: 1 0 100%; max-width: none; } .nav { gap: 2px 14px; } }

/* Bloques */
.hero { background: #0E2A3B; color: #E4ECEE; border-radius: 20px; padding: 32px; }
:root[data-theme="dark"] .hero { background: #071721; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: #071721; } }
.hero .eyebrow { margin: 0 0 6px; opacity: .75; font-size: 15px; }
.hero h1 { font: 800 clamp(34px, 6vw, 56px)/1 var(--display); margin: 0 0 12px; }
.hero .big { font: 800 clamp(32px, 10vw, 100px)/.9 var(--display); margin: 0; overflow-wrap: anywhere; }
.hero .big small { font-size: .38em; font-weight: 600; margin-left: .15em; color: #F2B705; }
.hero p { margin: 10px 0 0; max-width: 64ch; opacity: .9; }
.hero a { color: #F2B705; }
h2 { font: 800 30px/1 var(--display); margin: 36px 0 8px; }
.sub { color: var(--ink-soft); margin: 0 0 14px; font-size: 15px; max-width: 72ch; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pad { padding: 18px 20px; }
.msg { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 24px; font-size: 17px; }
.note { color: var(--ink-soft); font-size: 14px; margin-top: 16px; max-width: 80ch; }
.facts { display: flex; gap: 12px 32px; flex-wrap: wrap; padding: 16px 4px 0; color: var(--ink-soft); font-size: 15px; }
.facts b { color: var(--ink); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; font-size: 13px; color: var(--ink-soft); }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; white-space: nowrap; }
td a { text-decoration: none; } td a:hover { text-decoration: underline; }
.addr { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.pos { color: var(--c-pos); } .neg { color: var(--c-neg); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--ink-soft); border-radius: 6px; padding: 0 6px; margin-left: 6px; vertical-align: 1px; }
@media (max-width: 620px) { th, td { padding: 9px 10px; } .hide-sm { display: none; } .hero { padding: 24px 20px; } }

/* Gráficos */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .legend { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-soft); margin: 0 0 8px; }
.chart .legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart .tip { position: absolute; pointer-events: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.35; box-shadow: 0 6px 20px rgba(14, 42, 59, .14); white-space: nowrap; z-index: 4; }
.chart .tip strong { display: block; font-size: 15px; color: var(--ink); }
.chart .tip span { color: var(--ink-soft); }
.chart .tip .k { display: inline-block; width: 10px; height: 2px; vertical-align: 4px; margin-right: 6px; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .mark, .chart .hit:focus + .mark { opacity: .8; }
.chart details { margin-top: 8px; font-size: 14px; }
.chart details summary { cursor: pointer; color: var(--ink-soft); }
.chart details table { margin-top: 8px; font-size: 14px; }
.chart .empty { color: var(--ink-soft); font-size: 15px; padding: 24px 0; }

/* Formulario del revisor cuántico */
.qform { display: flex; gap: 8px; max-width: 640px; }
.qform input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.qform button { font: 600 15px var(--text); color: var(--paper); background: var(--tide); border: 0; border-radius: 10px; padding: 0 18px; cursor: pointer; }

/* Cotización en la cabecera */
.price-mini { margin-left: auto; display: flex; align-items: baseline; gap: 8px; font-size: 15px; white-space: nowrap; }
.price-mini strong { font: 600 22px/1 var(--display); }
.price-mini .up { color: var(--c-pos); } .price-mini .down { color: var(--c-neg); }
@media (max-width: 620px) { .price-mini { margin-left: 0; } }

.more-btn { display: block; width: 100%; font: 600 15px var(--text); color: var(--ink); background: none; border: 0; border-top: 1px solid var(--line); padding: 14px; cursor: pointer; }
.more-btn:hover { background: var(--fog); }

/* Tarjetas de datos */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tile span { font-size: 13px; color: var(--ink-soft); }
.tile b { font: 800 28px/1.1 var(--display); }
.tile small { font-size: 13px; color: var(--ink-soft); }

/* Pestañas de la sección rich list */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.tabs a { font-size: 15px; text-decoration: none; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--paper); }
.tabs a[aria-current="page"] { color: var(--paper); background: var(--tide); border-color: var(--tide); font-weight: 600; }

/* Amendments */
.amend-kind { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.vote { display: flex; align-items: center; gap: 12px; min-width: 150px; }
.vote-n { white-space: nowrap; font-size: 14px; color: var(--ink-soft); }
.vote-n b { color: var(--ink); }
.vote-track { position: relative; flex: 1; height: 8px; min-width: 70px; border-radius: 4px; background: var(--c-grid); }
.vote-fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--c-pos); }
.vote-line { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.amend-filter { width: 100%; max-width: 360px; margin: 0 0 12px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.amend-more { padding: 9px 14px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.amend-more[hidden] { display: none; }
@media (max-width: 620px) { .vote { flex-direction: column; align-items: stretch; gap: 6px; min-width: 96px; } .vote-track { flex: none; width: 100%; min-width: 0; } }
.amend-back { margin: 0 0 14px; font-size: 15px; }
.hero .amend-title { font-size: clamp(30px, 6vw, 56px); overflow-wrap: anywhere; }
.amend-meter { margin-top: 16px; }
.amend-data th { width: 34%; font-weight: 500; color: var(--ink-soft); text-align: left; vertical-align: top; }
.amend-data td { overflow-wrap: anywhere; }
.amend-voters { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.vchart { position: relative; padding-top: 26px; }
.vchart-bar { display: flex; gap: 2px; height: 22px; }
.vchart-bar span { min-width: 3px; }
.vchart-bar span:first-child { border-radius: 4px 0 0 4px; }
.vchart-bar span:last-child { border-radius: 0 4px 4px 0; }
.vchart-on { background: var(--c-pos); }
.vchart-off { background: var(--c-grid); }
.vchart-line { position: absolute; top: 20px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); z-index: 1; }
.vchart-line span { position: absolute; top: -20px; left: 0; white-space: nowrap; font-size: 13px; color: var(--ink-soft); }
.vchart-line span.end { left: auto; right: 0; }
.vchart-legend { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); }
.vchart-legend b { color: var(--ink); }
.vchart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.quote-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; }
.quote-ext { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; font-size: 14px; }
.quote-ext span { opacity: .8; }
.quote-ext b { font: 800 clamp(26px, 4vw, 40px)/1.05 var(--display); color: #F2B705; }

/* Celular: las tablas entran en la pantalla y el menú queda en una sola línea deslizable */
@media (max-width: 620px) {
  .nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-right: -16px; padding-right: 16px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .panel { overflow-x: auto; }
  table { font-size: 14px; }
  th, td { padding: 9px 8px; }
  th:first-child, td:first-child { padding-left: 12px; }
  th:last-child, td:last-child { padding-right: 12px; }
  td.r, th.r { white-space: normal; }
  .saldos thead { display: none; }
  .saldos, .saldos tbody, .saldos tr, .saldos td { display: block; width: 100%; }
  .saldos tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .saldos tr:last-child { border-bottom: 0; }
  .saldos td, .saldos td:first-child, .saldos td:last-child { padding: 2px 0; border: 0; }
  .saldos td.num { display: flex; justify-content: space-between; gap: 12px; white-space: normal; overflow-wrap: anywhere; text-align: right; }
  .saldos td.num::before { content: attr(data-l); color: var(--ink-soft); font-size: 13px; }
  .chart details { overflow-x: auto; }
}

/* Aviso de cookies */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 520px; margin-left: auto; padding: 14px 16px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(14, 42, 59, .22); font-size: 14px; }
.consent p { margin: 0 0 10px; }
.consent div { display: flex; justify-content: flex-end; gap: 8px; }
.consent button { font: 600 14px var(--text); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px; cursor: pointer; }
.consent button.ok { color: var(--paper); background: var(--tide); border-color: var(--tide); }
