/* Shared styles for Steinbach City Council Reporting.
   Light by default; follows the browser's dark mode. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1f23;
  --muted: #5b616b;
  --rule: #e3e0d8;
  --accent: #1f5f8b;
  --accent-soft: #e8f0f6;
  --quote-bar: #9fb8cc;
  --context-bg: #f6f1e4;
  --context-bar: #c9a548;
  --good-bg: #e3f1e6; --good-fg: #1f6b35;
  --ok-bg: #e8eef5;   --ok-fg: #2a5584;
  --part-bg: #fbf0d9; --part-fg: #85590b;
  --gap-bg: #f8e2e0;  --gap-fg: #9a2e25;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --surface: #1d2024;
    --text: #e7e8ea;
    --muted: #a0a6ae;
    --rule: #30343a;
    --accent: #7db4dc;
    --accent-soft: #1e2a34;
    --quote-bar: #4b6a82;
    --context-bg: #26231a;
    --context-bar: #a88a3a;
    --good-bg: #1d3324; --good-fg: #8fd3a2;
    --ok-bg: #1e2a38;   --ok-fg: #9cc3ea;
    --part-bg: #3a2f17; --part-fg: #e9c27a;
    --gap-bg: #3d1f1c;  --gap-fg: #f0a39b;
  }
}
:root[data-theme="dark"] {
  --bg: #15171a;
  --surface: #1d2024;
  --text: #e7e8ea;
  --muted: #a0a6ae;
  --rule: #30343a;
  --accent: #7db4dc;
  --accent-soft: #1e2a34;
  --quote-bar: #4b6a82;
  --context-bg: #26231a;
  --context-bar: #a88a3a;
  --good-bg: #1d3324; --good-fg: #8fd3a2;
  --ok-bg: #1e2a38;   --ok-fg: #9cc3ea;
  --part-bg: #3a2f17; --part-fg: #e9c27a;
  --gap-bg: #3d1f1c;  --gap-fg: #f0a39b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main { max-width: 820px; margin: 0 auto; padding: 32px 16px 64px; }
a { color: var(--accent); }
p { margin: 0 0 14px; }
ul, ol { padding-left: 20px; margin: 0 0 14px; }
li { margin-bottom: 6px; }

/* Site bar */
.sitebar { font-size: 14px; color: var(--muted); margin: 0 0 24px; }
.sitebar a { color: var(--muted); text-decoration: none; }
.sitebar a:hover { color: var(--accent); text-decoration: underline; }

/* Page header */
header.page { border-bottom: 1px solid var(--rule); padding-bottom: 24px; margin-bottom: 28px; }
.eyebrow { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 16px; }
.lede { font-size: 18px; margin: 0 0 12px; }
.meta { font-size: 14px; color: var(--muted); margin: 0; }

/* Headings */
.part-label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 64px 0 4px; font-weight: 700; }
h2 { font-size: 24px; margin: 48px 0 16px; padding-top: 8px; border-top: 2px solid var(--text); scroll-margin-top: 16px; }
.part-label + h2 { margin-top: 0; }
header.page + h2 { border-top: 0; padding-top: 0; margin-top: 0; }
h3 { font-size: 18px; margin: 32px 0 12px; scroll-margin-top: 16px; }
h3 .num { color: var(--accent); margin-right: 6px; }

/* Summary and table of contents */
.callout { background: var(--accent-soft); border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; }
.callout h2 { border: 0; margin: 0 0 10px; padding: 0; font-size: 18px; }
.callout ul:last-child, .callout p:last-child { margin-bottom: 0; }
nav.toc { border: 1px solid var(--rule); border-radius: 8px; padding: 16px 20px; margin: 0 0 8px; background: var(--surface); }
nav.toc h2 { border: 0; margin: 0 0 8px; padding: 0; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
nav.toc ol { margin: 0; }
nav.toc ol ol { margin-top: 4px; font-size: 15px; }
nav.toc li { margin-bottom: 4px; }

/* Quotes */
blockquote { margin: 0 0 16px; padding: 4px 0 4px 16px; border-left: 3px solid var(--quote-bar); }
blockquote p { margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.cite { font-size: 14px; color: var(--muted); }
.cite strong { color: var(--text); font-weight: 600; }
.cite a { white-space: nowrap; }

/* Context boxes */
.context { background: var(--context-bg); border-left: 3px solid var(--context-bar); padding: 12px 16px; margin: 8px 0 20px; font-size: 15px; border-radius: 0 6px 6px 0; }
.context p:last-child, .context ul:last-child, .context blockquote:last-child { margin-bottom: 0; }
.context .label { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: block; margin-bottom: 4px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 20px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; }
.card .k { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.card .v { font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
td.measure { font-weight: 600; min-width: 140px; }
td.date { white-space: nowrap; color: var(--muted); }
.nowrap { white-space: nowrap; }

/* Rating pills */
.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.good { background: var(--good-bg); color: var(--good-fg); }
.ok   { background: var(--ok-bg);   color: var(--ok-fg); }
.part { background: var(--part-bg); color: var(--part-fg); }
.gap  { background: var(--gap-bg);  color: var(--gap-fg); }
.legend { font-size: 14px; color: var(--muted); margin: 0 0 12px; line-height: 2; }
.legend .pill { margin-right: 4px; }

/* Sources and footer */
.sources { font-size: 14px; }
.sources li { margin-bottom: 4px; }
footer.site { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }

/* Home page report list */
.report-list { list-style: none; padding: 0; margin: 0; }
.report-list li { margin: 0 0 16px; }
.report { display: block; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; text-decoration: none; color: var(--text); }
.report:hover { border-color: var(--accent); }
.report .title { font-size: 19px; font-weight: 700; color: var(--accent); margin: 0 0 6px; }
.report .desc { margin: 0 0 8px; }
.report .when { font-size: 13px; color: var(--muted); margin: 0; }

@media (max-width: 560px) {
  h1 { font-size: 26px; }
  th, td { padding: 8px 6px; }
  td.date { white-space: normal; }
}
