:root {
  --bg-0: #070d0f;
  --bg-1: #0d1a20;
  --bg-2: #102933;
  --panel: rgba(8, 16, 19, 0.78);
  --panel-border: rgba(103, 180, 170, 0.25);
  --text: #ecf5f3;
  --subtle: #9db8b5;
  --signal: #61e0c8;
  --warn: #ff9f59;
  --danger: #ff5e5e;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

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

body {
  color: var(--text);
  font-family: "Newsreader", serif;
  background: radial-gradient(circle at 14% 18%, #1b3f3d 0%, transparent 40%),
    radial-gradient(circle at 82% 12%, #4f3020 0%, transparent 34%),
    linear-gradient(145deg, var(--bg-0), var(--bg-1) 40%, var(--bg-2));
  overflow-x: hidden;
}

.bg-mesh {
  position: fixed;
  inset: -20vh -20vw;
  pointer-events: none;
  background: conic-gradient(
    from 140deg at 74% 56%,
    rgba(255, 166, 95, 0.12),
    rgba(96, 223, 206, 0.08),
    rgba(255, 166, 95, 0.12)
  );
  filter: blur(70px);
  z-index: -2;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 0.5px, transparent 0);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
  opacity: 0.3;
}

.topbar {
  width: min(1280px, calc(100vw - 32px));
  margin: 22px auto 0;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(6, 12, 15, 0.78), rgba(11, 24, 28, 0.7));
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.kicker {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--signal);
}

h1 {
  margin: 8px 0 0;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(26px, 4.6vw, 44px);
  line-height: 1.06;
  letter-spacing: 0.01em;
}

.status-chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 8px 14px;
  color: var(--subtle);
  background: rgba(0, 0, 0, 0.2);
}

.status-chip.ok {
  color: #0f251f;
  border-color: transparent;
  background: var(--signal);
}

.status-chip.warn {
  color: #27180d;
  border-color: transparent;
  background: var(--warn);
}

.status-chip.bad {
  color: #fff;
  border-color: transparent;
  background: var(--danger);
}

.layout {
  width: min(1280px, calc(100vw - 32px));
  margin: 18px auto 32px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#overview-section,
#ops-section,
#accounts-section,
#models-section,
#config-section {
  scroll-margin-top: 18px;
}

.layout > * {
  min-width: 0;
}

.mobile-nav {
  display: none;
}

.mobile-nav-link {
  text-decoration: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(5px);
  animation: panel-rise 420ms ease both;
  min-width: 0;
}

.panel-wide {
  grid-column: 1 / -1;
}

.fold-panel {
  border: 1px solid rgba(103, 180, 170, 0.18);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10, 20, 24, 0.7), rgba(13, 16, 18, 0.46));
}

.fold-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-family: "Archivo Black", sans-serif;
  font-size: 18px;
}

.fold-summary::-webkit-details-marker {
  display: none;
}

.fold-hint {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fold-body {
  padding: 0 16px 16px;
}

.subfold {
  margin-top: 12px;
  border: 1px solid rgba(103, 180, 170, 0.14);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(8, 15, 18, 0.62), rgba(14, 16, 14, 0.42));
  overflow: hidden;
}

.subfold-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--signal);
  text-transform: uppercase;
}

.subfold-summary::-webkit-details-marker {
  display: none;
}

.subfold-body {
  padding: 0 12px 12px;
}

.subfold .history-panel,
.subfold .import-panel {
  margin-top: 0;
  margin-bottom: 0;
}

.subfold-log .output-box {
  margin-top: 0;
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  margin: 0 0 12px;
  font-family: "Archivo Black", sans-serif;
  font-size: 20px;
  letter-spacing: 0.02em;
}

h3 {
  margin: 0 0 8px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--signal);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.35fr 1fr 1fr;
  margin-bottom: 12px;
}

.hero-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(103, 180, 170, 0.18);
  background: linear-gradient(150deg, rgba(11, 23, 28, 0.88), rgba(14, 15, 14, 0.56));
  min-width: 0;
}

.hero-card-primary {
  background: radial-gradient(circle at top left, rgba(97, 224, 200, 0.18), transparent 44%),
    linear-gradient(150deg, rgba(8, 22, 28, 0.94), rgba(16, 18, 15, 0.62));
  border-color: rgba(97, 224, 200, 0.26);
}

.hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}

.hero-value {
  margin-top: 18px;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(28px, 4.8vw, 42px);
  line-height: 1.04;
  color: var(--text);
  overflow-wrap: anywhere;
}

.hero-value-compact {
  font-size: clamp(22px, 3.8vw, 30px);
}

.hero-detail,
.hero-meta {
  font-family: "IBM Plex Mono", monospace;
  overflow-wrap: anywhere;
}

