:root {
  --c-bg: #eef3f9;
  --c-bg-elev: #ffffff;
  --c-bg-card-2: #f6f9fc;
  --c-bg-feature: #eaf1f9;
  --c-border: #d5e0ec;
  --c-border-strong: #b7c9db;
  --c-text: #0a2540;
  --c-text-soft: #425466;
  --c-text-mute: #6b7b92;
  --c-accent: #0f66e4;
  --c-accent-2: #1a56db;
  --c-accent-soft: #dce9fb;
  --c-accent-glow: rgba(15, 102, 228, 0.22);
  --c-gold: #f8b500;
  --c-gold-text: #b47c00;
  --c-gold-soft: #fff4d6;
  --c-ok: #12b76a;
  --c-ok-soft: #dcfae6;
  --c-warn: #f79009;
  --c-warn-soft: #fef0c7;
  --c-err: #f04438;
  --c-err-soft: #fee4e2;
  --radius: 14px;
  --font: "Inter", "Noto Sans TC", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow-soft: 0 10px 30px rgba(10, 37, 64, 0.06);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--c-text);
  background:
    radial-gradient(1000px 480px at 8% -12%, rgba(15, 102, 228, 0.10), transparent 58%),
    radial-gradient(760px 380px at 92% 0%, rgba(248, 181, 0, 0.08), transparent 55%),
    var(--c-bg);
}
button, input { font: inherit; }
.hidden { display: none !important; }
.mute { color: var(--c-text-mute); font-size: 0.875rem; }
.error { color: #b42318; margin-top: 0.75rem; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.logo {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.25rem 1.5rem 2.5rem;
}
.dash-shell { width: 100%; display: grid; gap: 1rem; }
.lead { color: var(--c-text-soft); margin: 0.35rem 0 0; font-weight: 400; }
h1 { margin: 0; font-size: 1.75rem; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 1.05rem; letter-spacing: -0.01em; }

.login-panel {
  max-width: 420px;
  margin: 3rem auto;
  padding: 1.5rem;
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.field { display: grid; gap: 0.35rem; margin: 1.25rem 0; }
.field span { font-size: 0.85rem; color: var(--c-text-mute); }
.field input, .filters input {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--c-border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--c-text);
}
.field input:focus, .filters input:focus {
  outline: 2px solid var(--c-accent-soft);
  border-color: var(--c-accent);
}

.btn-primary, .btn-ghost {
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 6px 16px var(--c-accent-glow);
}
.btn-primary:hover { background: var(--c-accent-2); }
.btn-ghost {
  background: transparent;
  border-color: var(--c-border-strong);
  color: var(--c-text-soft);
}
.btn-ghost:hover { background: var(--c-bg-card-2); }

/* ---- Hero banner + LED ---- */
.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--c-border);
  background:
    linear-gradient(135deg, rgba(15, 102, 228, 0.08) 0%, rgba(255, 255, 255, 0.96) 42%, rgba(248, 181, 0, 0.08) 100%);
  box-shadow: var(--shadow-soft);
  padding: 1.15rem 1.25rem 1.2rem;
}
.hero-banner__glow {
  position: absolute;
  inset: auto -10% -40% auto;
  width: 320px;
  height: 220px;
  background: radial-gradient(circle, rgba(15, 102, 228, 0.16), transparent 70%);
  pointer-events: none;
}
.hero-banner__top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.1rem;
}
.hero-banner__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-accent);
}
.hero-banner__aside {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.led {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #98a2b3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  position: relative;
}
.led::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.28;
  filter: blur(4px);
}
.led--sm { width: 12px; height: 12px; }
.metric-card--db[data-state="ok"] .led,
.led[data-state="ok"],
#healthLed[data-state="ok"],
#dbLed[data-state="ok"] {
  background: var(--c-ok);
  animation: led-pulse 2.4s ease-in-out infinite;
}
.metric-card--db[data-state="warn"] .led,
.led[data-state="warn"],
#healthLed[data-state="warn"],
#dbLed[data-state="warn"] {
  background: var(--c-warn);
  animation: led-pulse 1.6s ease-in-out infinite;
}
.metric-card--db[data-state="err"] .led,
.led[data-state="err"],
#healthLed[data-state="err"],
#dbLed[data-state="err"] {
  background: var(--c-err);
  animation: led-pulse 0.9s ease-in-out infinite;
}
.metric-card--db[data-state="unknown"] .led,
.led[data-state="unknown"],
#healthLed[data-state="unknown"],
#dbLed[data-state="unknown"] {
  background: #98a2b3;
  animation: none;
}
@keyframes led-pulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.18); transform: scale(1.06); }
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--c-gold-soft);
  color: var(--c-gold-text);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(248, 181, 0, 0.35);
}

