/* Shared styles for HSD Reporting (copied from Steinbach City Council Reporting so both sites look alike).
   Light by default; follows the browser's dark mode.
   Type: Fraunces (headlines) + Atkinson Hyperlegible (text). Palette: paper and ink, canola gold,
   and flat prairie colours for topic sections (field, brick, lake, slate). */
@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&display=swap");
:root {
  --font-text: "Atkinson Hyperlegible", "Source Sans 3", Georgia, serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --bg: #f6f2e8;
  --surface: #fffcf5;
  --text: #1b1c1e;
  --muted: #5e5a51;
  --rule: #ddd4c2;
  --accent: #1d4f7c;
  --accent-soft: #e4ecf3;
  --quote-bar: #c9a548;
  --context-bg: #f1e8d3;
  --context-bar: #c9922e;
  --ink: #16181a; --on-ink: #f6f2e8; --gold: #e5a823;
  --field: #2f6b3a; --brick: #a8461f; --lake: #1d5a85; --slate: #3d4a57;
  --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: #121314;
    --surface: #1b1d1f;
    --text: #ece6d8;
    --muted: #a8a195;
    --rule: #31343a;
    --accent: #8db8de;
    --accent-soft: #1d2a35;
    --quote-bar: #a88a3a;
    --context-bg: #26221a;
    --context-bar: #b08a3e;
    --ink: #0b0c0d; --on-ink: #ece6d8; --gold: #e9b13c;
    --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: #121314;
  --surface: #1b1d1f;
  --text: #ece6d8;
  --muted: #a8a195;
  --rule: #31343a;
  --accent: #8db8de;
  --accent-soft: #1d2a35;
  --quote-bar: #a88a3a;
  --context-bg: #26221a;
  --context-bar: #b08a3e;
  --ink: #0b0c0d; --on-ink: #ece6d8; --gold: #e9b13c;
  --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: 17px/1.6 var(--font-text);
}
main { max-width: 820px; margin: 0 auto; padding: 0 16px 0; }
h1, h2, h3, .report .title { font-family: var(--font-head); font-optical-sizing: auto; letter-spacing: -0.005em; }
a { color: var(--accent); }
p { margin: 0 0 14px; }
ul, ol { padding-left: 20px; margin: 0 0 14px; }
li { margin-bottom: 6px; }

/* Site bar: a full-width ink masthead strip with a gold rule (full-bleed without horizontal overflow) */
/* border-image outsets paint full width without causing horizontal scroll */
.sitebar { margin: 0 0 28px; padding: 12px 0 15px; color: var(--on-ink);
           border-image: linear-gradient(to bottom, var(--ink) calc(100% - 4px), var(--gold) calc(100% - 4px)) fill 0 / 0 / 0 100vmax; }
.sitebar a { color: var(--on-ink); text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 17px; }
.sitebar a:hover, .sitebar a:focus-visible { color: var(--gold); 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: 36px; line-height: 1.15; margin: 0 0 16px; font-weight: 700; }
.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: var(--font-head); font-size: 18px; line-height: 1.5; }
.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: 64px; padding: 26px 0 28px; font-size: 14px; color: var(--on-ink);
               border-image: linear-gradient(to bottom, var(--gold) 4px, var(--ink) 4px) fill 0 / 0 / 0 100vmax; }
footer.site a { color: var(--on-ink); }
footer.site p:last-child { margin-bottom: 0; }

/* 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: 20px; font-weight: 600; line-height: 1.25; 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: 28px; }
  th, td { padding: 8px 6px; }
  td.date { white-space: normal; }
}
