/* dreamdata.nz shared site style.
   One stylesheet for every dreamdata.nz page (starter page, ICP map, NZ generation, and the Dash energy
   dashboard, which loads it from its assets/ folder). Page-specific layout stays in each page.
   Brand colours: navy #0F1B2D, teal #2BB5A3, amber #F2A93B, grey #9FB0C3 (see BRAND_README.md).
   Contrast: white text on the brand teal is too faint (2.6:1), so selected buttons use navy text on teal
   (6.8:1) and text links on light backgrounds use a darker teal, #1A7F72 (4.9:1). */

:root {
  --navy: #0F1B2D; --navy-2: #16263D; --navy-3: #24395A; --teal: #2BB5A3; --amber: #F2A93B; --grey: #9FB0C3;

  --bg: #ffffff;
  --surface: #f4f6f9;
  --text: #0F1B2D;
  --muted: #5B6B7F;
  --border: #dde3ea;
  --grid: #e9edf2;
  --accent: var(--teal);      /* fills: selected buttons, highlights */
  --on-accent: var(--navy);   /* text on --accent */
  --link: #1A7F72;            /* text links and text buttons */
  --focus: #1A7F72;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--navy); --surface: var(--navy-2); --text: #F0F4F8; --muted: var(--grey);
    --border: var(--navy-3); --grid: #1E3253; --link: var(--teal); --focus: var(--teal);
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Site header: always navy, in light and dark mode */
.site-header { background: var(--navy); border-bottom: 3px solid var(--teal); }
.site-header .inner { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center;
                      justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.site-header .brand { display: block; line-height: 0; }
.site-header .brand img { height: 36px; width: auto; }
.site-header nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.site-header nav a { display: block; color: var(--grey); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.site-header nav a:hover { color: #fff; background: var(--navy-2); }
.site-header nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--amber); border-radius: 8px 8px 0 0; }
.site-header :focus-visible { outline-color: var(--teal); }

/* Page body */
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.lbl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
select { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }

/* Single-select button groups */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 999px;
              padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button:hover { border-color: var(--accent); }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.textbtn { border: none; background: none; color: var(--link); font: inherit; font-size: 12px; cursor: pointer; padding: 0; }

/* Summary figures */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0 8px; }
.stat { background: var(--surface); border-radius: 10px; padding: 12px 14px; border-top: 3px solid var(--accent); }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12px; color: var(--muted); }

.note { color: var(--muted); font-size: 12.5px; margin-top: 14px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
