/* Tokens e estrutura comuns às duas páginas. */
:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --ink: #15172e;
  --muted: #5d6079;
  --line: #dfe1ea;
  --accent: #3a35d4;
  --accent-rgb: 58, 53, 212;
  --hot: #d6336c;
  --now: #f2b705;
  --sertao: #b8641a;
  --agreste: #2f8a4e;
  --rmr: #3a35d4;
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1020;
    --surface: #171933;
    --ink: #eceefb;
    --muted: #a2a5c4;
    --line: #2a2d4d;
    --accent: #8e8bff;
    --accent-rgb: 142, 139, 255;
    --hot: #ff6b9a;
    --now: #ffcf3f;
    --sertao: #f0a35c;
    --agreste: #6fd193;
    --rmr: #8e8bff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-block: 28px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  gap: 26px;
}

h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; font-stretch: 85%; line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: 20px; font-weight: 700; font-stretch: 90%; }

header { display: grid; gap: 6px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.lede { color: var(--muted); max-width: 70ch; margin: 8px 0 0; }

.topnav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.topnav a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.stats { display: flex; flex-wrap: wrap; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.stat { flex: 1 1 150px; padding: 12px 16px 14px 0; display: grid; gap: 2px; }
.stat b { font-family: var(--font-display); font-size: 28px; font-weight: 800; font-stretch: 85%; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }

section { display: grid; gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-width: 0; }
.scroll { overflow-x: auto; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.foot { color: var(--muted); font-size: 13px; max-width: 80ch; margin: 0; }

/* Grade de calor dia × bloco de 2h. */
.heat { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 980px; font-variant-numeric: tabular-nums; }
.heat th { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; padding: 2px 4px; white-space: nowrap; }
.heat th.day { text-align: left; font-size: 13px; color: var(--ink); padding-right: 10px; }
.heat th.day small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.heat td { text-align: center; padding: 7px 2px; border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 52px; }
.heat td.off { color: var(--muted); font-weight: 400; }
.heat td.strong { color: #fff; }
.heat td.now { box-shadow: inset 0 0 0 2px var(--now); }
.heat td.tot { text-align: right; font-family: var(--font-display); font-size: 15px; font-weight: 800; padding-left: 10px; }
.heat td.acc { text-align: right; font-weight: 400; color: var(--muted); font-size: 12px; }
.heat tr.today th.day { color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .heat td { transition: background-color .2s; }
}