.hero-detail {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: #d8ece8;
}

.hero-meta {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--subtle);
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  border: 1px solid rgba(103, 180, 170, 0.22);
  border-radius: 12px;
  padding: 12px 12px 10px;
  background: linear-gradient(140deg, rgba(14, 27, 31, 0.75), rgba(10, 18, 22, 0.5));
}

.metric-label {
  margin: 0;
  font-size: 13px;
  color: var(--subtle);
}

.metric-value {
  margin: 8px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(21px, 4vw, 33px);
  color: var(--signal);
}

.hint {
  margin: 10px 0 0;
  color: var(--subtle);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.action-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  min-height: 42px;
  color: var(--text);
  background: linear-gradient(140deg, rgba(13, 28, 33, 0.9), rgba(20, 16, 14, 0.68));
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
}

.btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.2);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn:active {
  transform: translateY(0);
}

.btn-main {
  border-color: transparent;
  color: #0f281f;
  background: linear-gradient(120deg, #64edd3, #4abca6);
}

.btn-danger {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(120deg, #c23b3b, #a01f1f);
}

.output-box,
.code-box,
.log-box {
  margin: 12px 0 0;
  border: 1px solid rgba(103, 180, 170, 0.18);
  border-radius: 10px;
  background: rgba(4, 8, 10, 0.78);
  color: #c7ddd9;
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
  font-family: "IBM Plex Mono", monospace;
  overflow: auto;
  min-width: 0;
}

.hit-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(103, 180, 170, 0.2);
  background: linear-gradient(145deg, rgba(8, 19, 23, 0.9), rgba(16, 15, 13, 0.62));
}

.history-panel {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(103, 180, 170, 0.16);
  background: linear-gradient(145deg, rgba(9, 17, 22, 0.88), rgba(14, 14, 13, 0.52));
}

.invalid-panel {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 94, 94, 0.18);
  background: linear-gradient(145deg, rgba(31, 13, 13, 0.7), rgba(17, 15, 14, 0.56));
}

.invalid-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.invalid-card {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 94, 94, 0.14);
  background: rgba(8, 10, 12, 0.5);
}

.invalid-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.invalid-detail {
  margin-top: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1.5;
  color: #ffd5d5;
}

.hit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hit-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--signal);
  text-transform: uppercase;
}

.hit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.hit-item,
.hit-file {
  display: grid;
  gap: 4px;
}

.hit-file {
  margin-top: 10px;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.history-card {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 8, 10, 0.42);
}

.history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.history-model,
.history-time {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.history-model {
  color: var(--signal);
}

.history-time {
  color: var(--subtle);
}

.history-meta {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--subtle);
}

.history-empty {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--subtle);
}

.hit-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hit-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.output-box {
  min-height: 420px;
  max-height: 560px;
}

.config-wrap {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.code-box {
  min-height: 220px;
}

.log-box {
  min-height: 240px;
  max-height: 360px;
}

.accounts-grid {
  display: grid;
  gap: 10px;
}

.account-group {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(8, 18, 21, 0.82), rgba(13, 14, 13, 0.6));
  overflow: hidden;
}

.account-group-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px;
}

.account-group-summary::-webkit-details-marker {
  display: none;
}

.account-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.account-group-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--signal);
}

.account-group-subtitle {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-group-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.account-group-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--subtle);
}

.account-group-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.import-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(103, 180, 170, 0.18);
  background: linear-gradient(145deg, rgba(10, 20, 24, 0.86), rgba(19, 15, 13, 0.5));
}

.import-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--signal);
  text-transform: uppercase;
}

.import-input {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(103, 180, 170, 0.24);
  background: rgba(4, 8, 10, 0.82);
  color: #dceeed;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  font-family: "IBM Plex Mono", monospace;
  outline: none;
}

.import-input:focus {
  border-color: rgba(97, 224, 200, 0.55);
  box-shadow: 0 0 0 3px rgba(97, 224, 200, 0.12);
}

.import-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.import-target {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 159, 89, 0.24);
  background: rgba(47, 28, 18, 0.32);
}

.import-target-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--warn);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.import-target-file {
  margin-top: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.is-hidden {
  display: none;
}

.import-options {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.import-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--subtle);
}

.import-hint {
  margin: 0;
}

.account-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(7, 18, 21, 0.82), rgba(16, 20, 17, 0.64));
  padding: 11px;
}

.account-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.account-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.account-file {
  font-family: "IBM Plex Mono", monospace;
  color: var(--signal);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-mail {
  margin-top: 3px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.account-meta {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--subtle);
}

.account-runtime {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--subtle);
}

.token-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  margin-right: 5px;
  margin-top: 8px;
}

.token-pill.ok {
  background: rgba(93, 226, 184, 0.2);
  color: #99ffd6;
}

