/* Palette from the PDF bulletin (boletin.py): navy #1F3A5F, gold #C8963E. */
:root {
  --navy: #1f3a5f;
  --gold: #c8963e;
  --bg: #f6f4ef;
  --paper: #fffefb;
  --ink: #1d232b;
  --muted: #5f6b7a;
  --line: #e1ddd3;
  --soft: #eef2f7;
  --link: #1f5fa8;
  --notice: #fff4e0;
  --notice-border: #e0a33a;
  --notice-ink: #4a3000;
  --shadow: 0 1px 2px rgb(20 30 45 / 0.05), 0 4px 16px rgb(20 30 45 / 0.05);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #9dbbe3;
    --gold: #d9ab5a;
    --bg: #12161c;
    --paper: #181d24;
    --ink: #e3e7ec;
    --muted: #97a2b0;
    --line: #2b323c;
    --soft: #1f2631;
    --link: #8cb8f0;
    --notice: #2a2216;
    --notice-border: #a77a2c;
    --notice-ink: #f0dcb8;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h, 80px) + 12px); }
/* Never scroll the page sideways; wide content (tables) scrolls inside its own box. */
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 30;
  background: #1f3a5f;
  border-bottom: 3px solid #c8963e;
  color: #fff;
}
.masthead-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
}
.brand { color: inherit; text-decoration: none; display: grid; line-height: 1.2; }
.brand .kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #e6c88f; font-weight: 600; }
.brand .name { font: 700 22px/1.2 var(--serif); }
.menu {
  display: none; background: none; border: 0; color: inherit; padding: 6px; margin-left: -6px;
  border-radius: 6px; cursor: pointer;
}
.menu:hover { background: rgb(255 255 255 / .1); }

