:root {
  color-scheme: light;
  --brand: #1f9d57;
  --brand-strong: #18794a;
  --brand-contrast: #ffffff;
  --brand-soft-bg: #e6f5ec;
  --brand-soft-border: #bfe3cd;
  --brand-soft-text: #18794a;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #f3f4f6;
  --nav-bg: #ffffff;
  --sidebar-bg: #fbfcfd;
  --text: #1d2025;
  --text-muted: #5b6470;
  --text-faint: #8b939e;
  --border: #e4e7ea;
  --border-strong: #d2d7dd;
  --field-border: #cbd1d8;
  --field-bg: #ffffff;
  --ok-bg: #e7f6ed;
  --ok-border: #c3e6d0;
  --ok-text: #157a43;
  --ok-dot: #1f9d57;
  --warn-bg: #fdf3da;
  --warn-border: #f0dca6;
  --warn-text: #8a6414;
  --warn-dot: #e0a020;
  --neutral-bg: #eef0f2;
  --neutral-border: #dadfe4;
  --neutral-text: #5b6470;
  --neutral-dot: #9aa3ae;
  --info-bg: #e7f0f9;
  --info-border: #c4dcf0;
  --info-text: #2b5f95;
  --info-dot: #4098d7;
  --danger-solid: #d64a37;
  --danger-bg: #fdebe7;
  --danger-border: #f3c3b8;
  --danger-text: #b23a26;
  --danger-dot: #d64a37;
  --chart: #4098d7;
  --bar-track: #eceef1;
  --focus: rgba(31, 157, 87, 0.18);
  --shadow-sm: 0 1px 2px rgba(20, 23, 28, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 23, 28, 0.1);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.875rem;
  --text-md: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 3rem;
  --radius-sm: 5px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;
  --container: 1200px;
  --content-max: 1120px;
  --sidebar-w: 248px;
  --dev-banner-h: 32px;
  --nav-h: 56px;
  --chrome-h: calc(var(--dev-banner-h) + var(--nav-h));
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --brand: #34c07a;
    --brand-strong: #5fd197;
    --brand-contrast: #0b1f14;
    --brand-soft-bg: #14271c;
    --brand-soft-border: #2c4a37;
    --brand-soft-text: #6fd3a0;
    --bg: #0a0a0b;
    --surface: #151517;
    --surface-2: #1b1b1d;
    --surface-3: #212123;
    --nav-bg: #0d0d0f;
    --sidebar-bg: #0d0d0f;
    --text: #f5f6f7;
    --text-muted: #a6a7ad;
    --text-faint: #74757b;
    --border: #29292c;
    --border-strong: #38383c;
    --field-border: #34343a;
    --field-bg: #151517;
    --ok-bg: #14271c;
    --ok-border: #2c4a37;
    --ok-text: #6fd3a0;
    --ok-dot: #34c07a;
    --warn-bg: #2e2613;
    --warn-border: #564716;
    --warn-text: #e0b24e;
    --warn-dot: #e0a020;
    --neutral-bg: #26292d;
    --neutral-border: #434851;
    --neutral-text: #a2abb5;
    --neutral-dot: #79818c;
    --info-bg: #16242f;
    --info-border: #2a3f56;
    --info-text: #8fc0ea;
    --info-dot: #4098d7;
    --danger-solid: #c44a37;
    --danger-bg: #2e1813;
    --danger-border: #5a2c22;
    --danger-text: #ef9f8d;
    --danger-dot: #e26a52;
    --chart: #6fb1e0;
    --bar-track: #212123;
    --focus: rgba(52, 192, 122, 0.28);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  }
}
@font-face {
  font-family: "Geist";
  src: url("/assets/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
}

h1 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
  letter-spacing: 0;
}

h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg);
  letter-spacing: 0;
}

h3 {
  margin: var(--space-5) 0 var(--space-3);
  font-size: var(--text-md);
}

p {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
}

p:last-child {
  margin-bottom: 0;
}

