header {
  background: #182541;
  color: #f8fafc;
  padding: 0.9rem 1.5rem 0;
}

header .notice {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: #dbe4f5;
}

header nav {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 0.85rem;
}

header nav a {
  color: #fff;
  text-decoration: none;
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
}

header nav a:hover {
  text-decoration: underline;
}

main {
  max-width: 1280px;
}

.crumb {
  font-size: 0.95rem;
  color: #4b5675;
  margin-top: 0;
}

.stats {
  columns: 1;
}

.document-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 2rem;
  align-items: start;
}

.document-layout-nav-left {
  grid-template-columns: 24rem minmax(0, 1fr);
}

.legal-body .level-section {
  scroll-margin-top: 1rem;
}

.legal-body .level-section h3 {
  margin-top: 1.8rem;
}

.legal-body .level-num {
  font-weight: 700;
  color: #182541;
}

.act-caption {
  color: #4b5675;
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}

.act-title {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin: 0.4rem 0 1rem;
}

.enacting-formula {
  font-style: italic;
  margin: 0 0 1.4rem;
}

.act-approval {
  margin-top: 2rem;
  font-weight: 600;
}

.act-enacted,
.act-source-link {
  font-size: 0.92rem;
  color: #4b5675;
}

.action-type {
  color: #4b5675;
  font-size: 0.95rem;
}

.nav-panel {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border: 1px solid #d7dbe8;
  border-radius: 8px;
  padding: 0.7rem 0.8rem 0.9rem;
}

.toc-tree {
  font-size: 0.9rem;
}

.toc-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-tree ul ul {
  padding-left: 1.05rem;
}

.toc-tree a {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.14rem 0.2rem 0.14rem 1rem;
  text-decoration: none;
  color: inherit;
  line-height: 1.3;
  border-radius: 3px;
}

.toc-tree a:hover {
  background: #f3f5fb;
}

.toc-tree li.expanded > a,
.toc-tree li.current > a {
  font-weight: 600;
}

.toc-tree li.expanded > a::before {
  content: "▾";
  position: absolute;
  margin-left: -0.95rem;
  color: #1a4f8b;
}

.toc-tree a {
  position: relative;
}

.toc-tree .kind {
  flex: 0 0 auto;
  font-weight: 700;
  color: #1a4f8b;
}

.toc-tree .name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a2a4a;
}

.toc-tree .range {
  flex: 0 0 auto;
  color: #5b6785;
  font-size: 0.8rem;
}

.legacy {
  margin: 0 0 1.5rem;
}

.legacy-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
}

.legacy-tile {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem 0.7rem;
  background: #f8fafc;
  border: 1px solid #d7dbe8;
  border-radius: 8px;
}

.legacy-tile strong {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.1;
  color: #182541;
}

.legacy-tile span {
  font-size: 0.8rem;
  line-height: 1.3;
  color: #4b5675;
}

.legacy-figure {
  margin: 0 0 1rem;
  padding: 0.6rem 0.6rem 0.3rem;
  background: #fff;
  border: 1px solid #d7dbe8;
  border-radius: 8px;
}

.legacy-chart {
  display: block;
  width: 100%;
  height: auto;
}

.legacy-chart .served {
  fill: #fff4dc;
}

.legacy-chart .served.senate {
  fill: #e9effa;
}

.legacy-chart .axis {
  stroke: #182541;
  stroke-width: 1.5;
}

.legacy-chart .lane,
.legacy-chart .tick {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  fill: #4b5675;
}

.legacy-chart .lane {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legacy-chart .enacted {
  fill: #1f7a46;
}

.legacy-chart .children {
  fill: #1a4f8b;
}

.legacy-chart .grandchildren {
  fill: #7c3aed;
}

.legacy-chart .regulations {
  fill: #c2410c;
}

.legacy-legend .swatch.regulations {
  background: #c2410c;
}

.legacy-chart a:hover rect {
  filter: brightness(1.25);
}

.legacy-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  margin: 0.35rem 0 0.2rem;
  font-size: 0.8rem;
  color: #4b5675;
}