/* Day strip: only on narrow screens. Month picker on the left, that month's days scroll sideways. */
.day-strip { display: none; }
@media (max-width: 820px) {
  .day-strip {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0 10px 16px;
    background: #1a3253; border-top: 1px solid rgb(255 255 255 / .08);
  }
  .strip-month {
    flex: none; position: relative; display: flex; align-items: center; gap: 4px;
    height: 46px; padding: 0 10px; border-radius: 10px;
    background: rgb(255 255 255 / .1); color: #e6c88f;
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  }
  /* Native select over the label: the phone's own picker opens on tap. */
  .strip-month select { position: absolute; inset: 0; opacity: 0; font-size: 16px; }
  .strip-days {
    flex: 1; min-width: 0; display: flex; gap: 6px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    padding-right: 16px; scrollbar-width: none;
  }
  .strip-days::-webkit-scrollbar { display: none; }
  .chip-day {
    flex: none; scroll-snap-align: center;
    display: grid; justify-items: center; gap: 1px; min-width: 48px; padding: 6px 8px;
    border-radius: 10px; color: rgb(255 255 255 / .82); text-decoration: none;
    border: 1px solid rgb(255 255 255 / .14);
  }
  .chip-day span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
  .chip-day b { font: 700 18px/1.1 var(--serif); }
  .chip-day.active { background: #c8963e; border-color: #c8963e; color: #1b1405; }
}

.mobile-search { display: none; }
@media (max-width: 820px) {
  .mobile-search { display: block; padding: 0 16px 10px; background: #1a3253; }
  .mobile-search .search { margin: 0; border-color: transparent; }
  /* 16px or larger, or iOS Safari zooms in when the field gets focus. */
  .mobile-search .search input { font-size: 16px; }
}

/* ---------- Layout ---------- */
.layout {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 280px minmax(0, 1fr) 220px;
  gap: 40px; padding: 0 24px;
}
.sidebar, .toc {
  position: sticky; top: var(--header-h, 80px); align-self: start;
  max-height: calc(100vh - var(--header-h, 80px)); overflow-y: auto;
  padding: 28px 0 40px;
}

/* ---------- Report list ---------- */
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; color: var(--muted); margin-bottom: 20px;
}
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgb(200 150 62 / .2); }
.search input {
  flex: 1; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 14px; padding: 10px 0; outline: none; min-width: 0;
}
.group {
  font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 20px 0 8px 4px;
}
.group:first-child { margin-top: 0; }
#list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.item {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none;
  border: 1px solid transparent;
}
.item:hover { background: var(--soft); }
.item.active { background: var(--paper); border-color: var(--line); box-shadow: var(--shadow); }
.item .day {
  font: 600 26px/1 var(--serif); color: var(--navy); width: 34px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.item.active .day { color: var(--gold); }
.item .info { display: grid; line-height: 1.3; }
.item .weekday { font-weight: 600; font-size: 14px; }
.item .meta { font-size: 12.5px; color: var(--muted); }
.chip {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .05em;
  padding: 1px 5px; border-radius: 4px; background: var(--soft); color: var(--navy);
}
.empty { color: var(--muted); font-size: 14px; padding: 0 4px; }

/* Bill hits in search results */
#list ul.bill-hits { gap: 6px; margin-bottom: 8px; }
.bill-hit {
  display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px;
  background: var(--paper); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.bill-hit:hover { border-color: var(--gold); }
.bill-hit .num { font: 600 11.5px/1 var(--sans); color: var(--gold); font-variant-numeric: tabular-nums; }
.bill-hit .title { font: 600 14.5px/1.3 var(--serif); }
.bill-hit .meta { font-size: 12px; color: var(--muted); }

/* ---------- Report ---------- */
main { min-width: 0; padding: 32px 0 80px; }
.status { color: var(--muted); padding: 40px 0; }
.report { max-width: 760px; }
.report-header { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.report-header .eyebrow {
  margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold);
}
.report-header h1 { font: 700 clamp(30px, 4.5vw, 42px)/1.12 var(--serif); color: var(--navy); margin: 0 0 20px; letter-spacing: -.01em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 14px/1 var(--sans); padding: 10px 16px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.button:hover { border-color: var(--muted); }
.button.primary { background: #1f3a5f; border-color: #1f3a5f; color: #fff; }
.button.primary:hover { background: #2a4b77; }
.no-pdf { font-size: 14px; color: var(--muted); }

.content { font-size: 17px; overflow-wrap: anywhere; }
.content .lead {
  font: italic 400 21px/1.5 var(--serif); color: var(--navy);
  margin: 24px 0 12px;
}
.section { margin-top: 44px; }
.section > h2 {
  font: 700 13px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--navy); margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--gold); display: inline-block;
}
.content h3 { font: 600 20px/1.3 var(--serif); color: var(--navy); margin: 32px 0 12px; }
.content p { margin: 0 0 14px; }
.content ul, .content ol { padding-left: 22px; margin: 0 0 16px; }
.content li { margin-bottom: 6px; }
.content li::marker { color: var(--gold); }
.content strong { font-weight: 600; }
.content code { font-size: .88em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.source { font-size: 13.5px; color: var(--muted); }

/* Bill cards */
.bill {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  margin: 14px 0 18px; box-shadow: var(--shadow); overflow: hidden;
}
.bill summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: baseline;
  padding: 14px 18px;
}
.bill summary::-webkit-details-marker { display: none; }
.bill summary::after {
  content: ""; width: 9px; height: 9px; align-self: center;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s; margin: 0 4px 4px;
}
.bill[open] summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
.bill summary:hover { background: var(--soft); }
.bill[open] summary { border-bottom: 1px solid var(--line); }
.bill .num {
  font: 600 12px/1 var(--sans); color: #fff; background: #1f3a5f;
  padding: 5px 8px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.bill .title { font: 600 18px/1.35 var(--serif); color: var(--ink); }
.bill .body { padding: 16px 20px 6px; font-size: 16px; }
.bill.highlight { border-color: var(--gold); box-shadow: 0 0 0 3px rgb(200 150 62 / .25); }
.decisions .bill .num { background: var(--gold); color: #2b1d05; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 14px; }
.table-wrap th { background: #1f3a5f; color: #fff; text-align: left; font-weight: 600; padding: 10px 12px; white-space: nowrap; }
.table-wrap td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table-wrap tr:nth-child(even) td { background: var(--soft); }

/* Report limitations */
.section.notice {
  background: var(--notice); border: 1px solid var(--notice-border); border-radius: 12px;
  padding: 18px 22px 6px; color: var(--notice-ink); font-size: 15.5px;
}
.section.notice > h2 { color: var(--notice-ink); border-color: var(--notice-border); }

/* Previous / next */
.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
}
.pager a {
  display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper);
  text-decoration: none; color: var(--navy); font: 600 16px/1.3 var(--serif);
}
.pager a:hover { border-color: var(--gold); }
.pager a span { font: 500 12px/1.4 var(--sans); color: var(--muted); }
.pager .next { text-align: right; }

/* ---------- Table of contents ---------- */
.toc-title { font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -1px;
  border-left: 2px solid transparent; color: var(--muted);
  text-decoration: none; font-size: 13.5px; line-height: 1.35;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--navy); border-left-color: var(--gold); font-weight: 500; }
.toc .count { font-size: 11px; background: var(--soft); border-radius: 8px; padding: 0 6px; margin-left: 4px; color: var(--muted); }

/* ---------- Medium and narrow screens ---------- */
.scrim { display: none; }
@media (max-width: 1180px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; }
  .toc { display: none; }
}
@media (max-width: 820px) {
  .masthead-inner { padding: 10px 16px; }
  .brand .name { font-size: 19px; }
  .menu { display: inline-flex; }
  .layout { display: block; padding: 0 16px; }
  /* The panel opens under the header so the pinned search box stays visible. */
  .sidebar {
    position: fixed; z-index: 40; top: var(--header-h, 160px); left: 0; bottom: 0; width: 100%;
    max-height: none; padding: 16px; background: var(--bg);
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 0 0 40px rgb(0 0 0 / .2);
  }
  .menu-open .sidebar { transform: none; }
  .menu-open .scrim { display: block; position: fixed; inset: var(--header-h, 160px) 0 0; z-index: 35; background: rgb(10 15 25 / .4); }
  .sidebar .search { display: none; }
  main { padding-top: 24px; }
  .content { font-size: 16.5px; }
  .content .lead { font-size: 19px; }
  .bill summary { grid-template-columns: 1fr auto; padding: 12px 14px; }
  .bill .num { justify-self: start; grid-column: 1; }
  .bill .title { grid-column: 1; font-size: 17px; }
  .bill summary::after { grid-row: 1 / span 2; grid-column: 2; }
  .bill .body { padding: 14px 14px 4px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
}
