:root {
  color-scheme: dark;
  --bg: #05070a;
  --sidebar: #070a0f;
  --surface: rgba(255, 255, 255, 0.026);
  --surface-raised: rgba(255, 255, 255, 0.044);
  --surface-strong: #10161d;
  --border: rgba(255, 255, 255, 0.075);
  --border-soft: rgba(255, 255, 255, 0.045);
  --border-cyan: rgba(55, 221, 255, 0.28);
  --text: #f3f7fa;
  --text-2: #cad4dc;
  --muted: #83909b;
  --muted-2: #7d8994;
  --cyan: #37ddff;
  --cyan-bright: #9aecff;
  --cyan-dark: #092b35;
  --gold: #f2b84b;
  --green: #59d99e;
  --orange: #ff9c55;
  --red: #ff747b;
  --sidebar-width: 254px;
  --topbar-height: 92px;
  --radius: 12px;
  --font-sans: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% -18%, rgba(55, 221, 255, 0.095), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "cv01", "ss03";
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 18px;
  top: -64px;
  padding: 10px 14px;
  border-radius: 7px;
  background: var(--cyan);
  color: #001017;
  font-weight: 700;
  transition: top 160ms ease;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 24px 18px 18px;
  border-right: 1px solid var(--border-soft);
  background: rgba(7, 10, 15, 0.97);
  backdrop-filter: blur(20px);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 20px;
}
.brand-emblem {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: cover;
  border: 1px solid rgba(55, 221, 255, 0.25);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(55, 221, 255, 0.09);
}
.brand-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1.2;
}
.brand-name span { color: var(--cyan); }
.brand-subtitle { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.environment-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin: 0 6px 24px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  font-weight: 600;
}
.pulse-dot, .status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}
.pulse-dot.is-live { background: var(--green); box-shadow: 0 0 0 4px rgba(89, 217, 158, 0.1); }
.pulse-dot.is-error { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 116, 123, 0.1); }
.primary-nav { display: grid; gap: 4px; }
.nav-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #8995a0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 560;
  text-align: left;
  transition: 140ms ease;
}
.nav-item:hover { color: var(--text-2); background: rgba(255, 255, 255, 0.028); }
.nav-item.is-active {
  color: var(--text);
  border-color: var(--border-cyan);
  background: linear-gradient(90deg, rgba(55, 221, 255, 0.095), rgba(55, 221, 255, 0.02));
  box-shadow: inset 2px 0 0 var(--cyan);
}
.nav-icon { width: 18px; color: currentColor; font-family: var(--font-mono); font-size: 15px; text-align: center; }
.nav-item.is-active .nav-icon { color: var(--cyan); }
.sidebar-trust {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(55, 221, 255, 0.045), rgba(255, 255, 255, 0.018));
}
.trust-kicker, .panel-kicker {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sidebar-trust p { margin: 9px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.sidebar-trust a { color: var(--text-2); font-size: 11px; text-decoration: none; }
.sidebar-trust a:hover { color: var(--cyan-bright); }
.sidebar-version { display: flex; justify-content: space-between; padding: 15px 7px 0; color: var(--muted-2); font: 10px/1 var(--font-mono); }

.workspace { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 16px 30px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(5, 7, 10, 0.88);
  backdrop-filter: blur(20px);
}
.breadcrumb { margin-bottom: 5px; color: var(--muted-2); font: 10px/1.2 var(--font-mono); letter-spacing: 0.1em; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 560; letter-spacing: -0.025em; }
.connection-panel { display: flex; align-items: end; gap: 9px; }
.compact-field { display: grid; gap: 5px; }
.compact-field > span, .form-grid label > span { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.compact-field input { width: 122px; }
.compact-field.token-field input { width: 200px; }
.connection-status { min-width: 85px; align-self: center; color: var(--muted); font-size: 11px; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  caret-color: var(--cyan);
  outline: none;
  transition: border-color 140ms ease, background 140ms ease;
}
input { height: 38px; padding: 0 11px; }
select { height: 40px; padding: 0 11px; }
textarea { min-height: 90px; resize: vertical; padding: 10px 11px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #4f5b65; }
input:focus, select:focus, textarea:focus { border-color: rgba(55, 221, 255, 0.58); background: rgba(55, 221, 255, 0.035); box-shadow: 0 0 0 3px rgba(55, 221, 255, 0.07); }

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 660;
  white-space: nowrap;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.42; }
.button-primary { border-color: var(--cyan); background: var(--cyan); color: #001017; box-shadow: 0 0 24px rgba(55, 221, 255, 0.12); }
.button-primary:hover:not(:disabled) { background: var(--cyan-bright); }
.button-ghost { background: rgba(255, 255, 255, 0.026); color: var(--text-2); }
.button-ghost:hover:not(:disabled) { border-color: rgba(55, 221, 255, 0.28); background: rgba(55, 221, 255, 0.045); color: var(--text); }
.button-danger { border-color: rgba(255, 116, 123, 0.38); background: rgba(255, 116, 123, 0.08); color: #ffb4b8; }
.full-width { width: 100%; }
.text-button { padding: 5px 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.text-button:hover { color: var(--cyan-bright); }

main { max-width: 1680px; margin: 0 auto; padding: 28px 30px 56px; }
.view { display: none; animation: view-in 180ms ease both; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.notice {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid var(--border-cyan);
  border-radius: 9px;
  background: rgba(55, 221, 255, 0.045);
}
.notice-mark { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; border: 1px solid rgba(55, 221, 255, 0.35); border-radius: 50%; color: var(--cyan); font: 700 12px/1 var(--font-mono); }
.notice strong { display: block; font-size: 12px; font-weight: 650; }
.notice span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.notice-success { border-color: rgba(89, 217, 158, 0.28); background: rgba(89, 217, 158, 0.045); }
.notice-success .notice-mark { border-color: rgba(89, 217, 158, 0.35); color: var(--green); }
.notice-error { border-color: rgba(255, 116, 123, 0.3); background: rgba(255, 116, 123, 0.045); }
.notice-error .notice-mark { border-color: rgba(255, 116, 123, 0.38); color: var(--red); }
.notice-warning { border-color: rgba(242, 184, 75, 0.3); background: rgba(242, 184, 75, 0.045); }
.notice-warning .notice-mark { border-color: rgba(242, 184, 75, 0.38); color: var(--gold); }
.compact-notice { margin: 0; padding: 11px 12px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi-card, .panel {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
}
.kpi-card { min-height: 132px; padding: 19px 20px 17px; border-radius: var(--radius); overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(55, 221, 255, 0.34), transparent); opacity: 0.45; }
.kpi-label { color: var(--muted); font-size: 10px; font-weight: 660; letter-spacing: 0.08em; text-transform: uppercase; }
.kpi-value { margin-top: 12px; color: var(--text); font-size: 31px; font-weight: 570; letter-spacing: -0.055em; line-height: 1; font-variant-numeric: tabular-nums; }
.status-value { font-size: 23px; letter-spacing: -0.025em; }
.kpi-meta { display: flex; align-items: center; gap: 7px; margin-top: 14px; color: var(--muted-2); font-size: 10px; }
.status-dot.neutral { background: var(--muted-2); }
.status-dot.success { background: var(--green); box-shadow: 0 0 0 3px rgba(89, 217, 158, 0.09); }
.status-dot.warning { background: var(--orange); }
.status-dot.danger { background: var(--red); }
.text-success { color: var(--green) !important; }
.text-warning { color: var(--orange) !important; }
.text-danger { color: var(--red) !important; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr); gap: 12px; margin-bottom: 12px; }
.panel { border-radius: var(--radius); }
.panel-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 19px; border-bottom: 1px solid var(--border-soft); }
.panel-header h2, .section-intro h2, .evidence-primary h2 { margin: 5px 0 0; font-size: 16px; font-weight: 570; letter-spacing: -0.018em; }
.panel-chip, .badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font: 10px/1 var(--font-mono);
}
.badge-success { border-color: rgba(89, 217, 158, 0.3); color: var(--green); background: rgba(89, 217, 158, 0.06); }
.badge-warning { border-color: rgba(255, 156, 85, 0.3); color: var(--orange); background: rgba(255, 156, 85, 0.06); }
.badge-danger { border-color: rgba(255, 116, 123, 0.3); color: var(--red); background: rgba(255, 116, 123, 0.06); }
.chart-frame { padding: 8px 18px 0; }
.chart-frame svg { display: block; width: 100%; height: 238px; overflow: visible; }
.chart-grid line { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }
.chart-area { fill: url(#activity-fill); }
.chart-line { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(55, 221, 255, 0.22)); }
.chart-point { fill: var(--bg); stroke: var(--cyan); stroke-width: 2; }
.chart-empty { fill: var(--muted-2); font: 12px var(--font-sans); }
.chart-legend { display: flex; justify-content: space-between; gap: 20px; padding: 0 20px 17px; color: var(--muted-2); font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 8px; }
.legend-line { width: 18px; height: 2px; background: var(--cyan); box-shadow: 0 0 6px rgba(55, 221, 255, 0.25); }
.checkpoint-panel { overflow: hidden; }
.checkpoint-orbit { height: 120px; display: grid; place-items: center; position: relative; margin: 12px 20px 0; }
.checkpoint-orbit::before, .checkpoint-orbit::after { content: ""; position: absolute; border: 1px solid rgba(55, 221, 255, 0.14); border-radius: 50%; }
.checkpoint-orbit::before { width: 104px; height: 104px; }
.checkpoint-orbit::after { width: 76px; height: 76px; border-color: rgba(242, 184, 75, 0.18); }
.orbit-core { width: 48px; height: 48px; display: grid; place-items: center; z-index: 1; border: 1px solid rgba(55, 221, 255, 0.55); border-radius: 50%; background: radial-gradient(circle, rgba(55, 221, 255, 0.16), rgba(55, 221, 255, 0.02)); color: var(--cyan-bright); font: 650 13px/1 var(--font-mono); box-shadow: 0 0 28px rgba(55, 221, 255, 0.12); }
.checkpoint-panel .detail-list { padding: 0 19px; }
.checkpoint-panel .button { margin: 14px 19px 18px; width: calc(100% - 38px); }

.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 0; color: var(--text-2); font-size: 11px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-list.spacious { padding: 9px 19px 16px; }
.detail-list.spacious > div { padding: 13px 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap { white-space: normal !important; overflow-wrap: anywhere; }

.table-panel { overflow: hidden; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { height: 42px; padding: 0 16px; color: var(--muted); background: rgba(255, 255, 255, 0.013); font-size: 9px; font-weight: 680; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { height: 49px; padding: 8px 16px; border-top: 1px solid var(--border-soft); color: var(--text-2); vertical-align: middle; }
tbody tr:hover:not(.empty-row) { background: rgba(55, 221, 255, 0.018); }
.empty-row td { height: 88px; color: var(--muted-2); text-align: center; }
.cell-muted { color: var(--muted); }
.hash-cell { max-width: 132px; color: var(--muted); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-badge { display: inline-flex; align-items: center; min-height: 22px; max-width: 210px; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); background: rgba(255, 255, 255, 0.018); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-badge.success { border-color: rgba(89, 217, 158, 0.24); color: #89e7b9; background: rgba(89, 217, 158, 0.045); }
.cell-badge.warning { border-color: rgba(255, 156, 85, 0.24); color: #ffc095; background: rgba(255, 156, 85, 0.045); }
.cell-badge.danger { border-color: rgba(255, 116, 123, 0.25); color: #ffafb3; background: rgba(255, 116, 123, 0.045); }
.panel-footer { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 8px 15px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 10px; }

.section-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 2px 0 20px; }
.section-intro h2 { margin-top: 7px; font-size: 25px; letter-spacing: -0.035em; }
.section-intro p { max-width: 730px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.toolbar { display: flex; gap: 9px; }
.search-field input { width: 250px; }
.ledger-table-panel table { min-width: 1120px; }

.evidence-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr); gap: 12px; margin-bottom: 12px; }
.evidence-primary { min-height: 360px; display: flex; flex-direction: column; justify-content: center; padding: 34px; overflow: hidden; background: radial-gradient(circle at 92% 14%, rgba(55, 221, 255, 0.13), transparent 17rem), var(--surface); }
.evidence-primary::after { content: ""; position: absolute; inset: auto -70px -120px auto; width: 260px; height: 260px; border: 1px solid rgba(55, 221, 255, 0.1); border-radius: 50%; }
.evidence-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 24px; border: 1px solid var(--border-cyan); border-radius: 11px; color: var(--cyan); background: rgba(55, 221, 255, 0.05); font: 23px/1 var(--font-mono); }
.evidence-primary h2 { max-width: 600px; margin: 9px 0 13px; font-size: 28px; letter-spacing: -0.04em; }
.evidence-primary p { max-width: 700px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.action-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.result-box { margin-top: 18px; padding: 11px 13px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); background: rgba(0, 0, 0, 0.16); font: 10px/1.5 var(--font-mono); overflow-wrap: anywhere; }
.fingerprint-list { display: grid; gap: 8px; padding: 17px 19px 19px; }
.fingerprint { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(255, 255, 255, 0.014); }
.fingerprint-index { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; color: var(--cyan); font: 9px/1 var(--font-mono); }
.fingerprint code { min-width: 0; color: var(--text-2); font: 10px/1.5 var(--font-mono); overflow-wrap: anywhere; }
.empty-state { padding: 28px; color: var(--muted-2); font-size: 11px; text-align: center; }

.records-grid, .system-grid { display: grid; grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr); gap: 12px; margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 19px; }
.form-grid label { display: grid; gap: 7px; }
.form-grid .full-span { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 13px; }
.form-hint { color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.trust-key { max-width: 310px; color: var(--muted); font: 10px/1.45 var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-action { min-height: 30px; padding-inline: 10px; font-size: 10px; }
.admin-locked { opacity: 0.58; }
.admin-locked form { pointer-events: none; }
.admin-locked::after { content: "Admin role required"; position: absolute; inset: 12px 12px auto auto; padding: 5px 8px; border: 1px solid rgba(255, 156, 85, 0.25); border-radius: 999px; color: var(--orange); background: rgba(5, 7, 10, 0.88); font-size: 9px; }

.check-list { display: grid; padding: 10px 19px 17px; }
.check-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid var(--border-soft); }
.check-row:last-child { border-bottom: 0; }
.check-row strong { font-size: 11px; font-weight: 550; }
.check-row span:last-child { color: var(--muted); font: 9px/1 var(--font-mono); }

.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; width: min(360px, calc(100vw - 40px)); display: grid; gap: 9px; }
.toast { padding: 13px 14px; border: 1px solid var(--border); border-radius: 9px; background: rgba(14, 20, 27, 0.98); box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4); color: var(--text-2); font-size: 11px; animation: toast-in 180ms ease both; }
.toast.success { border-color: rgba(89, 217, 158, 0.3); }
.toast.error { border-color: rgba(255, 116, 123, 0.32); }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.noscript { position: fixed; z-index: 999; inset: auto 20px 20px; padding: 13px; border: 1px solid var(--red); border-radius: 8px; background: #241013; color: #ffd7d9; }

@media (max-width: 1180px) {
  :root { --sidebar-width: 218px; }
  .brand-subtitle, .sidebar-trust { display: none; }
  .topbar { align-items: flex-start; }
  .connection-panel { flex-wrap: wrap; justify-content: flex-end; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid, .evidence-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --sidebar-width: 100%; }
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand-lockup { padding: 0; }
  .brand-emblem { width: 36px; height: 36px; flex-basis: 36px; }
  .brand-name { font-size: 13px; }
  .brand-subtitle, .environment-pill, .sidebar-trust, .sidebar-version { display: none; }
  .primary-nav { display: flex; justify-content: flex-start; gap: 2px; min-width: 0; overflow-x: auto; }
  .nav-item { width: auto; min-height: 36px; padding: 0 10px; }
  .nav-item span:last-child { display: none; }
  .nav-item.is-active span:last-child { display: inline; }
  .nav-icon { width: 15px; }
  .workspace { margin-left: 0; }
  .topbar { position: static; min-height: auto; display: grid; padding: 16px; }
  .connection-panel { justify-content: flex-start; }
  main { padding: 20px 16px 44px; }
  .records-grid, .system-grid { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .topbar h1 { font-size: 19px; }
  .connection-panel { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .compact-field input, .compact-field.token-field input { width: 100%; }
  .connection-status { min-width: 0; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-card { min-height: 118px; padding: 16px; }
  .kpi-value { font-size: 26px; }
  .status-value { font-size: 18px; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .toolbar { width: 100%; }
  .search-field { flex: 1; }
  .search-field input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full-span { grid-column: auto; }
  .evidence-primary { padding: 24px; }
  .evidence-primary h2 { font-size: 23px; }
  .chart-frame { padding-inline: 8px; }
  .chart-legend { align-items: flex-start; flex-direction: column; }
}

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