  :root {
    --bg: #F3F4FA; --surface: #FFFFFF; --surface-2: #E8EAF3;
    --text: #2B2E52; --text-muted: #62658A; --border: #D7DAEA;
    --primary: #3D4178; --primary-dark: #2B2E52; --primary-tint: #E8EAF3;
    --accent: #E2694F; --accent-dark: #C8543C; --accent-tint: #FBE7E1; --accent-text: #B3442A;
    --shadow: 0 1px 2px rgba(20, 30, 27, 0.06);
    --radius: 10px;
    --serif: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  }
  html[data-theme="dark"] {
    --bg: #23253F; --surface: #2E3050; --surface-2: #383A5E;
    --text: #EDEEF9; --text-muted: #B3B6D6; --border: #454877;
    --primary: #A0A5DD; --primary-dark: #A6AAE0; --primary-tint: #282A4D;
    --accent: #F08468; --accent-dark: #F6A088; --accent-tint: #2E2036; --accent-text: #F08468;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
  a { color: var(--primary); }
  .skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; }
  .skip-link:focus { left: 0; }

  .topbar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; row-gap: 8px; }
  .brand-mark { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: var(--primary); text-decoration: none; }
  .nav-tools { display: flex; align-items: center; gap: 6px; }
  .nav-link { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; padding: 8px 13px; border-radius: 8px; text-decoration: none; color: var(--text-muted); border: 1px solid transparent; }
  .nav-link:hover { background: var(--surface-2); }
  .nav-link.is-active { color: var(--primary); background: var(--primary-tint); border-color: var(--border); }
  .topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
  .icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 1rem; }
  .icon-btn:hover { background: var(--surface-2); }
  .icon-btn:focus-visible, a:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

  .container { max-width: 780px; margin: 0 auto; padding: 44px 24px 80px; }
  h1 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; margin: 0 0 6px; }
  .subtitle { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 32px; }
  h2 { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--primary); margin: 32px 0 12px; }
  p, li { font-size: 0.93rem; color: var(--text); }
  ul { padding-left: 22px; }
  li { margin-bottom: 6px; }

  .callout-primary {
    background: var(--primary-tint); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 22px; margin: 20px 0; font-size: 0.92rem;
  }
  .callout-primary strong { color: var(--primary); }

  .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 20px 0; }
  .stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; text-align: center; }
  .stat-card strong { display: block; font-family: var(--serif); font-size: 1.4rem; color: var(--primary); }
  .stat-card span { font-size: 0.76rem; color: var(--text-muted); }

  .changelog { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin: 16px 0; }
  .changelog-entry { padding: 14px 20px; border-bottom: 1px solid var(--border); }
  .changelog-entry:last-child { border-bottom: none; }
  .changelog-date { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent-text); margin-bottom: 4px; }
  .changelog-entry p { margin: 0; font-size: 0.88rem; }

  .contact-box {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 20px 22px; margin: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  }
  .btn { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; display: inline-block; }
  .btn:hover { background: var(--surface-2); }
  .btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
  .btn-primary:hover { background: var(--primary-dark); }

  footer { border-top: 1px solid var(--border); padding: 22px 24px 40px; margin-top: 20px; }
  footer .container { padding-top: 18px; padding-bottom: 0; }
  footer p { font-size: 0.78rem; color: var(--text-muted); max-width: 780px; margin: 0 0 8px; }

  /* Menú en móvil: se desplaza en horizontal en lugar de salirse de la pantalla */
  @media (max-width: 760px) {
    .topbar > div:last-child { width: 100%; min-width: 0; }
    .nav-tools { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .nav-tools::-webkit-scrollbar { display: none; }
    .nav-link { white-space: nowrap; }
  }

  /* Accesibilidad: contraste AA de textos sobre el color primario en modo oscuro */
  html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .btn-fill, html[data-theme="dark"] .annual-banner__cell,
  html[data-theme="dark"] .category-tab.is-active, html[data-theme="dark"] .skip-link, html[data-theme="dark"] .chip[aria-pressed="true"] { color: #14152A; }

.table-wrap { overflow-x: auto; margin: 0 0 14px; }
.table-wrap table { min-width: 560px; }
