:root {
  --bg: hsl(225 48% 8%);
  --text: hsl(225 30% 94%);
  --muted: hsl(225 16% 68%);
  --rule: hsl(225 30% 20%);
  --accent: hsl(230 100% 78%);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: hsl(225 25% 97%);
    --text: hsl(228 48% 12%);
    --muted: hsl(225 12% 38%);
    --rule: hsl(225 20% 86%);
    --accent: hsl(230 74% 49%);
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
main { max-width: 680px; margin: 0 auto; padding: 56px 20px 72px; }
nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 40px; font-size: 0.95rem; }
nav a[aria-current="page"] { color: var(--text); text-decoration: none; font-weight: 600; }
h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 40px 0 8px; }
h3 { font-size: 1rem; margin: 24px 0 4px; }
.meta, .muted { color: var(--muted); }
.meta { margin: 0 0 32px; font-size: 0.95rem; }
.lead { font-size: 1.1rem; }
ul { padding-left: 1.2em; }
li { margin: 6px 0; }
a { color: var(--accent); }
footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 0.9rem; }

/* Cabecera: barras de gasto con los colores de las líneas de Tablas (Hucha/Shared/Plano.swift) y la línea del límite del mes.
   Sin JS: el SVG ya está en su estado final; con «reducir movimiento» se ve fijo. */
:root { --tb-1: #5cb2fa; --tb-2: #ff9e4c; --tb-3: #bd85f5; --tb-4: #40ccbf; --tb-track: #333d59; --tb-limit: #8fa3ff; }
@media (prefers-color-scheme: light) {
  :root { --tb-1: #218cdb; --tb-2: #e06b0a; --tb-3: #8c45c9; --tb-4: #129e94; --tb-track: #d6dbe6; --tb-limit: #2e4fe0; }
}
.hero { display: flex; align-items: center; gap: 20px; margin: 0 0 16px; }
.hero h1 { margin: 0; }
.tb-art { width: 88px; height: 88px; flex: none; overflow: visible; }
.tb-base { stroke: var(--tb-track); stroke-width: 4; stroke-linecap: round; }
.tb-1 { fill: var(--tb-1); } .tb-2 { fill: var(--tb-2); } .tb-3 { fill: var(--tb-3); } .tb-4 { fill: var(--tb-4); }
.tb-bar { transform-box: fill-box; transform-origin: bottom; }
.tb-limit { stroke: var(--tb-limit); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100 200; }

@media (prefers-reduced-motion: no-preference) {
  .tb-bar { animation: tb-grow .9s cubic-bezier(.2, .9, .25, 1.05) both; }
  .tb-2 { animation-delay: .08s; } .tb-3 { animation-delay: .16s; } .tb-4 { animation-delay: .24s; }
  .tb-limit { animation: tb-draw .8s cubic-bezier(.2, .9, .25, 1.05) .35s both; }
}
@keyframes tb-grow { from { transform: scaleY(0); } }
@keyframes tb-draw { from { stroke-dashoffset: 100; } }

@media (min-width: 560px) {
  .tb-art { width: 112px; height: 112px; }
  .hero h1 { font-size: 2.4rem; }
}
