/* Alberta Ridings – method page. Same colours as map.css; a normal scrolling page with a sticky
   section menu and a back-to-top button (2026-11-11). */
:root {
  --ink: #14263a;
  --ink-2: #1f3650;
  --muted: #5b6672;
  --line: #dfe3e8;
  --paper: #f3f5f7;
  --white: #fff;
  --ucp: #2f6fb5;
  --ndp: #ee8a2b;
  --accent: #f2b705;
  --link: #1d4f91;
  --warn-bg: #fff3c4;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(20, 38, 58, .14);
  --sticky-h: 96px;              /* bar 50 + section menu 46 */
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--sticky-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--link); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- sticky header: brand bar + section menu ---- */
.sticky { position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; min-height: 50px; background: var(--ink); color: var(--white);
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--white); text-decoration: none; font-weight: 750; font-size: 1.08rem; letter-spacing: .01em;
}
.logo { width: 24px; height: 32px; flex: none; overflow: visible; }
.logo .ab { fill: none; stroke: var(--white); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 100; animation: logodraw 1.1s .15s ease-out both; }
.logo .cut { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 100; animation: logodraw .7s 1.1s ease-out both; }
@keyframes logodraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .logo .ab, .logo .cut { animation: none; } }
.btn {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--accent); color: var(--ink); font-weight: 650; font-size: .92rem; text-decoration: none;
}
.btn:hover { background: #ffd23d; }

.sections {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 6px 12px; min-height: 46px; background: var(--ink-2);
  -webkit-overflow-scrolling: touch;
}
.sections::-webkit-scrollbar { display: none; }
.sections a {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  border-radius: 999px; color: #d6dde5; text-decoration: none; font-size: .9rem; white-space: nowrap;
  transition: background .15s, color .15s;
}
.sections a:hover { background: rgba(255, 255, 255, .1); color: var(--white); }
.sections a.active { background: var(--white); color: var(--ink); font-weight: 650; }

/* ---- title band ---- */
.hero { background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%); color: var(--white); }
.hero-in { max-width: 780px; margin: 0 auto; padding: 34px 20px 38px; }
.kicker { margin: 0 0 10px; font-size: .9rem; color: #c9d2db; }
.tag {
  display: inline-block; margin-right: 6px; padding: 2px 9px; border-radius: 999px;
  background: var(--warn-bg); color: var(--ink); font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.hero h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; }
.hero .lede { margin: 0 0 14px; font-size: 1.12rem; color: #e8edf2; max-width: 62ch; }
.built { margin: 0; font-size: .85rem; color: #aeb9c5; }

/* ---- content ---- */
main {
  max-width: 780px; margin: -18px auto 0; padding: 8px 28px 40px;
  background: var(--white); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow);
  position: relative;
}
h2 {
  position: relative; margin: 40px 0 10px; padding: 0 0 0 16px;
  font-size: 1.4rem; line-height: 1.25; letter-spacing: -.005em;
}
h2::before {
  content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 5px; border-radius: 3px;
  background: linear-gradient(var(--ucp), var(--ndp));
}
main > h2:first-child { margin-top: 26px; }
h3 { margin: 22px 0 4px; font-size: 1.05rem; color: var(--ink-2); }
p, ul, ol { margin: 10px 0; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--muted); }
.small { font-size: .88rem; color: var(--muted); }
.fig { font-weight: 650; }

/* ---- riding pages (web/html/riding/<slug>/, written by scripts/52_riding_pages.py) ---- */
.cta { margin: 16px 0 6px; }
.cta .btn { min-height: 44px; padding: 0 20px; font-size: 1rem; }
.pager {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin: 36px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .92rem;
}

.limits {
  margin: 16px 0; padding: 12px 18px; border-radius: var(--radius);
  border: 1px solid #ecd9a0; border-left: 5px solid #e0b100; background: #fffaf0;
}
.limits h3 { margin-top: 4px; color: #6b5200; }

.scroll { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
thead th { position: sticky; top: 0; background: var(--paper); font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
tbody tr:nth-child(even) { background: #fafbfc; }
tbody tr:last-child td { border-bottom: 0; }
td.old { color: var(--muted); }

footer {
  margin: 44px -28px -40px; padding: 20px 28px 28px; background: var(--ink); color: #c9d2db;
  font-size: .88rem;
}
footer p { margin: 4px 0; }
footer a { color: var(--white); }

/* ---- back to top: always shown, bottom right ---- */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: var(--white); box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  border: 2px solid var(--accent); transition: transform .15s, background .15s;
}
.to-top svg { width: 24px; height: 24px; }
.to-top:hover { background: var(--ink-2); transform: translateY(-2px); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero-in { padding: 24px 16px 30px; }
  main { margin-top: -12px; padding: 4px 16px 32px; border-radius: 10px 10px 0 0; }
  footer { margin: 36px -16px -32px; padding: 18px 16px 24px; }
  .btn { padding: 0 11px; font-size: .86rem; }
  .to-top { right: 12px; bottom: 12px; width: 44px; height: 44px; }
}

@media print {
  .sticky, .to-top { display: none; }
  .hero { background: none; color: var(--ink); }
  .hero .lede, .built, .kicker { color: var(--ink); }
  main { box-shadow: none; margin-top: 0; }
}
