/* DC Election 2026 — deliberately old-school, but responsive. */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #555555;
  --link: #0000cc;
  --visited: #551a8b;
  --rule: #999999;
  --navy: #1f3b63;
  --box: #f4f4ee;
  --border: #c8c8c0;
  --flag-bg: #fff3cd;
  --flag-fg: #5c4400;
  --flag-border: #e0c36b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --fg: #e8e8e8;
    --muted: #b0b0b0;
    --link: #8ab4f8;
    --visited: #c58af9;
    --rule: #555555;
    --navy: #a9c6ec;
    --box: #1e1e1e;
    --border: #444444;
    --flag-bg: #3a3000;
    --flag-fg: #ffe08a;
    --flag-border: #7a6520;
  }
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 Verdana, Geneva, Tahoma, "DejaVu Sans", sans-serif;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 10px 16px 40px; }
a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 28px 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--box); padding: 6px 10px; z-index: 10; }

/* Masthead and navigation */
.masthead {
  text-align: center;
  border: 3px double var(--rule);
  padding: 14px 10px 10px;
  margin: 8px 0 8px;
}
.masthead .sitelink { text-decoration: none; color: var(--navy); }
.masthead .site {
  font: bold 36px/1.1 Georgia, "Times New Roman", Times, serif;
  letter-spacing: 1px;
  display: block;
}
.masthead .tagline { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.topnav {
  text-align: center;
  font-size: 15px;
  padding: 6px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
  color: var(--muted);
}
.topnav a { margin: 0 6px; white-space: nowrap; display: inline-block; padding: 3px 0; }
.topnav a.current { font-weight: bold; text-decoration: none; color: var(--fg); }

/* Headings */
h1 {
  font: bold 30px/1.2 Georgia, "Times New Roman", Times, serif;
  color: var(--navy);
  margin: 10px 0 12px;
}
h2 {
  font: bold 23px/1.25 Georgia, "Times New Roman", Times, serif;
  color: var(--navy);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
  margin: 34px 0 12px;
}
h3 {
  font: bold 18px/1.3 Georgia, "Times New Roman", Times, serif;
  color: var(--navy);
  margin: 24px 0 8px;
}
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 26px; }
li { margin-bottom: 6px; }
blockquote { margin: 0 0 14px 18px; padding-left: 12px; border-left: 3px solid var(--rule); color: var(--muted); }
.lead { font-size: 18px; }
.small { font-size: 14px; color: var(--muted); }

/* Candidate cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 12px 0 8px;
}
.card {
  display: block;
  border: 1px solid var(--border);
  background: var(--box);
  padding: 10px;
  text-align: center;
  text-decoration: none;
  color: var(--fg);
}
.card:visited { color: var(--fg); }
.card:hover { border-color: var(--navy); }
.card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  background: #dddddd;
  display: block;
}
.card .name { display: block; font-weight: bold; margin: 8px 0 2px; font-size: 16px; color: var(--link); text-decoration: underline; }
.card .tag { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }
.badge {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border: 1px solid var(--rule);
  padding: 1px 6px;
  margin-top: 7px;
  color: var(--muted);
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
table.plain { border-collapse: collapse; width: 100%; font-size: 15px; }
table.plain th, table.plain td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; vertical-align: top; }
table.plain th { background: var(--box); }
table.plain td.num { text-align: right; white-space: nowrap; }
table.plain tr.elected td { font-weight: bold; }
table.standings td { font-size: 14px; }
table.standings th.who { white-space: nowrap; }

/* Candidate profile */
.profile { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 8px; }
.profile .photo { flex: 0 0 230px; max-width: 100%; }
.profile .photo img { width: 100%; border: 1px solid var(--border); display: block; background: #dddddd; }
.credit { font-size: 12px; color: var(--muted); margin: 5px 0 0; line-height: 1.35; }
.profile .facts { flex: 1 1 300px; min-width: 0; }
.facts table { border-collapse: collapse; width: 100%; font-size: 15px; }
.facts th, .facts td { border: 1px solid var(--border); padding: 5px 8px; text-align: left; vertical-align: top; }
.facts th { background: var(--box); width: 32%; font-weight: bold; }
.office { font-size: 15px; color: var(--muted); margin: -6px 0 12px; }

sup.cite { line-height: 0; }
sup.cite a { text-decoration: none; font-size: 11px; padding: 0 1px; }
.note { border-left: 4px solid var(--rule); background: var(--box); padding: 8px 12px; font-size: 15px; }
.verdict { border: 1px solid var(--border); background: var(--box); padding: 10px 14px 2px; }
.label { font-weight: bold; }
.flag {
  background: var(--flag-bg);
  color: var(--flag-fg);
  border: 1px solid var(--flag-border);
  padding: 0 5px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
ol.sources { font-size: 14px; overflow-wrap: anywhere; }
ol.sources li { margin-bottom: 4px; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; margin-top: 24px; }
.toplink { font-size: 13px; text-align: right; margin: 6px 0 0; }
.dates td:first-child { white-space: nowrap; }

footer {
  margin-top: 44px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding-top: 12px;
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .masthead .site { font-size: 27px; }
  h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  .profile .photo { flex-basis: 100%; max-width: 260px; margin: 0 auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .card { padding: 7px; }
  .card .name { font-size: 14px; }
  .card .tag { font-size: 12px; }
  .dates td:first-child { white-space: normal; }
}

@media print {
  .topnav, .pager, .toplink, .skip { display: none; }
  a { color: inherit; text-decoration: none; }
  body { font-size: 12pt; }
}
