* { box-sizing: border-box; }

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color-scheme: light dark;
}

body { margin: 0; }
button, input { font: inherit; }

main {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 5rem;
}

.hero { max-width: 58rem; margin-bottom: 3rem; }

.skip-link {
  position: absolute;
  top: .5rem;
  left: .5rem;
  transform: translateY(-200%);
  background: Canvas;
  color: CanvasText;
  border: 2px solid currentColor;
  padding: .65rem .8rem;
  z-index: 10;
}

.skip-link:focus { transform: none; }

.eyebrow,
.section-kicker {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 750;
  margin-bottom: .35rem;
}

h1 {
  margin: .25rem 0 1rem;
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}

h2 {
  margin: .2rem 0 .75rem;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.1;
}

h3 { margin: 1.8rem 0 .6rem; }
p { max-width: 62ch; }

.lede { font-size: 1.18rem; max-width: 50rem; }

.prototype-strip,
.warning,
.freshness {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  border: 1px solid currentColor;
  border-radius: .65rem;
  padding: .85rem 1rem;
  margin-top: 1.25rem;
}

.prototype-strip { align-items: baseline; }
.prototype-strip span, .field-help { opacity: .75; }

.warning {
  display: block;
  border-style: dashed;
  max-width: 55rem;
}

.tool-shell {
  border: 1px solid currentColor;
  border-radius: .9rem;
  padding: clamp(1rem, 3vw, 2rem);
}

.tool-intro { max-width: 48rem; }

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

.controls label {
  display: grid;
  gap: .45rem;
  font-weight: 700;
}

.lookup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
}

.controls input,
.controls button,
.lookup-result,
.examples button {
  min-height: 2.9rem;
  border: 1px solid currentColor;
  border-radius: .45rem;
  padding: .6rem .75rem;
}

.controls input { width: 100%; }

.controls button,
.lookup-result,
.examples button {
  cursor: pointer;
  background: Canvas;
  color: CanvasText;
}

.controls button { font-weight: 750; }

.field-help {
  font-size: .82rem;
  font-weight: 450;
}

.lookup-results {
  display: grid;
  gap: .5rem;
  margin: .75rem 0;
}

.lookup-result {
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.lookup-result span { opacity: .75; }

.empty-state {
  margin: .5rem 0;
  padding: .8rem 0;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin: 1rem 0;
}

.examples > span { font-size: .9rem; opacity: .8; }
.examples button { min-height: 2.3rem; padding: .35rem .6rem; }

.load-status { min-height: 1.5rem; opacity: .78; }

.status-card {
  border-top: 1px solid currentColor;
  margin-top: 1.5rem;
  padding-top: 2rem;
}

.result-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.result-heading h2 { margin-top: 0; }

.status-badge {
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: .35rem .7rem;
  font-weight: 800;
  white-space: nowrap;
}

.freshness {
  margin: 1rem 0 1.5rem;
  font-size: .92rem;
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: .65rem 1rem;
  margin: 1.5rem 0;
}

.status-grid dt { font-weight: 750; }
.status-grid dd { margin: 0; overflow-wrap: anywhere; }

.event {
  border-left: .25rem solid currentColor;
  padding: .15rem 0 .15rem 1rem;
  margin: 1.4rem 0;
}

.event p { margin: .3rem 0; }
.event-next { border-left-style: double; border-left-width: .35rem; }

.evidence-list,
.guardrail-list { padding-left: 1.25rem; }

.evidence-list li,
.guardrail-list li { margin: .45rem 0; }

.guardrails {
  margin-top: 1.5rem;
  border-top: 1px solid currentColor;
  padding-top: 1rem;
}

.guardrails summary { cursor: pointer; font-weight: 750; }

.how-it-works {
  max-width: 58rem;
  margin-top: 3rem;
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: .75rem;
}

.steps li {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) 2fr;
  gap: 1rem;
  border-top: 1px solid currentColor;
  padding-top: .75rem;
}

.steps span { opacity: .78; }
.boundary-copy { margin-top: 1.5rem; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: .2rem solid currentColor;
  outline-offset: .2rem;
}

@media (max-width: 46rem) {
  main {
    width: min(100% - 1.25rem, 72rem);
    padding: 2rem 0 3rem;
  }

  .controls,
  .lookup-row,
  .status-grid,
  .steps li {
    grid-template-columns: 1fr;
  }

  .result-heading,
  .lookup-result {
    display: grid;
  }

  .status-badge { white-space: normal; }
}


.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  margin-top: 1.4rem;
}