.legacy-legend .swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.35rem;
  border-radius: 2px;
  vertical-align: -0.1rem;
}

.legacy-legend .swatch.served {
  background: #fff4dc;
  border: 1px solid #e8d9b5;
}

.legacy-legend .swatch.enacted {
  background: #1f7a46;
}

.legacy-legend .swatch.children {
  background: #1a4f8b;
}

.legacy-legend .swatch.grandchildren {
  background: #7c3aed;
}

.legacy-years details.legacy-year {
  margin: 0.3rem 0;
  padding: 0.3rem 0.7rem 0.4rem;
}

.legacy-year summary .kind {
  font-weight: 700;
  color: #1a4f8b;
}

.legacy-year summary .range {
  font-weight: 400;
  color: #5b6785;
  font-size: 0.9rem;
}

.legacy-year h4 {
  margin: 0.7rem 0 0.2rem;
  font-size: 0.78rem;
}

.legacy-year ul {
  margin: 0 0 0.4rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.legacy-year li {
  margin: 0.15rem 0;
}

.legacy-year li .name {
  color: #1a2a4a;
}

.legacy-year li .meta {
  font-size: 0.82rem;
}

.bill-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
  margin: 0.85rem 0 1.5rem;
}

.bill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 8.5rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d7dbe8;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(24, 37, 65, 0.04);
}

.bill-card.enacted {
  background: #f4faf6;
  border-color: #cfe6d6;
  box-shadow: inset 4px 0 0 #1f7a46;
}

.bill-card.died {
  background: #fafbfc;
}

.bill-card:hover,
.bill-card:focus-within {
  z-index: 5;
  overflow: visible;
}

.bill-card:has(.bill-card-expand[open]) {
  grid-column: 1 / -1;
  overflow: visible;
}

.bill-card.died::after {
  content: "";
  height: 1.55rem;
}

.bill-card-face {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
  padding: 0.7rem 0.8rem 0.4rem;
  text-decoration: none;
  color: inherit;
  min-height: 6.5rem;
}

.bill-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}

.bill-card .kind {
  font-weight: 700;
  color: #1a4f8b;
}

.bill-card .status {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4b5675;
}

.bill-card .status.passed {
  color: #14532d;
}

.bill-card .status.died {
  color: #6b7280;
}

.bill-card-face .name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #1a2a4a;
}

.bill-card-face .range {
  margin-top: auto;
  color: #5b6785;
  font-size: 0.8rem;
}

.bill-card-tip {
  position: absolute;
  z-index: 3;
  left: 0.45rem;
  right: 0.45rem;
  top: 0.45rem;
  max-height: 14rem;
  overflow: auto;
  padding: 0.55rem 0.65rem 0.6rem;
  background: #182541;
  color: #f8fafc;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(24, 37, 65, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.bill-card-tip p {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  line-height: 1.35;
}

.bill-card-tip p:last-child {
  margin-bottom: 0;
}

.bill-card-tip .meta {
  color: #c5d0e8;
  font-size: 0.8rem;
}

.bill-card-face:hover + .bill-card-tip,
.bill-card-face:focus-visible + .bill-card-tip {
  opacity: 1;
  transform: none;
}

.bill-card:has(.bill-card-expand[open]) .bill-card-tip {
  display: none;
}

.bill-card-expand {
  margin: 0;
  border: 0;
  border-top: 1px solid #e5e9f2;
  border-radius: 0 0 8px 8px;
  padding: 0;
  background: transparent;
}

.bill-card-expand > summary {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.28rem 0 0.35rem;
  font-weight: 400;
}

.bill-card-expand > summary::-webkit-details-marker {
  display: none;
}

.bill-card-expand .leaf {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #1a4f8b;
}

.bill-card-expand[open] .leaf {
  border-top-color: transparent;
  border-bottom: 7px solid #1a4f8b;
}

.bill-graph-panel {
  padding: 0.35rem 0.8rem 0.85rem;
  border-top: 1px solid #e5e9f2;
  background: #f8fafc;
  max-height: 28rem;
  overflow: auto;
}

