:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e7edf7;
  background: #071019;
  font-synthesis: none;
  --surface: rgba(14, 29, 43, 0.82);
  --surface-strong: #102235;
  --border: rgba(153, 185, 214, 0.18);
  --muted: #91a5b8;
  --accent: #49d8bc;
  --accent-strong: #8df3df;
  --danger: #ff9d9d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 20% 0%, #12334a 0, transparent 38%), radial-gradient(circle at 100% 20%, #103c36 0, transparent 30%), #071019; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }

.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 50; padding: .7rem 1rem; background: #fff; color: #071019; border-radius: .6rem; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 4rem); border-bottom: 1px solid var(--border); background: rgba(7, 16, 25, .86); backdrop-filter: blur(18px); }
.brand, .header-actions { display: flex; align-items: center; gap: .8rem; }
.brand-mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid rgba(73,216,188,.55); border-radius: .8rem; color: var(--accent-strong); background: rgba(73,216,188,.08); font-weight: 800; letter-spacing: -.04em; }
.brand div { display: grid; gap: .1rem; }
.brand span:last-child { color: var(--muted); font-size: .78rem; }
.status-pill { border: 1px solid var(--border); border-radius: 999px; padding: .45rem .7rem; color: var(--muted); font-size: .78rem; }
.status-online { color: var(--accent-strong); border-color: rgba(73,216,188,.42); background: rgba(73,216,188,.08); }
.status-offline { color: var(--danger); }

.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 4rem; }
.hero { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.eyebrow { margin: 0 0 .5rem; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { max-width: 820px; margin: 0; font-size: clamp(2.25rem, 6vw, 4.6rem); line-height: .98; letter-spacing: -.055em; }
h2, h3 { margin: 0; letter-spacing: -.025em; }
.hero-copy { max-width: 710px; margin: 1.2rem 0 0; color: var(--muted); line-height: 1.7; }
.last-updated { margin: 0; color: var(--muted); white-space: nowrap; font-size: .82rem; }

.search-card, .table-card, .boundary-card, .metric-card { border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.search-card { padding: 1rem; border-radius: 1.2rem; }
.search-form { display: grid; grid-template-columns: 150px 1fr auto; gap: .65rem; }
.search-form input, .search-form select { min-width: 0; border: 1px solid var(--border); border-radius: .75rem; padding: .85rem 1rem; color: #f4f8fb; background: rgba(3,10,16,.56); outline: none; }
.search-form input:focus, .search-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(73,216,188,.12); }
.button { border: 1px solid transparent; border-radius: .75rem; padding: .78rem 1rem; font-weight: 750; }
.button-primary { color: #04120f; background: var(--accent); }
.button-secondary { color: #d8e4ef; border-color: var(--border); background: rgba(255,255,255,.035); }
.notice { min-height: 1.25rem; margin: .8rem .2rem 0; color: var(--muted); font-size: .84rem; }
.search-result { margin-top: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: .9rem; background: rgba(3,10,16,.38); }
.record-grid { display: grid; grid-template-columns: minmax(130px, .45fr) 1fr; gap: .55rem 1rem; margin: 1rem 0 0; }
.record-grid dt { color: var(--muted); text-transform: capitalize; }
.record-grid dd { margin: 0; min-width: 0; }
.wrap { overflow-wrap: anywhere; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0; }
.metric-card { padding: 1.15rem; border-radius: 1rem; }
.metric-card span { display: block; color: var(--muted); font-size: .78rem; }
.metric-card strong { display: block; margin-top: .45rem; font-size: clamp(1.15rem, 2vw, 1.65rem); }

.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.table-card { min-width: 0; border-radius: 1.15rem; overflow: hidden; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
.section-heading > span { color: var(--muted); font-size: .72rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th, td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid rgba(153,185,214,.1); vertical-align: top; }
th { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.empty-state { color: var(--muted); text-align: center; padding: 2rem; }

.boundary-card { display: grid; grid-template-columns: .8fr 1fr; gap: 2rem; margin-top: 1rem; padding: 1.4rem; border-radius: 1.15rem; }
.boundary-card ul { margin: 0; padding-left: 1.2rem; color: var(--muted); line-height: 1.9; }
footer { padding: 1.5rem; text-align: center; color: var(--muted); font-size: .78rem; border-top: 1px solid var(--border); }

@media (max-width: 820px) {
  .site-header, .hero { align-items: flex-start; }
  .site-header, .hero, .boundary-card { flex-direction: column; }
  .hero, .boundary-card { display: grid; grid-template-columns: 1fr; }
  .header-actions { width: 100%; justify-content: space-between; }
  .search-form { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .data-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .page-shell { width: min(100% - 1rem, 1180px); padding-top: 2rem; }
  .site-header { padding-inline: .75rem; }
}