.section-nav a {
  display: inline-block;
  border-bottom: 1px solid currentColor;
  padding: .25rem 0;
  font-weight: 700;
}

.act-context {
  margin-top: 3rem;
  border: 1px solid currentColor;
  border-radius: .9rem;
  padding: clamp(1rem, 3vw, 2rem);
}

.act-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.formal-citation {
  margin: .25rem 0 0;
  font-size: 1.05rem;
  opacity: .8;
}

.act-freshness { margin-bottom: 1.75rem; }

.act-summary {
  max-width: 60rem;
  margin-bottom: 1.75rem;
}

.act-summary h3 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  margin-top: .15rem;
}

.act-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin: 0 0 2.25rem;
}

.act-facts > div {
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: .9rem 1rem;
}

.act-facts dt {
  font-weight: 800;
  margin-bottom: .35rem;
}

.act-facts dd { margin: 0; }

.act-section {
  border-top: 1px solid currentColor;
  padding-top: 1.6rem;
  margin-top: 2rem;
}

.act-section h3 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  margin-top: .15rem;
}

.section-intro { max-width: 52rem; }

.legal-lineage,
.lifecycle-timeline,
.dependency-chain {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}

.legal-lineage {
  display: grid;
  gap: .75rem;
  max-width: 48rem;
}

.legal-lineage li {
  display: grid;
  gap: .45rem;
}

.lineage-node {
  display: grid;
  gap: .35rem;
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: .9rem 1rem;
}

.lineage-node a { width: fit-content; }

.lineage-current { border-width: 2px; }

.relation-label {
  font-weight: 800;
  font-size: .9rem;
  padding-left: .25rem;
}

.bounded-unknown {
  border-left: .25rem solid currentColor;
  padding-left: .9rem;
  max-width: 52rem;
}

.lifecycle-timeline {
  display: grid;
  gap: 0;
  max-width: 58rem;
}

.lifecycle-timeline li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: .9rem 0 .9rem 1.2rem;
  border-left: .2rem solid currentColor;
  position: relative;
}

.lifecycle-timeline li::before {
  content: "";
  position: absolute;
  width: .55rem;
  height: .55rem;
  border: .15rem solid currentColor;
  border-radius: 50%;
  left: -.45rem;
  top: 1.25rem;
  background: Canvas;
}

.lifecycle-timeline time {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lifecycle-timeline div {
  display: grid;
  gap: .2rem;
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin-top: 1.25rem;
}

.context-card {
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: 1rem;
}

.context-card h4 {
  margin: .15rem 0 .55rem;
  font-size: 1.1rem;
}

.context-card p { margin: .35rem 0 .8rem; }

.relationship-type {
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: .74rem;
  font-weight: 800;
  opacity: .75;
}

.dependency-chain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.25rem;
}

.dependency-chain li {
  display: grid;
  gap: .35rem;
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: .9rem 1rem;
  position: relative;
}

.dependency-chain li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -.72rem;
  top: 50%;
  transform: translateY(-50%);
  background: Canvas;
  padding: 0 .15rem;
  font-weight: 800;
}

.downstream-examples {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
}

.downstream-examples p {
  flex-basis: 100%;
  margin-bottom: .15rem;
}

.downstream-examples button {
  min-height: 2.7rem;
  border: 1px solid currentColor;
  border-radius: .45rem;
  padding: .55rem .75rem;
  background: Canvas;
  color: CanvasText;
  cursor: pointer;
  text-align: left;
}

.evidence-details {
  margin-top: 1rem;
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: .8rem 1rem;
}

.evidence-details summary {
  cursor: pointer;
  font-weight: 800;
}

.evidence-metadata {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) 1fr;
  gap: .75rem 1rem;
  margin-bottom: .25rem;
}

.evidence-metadata dt { font-weight: 800; }
.evidence-metadata dd { margin: 0; }

.coverage-note {
  margin-top: 2rem;
  border: 1px dashed currentColor;
  border-radius: .6rem;
  padding: .9rem 1rem;
  max-width: 60rem;
}

.governing-act-link {
  margin: 1.5rem 0 0;
  font-weight: 800;
}

@media (max-width: 46rem) {
  .act-header,
  .act-facts,
  .context-grid,
  .dependency-chain,
  .evidence-metadata {
    grid-template-columns: 1fr;
  }

  .act-header {
    display: grid;
  }

  .lifecycle-timeline li {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .dependency-chain li:not(:last-child)::after {
    content: "↓";
    right: auto;
    left: 1rem;
    top: auto;
    bottom: -.85rem;
    transform: none;
  }
}


.act-freshness {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}

.act-freshness > div {
  display: grid;
  gap: .15rem;
}

.act-freshness > div span {
  font-variant-numeric: tabular-nums;
}

.act-freshness > p {
  grid-column: 1 / -1;
  margin: .2rem 0 0;
}

.applicability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.25rem 0;
}