code,
pre {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

img,
svg {
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *,
*::before,
*::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
.dev-banner {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--dev-banner-h);
  padding: 0 var(--space-4);
  background: var(--danger-solid);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-align: center;
}

nav {
  position: sticky;
  top: var(--dev-banner-h);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--nav-h);
  padding: 0 var(--space-6);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

nav > div,
.actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

nav form {
  margin: 0;
}

nav a:not(.brand) {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

nav a:not(.brand):hover {
  color: var(--text);
  text-decoration: none;
}

.nav-actions {
  gap: var(--space-3);
}

.nav-actions .nav-signin {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}

.nav-actions .nav-cta {
  min-height: 30px;
  padding: 0 var(--space-3);
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: var(--text-sm);
}

.nav-actions .nav-cta:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: 0;
}

.brand svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--brand);
}

.brand:hover {
  text-decoration: none;
}

main {
  width: min(var(--container), 100vw - 2 * var(--space-5));
  margin: var(--space-7) auto var(--space-8);
}

main:has(.service-shell) {
  width: 100%;
  margin: 0;
  min-height: calc(100vh - var(--chrome-h));
}

.service-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--chrome-h));
}

.service-sidebar {
  position: sticky;
  top: var(--chrome-h);
  align-self: start;
  height: calc(100vh - var(--chrome-h));
  display: grid;
  grid-template-rows: auto 1fr;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
  overflow-y: auto;
}

.service-sidebar-head {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.back-link {
  color: var(--text-faint);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--brand-strong);
  text-decoration: none;
}

.service-sidebar-head strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-base);
  font-weight: 600;
}

.service-sidebar-head code {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  color: var(--text-faint);
  font-size: var(--text-xs);
}

.service-nav {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: var(--space-4) var(--space-3);
}

.service-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.service-nav-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--text-faint);
}

.service-nav-link:hover {
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
}

.service-nav-link:hover svg {
  color: var(--text);
}

.service-nav-link.active {
  background: var(--brand-soft-bg);
  color: var(--brand-soft-text);
}

.service-nav-link.active svg {
  color: var(--brand);
}

.service-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6) var(--space-7);
}

.service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.service-header h1 {
  margin: 0;
}

.service-header .status-line {
  margin: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.service-content {
  min-width: 0;
  display: grid;
  gap: var(--space-4);
  width: 100%;
  max-width: 100%;
}

.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.toolbar h1 {
  margin-bottom: var(--space-1);
}

.toolbar p {
  margin: 0;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--text-sm);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

button:hover,
.button:hover {
  background: var(--surface-3);
  text-decoration: none;
}

button:active,
.button:active {
  transform: translateY(0.5px);
}

.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-contrast);
}

.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.danger {
  background: var(--danger-solid);
  border-color: var(--danger-solid);
  color: #fff;
}

.danger:hover {
  background: var(--danger-solid);
  filter: brightness(0.94);
}

.small {
  min-height: 28px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}

.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
}

.link-button:hover {
  background: transparent;
  text-decoration: underline;
}

.panel,
.card,
.empty {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.panel,
.card {
  box-shadow: var(--shadow-sm);
}

.narrow {
  max-width: 560px;
  margin: 0 auto;
}

.empty {
  display: grid;
  gap: var(--space-4);
  justify-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  color: var(--text-muted);
}

.empty.compact {
  padding: var(--space-5);
  justify-items: start;
  text-align: left;
}

.empty p {
  margin: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 26px;
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.section-title h2 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 var(--space-1);
  color: var(--text-faint);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--brand-strong);
}

.table-section {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding: 2px var(--space-2) 2px 7px;
  border: 1px solid var(--neutral-border);
  border-radius: var(--radius-pill);
  background: var(--neutral-bg);
  color: var(--neutral-text);
  font-size: var(--text-xs);
  line-height: 1.3;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neutral-dot);
  flex: 0 0 auto;
}

.badge.active,
.badge.success {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}

.badge.active::before,
.badge.success::before {
  background: var(--ok-dot);
}

.badge.error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.badge.error::before {
  background: var(--danger-dot);
}

.badge.pending {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.badge.pending::before {
  background: var(--warn-dot);
}

.badge.network {
  padding: 2px var(--space-2);
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info-text);
}

.badge.network::before {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.status-line {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.stack {
  display: grid;
  gap: var(--space-4);
}

.stack > button,
.stack > .button {
  justify-self: start;
}

label {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text);
}

input:not([type=radio]):not([type=checkbox]),
textarea,
select {
  width: 100%;
  min-height: 36px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  font-weight: 400;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--focus);
}

