:root {
  --ink: #10202d;
  --muted: #5f6f7a;
  --subtle: #eef2f4;
  --paper: #ffffff;
  --surface: #f7f9fa;
  --line: #dbe3e7;
  --blue: #0a5b78;
  --blue-ink: #073b52;
  --green: #2d6f63;
  --gold: #a9812d;
  --shadow: 0 18px 45px rgba(12, 38, 54, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@keyframes cascade-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-cascade] {
  opacity: 0;
  transform: translateY(18px);
}

.cascade-in {
  animation: cascade-in 620ms cubic-bezier(0.2, 0.72, 0.22, 1) forwards;
  animation-delay: var(--cascade-delay, 0ms);
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  [data-cascade] {
    opacity: 1;
    transform: none;
  }

  .cascade-in {
    animation: none;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

body[data-page="home"] {
  background: #0a111a;
  color: #e9f3f7;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

body[data-page="home"] .site-header {
  border-bottom-color: rgba(103, 136, 161, 0.22);
  background: rgba(9, 17, 27, 0.96);
}

body[data-page="home"] .brand {
  color: #f5fbff;
}

body[data-page="home"] .site-nav a {
  color: #9fb1c6;
}

body[data-page="home"] .site-nav a:hover,
body[data-page="home"] .site-nav a.active {
  border-bottom-color: #14b8d4;
  color: #f5fbff;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 220px;
  color: var(--ink);
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 9px 13px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.active {
  border-bottom-color: var(--blue);
  color: var(--blue-ink);
}

.hero {
  --home-map-height: clamp(430px, calc(100svh - 284px), 520px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(460px, 0.82fr) minmax(460px, 1.18fr);
  gap: 22px 28px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 54px 56px 30px;
  background: #0a111a;
  border-bottom: 1px solid rgba(103, 136, 161, 0.18);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(13, 24, 36, 0.28);
}

.hero-copy,
.map-stage,
.hero-metrics {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 4.4vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 8.5em;
  white-space: normal;
  text-wrap: balance;
}

.hero h1 span {
  display: block;
  white-space: nowrap;
}

h2 {
  margin-bottom: 10px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.3;
}

.lead {
  max-width: 600px;
  margin-bottom: 28px;
  color: #344955;
  font-size: 21px;
  line-height: 1.7;
}

body[data-page="home"] .lead {
  color: #aebfd1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

body[data-page="home"] .actions {
  margin: 24px 0 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--blue-ink);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

body[data-page="home"] .button {
  min-height: 40px;
  padding: 8px 17px;
  border: 1px solid rgba(142, 170, 194, 0.28);
  border-radius: 4px;
  background: rgba(14, 27, 42, 0.58);
  color: #e9f3f7;
  font-size: 16px;
  letter-spacing: 0;
}

body[data-page="home"] .button.primary {
  border-color: rgba(142, 170, 194, 0.28);
  background: rgba(14, 27, 42, 0.58);
  color: #e9f3f7;
  box-shadow: none;
}

body[data-page="home"] .button.secondary {
  border-color: rgba(142, 170, 194, 0.28);
  background: rgba(14, 27, 42, 0.58);
  color: #e9f3f7;
  box-shadow: none;
}

.button.secondary:hover,
.button.primary:hover {
  transform: none;
}

body[data-page="home"] .button:hover {
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(20, 38, 56, 0.72);
  color: #ffffff;
}

body[data-page="home"] .button.primary:hover {
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(20, 38, 56, 0.72);
}

body[data-page="home"] .button.secondary:hover {
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(20, 38, 56, 0.72);
}

.hero-summary {
  width: min(520px, 100%);
  margin-top: 0;
  border-top: 1px solid rgba(103, 136, 161, 0.24);
}

.hero-summary div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(103, 136, 161, 0.18);
}

.hero-summary span {
  color: #8fa4ba;
  font-size: 14px;
}

.hero-summary strong {
  color: #e9f3f7;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
}

.map-stage {
  height: var(--home-map-height);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f6;
  box-shadow: var(--shadow);
  overflow: hidden;
}

#city-map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.city-map-stage {
  position: relative;
  border-color: rgba(80, 125, 154, 0.32);
  background: #07111d;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.city-map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 120px rgba(2, 9, 16, 0.82);
}

.city-map-legend {
  position: absolute;
  left: auto;
  right: var(--map-legend-right, 36px);
  bottom: var(--map-legend-bottom, 18px);
  z-index: 2;
  display: grid;
  gap: 8px;
  width: var(--map-legend-width, auto);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  justify-content: center;
  color: #b9c7d8;
  font-size: 13px;
}

.city-map-legend span {
  display: grid;
  grid-template-columns: 9px auto;
  align-items: center;
  gap: 8px;
  min-width: 82px;
}

.city-map-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-observed {
  background: #19d3e6;
}

.legend-boundary {
  background: #28445a;
}

.legend-pulse {
  background: #e4b554;
  box-shadow: 0 0 12px rgba(228, 181, 84, 0.8);
}

.city-map-tooltip {
  position: absolute;
  z-index: 4;
  width: max-content;
  max-width: 220px;
  padding: 9px 11px;
  border: 1px solid rgba(228, 181, 84, 0.32);
  border-radius: 7px;
  background: rgba(8, 16, 26, 0.9);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  color: #f5fbff;
  pointer-events: none;
}

.city-map-tooltip strong,
.city-map-tooltip span {
  display: block;
}

.city-map-tooltip strong {
  font-size: 14px;
}

.city-map-tooltip span {
  margin-top: 2px;
  color: #aebfd1;
  font-size: 12px;
}

.hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

body[data-page="home"] .hero-metrics {
  border-color: rgba(103, 136, 161, 0.22);
  background: rgba(13, 25, 38, 0.72);
}

.hero-metrics div {
  padding: 20px 18px;
  border-right: 1px solid var(--line);
}

body[data-page="home"] .hero-metrics div {
  border-right-color: rgba(103, 136, 161, 0.22);
}

.hero-metrics div:last-child {
  border-right: 0;
}

.hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

body[data-page="home"] .hero-metrics span {
  color: #8fa4ba;
}

.hero-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.1;
}

body[data-page="home"] .hero-metrics strong {
  color: #f5fbff;
}

.home-strip {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: start;
  padding: 54px 56px 68px;
  border-top: 1px solid var(--line);
}

body[data-page="home"] .home-strip {
  border-top-color: rgba(103, 136, 161, 0.18);
  background: #0d1622;
}

body[data-page="home"] .home-strip h2,
body[data-page="home"] .route-list strong {
  color: #edf7fb;
}

body[data-page="home"] .route-list a {
  border-color: rgba(80, 125, 154, 0.26);
  background: #121f2f;
}

body[data-page="home"] .route-list small {
  color: #91a6bc;
}

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

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

.route-list a,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.route-list a {
  display: block;
  padding: 20px;
}

.route-list span {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 700;
}

.route-list strong,
.route-list small {
  display: block;
}

.route-list strong {
  font-size: 24px;
  line-height: 1.25;
}

.route-list small {
  margin-top: 9px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.agent-strip {
  grid-template-columns: 1fr;
  gap: 24px;
  justify-items: center;
  padding-top: 48px;
  padding-bottom: 58px;
  text-align: center;
}

.agent-strip .eyebrow {
  margin-bottom: 8px;
}

.agent-strip h2 {
  margin-bottom: 0;
  color: #edf7fb;
  font-size: clamp(28px, 3.2vw, 40px);
}

.agent-strip .agent-tool-grid {
  width: min(1120px, 100%);
}

.agent-tool-card {
  min-height: 152px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

body[data-page="home"] .agent-tool-card {
  border-color: rgba(80, 125, 154, 0.26);
  background: #121f2f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  text-align: left;
}

.agent-tool-card span,
.agent-tool-card strong,
.agent-tool-card p {
  display: block;
}

.agent-tool-card span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.agent-tool-card strong {
  margin-top: 10px;
  color: var(--blue-ink);
  font-size: 15px;
  line-height: 1.35;
}

body[data-page="home"] .agent-tool-card strong {
  color: #edf7fb;
}

.agent-tool-card code {
  font-family: Consolas, "Liberation Mono", monospace;
  white-space: normal;
  word-break: break-word;
}

.agent-tool-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

body[data-page="home"] .agent-tool-card p {
  color: #91a6bc;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 70px;
}

.page-title {
  max-width: 780px;
  margin-bottom: 30px;
}

body[data-page="data"] .page-title,
body[data-page="access"] .page-title {
  padding-inline: 0;
}

body[data-page="data"] .page-title {
  max-width: none;
  margin-bottom: 24px;
}

body[data-page="data"] .page-title p {
  margin: 0;
  text-indent: 0;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-ideograph;
}

body[data-page="data"] .page-title h1 {
  margin-bottom: 10px;
}

body[data-page="access"] .page-title {
  max-width: none;
  margin-bottom: 22px;
}

body[data-page="access"] .page-title p {
  max-width: none;
  margin: 0;
  line-height: 1.65;
  text-indent: 24px;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-ideograph;
}

body[data-page="access"] .page-title h1 {
  margin-bottom: 12px;
}

.page-title h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 58px);
}

.page-title p:last-child {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.85;
}

body[data-page="access"] .page-title p:last-child {
  line-height: 1.65;
}

.record-grid,
.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

body[data-page="data"] .record-grid {
  margin-bottom: 0;
}

body[data-page="data"] .topic-panel {
  margin-top: 24px;
}

body[data-page="data"] .agent-panel {
  margin-top: 24px;
}

.api-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.api-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.api-copy h3 {
  margin-bottom: 0;
}

.api-copy p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.api-table {
  min-width: 940px;
}

.api-table td:first-child {
  width: 230px;
  white-space: nowrap;
}

.api-table td:nth-child(2) {
  width: 150px;
}

.api-table code {
  font-family: Consolas, "Liberation Mono", monospace;
  color: var(--blue-ink);
  font-weight: 700;
}

.api-table a {
  color: var(--blue);
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  word-break: break-all;
}

.access-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.panel {
  padding: 24px;
}

.panel + .panel,
.topic-panel {
  margin-top: 20px;
}

.record-grid > .panel {
  height: 100%;
  margin-top: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin-bottom: 0;
}

.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.status-pill {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(10, 91, 120, 0.18);
  border-radius: 999px;
  background: #edf5f7;
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.muted {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}

.metadata-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.metadata-list div {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.metadata-list dt {
  color: var(--muted);
  font-size: 13px;
}

.metadata-list dd {
  margin: 2px 18px 0 0;
  color: var(--ink);
  font-weight: 700;
}

.metadata-list.compact {
  grid-template-columns: 1fr;
}

.file-panel {
  display: flex;
  flex-direction: column;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  min-height: 62px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.file-row:last-of-type {
  border-bottom: 1px solid var(--line);
}

.file-row strong,
.file-row span {
  display: block;
}

.file-row strong {
  font-size: 17px;
}

.file-row span,
.quiet {
  color: var(--muted);
  font-size: 14px;
}

.file-row a {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 700;
}

.quiet {
  margin: 18px 0 0;
}

.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-grid span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: #2b4050;
  font-size: 14px;
}

.variable-head {
  align-items: center;
}

.variable-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: #304351;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input,
select {
  min-height: 42px;
  padding: 8px 11px;
}

textarea {
  resize: vertical;
  min-height: 128px;
  padding: 10px 11px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(10, 91, 120, 0.18);
  border-color: var(--blue);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

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

.data-table th {
  background: var(--surface);
  color: #304351;
  font-size: 13px;
  white-space: nowrap;
}

.data-table td {
  font-size: 14px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  margin: 14px 0 0;
  color: var(--muted);
}

.terms-panel {
  margin-bottom: 14px;
}

body[data-page="access"] .terms-panel {
  padding-top: 22px;
  padding-bottom: 22px;
}

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

.terms-grid article {
  min-height: 104px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.terms-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  text-align-last: auto;
  text-wrap: pretty;
}

.reuse-task {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.reuse-task strong,
.reuse-task span {
  display: block;
}

.reuse-task span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.lookup-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.lookup-row input:first-child {
  grid-column: 1 / -1;
}

.lookup-row .button {
  justify-self: start;
}

.request-form {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 16px 0 0;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 4px;
}

.check-row span {
  margin: 0;
  color: #2f4351;
  font-weight: 500;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-message.error {
  color: #9a3b2f;
}

.form-message.ok {
  color: var(--green);
}

.verification-box {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(34, 103, 132, 0.26);
  border-radius: 8px;
  background: #f7fbfd;
}

.verification-box strong,
.verification-box span {
  display: block;
}

.verification-box span {
  margin-top: 4px;
  color: var(--muted);
}

.verification-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) auto;
  gap: 10px;
  align-items: center;
}

.download-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.download-box strong,
.download-box span {
  display: block;
}

.download-box span {
  margin-top: 4px;
  color: var(--muted);
}

.download-box.locked {
  background: var(--surface);
}

.download-box.success {
  border-color: rgba(45, 111, 99, 0.32);
  background: #f1f7f5;
}

.download-box .actions {
  margin-top: 14px;
}

.task-box {
  border-color: rgba(45, 111, 99, 0.32);
  background: #f1f7f5;
}

.task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

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

.task-head span:not(.status-pill) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.task-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  margin: 16px 0 0;
  border-top: 1px solid rgba(45, 111, 99, 0.18);
}

.task-meta div {
  padding: 11px 0;
  border-bottom: 1px solid rgba(45, 111, 99, 0.18);
}

.task-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.task-meta dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.task-files {
  margin-top: 16px;
  border-top: 1px solid rgba(45, 111, 99, 0.18);
}

.task-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(45, 111, 99, 0.18);
}

.task-file strong,
.task-file span {
  display: block;
}

.task-file span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.admin-table {
  min-width: 1120px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  padding: 22px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

body[data-page="home"] .site-footer {
  border-top-color: rgba(103, 136, 161, 0.18);
  background: #0d1622;
  color: #8fa4ba;
}

[hidden] {
  display: none !important;
}

@media (min-width: 901px) and (max-width: 1180px) {
  .site-header {
    padding: 0 24px;
  }

  .hero {
    --home-map-height: clamp(430px, calc(100svh - 284px), 484px);
    grid-template-columns: minmax(410px, 0.8fr) minmax(480px, 1.2fr);
    gap: 20px 24px;
    min-height: calc(100vh - 72px);
    padding: 42px 24px 26px;
  }

  .map-stage,
  #city-map-canvas {
    height: var(--home-map-height);
  }

  .hero h1 {
    font-size: clamp(40px, 4.4vw, 50px);
    max-width: 8.5em;
  }

  .hero-summary {
    width: 100%;
  }

  .hero-summary div {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 900px) {
  .site-header {
    padding: 0 24px;
  }

  .hero {
    --home-map-height: clamp(360px, 52svh, 460px);
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 40px 24px 34px;
  }

  .map-stage,
  #city-map-canvas {
    height: var(--home-map-height);
  }

  .hero-metrics,
  .home-strip,
  .record-grid,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .route-list,
  .terms-grid {
    grid-template-columns: 1fr;
  }

  .agent-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .variable-head {
    align-items: stretch;
    flex-direction: column;
  }

  .variable-tools {
    justify-content: stretch;
  }

  .variable-tools label {
    flex: 1 1 220px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px 12px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .site-nav a {
    flex: 0 0 auto;
  }

  .hero {
    --home-map-height: clamp(280px, 45svh, 340px);
    padding: 38px 18px 26px;
  }

  .lead {
    font-size: 18px;
  }

  .hero h1 {
    white-space: normal;
  }

  .map-stage,
  #city-map-canvas {
    height: var(--home-map-height);
  }

  .hero-summary div {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
  }

  .hero-metrics {
    border-bottom: 0;
  }

  .hero-metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-metrics strong {
    font-size: 23px;
  }

  .home-strip,
  .page-shell {
    width: auto;
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-strip {
    padding-top: 34px;
    padding-bottom: 44px;
  }

  .page-shell {
    padding-top: 34px;
  }

  .panel {
    padding: 18px;
  }

  body[data-page="access"] .page-title p {
    text-indent: 18px;
  }

  .metadata-list,
  .form-grid,
  .agent-tool-grid,
  .reuse-task,
  .lookup-row,
  .verification-row {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .api-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-head,
  .task-file {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-meta {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 18px;
  }
}
