.field-actions { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.modal.review-modal { width:min(860px,calc(100vw - 32px)); max-width:860px; }
.review-modal[open] { display:flex; flex-direction:column; max-height:calc(100dvh - 40px); overflow:hidden; }
.review-modal .modal-heading, .review-modal .modal-actions { flex-shrink:0; }
.review-modal .modal-actions { padding-top:16px; border-top:1px solid var(--line); }
#review-content { overflow-y:auto; min-height:0; padding-right:5px; }
.review-context { color:var(--muted); }
.review-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; padding:22px 0; margin:12px 0; border-block:1px solid var(--line); }
.review-metrics strong { display:block; font-size:32px; font-weight:600; letter-spacing:-1px; }
.review-metrics span { display:block; margin-top:5px; font-size:12px; color:var(--muted); }
.review-basis { padding:12px 16px; background:var(--inset); border-radius:10px; font-size:12px; }
.review-list { margin-top:22px; display:grid; }
.review-row { display:block; width:100%; text-align:left; padding:18px 0; background:transparent; border:0; border-top:1px solid var(--line); }
.review-row:hover strong { color:var(--blue); }
.review-row-heading { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.review-row-heading strong { font-size:16px; font-weight:600; text-transform:capitalize; }
.review-row-place, .review-row-step, .review-row-sources { display:block; margin-top:7px; font-size:12px; line-height:1.6; }
.review-row-place { color:var(--muted); }
.review-row-sources { color:var(--blue); }
.review-empty { padding:24px 0; color:var(--muted); }
@media(max-width:600px) {
  .below-field { flex-wrap:wrap; gap:16px; }
  .review-metrics { grid-template-columns:repeat(2,1fr); }
  .review-row-heading { flex-direction:column; gap:8px; }
}
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18251f;
  background: #f7f8f6;
  font-synthesis: none;
  --ink: #18251f;
  --muted: #6e7871;
  --line: #e1e5df;
  --green: #326e50;
  --lime: #e5f779;
  --amber: #a26725;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #6d967b;
  outline-offset: 4px;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
button {
  color: inherit;
}
button,
input,
select {
  font-size: 14px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(36px, 4.1vw, 58px);
  letter-spacing: -2.6px;
  font-weight: 540;
  line-height: 1.04;
}
h2 {
  font-size: 30px;
  letter-spacing: -1.2px;
  font-weight: 550;
  line-height: 1.15;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
  font-weight: 600;
}
.muted {
  color: var(--muted);
  line-height: 1.55;
}
.small {
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1.5px;
}
.skip-link {
  position: fixed;
  top: -70px;
  padding: 15px;
  background: #fff;
  z-index: 100;
}
.skip-link:focus {
  top: 5px;
}
.topbar {
  height: 83px;
  max-width: 1600px;
  margin: auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.brand {
  text-decoration: none;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 650;
}
.brand-separator {
  height: 20px;
  width: 1px;
  background: var(--line);
  margin: 0 8px;
}
.brand-caption {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.topbar nav {
  display: flex;
  gap: 26px;
  align-self: stretch;
}
.nav-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  position: relative;
  padding: 0 3px;
}
.nav-button.active {
  color: var(--ink);
  font-weight: 550;
}
.nav-button.active:after {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
  bottom: -1px;
  background: var(--ink);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 11px 16px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.button:hover {
  background: #edf0ea;
}
.button-dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.button-dark:hover {
  background: #35463b;
}
.button-light {
  border-color: transparent;
  background: #f0f2ee;
}
.icon-button {
  background: transparent;
  border: 0;
  font-size: 26px;
  padding: 0 6px;
  color: var(--muted);
}
#workspace {
  max-width: 1504px;
  margin: auto;
  padding: 42px 48px 0;
  min-height: calc(100vh - 150px);
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 31px;
  gap: 20px;
}
.page-heading .eyebrow {
  color: var(--muted);
  margin-bottom: 13px;
  display: block;
}
.page-heading p {
  font-size: 15px;
  max-width: 430px;
}
.page-title {
  font-size: 33px;
  letter-spacing: -1px;
  font-weight: 560;
}
.context-tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 12px;
  white-space: nowrap;
  display: flex;
  gap: 8px;
  align-items: center;
}
.context-tag:before {
  content: "";
  height: 6px;
  width: 6px;
  background: #879382;
  border-radius: 50%;
}
.workspace-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 32px;
}
.change-sidebar {
  padding-right: 24px;
  border-right: 1px solid var(--line);
}
.sidebar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}
.change-item {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  padding: 16px 14px;
  border-radius: 12px;
  margin-bottom: 7px;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.change-item:hover {
  background: #edf0ea;
}
.change-item.selected {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 3px 9px #18251f04;
}
.change-item .meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.change-item .name {
  font-size: 14px;
  font-weight: 560;
  line-height: 1.4;
}
.change-item .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.case-index {
  font-variant-numeric: tabular-nums;
}
.sidebar-note {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding: 20px 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.main-column {
  min-width: 0;
}
.change-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  padding: 12px 0 27px;
}
.change-hero .eyebrow {
  display: block;
  color: var(--green);
  margin-bottom: 15px;
}
.change-hero p {
  font-size: 15px;
  max-width: 510px;
  margin-top: 17px;
  line-height: 1.65;
  color: var(--muted);
}
.hero-symbol {
  width: 86px;
  height: 86px;
  background: var(--ink);
  border-radius: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  color: var(--lime);
  box-shadow: 0 14px 30px #18251f15;
  font-size: 44px;
  font-weight: 250;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 500;
  background: #eef3ec;
  color: var(--green);
}
.status-pill.amber {
  background: #f7efdf;
  color: var(--amber);
}
.status-pill.neutral {
  background: #eff1ef;
  color: var(--muted);
}
.datebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 20px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.datebar .date-caption {
  font-size: 13px;
  color: var(--muted);
}
.date-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #edf0ea;
  padding: 4px;
  border-radius: 9px;
}
.date-controls button {
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
}
.date-controls button.active {
  background: #fff;
  box-shadow: 0 1px 4px #0000000c;
}
.date-controls input {
  background: #fff;
  border: 0;
  border-radius: 5px;
  padding: 6px;
  width: 126px;
  font-size: 12px;
}
.impact-section {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 24px;
  padding: 25px 0;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
  gap: 12px;
}
.section-title h3 {
  font-size: 14px;
}
.section-title .meta {
  font-size: 12px;
  color: var(--muted);
}
.scope-number {
  font-size: 64px;
  line-height: 1;
  letter-spacing: -3px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.scope-number span {
  font-size: 17px;
  letter-spacing: 0;
  color: #98a197;
  margin-left: 8px;
}
.dot-grid {
  display: grid;
  grid-template-columns: repeat(25, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0 18px;
}
.building-dot {
  border: 0;
  aspect-ratio: 1;
  border-radius: 2px;
  background: #e3e7e0;
  min-width: 0;
  padding: 0;
  transition:
    background 0.3s,
    transform 0.15s;
}
.building-dot.scope {
  background: #8eaa8c;
}
.building-dot.applies {
  background: #386d50;
}
.building-dot.unknown {
  background: #daa052;
}
.building-dot.pending,
.building-dot.not_yet_effective {
  background: #aec697;
}
.building-dot.selected {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  transform: scale(1.05);
}
.building-dot:hover {
  transform: scale(1.5);
  position: relative;
  z-index: 1;
}
.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.legend span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.legend i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #e3e7e0;
}
.legend i.green {
  background: #8eaa8c;
}
.legend i.amber {
  background: #daa052;
}
.scope-card {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 25px 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.scope-card .eyebrow {
  color: #c0cbc0;
}
.scope-card .scope-number {
  color: var(--lime);
  margin: 18px 0 10px;
}
.scope-card .card-description {
  font-size: 13px;
  color: #c0cbc0;
  line-height: 1.55;
}
.scope-card .card-bottom {
  border-top: 1px solid #ffffff20;
  margin-top: 20px;
  padding-top: 12px;
  font-size: 12px;
  color: #d6dfd1;
}
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #edf1e9;
  border: 1px solid #e2e8db;
  border-radius: 9px;
  padding: 12px 15px;
  font-size: 12px;
  line-height: 1.55;
  color: #56664e;
  margin-bottom: 25px;
}
.notice strong {
  font-weight: 600;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(300px, 1.15fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.panel-head {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.panel-head h3 {
  font-size: 15px;
}
.search-wrap {
  padding: 14px 18px 4px;
}
.search {
  width: 100%;
  padding: 10px 12px;
  background: #f5f6f3;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
}
.building-list {
  max-height: 335px;
  overflow: auto;
  padding: 8px;
}
.building-row {
  display: block;
  position: relative;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
  padding: 13px 12px;
}
.building-row:hover {
  background: #f7f8f5;
}
.building-row.selected {
  background: #edf3e8;
}
.building-row .street {
  font-size: 13px;
  font-weight: 550;
  padding-right: 20px;
  line-height: 1.4;
  text-transform: capitalize;
}
.building-row .city {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.building-row .chevron {
  position: absolute;
  right: 12px;
  top: 22px;
  color: #7c8777;
}
.list-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.evidence-body {
  padding: 21px;
}
.evidence-body h3 {
  font-size: 18px;
  line-height: 1.35;
  margin: 10px 0 7px;
  text-transform: capitalize;
}
.fact-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 17px 0 20px;
  font-size: 12px;
  color: var(--muted);
}
.fact-row strong {
  color: var(--ink);
  font-weight: 550;
}
.reason-step {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding-bottom: 21px;
  position: relative;
}
.reason-step:not(:last-child):before {
  content: "";
  position: absolute;
  left: 10px;
  top: 24px;
  bottom: 3px;
  width: 1px;
  background: var(--line);
}
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 10px;
  background: #f1f4ee;
  border-radius: 50%;
  color: var(--green);
}
.reason-step h4 {
  font-size: 12px;
  margin: 3px 0 6px;
  font-weight: 600;
}
.reason-step p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.quote {
  padding: 11px 13px;
  background: #f5f7f2;
  border-left: 2px solid #9ab588;
  border-radius: 0 7px 7px 0;
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.6;
  color: #52604e;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--green);
}
.evidence-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.evidence-actions .button {
  font-size: 12px;
  padding: 9px 12px;
}
.site-footer {
  max-width: 1504px;
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  padding: 22px 48px;
  color: var(--muted);
  font-size: 11px;
  gap: 20px;
}
.footer-dot {
  margin: 0 6px;
}
.initial-state {
  padding: 80px 0;
  font-size: 18px;
  color: var(--muted);
}
.modal {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  max-width: 520px;
  width: calc(100% - 30px);
  color: var(--ink);
  box-shadow: 0 25px 100px #0003;
}
.modal::backdrop {
  background: #18251f60;
  backdrop-filter: blur(5px);
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal h2 {
  margin-bottom: 14px;
}
.modal p {
  font-size: 14px;
  margin-bottom: 20px;
}
.modal label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  margin: 15px 0;
}
.modal input:not([type="file"]),
.modal select {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 7px;
  background: #fff;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.file-picker {
  padding: 24px;
  border: 1px dashed #a1ae99;
  border-radius: 12px;
  background: #f5f7f2;
}
.file-picker input {
  display: block;
  margin-top: 15px;
  max-width: 100%;
}
.source-modal {
  max-width: 780px;
}
.source-modal pre {
  font-family: inherit;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.8;
  background: #f5f6f3;
  padding: 22px;
  max-height: 55vh;
  overflow: auto;
  border-radius: 10px;
}
.source-modal a {
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 30px);
  background: var(--ink);
  color: #fff;
  padding: 13px 21px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  max-width: 90%;
  font-size: 13px;
  z-index: 10;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.source-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
}
.source-table th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}
.source-table td {
  padding: 16px 17px;
  border-bottom: 1px solid #edf0ea;
}
.source-table .source-url {
  max-width: 440px;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--muted);
}
.table-scroll {
  overflow: auto;
}
.integrity-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
}
.integrity-card {
  padding: 27px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.integrity-card strong {
  display: block;
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -2px;
  margin: 17px 0;
}
.integrity-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.integrity-content {
  max-width: 800px;
}
.integrity-content h3 {
  margin: 25px 0 12px;
}
.integrity-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.rule-select {
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  margin: 10px 0;
}
.empty-list {
  padding: 25px;
  color: var(--muted);
  font-size: 14px;
}
.inline-error {
  color: #9e382f;
  line-height: 1.5;
  font-size: 13px;
}
.rule-pack-state {
  font-size: 11px;
  color: var(--muted);
  margin-top: 9px;
}
.fade-in {
  animation: enter 0.35s ease both;
}
@keyframes enter {
  from {
    opacity: 0.2;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  #workspace {
    padding-top: 48px;
  }
  .dot-grid {
    gap: 6px;
  }
  .change-hero h1 {
    max-width: 650px;
  }
}
@media (max-width: 1100px) {
  .topbar {
    padding: 0 25px;
  }
  .brand-caption,
  .brand-separator {
    display: none;
  }
  #workspace {
    padding: 30px 25px 0;
  }
  .workspace-grid {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 22px;
  }
  .change-sidebar {
    padding-right: 15px;
  }
  .impact-section {
    grid-template-columns: 1fr 170px;
    gap: 18px;
  }
  .scope-card {
    padding: 20px 17px;
  }
  .scope-number {
    font-size: 54px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .hero-symbol {
    display: none;
  }
  .change-hero {
    grid-template-columns: 1fr;
  }
  .datebar {
    align-items: flex-start;
    flex-direction: column;
  }
  .site-footer {
    padding: 20px 25px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 68px;
    padding: 0 18px;
    gap: 10px;
  }
  .brand {
    font-size: 20px;
  }
  .brand img {
    width: 26px;
    height: 26px;
  }
  .topbar nav {
    gap: 14px;
  }
  .nav-button {
    font-size: 12px;
  }
  .topbar > .button {
    font-size: 0;
    padding: 7px 11px;
  }
  .topbar > .button span {
    font-size: 22px;
  }
  #workspace {
    padding: 25px 18px 0;
  }
  .page-heading {
    margin-bottom: 22px;
  }
  .page-title {
    font-size: 28px;
  }
  .context-tag {
    font-size: 10px;
    padding: 6px 9px;
  }
  .workspace-grid {
    display: block;
  }
  .change-sidebar {
    padding: 0;
    border: 0;
    display: flex;
    overflow: auto;
    gap: 8px;
    margin-bottom: 26px;
  }
  .sidebar-label,
  .sidebar-note {
    display: none;
  }
  .change-item {
    min-width: 190px;
    width: 190px;
    margin: 0;
    padding: 12px;
  }
  .change-item .meta {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .change-item .sub {
    display: none;
  }
  .change-item .name {
    font-size: 12px;
  }
  .change-hero {
    padding: 0 0 15px;
    gap: 12px;
  }
  h1 {
    font-size: 39px;
    letter-spacing: -1.7px;
  }
  .change-hero p {
    font-size: 14px;
  }
  .impact-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 0;
  }
  .scope-card {
    min-height: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 20px;
    padding: 20px;
  }
  .scope-card .eyebrow {
    grid-column: 1 / -1;
  }
  .scope-card .scope-number {
    margin: 10px 0 0;
    font-size: 46px;
  }
  .scope-card .card-description {
    align-self: center;
  }
  .scope-card .card-bottom {
    grid-column: 1 / -1;
    margin-top: 14px;
  }
  .dot-grid {
    gap: 4px;
  }
  .detail-grid {
    padding-top: 20px;
  }
  .date-controls button {
    padding: 7px 9px;
  }
  .date-controls input {
    width: 120px;
  }
  .site-footer {
    flex-direction: column;
    gap: 7px;
    padding: 20px 18px;
  }
  .integrity-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .integrity-card {
    padding: 20px;
  }
  .integrity-card strong {
    font-size: 35px;
  }
  .source-table th,
  .source-table td {
    padding: 13px;
  }
  .source-url {
    min-width: 180px;
  }
  .modal {
    padding: 23px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .legend {
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* LawDiff product theme. One accent, readable status, stable spatial context. */
:root {
  --ink: #1c2230;
  --muted: #697181;
  --line: #e4e7ed;
  --green: #155de9;
  --blue: #155de9;
  --blue-soft: #edf3ff;
  --surface: #fff;
  --page: #f6f7f9;
  --inset: #f2f4f7;
  --amber: #9b5d08;
  --lime: #fff;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf0f7;
  --muted: #a0aabc;
  --line: #303743;
  --blue: #76a9ff;
  --green: #76a9ff;
  --blue-soft: #1b2c47;
  --surface: #1a1e27;
  --page: #11151d;
  --inset: #242b37;
  --amber: #f3bd65;
}
body {
  background: var(--page);
}
.topbar {
  max-width: none;
  padding: 0 30px;
  height: 76px;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  font-weight: 650;
  font-size: 22px;
  letter-spacing: -0.8px;
}
.brand-caption {
  font-size: 12px;
}
.topbar nav {
  gap: 25px;
}
.nav-button {
  font-size: 14px;
}
.nav-button.active {
  color: var(--blue);
}
.nav-button.active:after {
  background: var(--blue);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-trigger {
  display: flex;
  gap: 30px;
  align-items: center;
  color: var(--muted);
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
}
.search-trigger kbd {
  font: inherit;
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 1px 4px;
  border-radius: 4px;
}
.theme-toggle {
  border: 0;
  background: none;
  font-size: 23px;
  color: var(--muted);
  padding: 5px;
}
.button {
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink);
  padding: 10px 14px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover {
  background: var(--inset);
}
.button:active {
  transform: scale(0.98);
}
.button-dark {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 2px 4px #155de91a;
}
.button-dark:hover {
  background: #0d4fcf;
  color: #fff;
}
.button-light {
  background: var(--inset);
  border-color: transparent;
}
.button-wide {
  width: 100%;
}
#workspace {
  max-width: 1700px;
  padding: 0;
  min-height: calc(100vh - 140px);
}
.workspace-grid {
  grid-template-columns: 234px minmax(0, 1fr);
  gap: 0;
}
.change-sidebar {
  padding: 26px 15px 24px 20px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
}
.sidebar-top {
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  margin-bottom: 37px;
  color: var(--muted);
}
.sidebar-label {
  font-size: 10px;
  letter-spacing: 1px;
  padding: 0 12px;
}
.change-item {
  padding: 15px 13px;
  margin-bottom: 7px;
  border: 0;
  border-radius: 10px;
}
.change-item.selected {
  background: var(--blue-soft);
  box-shadow: none;
  color: var(--blue);
}
.change-item:hover {
  background: var(--inset);
}
.change-item.selected:hover {
  background: var(--blue-soft);
}
.change-item .meta {
  font-size: 10px;
  margin-bottom: 8px;
}
.change-item.selected .meta {
  color: var(--blue);
}
.change-item .name {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 580;
}
.change-item .sub {
  font-size: 11px;
}
.sidebar-note {
  font-size: 12px;
  padding: 23px 12px;
  line-height: 1.6;
  margin-top: 26px;
}
.sidebar-note p {
  margin: 12px 0;
}
.sidebar-note .eyebrow {
  font-size: 9px;
}
.sidebar-bottom {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  margin-top: auto;
  padding: 20px 12px 0;
}
.main-column {
  padding: 37px 38px 0;
  max-width: 1400px;
}
.page-heading {
  margin-bottom: 28px;
  align-items: center;
}
.page-heading .eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
  color: var(--blue);
}
.page-heading h1 {
  font-size: 35px;
  letter-spacing: -1.35px;
  line-height: 1.13;
  font-weight: 580;
}
.page-heading p {
  font-size: 14px;
  max-width: 630px;
  margin-top: 11px;
  line-height: 1.6;
}
.context-tag {
  background: var(--surface);
  font-size: 11px;
  padding: 8px 11px;
}
.context-tag:before {
  background: var(--blue);
}
.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 20px;
  align-items: start;
}
.field-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 18px #1c223003;
  overflow: hidden;
}
.field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 27px 22px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.field-header .eyebrow {
  color: var(--muted);
  font-size: 10px;
}
.field-header h3 {
  font-size: 16px;
  letter-spacing: -0.3px;
  margin-top: 8px;
}
.field-count {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.building-field {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 29px 27px;
  padding: 29px 27px 25px;
}
.city-cluster {
  min-width: 0;
  animation: none;
}
.cluster-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 560;
  margin-bottom: 11px;
  white-space: nowrap;
}
.cluster-title > span:last-child {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.cluster-dots {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  min-height: 100px;
  align-content: start;
}
.building-dot {
  border: 1px solid transparent;
  border-radius: 3px;
  background: #e8ebf0;
  aspect-ratio: 1;
  transition:
    background 0.24s,
    border-color 0.24s,
    box-shadow 0.24s;
  position: relative;
  min-height: 5px;
}
.building-dot.applies {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 1px 3px #155de91c;
}
.building-dot.unknown {
  background: transparent;
  border: 1.5px solid #c88926;
}
.building-dot.pending {
  background: var(--blue-soft);
  border: 1px dashed var(--blue);
}
.building-dot.not_yet_effective {
  background: transparent;
  border: 1px solid #95b5ed;
}
.building-dot.scope {
  background: #d1def5;
}
.building-dot.superseded {
  background: var(--inset);
  border: 1px solid var(--muted);
}
.building-dot.superseded:after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--muted);
  transform: rotate(-45deg);
}
.building-dot.selected {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  transform: none;
}
.building-dot:hover {
  transform: scale(1.22);
  z-index: 1;
}
.cluster-state {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 9px;
  letter-spacing: 0.2px;
}
.field-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  padding: 0 27px 14px;
  font-size: 10px;
  color: var(--muted);
}
.field-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: block;
  background: #e8ebf0;
}
.legend-dot.applies {
  background: var(--blue);
}
.legend-dot.unknown {
  border: 1px solid #c88926;
  background: transparent;
}
.legend-dot.pending {
  border: 1px dashed var(--blue);
  background: var(--blue-soft);
}
.legend-dot.not_yet_effective {
  border: 1px solid #95b5ed;
  background: transparent;
}
.field-note {
  font-size: 10px;
  color: var(--muted);
  padding: 0 27px 19px;
  line-height: 1.5;
}
.timeline {
  border-top: 1px solid var(--line);
  padding: 19px 25px 15px;
  background: linear-gradient(var(--surface), var(--page));
}
.timeline-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}
.play-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue);
  flex-shrink: 0;
}
.timeline-head .eyebrow {
  display: block;
  font-size: 8px;
  letter-spacing: 1.2px;
  margin-bottom: 4px;
  color: var(--muted);
}
.timeline-head strong {
  font-size: 13px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.timeline-jumps {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 5px;
}
.timeline-jumps .button {
  padding: 6px 8px;
  font-size: 10px;
}
.timeline-jumps input {
  border: 0;
  background: transparent;
  font-size: 10px;
  color: var(--muted);
  width: 107px;
}
.timeline input[type="range"] {
  width: 100%;
  height: 20px;
  accent-color: var(--blue);
  margin: 0;
  cursor: ew-resize;
}
.timeline-years {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.impact-inspector {
  padding: 25px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.impact-inspector > .eyebrow {
  font-size: 10px;
  color: var(--muted);
}
.impact-number {
  font-size: 62px;
  font-weight: 550;
  letter-spacing: -3px;
  line-height: 1.1;
  margin: 21px 0 8px;
  font-variant-numeric: tabular-nums;
}
.impact-number span {
  font-size: 16px;
  color: var(--muted);
  letter-spacing: -0.2px;
  margin-left: 7px;
  font-weight: 400;
}
.impact-inspector > h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.impact-inspector > p {
  font-size: 12px;
  line-height: 1.7;
}
.impact-breakdown {
  margin: 23px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.impact-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  font-size: 11px;
  color: var(--muted);
}
.impact-breakdown strong {
  font-weight: 550;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.inspector-source > .eyebrow {
  font-size: 9px;
  color: var(--muted);
}
.source-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--inset);
  border: 0;
  border-radius: 8px;
  width: 100%;
  padding: 11px 10px;
  text-align: left;
  font-size: 12px;
  margin: 12px 0;
  color: var(--ink);
}
.source-chip > span:last-child {
  margin-left: auto;
  color: var(--muted);
}
.source-chip small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.impact-inspector .button-wide {
  margin-top: 15px;
  font-size: 11px;
}
.below-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
  font-size: 11px;
  color: var(--muted);
  gap: 15px;
}
.below-field > span {
  display: flex;
  gap: 8px;
  align-items: center;
}
.notice {
  background: var(--blue-soft);
  border: 0;
  color: var(--muted);
  margin-top: 18px;
  font-size: 12px;
}
.text-button {
  color: var(--blue);
}
.site-footer {
  max-width: none;
  border-top: 1px solid var(--line);
  padding: 18px 30px;
  margin: 0;
  font-size: 10px;
  background: var(--surface);
}
.panel,
.source-table,
.integrity-card {
  background: var(--surface);
  border-color: var(--line);
}
.panel-head {
  padding: 20px;
}
.panel-head h3 {
  font-size: 14px;
}
.status-pill {
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  padding: 5px 8px;
}
.status-pill.neutral {
  background: var(--inset);
  color: var(--muted);
}
.status-pill.amber {
  background: #fff4de;
  color: #985905;
}
.address-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 33px 35px 28px;
  gap: 20px;
}
.address-heading .eyebrow {
  font-size: 9px;
  color: var(--muted);
  margin: 16px 0 10px;
}
.address-heading h1 {
  font-size: 35px;
  letter-spacing: -1.2px;
  text-transform: capitalize;
}
.address-heading p {
  font-size: 14px;
  margin-top: 10px;
}
.address-heading-actions {
  display: flex;
  gap: 8px;
}
.back-button {
  font-size: 12px;
  text-decoration: none;
}
.address-workspace {
  display: grid;
  grid-template-columns: 280px minmax(240px, 1fr) minmax(280px, 380px);
  gap: 23px;
  padding: 0 35px 35px;
  align-items: start;
}
.address-overview {
  display: grid;
  gap: 20px;
}
.layer-panel {
  overflow: hidden;
}
.layers-visual {
  height: 236px;
  position: relative;
  padding: 23px 20px 0;
  overflow: hidden;
}
.layer-planes {
  position: relative;
  height: 180px;
  perspective: 800px;
}
.law-plane {
  position: absolute;
  width: 100%;
  height: 90px;
  left: 0;
  top: calc(var(--plane) * 43px);
  background: var(--surface);
  border: 1px solid #c5d6f2;
  box-shadow: 0 7px 15px #18345b0b;
  border-radius: 10px;
  transform: rotateX(22deg) rotateY(-14deg) rotateZ(4deg);
  padding: 16px;
  transition:
    transform 0.3s,
    top 0.3s;
  z-index: calc(3 - var(--plane));
}
.layer-panel:hover .law-plane {
  transform: rotateX(8deg) rotateY(-3deg) rotateZ(0);
  top: calc(var(--plane) * 52px);
}
.plane-0 {
  background: var(--blue-soft);
}
.plane-label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.plane-label strong {
  font-size: 11px;
  margin-left: auto;
  color: var(--ink);
  font-weight: 500;
}
.plane-count {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 9px;
}
.layer-caption {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  padding: 0 20px 20px;
}
.facts-list {
  padding: 9px 20px;
}
.facts-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.facts-list > div:last-child {
  border: 0;
}
.facts-list strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
}
.fact-provenance {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  padding: 7px 20px 20px;
}
.address-rules .section-title {
  margin: 4px 0 16px;
}
.address-rules .section-title h3 {
  font-size: 14px;
}
.rule-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 19px;
  width: 100%;
  text-align: left;
  margin-bottom: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.rule-card:hover {
  border-color: #b7c9e8;
}
.rule-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-soft);
}
.rule-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.rule-card-top .eyebrow {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.8px;
}
.rule-card h3 {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 550;
}
.rule-card p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 9px;
}
.rule-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}
.conflict-label {
  display: block;
  margin-top: 12px;
  color: var(--amber);
  font-size: 10px;
}
.reasoning-panel {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}
.evidence-body {
  padding: 19px;
}
.evidence-body h3 {
  font-size: 17px;
}
.fact-row {
  gap: 12px;
  font-size: 10px;
}
.quote {
  background: var(--inset);
  border-left-color: var(--blue);
  color: var(--ink);
  font-size: 12px;
  max-height: 180px;
  overflow: auto;
  line-height: 1.7;
}
.step-number {
  background: var(--blue-soft);
  color: var(--blue);
}
.reason-step h4 {
  font-size: 12px;
}
.reason-step p {
  font-size: 12px;
}
.evidence-actions {
  flex-wrap: wrap;
}
.evidence-actions .button {
  white-space: normal;
  text-align: left;
}
.modal {
  background: var(--surface);
  color: var(--ink);
  border-radius: 18px;
}
.modal::backdrop {
  background: #131c3055;
  backdrop-filter: blur(8px);
}
.modal input:not([type="file"]),
.modal select {
  background: var(--surface);
  color: var(--ink);
}
.file-picker {
  background: var(--inset);
  border-color: var(--line);
}
.modal h2 {
  font-size: 31px;
  letter-spacing: -1px;
}
.source-modal pre {
  background: var(--inset);
  color: var(--ink);
}
.source-modal mark {
  background: #ffe99c;
  color: #302709;
  border-radius: 3px;
  padding: 2px;
}
.command-modal {
  max-width: 620px;
  padding: 0;
  margin-top: 16vh;
}
.command-input-wrap {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.command-input-wrap input {
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 18px !important;
  margin: 0 !important;
  outline: none !important;
}
.key-button {
  background: var(--inset);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 5px;
  font-size: 10px;
  padding: 4px 7px;
}
.command-result {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 14px;
}
.command-result:hover,
.command-result:focus {
  background: var(--blue-soft);
  outline: none;
}
.command-result small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
#command-results {
  padding: 8px;
  max-height: 420px;
  overflow: auto;
}
.command-footer {
  font-size: 11px;
  color: var(--muted);
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.rights-modal {
  max-width: 490px;
}
.rights-card {
  background: linear-gradient(145deg, #195acb, #163d82);
  border-radius: 19px;
  color: #fff;
  padding: 25px;
  box-shadow: 0 14px 30px #155de92b;
}
.rights-card .eyebrow {
  color: #d6e4ff;
  font-size: 9px;
}
.rights-card h2 {
  font-size: 25px;
  line-height: 1.3;
  text-transform: capitalize;
  margin: 20px 0 8px;
}
.rights-card .card-city {
  font-size: 13px;
  color: #d6e4ff;
  margin-bottom: 22px;
}
.rights-item {
  border-top: 1px solid #ffffff30;
  padding: 13px 0;
}
.rights-item h3 {
  font-size: 12px;
  font-weight: 550;
}
.rights-item p {
  font-size: 12px;
  line-height: 1.6;
  margin: 6px 0;
  color: #e1eaff;
}
.rights-item small {
  font-size: 10px;
  color: #c9daf5;
}
.rights-card-footer {
  font-size: 10px;
  color: #d6e4ff;
  line-height: 1.7;
  margin-top: 20px;
  border-top: 1px solid #ffffff30;
  padding-top: 15px;
}
.rights-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.segmented {
  display: flex;
  gap: 2px;
  background: var(--inset);
  padding: 3px;
  border-radius: 7px;
}
.segmented button {
  border: 0;
  background: none;
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 5px;
}
.segmented .active {
  background: var(--surface);
  box-shadow: 0 1px 3px #0001;
}
.qr-share {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 23px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.qr-share svg {
  width: 72px;
  height: 72px;
  background: #fff;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
}
.standalone-content {
  padding: 38px;
}
.standalone-content .page-heading h1 {
  font-size: 39px;
}
.integrity-cards {
  gap: 18px;
}
.integrity-content {
  padding-bottom: 35px;
}
.validation-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0;
}
.validation-row {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.validation-row:last-child {
  border: 0;
}
.validation-row strong {
  color: var(--blue);
  font-weight: 550;
}
.source-table td {
  border-color: var(--line);
}
.source-table tr:hover {
  background: var(--inset);
}
.rights-fallback {
  font-size: 11px;
  color: #d6e4ff;
  padding-top: 15px;
}
.initial-state {
  padding: 70px 40px;
}
html[data-theme="dark"] .building-dot.outside {
  background: #303744;
}
html[data-theme="dark"] .status-pill.amber {
  background: #392c17;
  color: #f3bd65;
}
html[data-theme="dark"] .law-plane {
  border-color: #3b506e;
}
html[data-theme="dark"] .field-card {
  box-shadow: none;
}
@media (min-width: 1550px) {
  .main-column {
    padding: 45px 48px 0;
  }
  .stage-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .building-field {
    gap: 33px 38px;
    padding: 35px 35px 28px;
  }
  .cluster-dots {
    gap: 7px;
  }
  .cluster-title {
    font-size: 13px;
  }
  .cluster-state {
    font-size: 10px;
  }
  .field-header {
    padding: 29px 35px;
  }
  .impact-inspector {
    padding: 28px 24px;
  }
}
@media (max-width: 1250px) {
  .brand-caption,
  .brand-separator {
    display: none;
  }
  .main-column {
    padding: 30px 24px 0;
  }
  .workspace-grid {
    grid-template-columns: 208px minmax(0, 1fr);
  }
  .stage-grid {
    grid-template-columns: minmax(0, 1fr) 205px;
    gap: 15px;
  }
  .building-field {
    gap: 22px 18px;
    padding: 23px 21px;
  }
  .cluster-dots {
    gap: 4px;
    min-height: 80px;
  }
  .cluster-title {
    font-size: 10px;
  }
  .impact-inspector {
    padding: 23px 17px;
  }
  .impact-number {
    font-size: 52px;
  }
  .field-header {
    padding: 22px;
  }
  .field-header h3 {
    font-size: 14px;
  }
  .field-count {
    display: none;
  }
  .timeline-jumps input {
    display: none;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .context-tag {
    display: none;
  }
  .address-workspace {
    grid-template-columns: 230px minmax(230px, 1fr) minmax(250px, 320px);
    gap: 17px;
    padding: 0 25px 25px;
  }
  .address-heading {
    padding: 30px 25px;
  }
  .address-heading h1 {
    font-size: 30px;
  }
}
@media (max-width: 1000px) {
  .search-trigger {
    gap: 10px;
  }
  .topbar nav {
    gap: 15px;
  }
  .workspace-grid {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .change-sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .stage-grid {
    grid-template-columns: 1fr;
  }
  .impact-inspector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 20px;
  }
  .impact-inspector > .eyebrow {
    grid-column: 1;
  }
  .impact-number {
    grid-column: 1;
    margin: 10px 0 0;
  }
  .impact-inspector > h3 {
    grid-column: 1;
  }
  .impact-inspector > p {
    grid-column: 1;
  }
  .impact-breakdown {
    grid-column: 2;
    grid-row: 1 / 5;
    margin: 0;
    border: 0;
  }
  .inspector-source {
    display: none;
  }
  .impact-inspector .button {
    grid-column: 1 / -1;
  }
  .cluster-dots {
    gap: 6px;
    min-height: 92px;
  }
  .cluster-title {
    font-size: 12px;
  }
  .address-workspace {
    grid-template-columns: 220px 1fr;
  }
  .reasoning-panel {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
  .address-heading-actions {
    flex-direction: column;
  }
  .address-heading h1 {
    font-size: 27px;
  }
  .source-table td {
    font-size: 12px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 16px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .brand {
    font-size: 20px;
  }
  .topbar nav {
    gap: 12px;
  }
  .nav-button {
    font-size: 11px;
  }
  .header-actions {
    gap: 4px;
  }
  .search-trigger {
    font-size: 0;
    padding: 7px;
    border: 0;
    background: none;
  }
  .search-trigger kbd {
    font-size: 11px;
  }
  .theme-toggle {
    font-size: 21px;
  }
  .header-actions #import-button {
    display: none;
  }
  .workspace-grid {
    display: flex;
    flex-direction: column;
  }
  .change-sidebar {
    min-height: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 15px;
    margin: 0;
  }
  .sidebar-top,
  .sidebar-bottom,
  .sidebar-note,
  .sidebar-label {
    display: none;
  }
  .change-item {
    min-width: 175px;
    padding: 10px 11px;
    margin: 0;
  }
  .change-item .meta {
    font-size: 9px;
    margin-bottom: 6px;
  }
  .change-item .name {
    font-size: 12px;
  }
  .change-item .sub {
    display: none;
  }
  .main-column {
    padding: 24px 16px 0;
  }
  .page-heading {
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 29px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .building-field {
    gap: 22px 15px;
    padding: 24px 18px;
  }
  .cluster-title {
    font-size: 10px;
    white-space: normal;
    min-height: 13px;
  }
  .cluster-dots {
    gap: 4px;
    min-height: 73px;
  }
  .cluster-state {
    font-size: 9px;
  }
  .field-header {
    padding: 20px 18px;
  }
  .field-header h3 {
    font-size: 15px;
  }
  .field-legend {
    padding: 0 18px 14px;
    font-size: 9px;
    gap: 10px;
  }
  .field-note {
    padding: 0 18px 18px;
    font-size: 9px;
  }
  .timeline {
    padding: 16px 18px 13px;
  }
  .timeline-jumps .button {
    font-size: 10px;
    padding: 6px 8px;
  }
  .timeline-head strong {
    font-size: 12px;
  }
  .impact-inspector {
    padding: 22px;
  }
  .impact-number {
    font-size: 49px;
  }
  .below-field {
    font-size: 10px;
  }
  .below-field .text-button {
    font-size: 10px;
  }
  .address-heading {
    padding: 25px 18px;
    align-items: flex-start;
  }
  .address-heading h1 {
    font-size: 26px;
  }
  .address-heading .eyebrow {
    font-size: 8px;
  }
  .address-heading p {
    font-size: 12px;
  }
  .address-heading-actions {
    gap: 7px;
  }
  .address-heading-actions .button {
    font-size: 0;
    padding: 10px;
  }
  .address-heading-actions .button svg {
    width: 18px;
    height: 18px;
  }
  .address-workspace {
    display: flex;
    flex-direction: column;
    padding: 0 18px 25px;
    gap: 20px;
  }
  .address-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 12px;
  }
  .layers-visual {
    height: 208px;
    padding: 18px 12px 0;
  }
  .law-plane {
    padding: 10px;
    height: 76px;
  }
  .plane-label {
    font-size: 9px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .plane-label strong {
    font-size: 10px;
  }
  .plane-label svg {
    display: none;
  }
  .plane-count {
    font-size: 8px;
  }
  .layer-caption {
    font-size: 9px;
    padding: 0 13px 14px;
  }
  .panel-head {
    padding: 16px 13px;
  }
  .panel-head h3 {
    font-size: 12px;
  }
  .facts-panel .status-pill {
    display: none;
  }
  .facts-list {
    padding: 7px 13px;
  }
  .facts-list > div {
    font-size: 10px;
    flex-direction: column;
    gap: 5px;
    padding: 8px 0;
  }
  .fact-provenance {
    font-size: 9px;
    padding: 5px 13px 14px;
  }
  .address-rules,
  .reasoning-panel {
    width: 100%;
  }
  .standalone-content {
    padding: 28px 18px;
  }
  .standalone-content .page-heading h1 {
    font-size: 31px;
  }
  .source-table {
    min-width: 660px;
  }
  .site-footer {
    padding: 16px;
  }
  .modal {
    padding: 22px;
  }
  .command-modal {
    padding: 0;
  }
  .rights-card {
    padding: 22px;
  }
  .rights-card h2 {
    font-size: 24px;
  }
  .modal h2 {
    font-size: 27px;
  }
}
@media (max-width: 380px) {
  .topbar nav {
    gap: 9px;
  }
  .header-actions {
    display: flex;
  }
  .cluster-dots {
    gap: 3px;
  }
  .building-field {
    gap: 20px 12px;
  }
  .address-overview {
    grid-template-columns: 1fr;
  }
  .layers-visual {
    max-width: 260px;
    margin: auto;
  }
  .page-heading h1 {
    font-size: 27px;
  }
}
@media (max-width: 600px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 52px 42px;
    height: 94px;
    gap: 0;
    padding: 0 16px;
  }
  .topbar .brand {
    grid-column: 1;
    grid-row: 1;
  }
  .topbar nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    height: 42px;
    gap: 12px;
    margin: 0;
  }
  .topbar .nav-button {
    font-size: 12px;
    height: 42px;
  }
  .header-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 12px;
  }
  .search-trigger {
    font-size: 12px;
    gap: 0;
    padding: 8px;
  }
  .search-trigger kbd {
    display: none;
  }
}
@media print {
  .topbar,
  .site-footer,
  .modal-heading,
  .rights-toolbar,
  .qr-share,
  .modal-actions {
    display: none !important;
  }
  body > *:not(#rights-dialog) {
    display: none !important;
  }
  #rights-dialog {
    display: block !important;
    position: static;
    border: 0;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }
  .rights-card {
    box-shadow: none;
    background: #fff;
    color: #111;
    border: 1px solid #ddd;
  }
  .rights-card p,
  .rights-card small,
  .rights-card .eyebrow,
  .rights-card .card-city,
  .rights-card-footer {
    color: #333;
  }
  .rights-item {
    border-color: #ddd;
  }
}
/* Compact building matrix preserves a complete time-control view on laptops. */
.cluster-dots {
  min-height: 0;
  gap: 4px;
}
.building-dot {
  height: 12px;
  aspect-ratio: auto;
  border-radius: 2px;
}
.building-field {
  gap: 22px 26px;
  padding: 23px 27px 19px;
}
.cluster-state {
  margin-top: 7px;
}
.field-header {
  padding: 22px 27px;
}
.field-legend {
  padding-bottom: 10px;
}
.timeline {
  padding-top: 16px;
  padding-bottom: 13px;
}
.search-section-label {
  padding: 11px 14px 6px;
  font-size: 9px;
  letter-spacing: 1.3px;
  color: var(--muted);
}
.search-result {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 9px;
  padding: 12px 14px;
}
.search-result:hover,
.search-result:focus {
  background: var(--blue-soft);
}
.search-result > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.search-result strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
  text-transform: capitalize;
}
.search-result small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}
.search-result > svg {
  color: var(--muted);
}
.rights-toolbar p {
  margin: 0;
}
.segmented .selected {
  background: var(--surface);
  box-shadow: 0 1px 4px #0001;
}
.rights-wallet {
  padding: 25px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1964e8, #163e89);
  color: white;
  box-shadow: 0 15px 32px #155de922;
}
.wallet-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16px;
}
.wallet-brand span {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 1.5px;
  font-weight: 500;
  opacity: 0.8;
}
.rights-wallet h2 {
  margin: 27px 0 6px !important;
  font-size: 26px !important;
  text-transform: capitalize;
  line-height: 1.2;
  letter-spacing: -0.8px;
}
.rights-wallet p {
  color: #d6e5ff;
  margin-bottom: 10px;
  font-size: 12px;
}
.wallet-date {
  font-size: 10px;
  color: #ccdfff;
  margin-bottom: 23px;
}
.wallet-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  padding: 12px 0;
  border-top: 1px solid #ffffff30;
}
.wallet-summary strong {
  font-weight: 500;
  font-size: 10px;
}
.wallet-bottom {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
}
.wallet-bottom > span {
  font-size: 8px;
  line-height: 1.8;
  color: #dae6ff;
}
#rights-qr {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  padding: 4px;
  background: white;
  border-radius: 6px;
}
#rights-qr svg {
  width: 100%;
  height: 100%;
}
.rights-wallet + .small {
  font-size: 10px;
  margin: 16px 0;
  line-height: 1.6;
}
.rights-detail details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.rights-detail summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  cursor: pointer;
}
.rights-detail p {
  font-size: 11px;
  line-height: 1.7;
  margin: 12px 0 0;
}
.rights-detail .small {
  color: var(--muted);
}
@media (max-width: 760px) {
  .building-field {
    gap: 20px 15px;
    padding: 23px 18px;
  }
  .building-dot {
    height: 9px;
  }
  .cluster-dots {
    gap: 3px;
  }
  .wallet-brand span {
    font-size: 7px;
  }
  .rights-wallet {
    padding: 20px;
  }
  .rights-wallet h2 {
    font-size: 23px !important;
  }
  .field-header {
    padding: 20px 18px;
  }
}
@media print {
  .rights-wallet {
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .rights-detail {
    display: none;
  }
  .rights-wallet + .small {
    display: block !important;
  }
}
.layers-visual {
  height: 262px;
}
.layer-planes {
  height: 226px;
}
.law-plane {
  height: 78px;
  top: calc(var(--plane) * 65px);
  z-index: calc(var(--plane) + 1);
  transform: rotateX(10deg) rotateY(-7deg) rotateZ(-2deg);
}
.layer-panel:hover .law-plane {
  top: calc(var(--plane) * 65px);
  transform: rotateX(0) rotateY(0) rotateZ(0);
}
.plane-0 {
  background: var(--surface);
}
.plane-2 {
  background: var(--blue-soft);
}
@media (max-width: 760px) {
  .layers-visual {
    height: 247px;
  }
  .law-plane {
    height: 72px;
    top: calc(var(--plane) * 65px);
  }
}
.condition-group {
  border-left: 1px solid var(--line);
  padding: 8px 0 3px 10px;
  margin: 7px 0;
}
.condition-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 9px;
}
.condition-state {
  font-size: 9px;
  white-space: nowrap;
}
.condition-state.met {
  color: var(--blue);
}
.condition-state.missing {
  color: var(--amber);
}
.condition-leaf {
  display: flex;
  gap: 8px;
  padding: 7px 0;
}
.condition-leaf strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.condition-leaf span:last-child {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  display: block;
}
.condition-status-dot {
  display: block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  margin-top: 5px;
  background: #aab0b9;
}
.condition-status-dot.met {
  background: var(--blue);
}
.condition-status-dot.missing {
  background: #d5a557;
}

