/* Swan River School District No. 4 — Building Reserve Levy Information
   Plain CSS, no dependencies, no build step.
   Mobile-first · base font ~18px · high contrast · print stylesheet at bottom. */

:root {
  --ink: #1c1c1c;        /* body text */
  --paper: #ffffff;      /* page background */
  --navy: #1e3a5c;       /* masthead, headings */
  --navy-deep: #152b45;  /* nav bar */
  --shade: #eef2f6;      /* table header fill, footer */
  --rule: #b9c4d0;       /* table borders */
  --link: #0b4f8a;       /* links (≥7:1 contrast on white) */
}

* { box-sizing: border-box; }

/* 112.5% of the browser default = 18px for most people,
   and scales up if a visitor has raised their default font size. */
html { font-size: 112.5%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

/* Skip link for keyboard and screen-reader users */
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #ffffff;
  color: var(--link);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- Masthead ---------- */
.masthead {
  background: var(--navy);
  color: #ffffff;
  text-align: center;
  padding: 1.1rem 1rem 0.9rem;
}
.masthead p { margin: 0; }
.district {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sitename {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0.15rem 0;
}
.sitename a { color: #ffffff; text-decoration: none; }
.sitename a:hover, .sitename a:focus { text-decoration: underline; }
.electiondate { font-size: 0.95rem; }

/* ---------- Navigation ---------- */
nav { background: var(--navy-deep); }
nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0.35rem 0.5rem;
  max-width: 46rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.35rem;
}
nav li { margin: 0; }
nav a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.95rem;
}
nav a:hover, nav a:focus { background: rgba(255, 255, 255, 0.14); text-decoration: underline; }
nav a[aria-current="page"] {
  background: #ffffff;
  color: var(--navy-deep);
  font-weight: 700;
}

/* ---------- Main content ---------- */
main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.4rem 1.1rem 3rem;
}

h1 { font-size: 1.8rem; line-height: 1.2; margin: 0.8rem 0 1rem; color: var(--navy-deep); }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 0.6rem; color: var(--navy-deep); }
p { margin: 0.8rem 0; }
.lead { font-size: 1.1rem; }

a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

ul { padding-left: 1.3rem; }
li { margin: 0.35rem 0; }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; }
th, td {
  border: 1px solid var(--rule);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
thead th { background: var(--shade); }

/* Levy at a glance: label column shaded, values bold */
.keyfacts th { background: var(--shade); width: 55%; font-weight: 600; }
.keyfacts td { font-weight: 700; }

/* Tax-impact table: the key numbers, never fine print */
.taximpact th, .taximpact td { font-variant-numeric: tabular-nums; }
.taximpact tbody td { font-size: 1.1rem; font-weight: 600; }
.taximpact th:nth-child(n+2), .taximpact td:nth-child(n+2) { text-align: right; }

/* ---------- Key dates list ---------- */
.keydates li { margin: 0.6rem 0; }

/* ---------- Ballot reproduction ---------- */
.ballot {
  margin: 1rem 0 2rem;
  padding: 1.2rem 1.3rem;
  border: 2px solid #333333;
  background: #fffdf6;
  font-family: Georgia, "Times New Roman", serif;
}
.ballot-head {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 0;
}
.ballot-choice { font-weight: 700; margin: 0.9rem 0 0; }
.ballot-choice .box { font-size: 1.2em; margin-right: 0.35rem; }

/* ---------- Continue link (follows the nav order) ---------- */
.pagenext { margin-top: 2.6rem; font-weight: 600; }

/* ---------- Footer ---------- */
footer {
  background: var(--shade);
  border-top: 3px solid var(--navy);
  margin-top: 2rem;
}
.neutrality {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.1rem;
  font-size: 0.95rem;
  text-align: center;
}

/* ---------- Larger screens ---------- */
@media (min-width: 40em) {
  h1 { font-size: 2.1rem; }
  .sitename { font-size: 1.6rem; }
}

/* ---------- Print ---------- */
@media print {
  .skip, nav, .pagenext { display: none; }
  body { color: #000000; }
  .masthead {
    background: none;
    color: #000000;
    border-bottom: 2pt solid #000000;
    padding: 0 0 0.4rem;
  }
  .sitename a { color: #000000; }
  main { max-width: none; padding: 0; }
  h1, h2 { color: #000000; }
  a { color: #000000; }
  /* Print the address of external links so a paper copy still works */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-weight: 400; }
  thead th, .keyfacts th { background: none; }
  .ballot { background: none; }
  table, .ballot { page-break-inside: avoid; }
  footer { background: none; border-top: 1pt solid #000000; }
}

/* ---------- Documents page (added in Phase 2; nothing above changed) ---------- */
.doclist li { margin: 0.9rem 0; }
.docmeta { font-size: 0.9rem; white-space: nowrap; }
.docnote { margin: 0.35rem 0 0; font-size: 0.95rem; max-width: 60ch; }
.note {
  margin: 1.2rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--navy);
  background: var(--shade);
}

@media print {
  .note { background: none; border-left: 2pt solid #000000; }
}
