:root {
  color-scheme: dark;
  --ink: #0b1118;
  --surface: #111a23;
  --surface-strong: #17232d;
  --line: #2a3a47;
  --line-soft: #1d2a34;
  --text: #eef6f5;
  --muted: #9aadb0;
  --quiet: #70888d;
  --accent: #76e6c3;
  --accent-ink: #06231d;
  --attention: #f2c46d;
  --danger: #ff8f8f;
  --page-gutter: clamp(1rem, 3vw, 3.25rem);
  --content-width: 1480px;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  line-height: 1.5;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-180%);
  transition: transform 120ms ease;
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}
.brand-lockup > span:last-child { display: grid; min-width: 0; }
.brand-lockup strong { font-size: .92rem; letter-spacing: .02em; }
.brand-lockup small { color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-weight: 800;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: var(--page-gutter);
}
.login-panel {
  width: min(100%, 680px);
  padding: clamp(1.4rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
}
.login-copy { margin: clamp(2.4rem, 8vw, 5rem) 0 2.25rem; }
.eyebrow {
  margin: 0 0 .5rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.login-copy h1, .overview h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.login-copy > p:last-child, .overview-copy > p:last-child { max-width: 62ch; color: var(--muted); }
.login-form { display: grid; gap: .75rem; }
.login-form label { font-weight: 700; }
.login-form input {
  width: 100%;
  min-height: 3.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
  color: var(--text);
  padding: .8rem .95rem;
}
.login-form input:hover { border-color: var(--quiet); }
.login-form button, .refresh-button {
  min-height: 3rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 800;
  padding: .75rem 1rem;
}
.login-form button:hover, .refresh-button:hover { background: #9af0d5; }
.google-login { gap: 1rem; }
.google-button-wrap {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.google-test-form { margin: 0; }
.google-test-button {
  display: inline-flex;
  width: min(100%, 320px);
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  border: 1px solid #747775 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #1f1f1f !important;
  font-weight: 650 !important;
}
.google-test-button:hover { background: #f6f9fe !important; }
.google-test-button span {
  color: #4285f4;
  font-size: 1.08rem;
  font-weight: 800;
}
.form-note, .form-error { margin: .25rem 0 0; font-size: .84rem; }
.form-note { color: var(--quiet); }
.form-error { color: var(--danger); }

.app-shell { min-height: 100vh; }
.topbar, .section-nav, .main-shell, footer {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.topbar {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.scope-label, .host-label { color: var(--muted); font-size: .8rem; }
.quiet-button {
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: .5rem .9rem;
}
.quiet-button:hover { border-color: var(--accent); color: var(--accent); }
.section-nav {
  display: flex;
  min-height: 3.25rem;
  align-items: stretch;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.section-nav a {
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .86rem;
  text-decoration: none;
}
.section-nav a:hover, .section-nav a:focus-visible { color: var(--text); border-bottom-color: var(--accent); }
.main-shell { padding-top: clamp(2rem, 5vw, 4.75rem); padding-bottom: 5rem; }

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .34fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
}
.overview h1 { max-width: 14ch; }
.overview-status {
  display: grid;
  align-content: end;
  justify-items: start;
  gap: .4rem;
  min-width: 0;
}
.overview-status > span:not(.status-mark) { margin-top: 1.25rem; color: var(--quiet); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.overview-status > strong { overflow-wrap: anywhere; font-size: .9rem; }
.refresh-button { min-height: 2.75rem; margin-top: 1rem; }
.refresh-button[aria-busy="true"] { cursor: wait; opacity: .7; }
.refresh-message { min-height: 1.4em; margin: .15rem 0 0; color: var(--muted); font-size: .8rem; }

.status-mark {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.status-mark > span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--quiet); }
.status-healthy > span, .status-live > span { background: var(--accent); box-shadow: 0 0 0 4px rgba(118, 230, 195, .1); }
.status-scheduled > span { background: #91b7ff; }
.status-attention > span { background: var(--attention); }

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(2.5rem, 7vw, 6rem) 0;
  border-block: 1px solid var(--line);
}
.signal-strip > div { display: grid; gap: .35rem; padding: 1.3rem 1.5rem; border-right: 1px solid var(--line); }
.signal-strip > div:first-child { padding-left: 0; }
.signal-strip > div:last-child { border-right: 0; padding-right: 0; }
.signal-strip span { color: var(--muted); font-size: .76rem; }
.signal-strip strong { font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1; text-transform: capitalize; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .72fr); gap: clamp(1.5rem, 4vw, 4rem); }
.workspace-secondary { border-left: 1px solid var(--line); padding-left: clamp(1.5rem, 4vw, 3rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.85rem); letter-spacing: -.025em; }
.mode-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .7rem;
  padding: .35rem .65rem;
  text-transform: uppercase;
  white-space: nowrap;
}
.workflow-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.workflow-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line-soft); }
.workflow-row > div:first-child { display: grid; min-width: 0; gap: .25rem; }
.workflow-row strong { font-size: .98rem; }
.workflow-row span:not(.status-mark) { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.workflow-state { display: grid; justify-items: end; align-content: center; gap: .35rem; }
.workflow-state small { color: var(--quiet); text-align: right; }
.usage-number { display: grid; margin: 2rem 0 1rem; }
.usage-number strong { font-size: clamp(3rem, 7vw, 5rem); line-height: .9; letter-spacing: -.06em; }
.usage-number span { color: var(--muted); font-size: .85rem; }
.meter { display: block; width: 100%; height: .55rem; border: 0; border-radius: 999px; background: var(--surface-strong); appearance: none; }
.meter::-webkit-meter-bar { border: 0; border-radius: 999px; background: var(--surface-strong); }
.meter::-webkit-meter-optimum-value { min-width: 2px; border-radius: 999px; background: var(--accent); }
.meter::-moz-meter-bar { min-width: 2px; border-radius: 999px; background: var(--accent); }
.meter-pending { min-height: 2.25rem; border-block: 1px solid var(--line); color: var(--attention); font-size: .78rem; line-height: 2.25rem; }
.definition-list { margin: 1.5rem 0 0; }
.definition-list > div { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line-soft); }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.route-section, .source-section { margin-top: clamp(3.5rem, 8vw, 7.5rem); scroll-margin-top: 1rem; }
.route-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); border-top: 1px solid var(--line); }
.route-list { margin-top: 0; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 0; }
th, td { padding: 1rem .75rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { color: var(--quiet); font-size: .7rem; letter-spacing: .11em; text-transform: uppercase; }
tbody th { font-size: .88rem; }
tbody td { color: var(--muted); font-size: .82rem; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; border-top: 1px solid var(--line-soft); color: var(--quiet); font-size: .75rem; }

@media (min-width: 761px) {
  table { min-width: 720px; }
}

@media (max-width: 760px) {
  .scope-label { display: none; }
  .section-nav { gap: 1rem; overflow-x: auto; }
  .section-nav a { min-height: 3.25rem; }
  .overview, .workspace-grid, .route-grid { grid-template-columns: 1fr; }
  .overview { align-items: start; gap: 1.5rem; }
  .overview-status { padding-top: 1.25rem; border-top: 1px solid var(--line); }
  .signal-strip { grid-template-columns: 1fr 1fr; }
  .signal-strip > div { min-height: 5.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); padding: 1rem; }
  .signal-strip > div:nth-child(2n) { border-right: 0; }
  .signal-strip > div:first-child { padding-left: 0; }
  .signal-strip > div:nth-child(3) { padding-left: 0; border-bottom: 0; }
  .signal-strip > div:nth-child(4) { border-bottom: 0; padding-right: 0; }
  .workspace-secondary { border-left: 0; border-top: 1px solid var(--line); padding: 2.5rem 0 0; }
  .workflow-row { grid-template-columns: 1fr; gap: .6rem; }
  .workflow-state { justify-items: start; }
  .workflow-state small { text-align: left; }
  .route-grid { gap: 0; }
  .route-list + .route-list { margin-top: 0; }
  .host-label { display: none; }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; width: 100%; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  tbody, tbody tr, tbody th, tbody td { display: block; }
  tbody tr { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
  tbody th, tbody td { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  tbody th { grid-column: 1; font-size: .9rem; }
  tbody td:nth-of-type(1) { grid-column: 2; grid-row: 1; }
  tbody td:nth-of-type(2), tbody td:nth-of-type(3) { grid-column: 1 / -1; }
  tbody td:nth-of-type(2)::before, tbody td:nth-of-type(3)::before { content: attr(data-label); display: block; margin-bottom: .18rem; color: var(--quiet); font-size: .62rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
}

@media (max-width: 420px) {
  .topbar { min-height: 4.5rem; }
  .brand-mark { width: 2.2rem; height: 2.2rem; }
  .brand-lockup strong { font-size: .8rem; }
  .brand-lockup small { font-size: .62rem; }
  .quiet-button { padding-inline: .65rem; }
  .section-nav { gap: .85rem; }
  .section-nav a { font-size: .8rem; }
  .section-heading { align-items: start; }
  .signal-strip strong { font-size: 1.4rem; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