::placeholder {
  color: var(--text-faint);
}

textarea {
  min-height: 96px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

input[type=radio],
input[type=checkbox] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  color: var(--text);
}

fieldset {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

legend {
  padding: 0 var(--space-2);
  font-size: var(--text-sm);
}

.key-block {
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

.error {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--danger-border);
  border-left: 3px solid var(--danger-solid);
  border-radius: var(--radius-md);
  background: var(--danger-bg);
  color: var(--danger-text);
  font-weight: 600;
  font-size: var(--text-sm);
}

.error-inline {
  color: var(--danger-text);
  font-size: var(--text-sm);
}

.events {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.events li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text);
}

.events time {
  color: var(--text-faint);
  font-size: var(--text-xs);
}

.records-table-wrap,
.analytics-table-wrap,
.identity-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
}

.records-table,
.analytics-table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
}

:is(.records-table, .analytics-table) th,
:is(.records-table, .analytics-table) td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

:is(.records-table, .analytics-table) thead th {
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.analytics-grid .analytics-table {
  font-size: var(--text-xs);
}

.analytics-grid .analytics-table th,
.analytics-grid .analytics-table td {
  padding: var(--space-2) var(--space-1);
}

.analytics-grid .analytics-table thead th {
  white-space: normal;
}

.analytics-grid .analytics-table td {
  white-space: nowrap;
}

:is(.records-table, .analytics-table) tbody tr:last-child td {
  border-bottom: 0;
}

.records-table tbody tr:hover,
.analytics-table tbody tr:hover {
  background: var(--surface-2);
}

.empty-cell {
  padding: var(--space-6) !important;
  text-align: center;
  color: var(--text-muted);
}

.analytics-table code,
.identity-address-code,
.truncate-copy {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text);
}

.analytics-path-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
  font: inherit;
  color: inherit;
}

.analytics-table th:last-child,
.analytics-table td:last-child {
  text-align: right;
}

.records-table {
  min-width: 880px;
}

.records-table th:nth-child(1),
.records-table td:nth-child(1) {
  width: 104px;
}

.records-table th:nth-child(2),
.records-table td:nth-child(2) {
  width: 112px;
}

.records-table th:nth-child(4),
.records-table td:nth-child(4) {
  width: 196px;
}

.records-table th:nth-child(5),
.records-table td:nth-child(5) {
  width: 150px;
}

.records-table tfoot td {
  border-bottom: 0;
  background: var(--surface-2);
}

.record-name-input {
  font-family: var(--font-mono);
}

.compact-control,
.records-table input:not([type=checkbox]) {
  min-height: 34px;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-sm);
}

.tls-control {
  width: 100%;
  min-width: 142px;
}

.origin-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}

.origin-fields input {
  min-width: 0;
}

.record-actions {
  white-space: nowrap;
}

.record-actions form {
  display: inline-flex;
  margin-left: var(--space-2);
}

.add-row .muted {
  display: block;
  font-size: var(--text-sm);
}

.identities-table {
  min-width: 1000px;
}

.identities-table th:nth-child(1),
.identities-table td:nth-child(1) {
  width: 120px;
}

.identities-table th:nth-child(2),
.identities-table td:nth-child(2) {
  width: 38%;
}

.identities-table th:nth-child(3),
.identities-table td:nth-child(3) {
  width: 104px;
}

.identities-table th:nth-child(4),
.identities-table td:nth-child(4) {
  width: 172px;
}

.identities-table th:nth-child(5),
.identities-table td:nth-child(5) {
  width: 180px;
}

.identities-table th:nth-child(6),
.identities-table td:nth-child(6) {
  width: 252px;
}

.traffic-log-table {
  min-width: 1060px;
}

.traffic-log-table th:nth-child(1),
.traffic-log-table td:nth-child(1) {
  width: 108px;
}

.traffic-log-table th:nth-child(2),
.traffic-log-table td:nth-child(2) {
  width: 88px;
}

.traffic-log-table th:nth-child(3),
.traffic-log-table td:nth-child(3) {
  width: 82px;
}

.traffic-log-table th:nth-child(5),
.traffic-log-table td:nth-child(5) {
  width: 80px;
}