.btn-icon-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--c-text-soft);
  cursor: pointer;
  box-shadow: none;
  outline: none;
}
.btn-icon-refresh:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--c-accent);
}
.btn-icon-refresh:focus-visible {
  box-shadow: 0 0 0 2px rgba(15, 102, 228, 0.35);
}
.btn-icon-refresh:active {
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}
.metric-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 88px;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--c-border);
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.04);
}
.metric-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--mono);
}
.metric-card--health .metric-card__icon,
.metric-card--db .metric-card__icon {
  background: var(--c-ok-soft);
}
.metric-card__body { min-width: 0; }
.metric-label {
  color: var(--c-text-mute);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.metric-value {
  margin-top: 0.15rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.metric-hint {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--c-text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.led-wrap {
  background: transparent !important;
}

.filters-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem;
  margin: 0;
}
.filters input { min-width: 120px; flex: 1; }

.card {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.table-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, #fbfdff 0%, #f7fafd 100%);
}
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td {
  text-align: left;
  padding: 0.85rem 0.85rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
td.time-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
td.time-cell .tz {
  display: block;
  margin-top: 0.15rem;
  color: var(--c-text-mute);
  font-size: 0.75rem;
  font-weight: 500;
}
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable:hover { color: var(--c-accent); }
th.sortable .sort-ind { margin-left: 0.25rem; opacity: 0.55; font-size: 0.75rem; }
th.sortable.is-active { color: var(--c-accent); }
th.sortable.is-active .sort-ind { opacity: 1; }

.tps-cell {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 8px;
  padding: 0.2rem 0.55rem;
  display: inline-block;
  min-width: 3.5rem;
  text-align: right;
  border: 1px solid rgba(15, 37, 64, 0.06);
  background: #e8f1fb;
  color: #2f4f73;
}
.tps-cell.is-empty {
  color: var(--c-text-mute);
  background: transparent;
  border-color: transparent;
  font-weight: 500;
}
.tps-cell.chip-tone-0 { background: #e8f1fb; color: #2f4f73; border-color: rgba(47, 79, 115, 0.10); }
.tps-cell.chip-tone-1 { background: #eaf6ef; color: #2f5a42; border-color: rgba(47, 90, 66, 0.10); }
.tps-cell.chip-tone-2 { background: #f7efe6; color: #6a4b2c; border-color: rgba(106, 75, 44, 0.10); }
.tps-cell.chip-tone-3 { background: #f1eaf8; color: #56406f; border-color: rgba(86, 64, 111, 0.10); }
.tps-cell.chip-tone-4 { background: #eaf5f5; color: #2f5b5c; border-color: rgba(47, 91, 92, 0.10); }
.tps-cell.chip-tone-5 { background: #f8eef1; color: #6b3f4d; border-color: rgba(107, 63, 77, 0.10); }
.tps-cell.chip-tone-6 { background: #f3f2e7; color: #5a5632; border-color: rgba(90, 86, 50, 0.10); }
.tps-cell.chip-tone-7 { background: #eef0f7; color: #3f4663; border-color: rgba(63, 70, 99, 0.10); }
.rank-cell,
.ttft-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--c-text);
  white-space: nowrap;
}
.rank-cell {
  color: var(--c-accent-2);
}
.ttft-cell .unit,
.ttft-hot .unit {
  margin-left: 0.12rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--c-text-mute);
}
.rank-cell.is-empty,
.ttft-cell.is-empty {
  font-weight: 500;
  color: var(--c-text-mute);
}
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--c-accent-soft); }
tbody tr:last-child td { border-bottom: none; }
tbody tr.is-focus {
  background: rgba(15, 102, 228, 0.14);
  box-shadow: inset 0 0 0 2px var(--c-accent);
  outline: none;
}
tbody tr.is-focus:hover { background: rgba(15, 102, 228, 0.18); }
tbody tr.is-focus:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}
.table-card {
  overflow: hidden;
  border-radius: var(--radius);
}
.mono { font-family: var(--mono); font-size: 0.8rem; }
.chip {
  display: inline-block;
  margin: 0.1rem 0.25rem 0.1rem 0;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #e8eef6;
  color: #334155;
  border: 1px solid rgba(15, 37, 64, 0.06);
  font-size: 0.75rem;
  font-weight: 600;
}
/* Soft pastel tones — muted so the table stays calm; neighbors differ */
.chip.chip-tone-0 { background: #e8f1fb; color: #2f4f73; border-color: rgba(47, 79, 115, 0.10); }
.chip.chip-tone-1 { background: #eaf6ef; color: #2f5a42; border-color: rgba(47, 90, 66, 0.10); }
.chip.chip-tone-2 { background: #f7efe6; color: #6a4b2c; border-color: rgba(106, 75, 44, 0.10); }
.chip.chip-tone-3 { background: #f1eaf8; color: #56406f; border-color: rgba(86, 64, 111, 0.10); }
.chip.chip-tone-4 { background: #eaf5f5; color: #2f5b5c; border-color: rgba(47, 91, 92, 0.10); }
.chip.chip-tone-5 { background: #f8eef1; color: #6b3f4d; border-color: rgba(107, 63, 77, 0.10); }
.chip.chip-tone-6 { background: #f3f2e7; color: #5a5632; border-color: rgba(90, 86, 50, 0.10); }
.chip.chip-tone-7 { background: #eef0f7; color: #3f4663; border-color: rgba(63, 70, 99, 0.10); }

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--c-text-mute);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
}
.pager-pages {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.pager-pages .page-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #fff;
  color: var(--c-text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.pager-pages .page-btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}
.pager-pages .page-btn.is-active {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  color: var(--c-accent);
  cursor: default;
}
.pager-pages .page-ellipsis {
  padding: 0 0.2rem;
  color: var(--c-text-mute);
  font-size: 0.82rem;
}
.pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.pager-jump input {
  width: 3.4rem;
  height: 2rem;
  padding: 0 0.4rem;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
  text-align: center;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, 0.34);
  backdrop-filter: blur(2px);
}
.drawer-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 960px);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem 1.15rem;
  overflow: hidden;
  animation: drawer-in 160ms ease-out;
}
@keyframes drawer-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.drawer-head__copy { min-width: 0; }
.drawer-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-mute);
}
.drawer-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-all;
  color: var(--c-text);
}
.drawer-meta {
  font-size: 0.85rem;
  line-height: 1.45;
}
.drawer-body {
  display: grid;
  gap: 0.55rem;
  overflow: auto;
  min-height: 0;
  padding-right: 0.15rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
.detail-card {
  background: var(--c-bg-card-2);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  box-shadow: none;
}
.detail-card--wide { grid-column: 1 / -1; }
.detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  margin-bottom: 0.3rem;
}
.detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-text);
  word-break: break-word;
}
.detail-value.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
}
.detail-hint {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--c-text-mute);
}
.detail-score {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.detail-score__num {
  font-family: var(--mono);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--c-accent);
  line-height: 1;
}
.detail-score__rating {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--c-accent-soft);
  color: var(--c-accent-2);
  font-size: 0.78rem;
  font-weight: 700;
}
.detail-models-hero {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.7rem 0.65rem;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(232, 241, 251, 0.55), rgba(255, 255, 255, 0.9));
}
.detail-models-hero__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.detail-models-hero__head .detail-label { margin-bottom: 0; }
.detail-models-hero__hint {
  margin: 0;
  font-size: 0.72rem;
}
.detail-models-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0;
}
.detail-models {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.82rem;
}
.detail-models th,
.detail-models td {
  padding: 0.35rem 0.35rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-models th {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-mute);
  font-weight: 700;
  background: transparent;
  white-space: nowrap;
}
.detail-models tr:last-child td { border-bottom: none; }
.detail-models .num,
.detail-models th.num,
.detail-models td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.detail-models col.col-model { width: 28%; }
.detail-models col.col-rank { width: 12%; }
.detail-models col.col-tps { width: 14%; }
.detail-models col.col-ttft { width: 14%; }
.detail-models col.col-class { width: 16%; }
.detail-models col.col-st { width: 16%; }
.detail-models .col-class,
.detail-models .col-st {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--c-text-soft);
}
.detail-models .chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-models .chip-model {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.16rem 0.55rem;
}
.detail-models .tps-hot,
.detail-models .ttft-hot,
.detail-models .rank-hot {
  display: inline-block;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--c-text);
}
.detail-models .tps-hot {
  color: var(--c-accent);
  background: var(--c-accent-soft);
  border-radius: 8px;
  padding: 0.1rem 0.4rem;
}
.detail-models .rank-hot {
  color: var(--c-accent-2);
}
.detail-models .ttft-hot {
  color: var(--c-text);
}
.detail-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-bg-card-2);
}
.detail-kv {
  min-width: 0;
  padding: 0.2rem 0;
}
.detail-kv--wide {
  grid-column: 1 / -1;
}
.detail-kv__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  margin-bottom: 0.12rem;
}
.detail-kv__value {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--c-text);
  word-break: break-word;
  line-height: 1.35;
}
.detail-kv__value .mono {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
}
.detail-kv__hint {
  display: inline;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--c-text-mute);
}
.detail-kv__value .chip {
  margin-right: 0.25rem;
}
.drawer-raw {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.drawer-raw summary {
  cursor: pointer;
  list-style: none;
  padding: 0.7rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-soft);
  background: linear-gradient(180deg, #fbfdff 0%, #f7fafd 100%);
  border-bottom: 1px solid transparent;
  user-select: none;
}
.drawer-raw summary::-webkit-details-marker { display: none; }
.drawer-raw[open] summary {
  border-bottom-color: var(--c-border);
}
.drawer-raw .json {
  max-height: 220px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--c-bg-card-2);
}
.json {
  flex: 1;
  margin: 0;
  overflow: auto;
  padding: 0.9rem;
  background: var(--c-bg-card-2);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--c-text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .hero-banner__top { flex-direction: column; }
  .hero-banner__aside { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .metrics { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-compact { grid-template-columns: 1fr; }
  .drawer { padding: 0.75rem; }
  .drawer-panel { max-height: 92vh; }
}
