:root {
  --ink: #172033;
  --muted: #5f6b7a;
  --line: #d8dee8;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --soft-blue: #eaf4fb;
  --blue: #1d6fb8;
  --navy: #16365f;
  --green: #2f7d57;
  --green-soft: #e8f4ef;
  --amber: #a96516;
  --amber-soft: #fff3df;
  --red: #a43d3f;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 74px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 260px;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 100%;
}

.primary-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.9rem;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--navy);
  background: var(--soft-blue);
}

.searchbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 14px;
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr);
  gap: 10px;
  align-items: start;
  position: relative;
}

.searchbar label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding-top: 11px;
}

.searchbar input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.searchbar input:focus {
  outline: 3px solid rgba(29, 111, 184, 0.18);
  border-color: var(--blue);
}

.search-results {
  grid-column: 2;
  display: none;
  position: absolute;
  left: 174px;
  right: 24px;
  top: 50px;
  max-height: 360px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-results.open {
  display: block;
}

.search-result {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result strong {
  display: block;
  color: var(--navy);
}

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

.search-result small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.search-result em {
  display: inline-flex;
  margin-top: 7px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
}

.search-status {
  background: var(--soft-blue);
}

.study-strip {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 12px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.study-strip strong {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.study-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-strip a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.study-strip a:hover {
  background: var(--soft-blue);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 24px 72px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: end;
  padding: 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel > *,
.method-strip > *,
.law-ledger > *,
.portal-card,
.state-card,
.matrix-card,
.signal-card {
  min-width: 0;
}

.hero-panel h1 {
  max-width: 850px;
  margin: 8px 0 14px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 4.3rem);
  line-height: 1.02;
}

.hero-panel p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.eyebrow,
.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-proof {
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  padding: 18px;
  border-radius: 8px;
}

.hero-proof strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
}

.hero-proof p {
  font-size: 0.95rem;
}

.method-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.method-strip div {
  background: var(--surface);
  padding: 18px;
}

.method-strip strong,
.method-strip span {
  display: block;
}

.method-strip span {
  color: var(--muted);
  margin-top: 5px;
}

.section-wrap,
.guided-reading,
.law-ledger,
.content-block,
.matrix-section,
.continuity,
.signal-panel,
.legal-chapters {
  margin-top: 28px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 16px;
}

.section-heading h2,
.guided-reading h2,
.content-block h2,
.matrix-section h2,
.continuity h2,
.law-ledger h2,
.legal-chapters h2 {
  margin: 6px 0 8px;
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1.18;
}

.section-heading p,
.content-block p,
.law-ledger p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portal-card,
.state-card,
.matrix-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

a.portal-card,
a.state-card {
  display: block;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

a.portal-card:hover,
a.state-card:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 111, 184, 0.5);
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.12);
}

.portal-card.featured,
.state-card.featured {
  border-color: rgba(47, 125, 87, 0.45);
  background: linear-gradient(180deg, var(--surface), var(--green-soft));
}

.portal-card h3,
.state-card h3,
.matrix-card h3 {
  margin: 8px 0 10px;
  color: var(--navy);
  font-size: 1.18rem;
  line-height: 1.22;
}

.portal-card p,
.state-card p,
.matrix-card p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.portal-card small,
.state-card small {
  display: block;
  margin-top: 14px;
  color: var(--green);
  font-weight: 800;
}

.state-expansion-queue {
  display: grid;
  gap: 22px;
}

.state-queue-region {
  display: grid;
  gap: 12px;
}

.state-queue-region h3 {
  margin: 0;
  color: var(--navy);
}

.state-queue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.state-queue-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--surface);
}

.state-queue-card.is-ready {
  border-left-color: var(--green);
}

.state-queue-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.state-queue-head .state-symbol {
  min-height: 54px;
}

.state-queue-head .state-symbol img {
  width: 54px;
  height: 38px;
}

.state-queue-head strong,
.state-queue-head span {
  display: block;
}

.state-queue-head strong {
  color: var(--navy);
}

.state-queue-head span,
.state-queue-card p {
  color: var(--muted);
}

.state-queue-card p {
  margin: 0;
}

.state-queue-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.state-queue-links a,
.state-queue-links span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--paper);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.review-notice {
  border-left: 4px solid var(--amber);
}