.bill-graph {
  font-size: 0.9rem;
  overflow-x: hidden;
}

.bill-graph ul {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0 0 0 1.15rem;
  border-left: 2px solid #c5d0e4;
}

.bill-graph > ul {
  padding-left: 0;
  border-left: 0;
  margin-top: 0;
}

.bill-graph li {
  position: relative;
  margin: 0.3rem 0;
  min-width: 0;
}

.bill-graph li > ul {
  margin-left: 0.35rem;
}

.bill-graph li::before {
  content: "";
  position: absolute;
  left: -1.15rem;
  top: 0.85rem;
  width: 1.05rem;
  border-top: 2px solid #c5d0e4;
}

.bill-graph > ul > li::before {
  content: none;
}

.graph-node {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  max-width: 100%;
  width: fit-content;
  padding: 0.28rem 0.55rem;
  background: #fff;
  border: 1px solid #d7dbe8;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  line-height: 1.3;
}

.graph-node:hover {
  background: #f3f5fb;
}

.graph-node .kind {
  flex: 0 0 auto;
  font-weight: 700;
  color: #1a4f8b;
}

.graph-node .name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a2a4a;
}

.graph-node.act {
  background: #e8f4ea;
  border-color: #1f7a46;
}

.graph-node.act .kind {
  color: #14532d;
}

.graph-node.regulation {
  background: #eef2ff;
  border-color: #c7d2fe;
}

@media (max-width: 1100px) {
  .bill-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bill-cards {
    grid-template-columns: 1fr;
  }
}

.section-note {
  margin: 0.85rem 0 1.2rem;
  background: #f8fafc;
}

.section-note ul {
  margin: 0.35rem 0 0.7rem 1.1rem;
}

.graph-panel {
  background: #f3f5fb;
  border: 1px solid #d7dbe8;
  border-radius: 8px;
  padding: 1rem 1.1rem 1.2rem;
}

.graph-panel h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.graph-panel h3 {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.graph-panel .meta {
  color: #5b6785;
  font-size: 0.85rem;
}

.unresolved {
  color: #6b7280;
  border-bottom: 1px dotted #9ca3af;
}

li.enacted {
  background: #e8f4ea;
  border-left: 4px solid #1f7a46;
  padding: 0.35rem 0.65rem;
  margin: 0.35rem 0;
  list-style: none;
}

li.enacted .badge {
  display: inline-block;
  margin-left: 0.35rem;
  color: #14532d;
  font-weight: 650;
  font-size: 0.85rem;
}

table.bills-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0.75rem 0 0;
}

.bills-table th,
.bills-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid #d7dbe8;
}

.bills-table th {
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5675;
}

.bills-table tr.enacted {
  background: #e8f4ea;
}

.bills-table tr.enacted td:first-child {
  box-shadow: inset 4px 0 0 #1f7a46;
}

table.bill-history {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.bill-history th,
.bill-history td {
  text-align: left;
  vertical-align: top;
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid #d7dbe8;
}

.bill-history td:first-child {
  white-space: nowrap;
  width: 7rem;
}

details {
  margin: 0.6rem 0;
  border: 1px solid #d7dbe8;
  border-radius: 6px;
  padding: 0.35rem 0.7rem 0.55rem;
  background: #fff;
}

details summary {
  cursor: pointer;
  font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  font-weight: 650;
  color: #182541;
}

pre.bill-source {
  white-space: pre-wrap;
  font-size: 0.88rem;
  line-height: 1.45;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  overflow-x: auto;
}

iframe.source,
iframe.pdf {
  width: 100%;
  min-height: 70vh;
  border: 1px solid #d7dbe8;
  background: #fff;
}

form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 28rem;
}

.session-picker {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.session-picker label {
  max-width: 24rem;
}

.session-picker select {
  font: inherit;
  padding: 0.4rem 0.55rem;
  min-width: 18rem;
}

form input[type="search"] {
  font: inherit;
  padding: 0.45rem 0.6rem;
}

@media (max-width: 960px) {
  .document-layout {
    grid-template-columns: 1fr;
  }
}