.traffic-log-table th:nth-child(7),
.traffic-log-table td:nth-child(7) {
  width: 72px;
}

.traffic-log-table th:nth-child(9),
.traffic-log-table td:nth-child(9) {
  width: 86px;
}

.traffic-log-table th:last-child,
.traffic-log-table td:last-child {
  text-align: left;
}

.log-meta {
  display: block;
  color: var(--text-faint);
  font-size: var(--text-sm);
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-transform: capitalize;
}

.hero {
  display: grid;
  align-content: center;
  min-height: min(100vh - var(--chrome-h), 31rem);
  margin: calc(-1 * var(--space-7)) calc(50% - 50vw) 0;
  padding: var(--space-8) max(var(--space-5), (100vw - var(--content-max)) / 2) var(--space-7);
  background: radial-gradient(52% 68% at 86% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 62%), var(--bg);
}

.hero > div {
  max-width: 720px;
}

.hero h1 {
  max-width: 12em;
  margin: var(--space-2) 0 var(--space-4);
  font-size: 2.75rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
}

.hero h1 span:last-child {
  white-space: nowrap;
}

.lede {
  max-width: 620px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.58;
}

.actions {
  margin-top: var(--space-5);
}

.hero .actions {
  gap: var(--space-3);
}

.hero .actions button,
.hero .actions .button {
  width: 220px;
  max-width: 100%;
  min-height: 40px;
  padding: 0 var(--space-5);
  font-size: var(--text-base);
}

.hero .actions .primary {
  border-color: var(--brand-strong);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-5);
  max-width: var(--content-max);
  margin: var(--space-8) auto var(--space-7);
}

.feature {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  max-width: 260px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-1);
  border-radius: var(--radius-md);
  background: var(--brand-soft-bg);
  color: var(--brand);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.signup-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: var(--space-5);
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}

.signup-key-panel,
.signup-confirm-panel {
  display: grid;
  gap: var(--space-4);
}

.signup-key-panel h1,
.signup-confirm-panel h1 {
  margin-bottom: 0;
}

.signup-key-panel p,
.signup-confirm-panel p {
  max-width: 42rem;
}

.signup-key {
  min-height: 136px;
  display: flex;
  align-items: center;
  font-size: var(--text-base);
}

.key-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.key-actions button,
.key-actions .button {
  min-width: 112px;
}

.service-list-card {
  padding: 0;
  overflow: hidden;
}

.service-list {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.service-list th:nth-child(2),
.service-list td:nth-child(2) {
  width: 120px;
}

.service-list th,
.service-list td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.service-list thead th {
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0;
}

.service-list tbody tr:last-child td {
  border-bottom: 0;
}

.service-list tbody tr:hover {
  background: var(--surface-2);
}

.service-list .name a {
  color: var(--text);
  font-size: var(--text-base);
}

.service-list .name a:hover {
  color: var(--brand-strong);
  text-decoration: none;
}

.service-list .routing {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.service-list .go {
  width: 56px;
  text-align: right;
}

.service-list .go a {
  color: var(--text-faint);
  font-size: var(--text-base);
}

.service-list .go a:hover {
  color: var(--brand-strong);
  text-decoration: none;
}

.analytics-stack {
  min-width: 0;
  display: grid;
  gap: var(--space-4);
}

.analytics-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.metric-card {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--surface);
}

.metric-card span {
  color: var(--text-faint);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0;
}

.metric-card strong {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-4);
}

.analytics-grid > .panel {
  grid-column: span 2;
}

.analytics-grid > .panel:nth-last-child(1):nth-child(3n+1) {
  grid-column: 1/-1;
}

.analytics-grid > .panel:nth-last-child(2):nth-child(3n+1),
.analytics-grid > .panel:nth-last-child(1):nth-child(3n+2) {
  grid-column: span 3;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.metric-chip {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.metric-chip strong {
  font-size: var(--text-base);
  line-height: 1;
  color: var(--text);
}

.metric-chip strong,
.hour-row strong,
.bandwidth-row strong {
  font-weight: 400;
}

.hour-list {
  display: grid;
  gap: var(--space-2);
}

.hour-row {
  display: grid;
  grid-template-columns: 84px 1fr 52px 64px;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.bandwidth-head,
.bandwidth-row {
  display: grid;
  grid-template-columns: 84px 1fr 80px 80px 80px;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.bandwidth-head {
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-faint);
}

.hour-row > div,
.bandwidth-row > div {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--bar-track);
  overflow: hidden;
}

.hour-row > div > span,
.bandwidth-row > div > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--chart);
}

