/* Estilos comunes de las demos. Mismos tokens (solo oscuro) que el portfolio, sin dependencias externas. */
:root {
  --bg: #101728; --surface: #19223a; --fg: #e8eef5; --muted: #a8b4c8; --accent: #74c4df;
  --rule: rgb(232 238 245 / 0.18); --ring: #74c4df; --ok: #5fcf9a; --warn: #e7b25a; --bad: #f08a80;
  --grid: rgb(232 238 245 / 0.05);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', sans-serif; }
body {
  margin: 0; min-height: 100vh;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px; background-attachment: fixed;
}
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 2px; }
a { color: var(--accent); }
.demo-banner {
  position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  justify-content: space-between; padding: .6rem 1rem; background: var(--fg); color: var(--bg);
  font: 600 .85rem/1.3 ui-monospace, 'Cascadia Code', Consolas, monospace; letter-spacing: .06em;
}
.demo-banner a { color: inherit; }
.demo-pill { text-transform: uppercase; letter-spacing: .14em; }
.wrap { max-width: 64rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
h1 { font: 600 clamp(1.8rem, 5vw, 2.6rem)/1.1 Georgia, 'Times New Roman', serif; margin: .5rem 0 .25rem; letter-spacing: -.01em; }
h2 { font: 600 .74rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.lede { color: var(--muted); max-width: 40rem; margin: 0 0 1rem; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: .35rem; padding: 1rem 1.1rem; }
.grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.kpi .label { font: .7rem ui-monospace, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi .value { font: 600 1.7rem/1.2 Georgia, serif; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: .85rem; color: var(--muted); }
.up { color: var(--ok); } .down { color: var(--bad); }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
button, select, input { font: inherit; color: inherit; }
.btn, .tab { padding: .45rem .9rem; border: 1px solid var(--muted); border-radius: .4rem; background: var(--surface); cursor: pointer; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.tab[aria-pressed='true'], .tab[aria-selected='true'] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
select, input[type='number'], input[type='text'] { padding: .4rem .6rem; border: 1px solid var(--muted); border-radius: .35rem; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rule); }
th { font: .7rem ui-monospace, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
progress { width: 100%; height: .6rem; accent-color: var(--ring); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.muted { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
