:root {
  --bg: #eef1f4;
  --paper: #fafbfd;
  --paper-strong: #ffffff;
  --ink: #1c2128;
  --muted: #626b75;
  --line: #d7dce2;
  --accent: #39424d;
  --accent-soft: #eceff3;
  --good: #2b3138;
  --warn: #4d5661;
  --bad: #6a717a;
  --shadow: 0 12px 36px rgba(20, 24, 30, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(57, 66, 77, 0.12), transparent 28rem),
    linear-gradient(180deg, #e3e7ec 0%, var(--bg) 16rem);
  color: var(--ink);
  font-family: "Libre Franklin", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Source Serif 4", serif;
  line-height: 1.15;
}

.page-shell {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 1.25rem 0 1rem;
}

.brand {
  display: inline-flex;
  gap: 0.9rem;
  align-items: center;
  color: inherit;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.mission-note,
.cell-note,
.hero-copy,
.eyebrow {
  color: var(--muted);
}

.mission-note {
  max-width: 42rem;
  margin-top: 0.9rem;
}

.hero-card,
.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 220, 226, 0.96);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 1fr);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.hero-card h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 2.5vw, 3rem);
}

.hero-copy {
  max-width: 42rem;
  font-size: 1.02rem;
}

.eyebrow {
  margin-bottom: 0.55rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stats-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.detail-status-card {
  padding: 1rem;
  border-radius: 1rem;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.8rem;
  font-family: "Source Serif 4", serif;
}

.panel {
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.jurisdiction-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  margin-bottom: 1rem;
}

.jurisdiction-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.jurisdiction-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.coverage-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.coverage-live {
  color: var(--good);
  background: rgba(43, 49, 56, 0.08);
}

.coverage-planned {
  color: var(--accent);
  background: rgba(57, 66, 77, 0.08);
}

.coverage-high {
  color: var(--good);
  background: rgba(43, 49, 56, 0.08);
}

.coverage-medium {
  color: var(--warn);
  background: rgba(77, 86, 97, 0.1);
}

.coverage-low,
.coverage-review {
  color: var(--bad);
  background: rgba(106, 113, 122, 0.1);
}

.jurisdiction-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.jurisdiction-stats div {
  padding-top: 0.2rem;
}

.jurisdiction-stats dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.jurisdiction-stats dd {
  margin: 0.2rem 0 0;
  font-family: "Source Serif 4", serif;
  font-size: 1.2rem;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #f8fbfc;
  font-weight: 600;
}

.primary-link:hover {
  text-decoration: none;
}

.card-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.relationship-list {
  display: grid;
  gap: 0.9rem;
}

.relationship-card {
  padding: 1rem;
  border-radius: 1rem;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.relationship-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.relationship-summary {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.relationship-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact-list {
  margin-top: 0.6rem;
}

.filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: 11rem minmax(14rem, 1fr) 12rem 11rem;
  align-items: end;
}

.filters label span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.filters input,
.filters select,
.filters button {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--paper-strong);
  color: var(--ink);
  font: inherit;
}

.filters input,
.filters select {
  padding: 0.65rem 0.8rem;
}

.filters button {
  cursor: pointer;
  border-color: var(--accent);
  background: var(--accent);
  color: #f8fbfc;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

.bill-table {
  width: 100%;
  border-collapse: collapse;
}

.bill-table th,
.bill-table td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.bill-table th {
  text-align: left;
  font-size: 0.88rem;
  color: var(--muted);
}

.updated-column {
  width: 8.5rem;
  min-width: 8.5rem;
  white-space: nowrap;
}

.bill-link {
  font-weight: 700;
}

.title-cell strong,
.title-cell small {
  display: block;
}

.title-cell small {
  margin-top: 0.28rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.15;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.status-active {
  color: var(--warn);
  background: rgba(77, 86, 97, 0.1);
}

.status-passed {
  color: var(--good);
  background: rgba(43, 49, 56, 0.08);
}

.status-failed,
.status-replaced {
  color: var(--bad);
  background: rgba(106, 113, 122, 0.1);
}

.empty-state {
  padding: 1rem 0.1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
}

.detail-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 1fr);
}

.mini-meta,
.meta-list,
.term-list {
  display: grid;
  gap: 0.7rem;
}

.mini-meta div,
.meta-list div,
.term-list div {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.mini-meta dt,
.meta-list dt,
.term-list dt {
  font-size: 0.85rem;
  color: var(--muted);
}

.mini-meta dd,
.meta-list dd,
.term-list dd {
  margin: 0.2rem 0 0;
}

.summary-callout {
  padding: 1rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0.9rem;
}

.simple-list,
.link-list {
  padding-left: 1.1rem;
}

.timeline {
  margin: 0;
  padding-left: 1.4rem;
}

.timeline li + li {
  margin-top: 1rem;
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline span {
  color: var(--muted);
  font-size: 0.9rem;
}

.document-text {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin: 0;
  max-height: 46rem;
  overflow: auto;
  padding: 1rem;
  border-radius: 0.9rem;
  background: #f4f6f8;
  border: 1px solid var(--line);
  font-family: "Source Serif 4", serif;
  line-height: 1.5;
}

details > summary {
  cursor: pointer;
  margin-bottom: 0.85rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .hero-card,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }
}