.hour-row strong,
.hour-row em,
.bandwidth-row strong,
.bandwidth-row em {
  text-align: right;
  font-style: normal;
  color: var(--text);
}

.hour-row em,
.bandwidth-row em {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.bandwidth-head strong,
.bandwidth-head em {
  text-align: right;
  font-style: normal;
  font-weight: inherit;
  color: inherit;
}

.identity-page {
  display: grid;
  gap: var(--space-5);
}

.identity-error-text {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  color: var(--danger-text);
  font-size: var(--text-sm);
}

.identity-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1);
}

.identity-row-actions form,
.identity-generate-actions form {
  display: inline-flex;
}

.identity-key-panel .key-block {
  max-height: 300px;
  overflow: auto;
}

.identity-key-panel {
  display: grid;
  gap: var(--space-4);
}

.identity-registration-form,
.identity-registration-output {
  display: grid;
  gap: var(--space-3);
}

.identity-registration-form h3,
.identity-registration-output h3 {
  font-size: var(--text-base);
}

.identity-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(340px, 1.2fr);
  gap: var(--space-5);
  align-items: start;
}

.identity-generate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.identity-import-grid {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.identity-import-form textarea {
  min-height: 140px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.danger-zone h2 {
  margin-bottom: var(--space-1);
}

.danger-zone p {
  margin: 0;
  color: var(--danger-text);
}

.muted {
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

@media (max-width: 860px) {
  :root {
    --dev-banner-h: 48px;
  }
  nav {
    padding: 0 var(--space-4);
  }
  .dev-banner {
    padding: 0 var(--space-3);
    font-size: var(--text-xs);
  }
  main {
    width: calc(100vw - 2 * var(--space-4));
    margin-top: var(--space-5);
  }
  main:has(.service-shell) {
    min-height: auto;
  }
  .service-shell {
    display: block;
    min-height: auto;
  }
  .service-sidebar {
    position: static;
    height: auto;
    grid-template-rows: none;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .service-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4) var(--space-4);
  }
  .service-main {
    padding: var(--space-5) var(--space-4) var(--space-7);
  }
  .service-header {
    display: grid;
    gap: var(--space-2);
  }
  .service-header .status-line {
    justify-content: flex-start;
  }
  .toolbar,
.danger-zone {
    display: grid;
  }
  .analytics-grid,
.signup-flow,
.identity-workbench,
.identity-import-grid {
    grid-template-columns: 1fr;
  }
  .analytics-grid > .panel {
    grid-column: 1/-1;
  }
  .hour-row,
.bandwidth-head,
.bandwidth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-1) var(--space-4);
  }
  .hour-row > div,
.bandwidth-row > div,
.bandwidth-head > span {
    display: none;
  }
  .hour-row > time,
.bandwidth-row > time {
    flex: 1 1 100%;
  }
  .records-table-wrap,
.analytics-table-wrap,
.identity-table-wrap {
    max-width: calc(100vw - 2 * var(--space-4));
  }
}
@media (max-width: 700px) {
  .hero {
    min-height: auto;
    padding-top: var(--space-7);
    padding-bottom: var(--space-6);
  }
  .hero h1 {
    max-width: 11em;
    font-size: 2.2rem;
    line-height: 1.06;
  }
  .lede {
    max-width: 34rem;
  }
  .actions {
    gap: var(--space-3);
  }
  .features {
    margin-top: var(--space-5);
  }
  .signup-flow {
    gap: var(--space-4);
  }
}
@media (max-width: 420px) {
  .hero h1 {
    max-width: 10.5em;
    font-size: 1.95rem;
  }
  .actions,
.actions form,
.actions button,
.actions .button {
    width: 100%;
  }
  .key-actions,
.key-actions button,
.key-actions .button,
.signup-confirm-panel .stack > button {
    width: 100%;
  }
}