.review-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid rgba(180, 83, 9, 0.35);
  border-radius: 6px;
  color: #92400e;
  background: #fff7ed;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.review-pill.approved {
  border-color: rgba(4, 120, 87, 0.28);
  background: #ecfdf5;
  color: #047857;
}

.review-pill.danger {
  border-color: rgba(185, 28, 28, 0.28);
  background: #fef2f2;
  color: #b91c1c;
}

.benefit-cross-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.benefit-cross-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.benefit-cross-card h3,
.benefit-cross-card p {
  margin: 0;
}

.benefit-cross-card p,
.benefit-cross-card dd {
  color: var(--muted);
}

.benefit-cross-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 12px;
}

.benefit-cross-card dt {
  font-weight: 850;
  color: var(--accent-dark);
}

.benefit-cross-card dd {
  margin: 0;
}

.law-excerpt {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.law-excerpt summary {
  cursor: pointer;
  font-weight: 850;
  color: var(--navy);
}

.law-excerpt p {
  margin: 10px 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mini-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-link-list a,
.mini-link-list span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--ink);
  background: #f8fafc;
  font-weight: 750;
  text-decoration: none;
}

.source-warning {
  border-left: 3px solid #b45309;
  padding-left: 10px;
  color: #92400e;
}

.source-audit-list,
.source-audit-docs {
  display: grid;
  gap: 12px;
}

.source-audit-state {
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.source-audit-state summary {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  color: var(--navy);
}

.source-audit-state summary span {
  color: var(--muted);
  font-size: 0.9rem;
}

.source-audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}

.source-audit-actions a {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--paper);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.source-audit-docs {
  padding: 0 16px 16px;
}

.source-audit-doc {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.source-audit-doc strong,
.source-audit-doc span,
.source-audit-doc small {
  display: block;
}

.source-audit-doc p,
.source-audit-doc small,
.source-audit-doc span {
  margin: 0;
  color: var(--muted);
}

.states-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.region-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.region-jump a,
.region-heading a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: var(--surface);
  font-weight: 800;
  text-decoration: none;
}

.region-block {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.region-block:first-of-type {
  border-top: 0;
  padding-top: 8px;
}

.region-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.region-heading h3 {
  margin: 4px 0 8px;
  color: var(--navy);
  font-size: 1.38rem;
}

.region-heading p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
}

