:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  color: #e7e9e7;
  background: #0c100f;
  font-synthesis: none;
  --bg: #0c100f;
  --panel: #131917;
  --panel2: #171e1b;
  --line: #28312c;
  --muted: #9ba79f;
  --dim: #738379;
  --green: #b5f37b;
  --positive: #a5e58b;
  --red: #f39494;
  --amber: #e9c778;
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
button {
  border: 0;
}
svg {
  display: block;
}
svg.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button svg {
  pointer-events: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
.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;
}
.skip-link {
  position: fixed;
  left: 260px;
  top: -60px;
  background: var(--green);
  color: #14200d;
  padding: 12px 20px;
  z-index: 20;
}
.skip-link:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  background: #101512;
  z-index: 5;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.7rem;
  letter-spacing: -0.065em;
  font-weight: 750;
  padding: 0 10px;
}
.brand-period {
  color: var(--green);
}
.workspace-label {
  color: var(--dim);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin: 48px 12px 16px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 8px;
  color: #a4afa7;
  font-size: 0.9rem;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
.sidebar nav a:hover {
  background: #1a231d;
  color: #e9eee9;
}
.sidebar nav a.active {
  color: var(--green);
  background: #24311e;
}
.nav-count {
  font-size: 0.75rem;
  padding: 2px 6px;
  background: #26302a;
  border-radius: 4px;
  color: #bec9c0;
  margin-left: auto;
}
.sidebar-note {
  margin: 54px 12px 0;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.small-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--dim);
  font-weight: 600;
}
.sidebar-note p {
  font-size: 0.85rem;
  color: #9ba79f;
  margin-top: 12px;
  line-height: 1.8;
}
.note-line {
  display: block;
  width: 30px;
  height: 2px;
  background: #657b48;
  margin-top: 22px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 22px 10px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.source-mark {
  width: 32px;
  height: 32px;
  background: #232c27;
  border: 1px solid #344038;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #a9bbb0;
}
.sidebar-bottom strong {
  font-size: 0.85rem;
  font-weight: 500;
  display: block;
}
.sidebar-bottom span {
  display: block;
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 3px;
}
.shell {
  margin-left: 224px;
}
.topbar {
  height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.breadcrumb {
  display: flex;
  gap: 14px;
  color: var(--dim);
  font-size: 0.85rem;
}
.breadcrumb strong {
  font-weight: 500;
  color: #c5cfc8;
}
.breadcrumb span {
  color: #45544b;
}
.topbar-right {
  display: flex;
  gap: 22px;
  align-items: center;
}
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
}
.connection.running {
  color: #bdd9ad;
}
.connection.running .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px #b5f37b0b;
}
.connection.stopped {
  color: var(--amber);
}
.connection.stopped .status-dot {
  background: var(--amber);
}
.utc-clock {
  font:
    0.75rem ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  color: var(--dim);
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 36px 40px 20px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.eyebrow {
  color: #a2b198;
  font-size: 0.75rem;
  letter-spacing: 0.17em;
  font-weight: 650;
  margin-bottom: 12px;
}
h1 {
  font-size: 2.05rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.055em;
}
.page-heading p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 11px;
}
.heading-mark {
  height: 46px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding-right: 10px;
}
.heading-mark i {
  width: 6px;
  background: #354d2a;
  transform: skew(-16deg);
  border-radius: 2px;
}
.heading-mark i:nth-child(1) {
  height: 16px;
}
.heading-mark i:nth-child(2) {
  height: 28px;
}
.heading-mark i:nth-child(3) {
  height: 22px;
}
.heading-mark i:nth-child(4) {
  height: 35px;
}
.heading-mark i:nth-child(5) {
  height: 46px;
  background: var(--green);
}
.scope-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
}
.scope-fields {
  display: flex;
  gap: 10px;
}
.scope-fields label {
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding-left: 12px;
  color: var(--muted);
}
select {
  appearance: none;
  color: #dce3dc;
  background: var(--panel)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ba79f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 36px 10px 12px;
  font-size: 0.875rem;
  height: 41px;
  max-width: 100%;
}
.scope-fields select {
  border: 0;
  background-color: transparent;
  padding-left: 10px;
}
.refresh-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--dim);
  font-size: 0.75rem;
}
.auto-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  cursor: pointer;
}
.auto-toggle input {
  position: absolute;
  opacity: 0;
  width: 32px;
  height: 18px;
  cursor: pointer;
}
.switch {
  width: 27px;
  height: 16px;
  border-radius: 20px;
  background: #354139;
  position: relative;
  pointer-events: none;
}
.switch:after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  position: absolute;
  top: 3px;
  left: 3px;
  background: #7c9082;
  border-radius: 50%;
  transition: transform 0.15s;
}
.auto-toggle input:checked + .switch {
  background: #3d582c;
}
.auto-toggle input:checked + .switch:after {
  background: var(--green);
  transform: translateX(11px);
}
.auto-toggle input:focus-visible + .switch {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.icon-button {
  height: 35px;
  width: 35px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 7px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}
.icon-button:hover {
  color: var(--green);
  background: #202a21;
}
.icon-button.refreshing svg {
  animation: spin 0.8s linear infinite;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.kpi {
  padding: 21px 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.kpi.featured {
  background: linear-gradient(120deg, #202f1c, #162017);
  border-color: #435c31;
}
.kpi-label {
  font-size: 0.85rem;
  color: #aebbaf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.kpi-label svg {
  color: #758e77;
}
.kpi.featured .kpi-label svg {
  color: var(--green);
}
.kpi-value {
  font-size: 2.15rem;
  letter-spacing: -0.055em;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin: 17px 0 10px;
}
.kpi.featured .kpi-value {
  color: #c1f79d;
}
.kpi-detail {
  color: var(--dim);
  font-size: 0.75rem;
  line-height: 1.5;
}
.kpi.featured .kpi-detail {
  color: #8ca47e;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}
.panel-header {
  padding: 22px 23px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.panel-header p {
  color: var(--dim);
  font-size: 0.8rem;
  margin-top: 6px;
}
.panel-link {
  color: #b4c5ac;
  font-size: 0.8rem;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #1a211d;
}
.panel-link:hover {
  border-color: #657b48;
  color: var(--green);
}
.chart {
  padding: 16px 18px 12px;
  min-height: 230px;
}
.chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart text {
  font:
    12px ui-sans-serif,
    system-ui,
    sans-serif;
  fill: #84938a;
}
.chart .grid-line {
  stroke: #28312c;
  stroke-dasharray: 3 5;
  stroke-width: 1;
}
.chart .bar {
  fill: #7cab59;
  transition: fill 0.15s;
}
.chart .bar:hover {
  fill: #c1f397;
}
.chart-footer {
  padding: 0 23px 18px;
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 0.75rem;
  gap: 10px;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 7px;
}
.chart-legend:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #7cab59;
}
.pipeline-content {
  padding: 24px;
}
.pipeline-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 13px;
}
.stage-tag {
  font-size: 0.75rem;
  background: #23311e;
  color: #b5d4a2;
  border: 1px solid #384c2f;
  border-radius: 5px;
  padding: 4px 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.progress-track {
  background: #263029;
  height: 6px;
  border-radius: 5px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 5px;
  min-width: 0;
  max-width: 100%;
}
.progress-caption {
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 9px;
}
.pipeline-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 23px;
}
.pipeline-metrics span {
  display: block;
  color: var(--dim);
  font-size: 0.75rem;
}
.pipeline-metrics strong {
  font-size: 1.2rem;
  font-weight: 500;
  display: block;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.coverage-note {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 19px;
  color: #9cab9e;
  font-size: 0.75rem;
  line-height: 1.6;
}
.signal-note {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #3c3b28;
  background: #1d2018;
  border-radius: 9px;
  padding: 16px 20px;
  margin-bottom: 22px;
  color: #c8c3a8;
  font-size: 0.8rem;
  line-height: 1.65;
}
.signal-note > svg {
  color: var(--amber);
  flex-shrink: 0;
}
.signal-note strong {
  font-weight: 600;
  color: #e0d5aa;
}
.table-scroll {
  overflow: auto;
  width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 550;
  color: #84968a;
  padding: 16px 22px;
  background: #141b17;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
th:first-child,
td:first-child {
  text-align: left;
}
td {
  padding: 17px 22px;
  border-bottom: 1px solid #252f28;
  text-align: right;
  color: #c9d3cb;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #19231b;
}
.table-panel .panel-header {
  padding-bottom: 22px;
}
.table-panel td,
.table-panel th {
  padding-left: 20px;
  padding-right: 20px;
}
.wallet-button {
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  text-align: left;
  font-size: 0.875rem;
  color: #e5eae5;
}
.wallet-button:hover .mono {
  color: var(--green);
}
.avatar {
  height: 33px;
  width: 33px;
  border-radius: 9px;
  background: #29372c;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #a0bc98;
  font-size: 0.75rem;
  border: 1px solid #394e36;
  letter-spacing: -0.05em;
}
.avatar.v1 {
  background: #252f3d;
  color: #a0bdd4;
  border-color: #354658;
}
.avatar.v2 {
  background: #352d3d;
  color: #c5acd3;
  border-color: #493c54;
}
.avatar.v3 {
  background: #3b3427;
  color: #d3c09a;
  border-color: #514734;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
  letter-spacing: -0.035em;
}
.wallet-subtitle {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  letter-spacing: 0;
  color: var(--dim);
}
.tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 650;
  padding: 6px 8px;
  border-radius: 5px;
  border: 1px solid #37443c;
  background: #1d2821;
  color: #98aa9b;
}
.tier.best {
  background: #312d1a;
  border-color: #544926;
  color: #e9ce82;
}
.tier.well {
  background: #242d3a;
  border-color: #3b4b61;
  color: #aec3e4;
}
.tier.good {
  background: #21331d;
  border-color: #3e5632;
  color: #b1d69e;
}
.positive {
  color: var(--positive) !important;
}
.negative {
  color: var(--red) !important;
}
.muted {
  color: var(--dim) !important;
}
.table-footnote {
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  color: var(--dim);
  font-size: 0.75rem;
  line-height: 1.6;
}
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.alert-preview {
  margin-top: 22px;
}
.preview-alerts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
}
.preview-alert {
  padding: 0 23px 23px;
  border-right: 1px solid var(--line);
}
.preview-alert:last-child {
  border-right: 0;
}
.alert-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.75rem;
  color: var(--dim);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.alert-type {
  color: #b8d8a7;
  background: #23311f;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}
.alert-time {
  margin-left: auto;
  white-space: nowrap;
}
.alert-preview-text {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #b8c5ba;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--dim);
}
.search-field input {
  width: 220px;
  max-width: 100%;
  border: 0;
  background: none;
  color: #e2e9e2;
  height: 41px;
  outline-offset: 0;
  font-size: 0.875rem;
}
.search-field input::placeholder {
  color: #748378;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 7px;
  background: #202b23;
  border: 1px solid #344434;
  font-size: 0.85rem;
  color: #d4e0ce;
  min-height: 41px;
}
.button:hover {
  background: #293b26;
  border-color: #56714a;
}
.button.primary {
  background: var(--green);
  color: #1b2b13;
  border-color: var(--green);
  font-weight: 600;
}
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 17px 22px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pagination button {
  border: 1px solid var(--line);
  background: #1a221c;
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 0.8rem;
}
.empty-state,
.loading-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.empty-state .empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #344434;
  background: #1d2a1e;
  border-radius: 15px;
  margin: 0 auto 18px;
  color: #a5be96;
}
.empty-state h3,
.loading-state strong {
  display: block;
  color: #d6e0d7;
  font-size: 1.1rem;
  font-weight: 500;
}
.empty-state p,
.loading-state p {
  font-size: 0.875rem;
  margin: 10px auto 20px;
  max-width: 440px;
}
.loader {
  display: block;
  width: 30px;
  height: 30px;
  border: 2px solid #344434;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-banner {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #321d1c;
  border: 1px solid #67413a;
  color: #f2b7aa;
  font-size: 0.875rem;
}
.error-banner button {
  background: none;
  text-decoration: underline;
  margin-left: 12px;
  color: inherit;
}
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.alert-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
}
.alert-card .alert-meta {
  margin-bottom: 15px;
}
.alert-card .alert-type {
  font-size: 0.75rem;
}
.delivery {
  margin-left: 4px;
  font-size: 0.75rem;
  color: #a8b99f;
}
.delivery.unsent {
  color: var(--amber);
}
.alert-card pre {
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #c5d2c7;
  font-size: 0.875rem;
  line-height: 1.8;
  margin: 0;
}
.alert-card details {
  margin-top: 10px;
}
.alert-card summary {
  cursor: pointer;
  color: #b5c6aa;
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.alert-links {
  display: flex;
  gap: 16px;
  margin-top: 15px;
  font-size: 0.8rem;
  color: #b7d99e;
}
.market-title {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-size: 0.8rem;
  color: #d6e2d7;
}
.market-title:hover {
  color: var(--green);
}
.asset-tag {
  font-weight: 600;
  font-size: 0.75rem;
  color: #bdcbbb;
  letter-spacing: 0.03em;
}
.market-status {
  font-size: 0.75rem;
  display: inline-flex;
  padding: 5px 8px;
  background: #222d26;
  border-radius: 5px;
  color: #b5c7b9;
}
.market-status.open {
  color: #b9e395;
  background: #23351c;
}
.market-status.error,
.market-status.ambiguous {
  color: var(--amber);
  background: #302b1c;
}
.page-footer {
  padding: 29px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #6d7e72;
  font-size: 0.75rem;
}
.page-footer strong {
  color: #91a38e;
  font-weight: 500;
}
dialog {
  background: #121914;
  color: #e1e9e1;
  border: 1px solid #3c4d3e;
  border-radius: 16px;
  padding: 0;
  width: min(960px, 94vw);
  max-height: 91vh;
  box-shadow: 0 30px 120px #0009;
}
dialog::backdrop {
  background: #040a06b8;
  backdrop-filter: blur(5px);
}
.detail-header {
  padding: 25px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  position: sticky;
  top: 0;
  background: #141c16;
  z-index: 1;
}
.detail-header h2 {
  font-size: 1.3rem;
  margin-top: 9px;
}
.detail-actions {
  display: flex;
  gap: 8px;
}
.detail-address {
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 9px;
  overflow-wrap: anywhere;
}
.detail-content {
  padding: 25px 28px;
}
.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.detail-stat {
  background: #1b251d;
  border: 1px solid #303d31;
  padding: 16px;
  border-radius: 9px;
}
.detail-stat span {
  display: block;
  font-size: 0.75rem;
  color: #96a890;
}
.detail-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.detail-note {
  font-size: 0.8rem;
  line-height: 1.7;
  color: #aabc9f;
  margin-bottom: 23px;
  padding: 15px 17px;
  border: 1px solid #35472e;
  border-radius: 8px;
  background: #1c2919;
}
.detail-note.warning {
  color: #cabe92;
  border-color: #4d4529;
  background: #26251a;
}
.detail-chart-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.detail-chart-grid .chart {
  min-height: 160px;
}
.detail-chart-grid .panel-header {
  padding: 17px 17px 0;
}
.timing-bars {
  padding: 18px 17px;
}
.timing-row {
  display: grid;
  grid-template-columns: 50px 1fr 40px;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  color: #a3b39b;
}
.timing-row:last-child {
  margin-bottom: 0;
}
.timing-row .progress-track {
  height: 5px;
}
.timing-row .progress-fill {
  background: #819f60;
}
.timing-row > span:last-child {
  text-align: right;
}
.detail-table {
  margin-top: 20px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  border: 1px solid #4c683b;
  border-radius: 8px;
  padding: 12px 20px;
  background: #23321e;
  color: #cfebba;
  box-shadow: 0 8px 30px #0005;
  font-size: 0.875rem;
}
.sort-label {
  background: none;
  padding: 0;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.sort-label.active {
  color: #b6cba9;
}
.sort-label svg {
  width: 12px;
  height: 12px;
}
.asset-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.asset-chip {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 10px 13px;
  font-size: 0.75rem;
  color: #9eaf9f;
  display: flex;
  gap: 12px;
  align-items: center;
}
.asset-chip strong {
  color: #d1dbce;
  font-size: 0.8rem;
  font-weight: 550;
}
.asset-chip b {
  color: #aed38d;
  font-weight: 500;
}
.mini-note {
  font-size: 0.75rem;
  color: var(--dim);
  line-height: 1.65;
  margin: 0 0 18px;
}
.footer-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-legend .tier {
  font-size: 0.75rem;
}
.footer-legend span {
  font-size: 0.75rem;
  color: var(--dim);
}
@media (min-width: 1600px) {
  main {
    padding-top: 44px;
  }
  .kpi {
    padding: 25px;
  }
  .chart {
    padding-top: 20px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 194px;
    padding: 28px 14px;
  }
  .shell {
    margin-left: 194px;
  }
  .topbar {
    padding: 0 26px;
  }
  main {
    padding: 30px 26px 18px;
  }
  .kpi {
    padding: 18px 16px;
  }
  .kpi-value {
    font-size: 1.9rem;
  }
  .kpi-label {
    font-size: 0.8rem;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, 1fr);
    gap: 16px;
  }
  .pipeline-content {
    padding: 22px 18px;
  }
  .refresh-controls #updated {
    display: none;
  }
  .toolbar-left {
    flex-wrap: wrap;
  }
  .preview-alerts {
    grid-template-columns: 1fr;
  }
  .preview-alert {
    padding: 16px 23px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .preview-alert:last-child {
    border-bottom: 0;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 76px;
    padding: 25px 10px;
    align-items: center;
  }
  .brand {
    padding: 0;
  }
  .brand > span,
  .workspace-label,
  .sidebar-note,
  .sidebar-bottom,
  .nav-count {
    display: none;
  }
  .sidebar nav {
    margin-top: 34px;
    gap: 14px;
    width: 100%;
  }
  .sidebar nav a {
    font-size: 0;
    padding: 14px;
    justify-content: center;
    gap: 0;
  }
  .sidebar nav a svg {
    height: 21px;
    width: 21px;
  }
  .shell {
    margin-left: 76px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .chart {
    min-height: 190px;
  }
  .pipeline-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .page-heading p {
    max-width: 530px;
  }
  .heading-mark {
    display: none;
  }
  .detail-chart-grid {
    grid-template-columns: 1fr;
  }
  .search-field input {
    width: 180px;
  }
  .skip-link {
    left: 90px;
  }
}
@media (max-width: 600px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    justify-content: space-between;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .brand > span {
    display: block;
    font-size: 1.4rem;
  }
  .brand {
    gap: 7px;
  }
  .sidebar nav {
    margin: 0;
    width: auto;
    flex-direction: row;
    gap: 5px;
  }
  .sidebar nav a {
    padding: 10px;
  }
  .sidebar nav a svg {
    height: 18px;
    width: 18px;
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    height: 53px;
    padding: 0 18px;
  }
  .topbar-right {
    gap: 10px;
  }
  .utc-clock {
    display: none;
  }
  .breadcrumb {
    font-size: 0.75rem;
    gap: 9px;
  }
  .connection {
    font-size: 0.75rem;
  }
  main {
    padding: 25px 16px 16px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }
  h1 {
    font-size: 1.85rem;
  }
  .page-heading p {
    font-size: 0.85rem;
  }
  .scope-bar {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .scope-fields {
    gap: 7px;
    width: 100%;
  }
  .scope-fields label {
    padding-left: 9px;
    flex: 1;
    min-width: 0;
  }
  .scope-fields select {
    padding-right: 25px;
    font-size: 0.8rem;
    width: 100%;
  }
  .scope-fields svg {
    width: 15px;
    height: 15px;
  }
  .refresh-controls {
    margin-left: auto;
  }
  .refresh-controls #updated {
    display: inline;
  }
  .kpi-grid {
    gap: 10px;
    margin-bottom: 16px;
  }
  .kpi {
    padding: 15px 13px;
    border-radius: 10px;
  }
  .kpi-label {
    font-size: 0.75rem;
    align-items: flex-start;
    line-height: 1.5;
  }
  .kpi-label svg {
    width: 15px;
    height: 15px;
  }
  .kpi-value {
    font-size: 1.9rem;
    margin-top: 13px;
  }
  .kpi-detail {
    font-size: 0.75rem;
  }
  .overview-grid {
    gap: 16px;
    margin-bottom: 16px;
  }
  .panel-header {
    padding: 19px 17px 0;
  }
  h2 {
    font-size: 1rem;
  }
  .panel-header p {
    font-size: 0.75rem;
  }
  .pipeline-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chart {
    padding: 18px 10px 9px;
    min-height: 160px;
  }
  .chart-footer {
    padding: 0 17px 17px;
    font-size: 0.75rem;
  }
  .signal-note {
    padding: 13px 15px;
    font-size: 0.75rem;
    align-items: flex-start;
    gap: 10px;
  }
  .table-panel .panel-header {
    padding: 18px 16px;
  }
  .panel-link {
    font-size: 0.75rem;
    padding: 7px;
  }
  .toolbar,
  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }
  .toolbar-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .toolbar-left .search-field {
    grid-column: 1/-1;
  }
  .search-field input {
    width: 100%;
  }
  .toolbar-right {
    justify-content: space-between;
  }
  .toolbar select {
    width: 100%;
    font-size: 0.8rem;
  }
  .toolbar .button {
    font-size: 0.8rem;
  }
  .pagination {
    padding: 15px;
    font-size: 0.75rem;
  }
  .pagination-controls {
    gap: 5px;
  }
  .pagination button {
    font-size: 0.75rem;
    padding: 7px 9px;
  }
  .page-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.75rem;
  }
  .alert-card {
    padding: 19px 17px;
  }
  .alert-card pre {
    font-size: 0.8rem;
  }
  .alert-time {
    margin-left: 0;
  }
  .detail-header {
    padding: 20px 17px;
  }
  .detail-actions {
    gap: 5px;
  }
  .detail-actions .button {
    padding: 9px;
    font-size: 0.75rem;
  }
  .detail-content {
    padding: 18px 15px;
  }
  .detail-stats {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .detail-stat {
    padding: 13px;
  }
  .detail-stat strong {
    font-size: 1.1rem;
  }
  .detail-chart-grid {
    gap: 12px;
  }
  .detail-note {
    font-size: 0.75rem;
  }
  .detail-header h2 {
    font-size: 1.15rem;
  }
  .detail-address {
    font-size: 0.75rem;
  }
  .skip-link {
    left: 15px;
  }
  .preview-alerts {
    margin-top: 8px;
  }
  .toast {
    width: 90%;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* SVG labels scale with the viewBox; compensate on narrow screens. */
@media (max-width: 600px) {
  .chart text {
    font-size: 22px;
  }
  .detail-chart-grid .chart text {
    font-size: 18px;
  }
}