.token-pill.no {
  background: rgba(255, 84, 84, 0.2);
  color: #ffc0c0;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.state-pill.active {
  background: rgba(93, 226, 184, 0.16);
  color: #99ffd6;
}

.state-pill.disabled {
  background: rgba(255, 159, 89, 0.16);
  color: #ffd0aa;
}

.state-pill.warnish {
  background: rgba(255, 206, 122, 0.14);
  color: #ffd78d;
}

.state-pill.bad {
  background: rgba(255, 84, 84, 0.18);
  color: #ffc2c2;
}

.state-pill.idle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--subtle);
}

.account-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-mini {
  min-height: 34px;
  padding: 0 12px;
}

.model-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.model-state-panel {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(103, 180, 170, 0.18);
  background: linear-gradient(145deg, rgba(9, 18, 23, 0.88), rgba(18, 16, 14, 0.54));
}

.model-state-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.model-state-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--signal);
  text-transform: uppercase;
}

.model-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.model-chip {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(103, 180, 170, 0.3);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: #d8ece8;
  background: rgba(8, 16, 20, 0.76);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  min-width: 0;
  overflow-wrap: anywhere;
}

.model-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(97, 224, 200, 0.55);
}

.model-chip.active {
  color: #0e261f;
  border-color: transparent;
  background: linear-gradient(120deg, #64edd3, #4abca6);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  min-width: 180px;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.topbar > *,
.panel > *,
.hero-grid,
.hero-card,
.metrics,
.action-grid,
.metric-card,
.hit-panel,
.history-panel,
.invalid-panel,
.history-list,
.history-card,
.config-wrap,
.accounts-grid,
.account-group,
.account-group-body,
.import-panel,
.import-actions,
.import-options,
.account-card,
.account-top > *,
.account-side,
.account-meta,
.account-meta > *,
.account-runtime,
.account-runtime > *,
.account-actions,
.model-grid,
.model-toolbar,
.model-state-panel,
.model-state-grid,
.model-state-grid > * {
  min-width: 0;
}

@media (max-width: 920px) {
  .invalid-top,
  .import-target {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .panel-wide {
    grid-column: auto;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .config-wrap {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .import-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .topbar,
  .layout {
    width: min(1280px, calc(100vw - 20px));
  }

  body {
    padding-bottom: 78px;
  }

  .mobile-nav {
    position: fixed;
    left: 50%;
    bottom: calc(10px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 15;
    width: min(1280px, calc(100vw - 20px));
    padding: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: rgba(6, 12, 15, 0.86);
    border: 1px solid rgba(103, 180, 170, 0.2);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
  }

  .mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 8px;
    border-radius: 12px;
    background: rgba(14, 27, 31, 0.72);
    color: var(--text);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .topbar {
    margin-top: 10px;
    padding: 16px;
  }

  .panel {
    padding: 14px;
    border-radius: 16px;
  }

  h2 {
    font-size: 18px;
  }

  .status-chip {
    width: 100%;
    text-align: center;
  }

  .output-box {
    min-height: 260px;
    max-height: 360px;
  }

  .history-top,
  .hit-head,
  .model-state-head,
  .account-top,
  .account-group-head,
  .subfold-summary,
  .hero-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-side,
  .account-group-badges,
  .panel-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .account-meta,
  .model-state-grid,
  .hit-grid {
    grid-template-columns: 1fr;
  }

  .output-box,
  .code-box {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .history-panel,
  .invalid-panel,
  .import-panel,
  .model-state-panel,
  .hit-panel {
    padding: 10px;
  }

  .model-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-chip {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .metrics,
  .action-grid {
    grid-template-columns: 1fr;
  }
  .model-state-grid,
  .hit-grid {
    grid-template-columns: 1fr;
  }

  .layout {
    margin-bottom: 20px;
    gap: 12px;
  }

  .kicker {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  h1 {
    font-size: clamp(24px, 8vw, 34px);
  }

  .hero-card {
    padding: 14px;
    border-radius: 14px;
  }

  .hero-value {
    margin-top: 14px;
    font-size: clamp(24px, 8vw, 32px);
  }

  .hero-value-compact {
    font-size: clamp(20px, 6.2vw, 26px);
  }

  .history-card,
  .invalid-card,
  .account-card,
  .subfold,
  .hit-panel,
  .history-panel,
  .invalid-panel,
  .import-panel,
  .model-state-panel {
    padding: 10px;
  }

  .subfold {
    padding: 0;
  }

  .subfold-body {
    padding: 0 10px 10px;
  }

  .import-options,
  .account-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .account-actions .btn,
  .import-options .btn,
  .panel-actions .btn {
    width: 100%;
  }

  .model-grid {
    grid-template-columns: 1fr;
  }
}