.state-symbol {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.state-symbol img {
  width: 62px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 5px 14px rgba(23, 32, 51, 0.08);
}

.state-card strong {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: var(--soft-blue);
}

.guided-reading {
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.timeline a {
  display: block;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  text-decoration: none;
  background: var(--paper);
}

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

.timeline span {
  color: var(--muted);
  margin-top: 5px;
  font-size: 0.95rem;
}

.law-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.law-ledger > div,
.source-badge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.source-badge {
  border-left: 4px solid var(--blue);
}

.source-badge span,
.source-badge strong {
  display: block;
}

.source-badge span {
  color: var(--muted);
}

.source-badge strong {
  margin-top: 6px;
  color: var(--blue);
}

.source-list {
  margin: 0;
  padding-left: 18px;
}

.source-list li {
  margin: 6px 0;
}

.source-list a {
  color: var(--blue);
  font-weight: 650;
  word-break: break-word;
}

.source-status {
  color: var(--amber);
  font-weight: 750;
}

.content-block {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.signal-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.signal-card:hover,
.signal-card:focus {
  border-color: rgba(177, 99, 12, 0.45);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.signal-card strong,
.signal-card span,
.signal-card small {
  display: block;
}

.signal-card strong {
  color: var(--navy);
  line-height: 1.18;
}

.signal-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.signal-card small {
  margin-top: 10px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-study-list,
.topic-index {
  display: grid;
  gap: 16px;
}

.benefit-sector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.benefit-sector-card {
  display: grid;
  gap: 8px;
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.benefit-sector-card:hover,
.benefit-sector-card:focus {
  border-color: rgba(47, 125, 87, 0.45);
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.10);
  transform: translateY(-1px);
}

.benefit-sector-card span {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.benefit-sector-card strong {
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.2;
}

.benefit-sector-card small {
  color: var(--muted);
  line-height: 1.35;
}

.benefit-sector-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.benefit-sector {
  scroll-margin-top: 108px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
}

.benefit-sector:target {
  outline: 3px solid rgba(47, 125, 87, 0.22);
  outline-offset: 3px;
}

.benefit-sector-heading span {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.benefit-sector-heading h3 {
  margin: 5px 0 8px;
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1.18;
}

.benefit-sector-heading p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
}

.benefit-sector-rules {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.benefit-sector-rules dt {
  color: var(--navy);
  font-weight: 850;
}

.benefit-sector-rules dd {
  margin: 0;
  color: var(--ink);
}

.signal-study {
  scroll-margin-top: 96px;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
}

.signal-study:target,
.article-subunit:target {
  outline: 3px solid rgba(177, 99, 12, 0.22);
  outline-offset: 3px;
}

.signal-study h3 {
  margin: 4px 0 8px;
  color: var(--navy);
}

.signal-study p {
  margin: 0;
  color: var(--muted);
}

.signal-study-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.signal-study-grid dt {
  color: var(--navy);
  font-weight: 850;
}

.signal-study-grid dd {
  margin: 0;
  color: var(--ink);
}

.signal-law-links {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.signal-law-links strong {
  color: var(--navy);
}

.signal-law-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-law-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--soft-blue);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.topic-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.topic-index-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.topic-index-group h3 {
  margin: 0 0 8px;
  color: var(--navy);
}

.topic-index-group p {
  margin: 0 0 12px;
  color: var(--muted);
}

.topic-index-group div {
  display: grid;
  gap: 8px;
}

.topic-index-group a {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--soft-blue);
  text-decoration: none;
}

.topic-index-group a span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.study-path {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.study-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.study-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.study-step:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 111, 184, 0.45);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.09);
}

.study-step > span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--navy);
  font-weight: 850;
  font-size: 0.82rem;
}

.study-step strong {
  color: var(--navy);
  line-height: 1.25;
}

.study-step small {
  color: var(--muted);
  line-height: 1.35;
}

.chapter-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.chapter-flow a {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(169, 101, 22, 0.25);
  border-radius: 8px;
  background: var(--amber-soft);
  color: inherit;
  text-decoration: none;
}

.chapter-flow span {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.chapter-flow strong {
  color: var(--navy);
  line-height: 1.25;
}

.chapter-flow small {
  color: var(--muted);
  line-height: 1.35;
}

.signals-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 750;
}

.signal-chip.quiet {
  color: var(--muted);
  background: #eef2f7;
}

.inventory-table p {
  max-width: 850px;
}

.doc-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.doc-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.doc-table th,
.doc-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  position: sticky;
  top: 0;
  background: var(--soft-blue);
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.doc-table td:first-child {
  width: 260px;
}

.doc-table td:nth-child(4) {
  white-space: nowrap;
}

.doc-table strong,
.doc-table span {
  display: block;
}

.doc-table td:first-child span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.doc-table a {
  color: var(--blue);
  font-weight: 750;
}

.ncm-benefits-table {
  min-width: 1560px;
}

.ncm-benefits-table td:nth-child(4),
.ncm-benefits-table td:nth-child(5),
.ncm-benefits-table td:nth-child(7) {
  max-width: 340px;
  white-space: normal;
}

.ncm-benefits-table td {
  overflow-wrap: anywhere;
}

.law-chapter-list {
  display: grid;
  gap: 16px;
}

.law-chapter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.law-chapter h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.22rem;
}

.law-chapter > p {
  margin: 0 0 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.law-quotes {
  display: grid;
  gap: 10px;
}

.law-quote {
  margin: 0;
  padding: 16px 18px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--soft-blue);
}

.law-quote p {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.law-quote cite {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  font-size: 0.82rem;
}

.legal-hero {
  align-items: stretch;
}

.legal-continuity p {
  margin: 0 0 14px;
  color: var(--muted);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.source-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  min-height: 150px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-card:hover {
  border-color: rgba(29, 111, 184, 0.45);
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08);
}

.source-card span {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.source-card strong {
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.25;
}

.source-card small {
  color: var(--muted);
}

.law-reader-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  margin-top: 28px;
  align-items: start;
}

.law-sidebar {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.law-sidebar strong {
  margin-top: 8px;
  color: var(--navy);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.law-sidebar strong:first-child {
  margin-top: 0;
}

.law-sidebar a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.law-sidebar a span {
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.4;
}

.law-sidebar a:hover,
.law-sidebar a.active {
  color: var(--navy);
  background: var(--soft-blue);
}

.law-reader-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.legal-document,
.analysis-panel {
  max-width: 100%;
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.document-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 18px;
  align-items: start;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.document-heading > div {
  min-width: 0;
}

.document-heading h2,
.analysis-panel h2 {
  margin: 4px 0 8px;
  color: var(--navy);
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.document-heading p,
.analysis-panel p {
  margin: 0 0 10px;
  color: var(--muted);
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.document-actions a,
.document-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--soft-blue);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.article-block {
  margin-top: 14px;
  padding: 16px;
  background: #fffdf8;
  border: 1px solid #eadfce;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
}

.article-number {
  margin-bottom: 10px;
  color: var(--amber);
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: uppercase;
}

.article-text {
  color: #253047;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.article-caput {
  margin-top: 12px;
}

.article-context-note {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  margin: 8px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 125, 87, 0.24);
  border-radius: 8px;
  background: var(--green-soft);
}

.article-context-note strong {
  color: var(--green);
}

.article-context-note span {
  color: var(--ink);
}

.article-index {
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.article-index strong {
  display: block;
  color: var(--navy);
  font-size: 0.92rem;
  text-transform: uppercase;
}

.article-index p {
  margin: 6px 0 12px;
  color: var(--muted);
}

.article-index-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.article-index-links.compact {
  display: flex;
  flex-wrap: wrap;
}

.article-index-links a,
.article-index-missing {
  display: grid;
  gap: 3px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--navy);
  text-decoration: none;
}

.article-index-links.compact a,
.article-index-links.compact .article-index-missing {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
}

.article-index-links a span,
.article-index-missing span {
  font-weight: 850;
}

.article-index-links a small,
.article-index-missing small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.article-index-missing {
  color: var(--muted);
  background: #f3f4f6;
}

.article-index-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.article-subunits {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.article-subunit {
  scroll-margin-top: 96px;
  padding: 12px 14px;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: #fffaf1;
}

.article-subunit-marker {
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.chapter-map {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.chapter-map strong {
  color: var(--navy);
}

.chapter-map div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chapter-map a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--soft-blue);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.law-pre {
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: #253047;
  background: transparent;
  border: 0;
  font: 0.92rem/1.6 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.source-heading {
  margin: 20px 0 8px;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.legal-table-block {
  padding: 0;
  overflow: hidden;
}

.legal-table-block .article-number {
  padding: 14px 16px 0;
}

.law-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.law-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  table-layout: auto;
  border-collapse: collapse;
  color: #253047;
  font-size: 0.84rem;
  line-height: 1.45;
}

.law-table th,
.law-table td {
  vertical-align: top;
  padding: 9px 10px;
  border-top: 1px solid #eadfce;
  border-right: 1px solid #f1e8da;
  min-width: 8rem;
  max-width: 26rem;
  overflow-wrap: break-word;
  word-break: normal;
}

.law-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--navy);
  background: #fff5df;
  font-weight: 850;
  text-align: left;
  white-space: nowrap;
}

.law-table td {
  background: #fffdf8;
}

.law-table td:nth-child(4),
.law-table td:nth-child(5),
.law-table td:nth-child(6) {
  min-width: 18rem;
}

.legal-record-block {
  padding: 0;
  overflow: hidden;
}

.legal-record-block .article-number {
  padding: 14px 16px 0;
}

.record-guide {
  display: grid;
  gap: 10px;
  padding: 10px 16px 0;
}

.record-guide p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.record-guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-guide-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #eadfce;
  border-radius: 6px;
  background: #fff8e9;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-record-list {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.legal-record-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: #fffdf8;
}

.legal-record-card header {
  display: grid;
  gap: 4px;
}

.legal-record-card header span {
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.legal-record-card h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.record-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.record-field {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #f1e8da;
  border-radius: 8px;
  background: #ffffff;
}

.record-field.wide {
  grid-column: 1 / -1;
}

.record-field strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.record-field p {
  margin: 0;
  color: #253047;
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.department-grid.compact {
  margin-top: 16px;
}

.empty-note {
  padding: 14px;
  color: var(--muted);
  background: var(--soft-blue);
  border-radius: 8px;
}

.chapter-application {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(47, 125, 87, 0.25);
  background: var(--green-soft);
}

.chapter-application strong {
  color: var(--green);
}

.chapter-application span {
  color: var(--ink);
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.department-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.department-grid strong,
.department-grid span {
  display: block;
}

.department-grid strong {
  color: var(--navy);
}

.department-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.matrix-card {
  border-top: 4px solid var(--amber);
}

.matrix-card dl {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 14px 0 0;
}

.matrix-card dt {
  color: var(--navy);
  font-weight: 800;
}

.matrix-card dd {
  margin: 0;
  color: var(--muted);
}

.continuity {
  padding: 24px;
  border-radius: 8px;
  background: var(--amber-soft);
  border: 1px solid rgba(169, 101, 22, 0.25);
}

.continuity div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.continuity a {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid rgba(169, 101, 22, 0.25);
  color: var(--navy);
  font-weight: 750;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #111827;
  color: #eef2f7;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.site-footer > div {
  max-width: 560px;
}

.site-footer p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.site-footer a,
.site-footer span {
  display: block;
  color: #d9e8ff;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .topbar,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .hero-panel,
  .law-ledger {
    grid-template-columns: 1fr;
  }

  .method-strip,
  .card-grid,
  .states-grid,
  .timeline,
  .matrix-grid,
  .signal-grid,
  .benefit-sector-grid,
  .benefit-cross-grid,
  .signal-study,
  .topic-index-grid,
  .department-grid,
  .source-grid,
  .state-queue-grid,
  .source-audit-state summary,
  .study-step-grid,
  .chapter-flow {
    grid-template-columns: 1fr 1fr;
  }

  .law-reader-grid {
    grid-template-columns: 1fr;
  }

  .law-sidebar {
    position: static;
  }

  .region-heading {
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .topbar,
  main {
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
    max-width: 100%;
  }

  .searchbar {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }

  .study-strip {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }

  .search-results {
    grid-column: 1;
    left: 16px;
    right: 16px;
    top: 92px;
  }

  .hero-panel {
    padding: 24px;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }

  .hero-panel h1 {
    font-size: 1.7rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
    max-width: calc(100vw - 96px) !important;
  }

  .hero-panel p {
    width: calc(100vw - 96px) !important;
    max-width: calc(100vw - 96px) !important;
  }

  .hero-proof {
    width: 100%;
    max-width: 100%;
  }

  .method-strip,
  .card-grid,
  .states-grid,
  .timeline,
  .matrix-grid,
  .signal-grid,
  .benefit-sector-grid,
  .signal-study,
  .signal-study-grid,
  .benefit-sector-rules,
  .topic-index-grid,
  .article-context-note,
  .article-index-links,
  .department-grid,
  .source-grid,
  .state-queue-grid,
  .study-step-grid,
  .chapter-flow,
  .document-heading {
    grid-template-columns: 1fr;
  }

  .chapter-map {
    align-items: flex-start;
    flex-direction: column;
  }

  .record-fields {
    grid-template-columns: 1fr;
  }

  .document-actions {
    justify-content: flex-start;
  }

  .matrix-card dl {
    grid-template-columns: 1fr;
  }

  .benefit-cross-card dl {
    grid-template-columns: 1fr;
  }

  .chapter-application {
    grid-template-columns: 1fr;
  }

  .primary-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: calc(100vw - 32px);
    max-width: 100%;
  }

  .primary-nav a {
    padding: 8px 6px;
    text-align: center;
    font-size: 0.84rem;
    overflow-wrap: anywhere;
    width: 100%;
  }

  .hero-panel h1,
  .hero-panel p,
  .hero-proof p,
  .method-strip span,
  .section-heading p,
  .content-block p,
  .law-ledger p,
  .source-list,
  .source-list li,
  .source-list a,
  .portal-card p,
  .state-card p,
  .matrix-card p,
  .signal-study p,
  .signal-study-grid dd,
  .topic-index-group p,
  .topic-index-group a span,
  .study-step small,
  .chapter-flow small,
  .article-context-note span,
  .article-index p {
    width: auto;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
  }
}