/* A saved extraction receipt, separate from the application's loaded rule pack. */
.extraction-run-card {
  margin: 8px 0 36px;
  padding: 27px 29px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.extraction-run-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.extraction-run-heading .eyebrow {
  color: var(--blue);
  font-size: 10px;
  letter-spacing: 1.15px;
}
.extraction-run-heading h3 {
  margin: 8px 0 0;
  font-size: 24px;
  letter-spacing: -.7px;
  font-weight: 570;
}
.extraction-run-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
  padding-top: 3px;
}
.extraction-run-status svg {
  flex-shrink: 0;
}
.extraction-run-card[data-run-state="review"] .extraction-run-status {
  color: var(--amber);
}
.extraction-run-card[data-run-state="failed"] .extraction-run-status,
.extraction-run-source[data-source-status="failed_requires_review"] > div > span {
  color: #b3453f;
}
html[data-theme="dark"] .extraction-run-card[data-run-state="failed"] .extraction-run-status,
html[data-theme="dark"] .extraction-run-source[data-source-status="failed_requires_review"] > div > span {
  color: #f49f99;
}
.integrity-content .extraction-run-context {
  margin: 14px 0 22px;
  font-size: 13px;
  line-height: 1.7;
  max-width: 650px;
}
.extraction-run-flow {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px;
}
.extraction-run-flow li {
  position: relative;
  min-width: 0;
}
.extraction-run-flow li:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  top: 20px;
  right: -17px;
  color: var(--line);
  font-size: 22px;
}
.extraction-flow-number {
  display: block;
  font-size: 10px;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.extraction-run-flow strong {
  display: block;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -.2px;
  margin-bottom: 5px;
}
.extraction-run-flow li > span:last-child {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.extraction-run-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  border-top: 1px solid var(--line);
  margin-top: 23px;
  padding-top: 20px;
}
.extraction-run-metrics strong {
  display: block;
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.extraction-run-metrics span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.extraction-run-provenance {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.extraction-run-provenance summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 550;
  padding: 15px 0;
}
.extraction-run-provenance summary > span {
  float: right;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
.extraction-run-times {
  margin: 0 0 14px;
  padding: 13px 15px;
  background: var(--inset);
  border-radius: 8px;
}
.extraction-run-times > div {
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: 12px;
  font-size: 11px;
  line-height: 1.8;
}
.extraction-run-times dt {
  color: var(--muted);
}
.extraction-run-times dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.extraction-run-source {
  padding: 11px 0 14px;
  border-top: 1px solid var(--line);
}
.extraction-run-source > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.extraction-run-source > div > span {
  color: var(--muted);
  font-size: 11px;
}
.extraction-run-source .text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.integrity-content .extraction-run-source p {
  font-size: 11px;
  margin-top: 5px;
}
.extraction-run-source code {
  display: block;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: var(--muted);
  font-size: 9px;
  overflow-wrap: anywhere;
  line-height: 1.6;
  margin-top: 5px;
}
.extraction-run-limitations {
  margin: 15px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.extraction-run-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 18px;
}
.extraction-run-footer > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  max-width: 340px;
}
.extraction-run-download {
  flex-shrink: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  min-height: 38px;
}
.extraction-run-unavailable {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 18px 0 25px;
  color: var(--muted);
}
.extraction-run-unavailable strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  font-weight: 550;
}
.integrity-content .extraction-run-unavailable p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .extraction-run-card {
    padding: 22px 20px;
    border-radius: 14px;
  }
  .extraction-run-heading {
    flex-direction: column;
    gap: 12px;
  }
  .extraction-run-heading h3 {
    font-size: 22px;
  }
  .extraction-run-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 28px;
  }
  .extraction-run-flow li:nth-child(2)::after {
    content: none;
  }
  .extraction-run-metrics {
    gap: 12px;
  }
  .extraction-run-metrics strong {
    font-size: 25px;
  }
  .extraction-run-metrics span {
    font-size: 10px;
  }
  .extraction-run-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}
.corpus-card { padding: 28px; border: 1px solid var(--line); border-radius: 22px; margin-bottom: 28px; background: var(--surface); }
.integrity-content .corpus-card h3 { margin: 10px 0 12px; font-size: 28px; letter-spacing: -.8px; }
.corpus-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin: 26px 0; }
.corpus-metrics strong { display: block; font-size: 32px; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.corpus-metrics span { font-size: 12px; color: var(--muted); }
.corpus-source-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(47px,1fr)); gap: 6px; margin-bottom: 24px; }
.corpus-source { min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.corpus-source.processed { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.corpus-source.rejected { color: var(--amber); border-color: #d9b67a; }
.corpus-source.missing_text { border-style: dashed; }
.corpus-source:hover { transform: translateY(-1px); border-color: currentColor; }
@media(max-width:600px) { .corpus-card { padding: 20px; } .corpus-metrics { grid-template-columns: repeat(2,1fr); } }
