/* ── Bonding APR Table ──────────────────────────────────────
 * Tabla pedagógica: APR vs precio NO a 7 días al vencimiento.
 * Estilo coherente con sibling widgets del post-03.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-page:        #0E1118;
  --bg-panel:       #131820;
  --hairline:       #232A36;
  --hairline-soft:  #1A2029;
  --text:           #B5BAC4;
  --text-strong:    #E8EAEE;
  --text-muted:     #6E7480;
  --text-faint:     #4A5060;
  --accent:         #6B9EBB;
  --accent-rgb:     107, 158, 187;
}

[data-theme="light"] {
  --bg-page:        #f4e9da;
  --bg-panel:       #ede3d6;
  --hairline:       #c4b598;
  --hairline-soft:  #d4c4b0;
  --text:           #5a4a3d;
  --text-strong:    #2b2218;
  --text-muted:     #8a7060;
  --text-faint:     #a89080;
  --accent:         #2b5d73;
  --accent-rgb:     43, 93, 115;
}

html, body {
  width: 100%;
  background: var(--bg-page);
  color: var(--text);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  min-height: 100vh;
}

html.embedded body { padding: 0; min-height: auto; }
html.embedded .panel { padding: 14px 16px 12px; }

.panel {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 18px 22px 20px;
}

/* ── Table ──────────────────────────────────────────── */
.bond-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.bond-table th {
  text-align: right;
  padding: 4px 8px 8px;
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  font-weight: 500;
}
.bond-table th:first-child { text-align: left; padding-left: 0; }
.bond-table th:last-child { padding-right: 0; }
.bond-table th .th-sub {
  display: inline;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  opacity: 0.65;
  margin-left: 3px;
}

.bond-table td {
  text-align: right;
  padding: 7px 8px;
  color: var(--text);
  border-bottom: 1px solid var(--hairline-soft);
  letter-spacing: -0.01em;
}
.bond-table td:first-child {
  text-align: left;
  color: var(--text-strong);
  font-weight: 500;
  white-space: nowrap;
  padding-left: 0;
}
.bond-table td:last-child { padding-right: 0; }
.bond-table tr:last-child td { border-bottom: none; }

.bond-table .apr-cell { color: var(--accent); font-weight: 500; }
.bond-table .apy-cell { color: var(--text-strong); font-weight: 600; }

/* Row del 98.7c — ancla del ejemplo del post */
.bond-table tr.is-anchor td {
  background: rgba(var(--accent-rgb), 0.06);
  border-color: rgba(var(--accent-rgb), 0.20);
}
.bond-table tr.is-anchor td:first-child::before {
  content: "▸";
  color: var(--accent);
  margin-right: 4px;
  display: inline-block;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: 16px 8px; }
  .panel { padding: 14px 14px 16px; }
  .bond-table { font-size: 11px; }
  .bond-table th { font-size: 8.5px; padding: 4px 4px 6px; }
  .bond-table td { padding: 6px 4px; }
}