.applicability-grid > div {
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: .9rem 1rem;
}

.applicability-grid dt {
  font-weight: 800;
  margin-bottom: .35rem;
}

.applicability-grid dd {
  margin: 0;
}

.scope-details {
  margin-top: .8rem;
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: .8rem 1rem;
}

.scope-details summary {
  cursor: pointer;
  font-weight: 800;
}

.scope-list {
  columns: 2;
  column-gap: 2rem;
  padding-left: 1.2rem;
}

.scope-list li {
  break-inside: avoid;
  margin-bottom: .45rem;
}

.actor-grid,
.dependency-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.actor-grid article,
.dependency-card {
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: .9rem 1rem;
}

.actor-grid h4,
.dependency-card h4 {
  margin: .2rem 0 .55rem;
  font-size: 1.05rem;
}

.actor-grid p,
.dependency-card p {
  margin: .35rem 0 .75rem;
}

.source-context {
  font-size: .92rem;
  opacity: .84;
}

.secondary-route {
  border-left: .25rem solid currentColor;
  padding-left: .9rem;
  max-width: 58rem;
}

.coverage-note a {
  font-weight: 700;
}

@media (max-width: 46rem) {
  .act-freshness,
  .applicability-grid,
  .actor-grid,
  .dependency-cards {
    grid-template-columns: 1fr;
  }

  .scope-list {
    columns: 1;
  }
}


/* P5 relationship/readability repairs */

.detail-cue {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  margin-top: .55rem;
  padding: .2rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: CanvasText;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.scope-details summary,
.evidence-details summary,
.guardrails summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}

.lineage-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: .65rem;
  margin: 1.25rem 0;
}

.lineage-path .lineage-node {
  height: 100%;
}

.lineage-edge {
  align-self: center;
  display: grid;
  justify-items: center;
  gap: .1rem;
  min-width: 5.5rem;
  font-size: .86rem;
  font-weight: 800;
  text-align: center;
}

.lineage-edge span:last-child {
  font-size: 1.35rem;
  line-height: 1;
}

.relation-ledger {
  margin-top: 1.25rem;
  border-top: 1px solid currentColor;
}

.relation-row {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr) minmax(8rem, auto);
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid currentColor;
}

.relation-kind {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.relation-body h4 {
  margin: 0 0 .35rem;
  font-size: 1.08rem;
}

.relation-body p {
  margin: 0;
}

.relation-source {
  justify-self: end;
  font-weight: 700;
}

.operative-routes {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.operative-route {
  border-top: 1px solid currentColor;
  padding-top: 1rem;
}

.dependency-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr);
  gap: .7rem;
  align-items: stretch;
}

.dependency-node {
  display: grid;
  align-content: center;
  gap: .3rem;
  border: 1px solid currentColor;
  border-radius: .6rem;
  padding: .85rem 1rem;
}

.node-role {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .72;
}

.dependency-edge {
  align-self: center;
  display: grid;
  justify-items: center;
  min-width: 7rem;
  gap: .05rem;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}

.dependency-edge span:last-child {
  font-size: 1.35rem;
  line-height: 1;
}

.dependency-explanation {
  max-width: 58rem;
  margin: .75rem 0 0;
  padding-left: 1rem;
  border-left: .2rem solid currentColor;
}

.dependency-explanation p {
  margin: .35rem 0;
}

@media (max-width: 58rem) {
  .lineage-path {
    grid-template-columns: 1fr;
  }

  .lineage-edge {
    min-width: 0;
    justify-items: start;
    padding-left: 1rem;
  }

  .lineage-edge span:last-child {
    transform: rotate(90deg);
    transform-origin: center;
  }

  .relation-row {
    grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
  }

  .relation-source {
    grid-column: 2;
    justify-self: start;
  }

  .dependency-path {
    grid-template-columns: 1fr;
  }

  .dependency-edge {
    min-width: 0;
    justify-items: start;
    padding-left: 1rem;
  }

  .dependency-edge span:last-child {
    transform: rotate(90deg);
    transform-origin: center;
  }
}

@media (max-width: 46rem) {
  .relation-row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .relation-source {
    grid-column: 1;
  }
}


.lineage-node,
.relation-body,
.relation-source,
.dependency-node,
.dependency-explanation,
.applicability-grid dd {
  overflow-wrap: anywhere;
}
