:root {
  --titan-space-1: 4px;
  --titan-space-2: 8px;
  --titan-space-3: 12px;
  --titan-space-4: 16px;
  --titan-space-5: 20px;
  --titan-space-6: 24px;
  --titan-space-8: 32px;
  --titan-space-10: 40px;

  --titan-radius-sm: 6px;
  --titan-radius-md: 10px;
  --titan-radius-lg: 14px;
  --titan-radius-xl: 18px;

  --titan-shadow-soft: 0 14px 40px rgba(0, 0, 0, .18);
  --titan-shadow-strong: 0 28px 90px rgba(0, 0, 0, .36);

  --titan-surface-1: var(--surface);
  --titan-surface-2: var(--surface2);
  --titan-border: var(--border);
  --titan-border-strong: var(--border2);
}

.titan-card {
  border: 1px solid var(--titan-border);
  border-radius: var(--titan-radius-lg);
  background: var(--titan-surface-1);
  box-shadow: var(--titan-shadow-soft);
}

.titan-card--interactive {
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.titan-card--interactive:hover {
  transform: translateY(-2px);
  border-color: var(--titan-border-strong);
  background: color-mix(in srgb, var(--titan-surface-2) 72%, var(--titan-surface-1));
}

.titan-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--titan-space-4);
  min-height: 54px;
  padding: 0 var(--titan-space-5);
  border-bottom: 1px solid var(--titan-border);
}

.titan-card__body {
  padding: var(--titan-space-5);
}

.titan-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.titan-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--titan-space-6);
  margin-bottom: var(--titan-space-5);
}

.titan-section-head__copy {
  display: grid;
  gap: var(--titan-space-1);
}

.titan-section-head h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  letter-spacing: -.04em;
}

.titan-section-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.titan-section-head__actions {
  display: flex;
  align-items: center;
  gap: var(--titan-space-2);
  flex-wrap: wrap;
}

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

.titan-stat {
  position: relative;
  display: grid;
  gap: var(--titan-space-1);
  overflow: hidden;
  padding: var(--titan-space-4);
  border: 1px solid var(--titan-border);
  border-radius: var(--titan-radius-lg);
  background: var(--titan-surface-1);
}

.titan-stat::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--blue);
  content: '';
}

.titan-stat--green::before { background: var(--green); }
.titan-stat--red::before { background: var(--red); }
.titan-stat--gold::before { background: var(--gold); }
.titan-stat--cyan::before { background: var(--cyan); }

.titan-stat__label {
  color: var(--dim);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.titan-stat__value {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 950;
  letter-spacing: -.04em;
  line-height: 1.1;
}

.titan-stat__hint {
  color: var(--muted);
  font-size: 10px;
}

.titan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--titan-space-2);
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: var(--titan-radius-md);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.titan-btn:hover {
  transform: translateY(-1px);
}

.titan-btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 30px var(--blue-glow);
}

.titan-btn--secondary {
  border-color: var(--titan-border);
  background: var(--titan-surface-2);
  color: var(--text);
}

.titan-btn--ghost {
  border-color: var(--titan-border);
  background: transparent;
  color: var(--muted);
}

.titan-btn--danger {
  border-color: color-mix(in srgb, var(--red) 28%, transparent);
  background: color-mix(in srgb, var(--red) 9%, transparent);
  color: var(--red);
}

.titan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--titan-border);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.titan-badge--blue {
  border-color: color-mix(in srgb, var(--blue) 28%, transparent);
  background: color-mix(in srgb, var(--blue) 9%, transparent);
  color: var(--blue);
}

.titan-badge--green {
  border-color: color-mix(in srgb, var(--green) 28%, transparent);
  background: color-mix(in srgb, var(--green) 8%, transparent);
  color: var(--green);
}

.titan-badge--red {
  border-color: color-mix(in srgb, var(--red) 28%, transparent);
  background: color-mix(in srgb, var(--red) 8%, transparent);
  color: var(--red);
}

.titan-badge--gold {
  border-color: color-mix(in srgb, var(--gold) 26%, transparent);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  color: var(--gold);
}

.titan-tabs {
  display: flex;
  gap: var(--titan-space-1);
  overflow-x: auto;
  padding: var(--titan-space-1);
  border: 1px solid var(--titan-border);
  border-radius: var(--titan-radius-lg);
  background: var(--titan-surface-1);
}

.titan-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--titan-radius-md);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.titan-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.035);
}

.titan-tab.is-active {
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  color: var(--blue);
}

.titan-empty {
  display: grid;
  justify-items: center;
  min-height: 260px;
  padding: var(--titan-space-8) var(--titan-space-5);
  border: 1px dashed var(--titan-border-strong);
  border-radius: var(--titan-radius-lg);
  text-align: center;
}

.titan-empty__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--titan-radius-md);
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  color: var(--blue);
  font-weight: 950;
}

.titan-empty h3 {
  margin: var(--titan-space-4) 0 var(--titan-space-1);
  font-size: 18px;
}

.titan-empty p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.titan-empty__actions {
  display: flex;
  gap: var(--titan-space-2);
  margin-top: var(--titan-space-5);
  flex-wrap: wrap;
  justify-content: center;
}

.titan-command-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.titan-command-trigger:hover {
  border-color: var(--border2);
  color: var(--text);
}

.titan-command-trigger kbd,
.titan-command kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid var(--border2);
  border-radius: 5px;
  background: var(--bg2);
  color: var(--dim);
  font-family: inherit;
  font-size: 9px;
  font-weight: 850;
}

.titan-command-shell {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: start center;
  padding: min(13vh, 110px) 18px 30px;
}

.titan-command-shell[hidden] {
  display: none;
}

.titan-command-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(7px);
}

.titan-command {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  overflow: hidden;
  border: 1px solid var(--border2);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 96%, #000);
  box-shadow: var(--titan-shadow-strong);
  animation: titanCommandIn .15s ease;
}

@keyframes titanCommandIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.985);
  }
}

.titan-command__header,
.titan-command__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.titan-command__header {
  border-bottom: 1px solid var(--border);
}

.titan-command__header h2 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 900;
}

.titan-command__search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.titan-command__search > span {
  color: var(--blue);
  font-size: 20px;
}

.titan-command__search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.titan-command__search input::placeholder {
  color: var(--dim);
}

.titan-command__results {
  max-height: min(56vh, 470px);
  overflow-y: auto;
  padding: 8px;
}

.titan-command-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--text);
}

.titan-command-item[hidden] {
  display: none;
}

.titan-command-item:hover,
.titan-command-item.is-selected {
  background: var(--surface2);
}

.titan-command-item__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
}

.titan-command-item__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.titan-command-item__copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titan-command-item__copy small {
  color: var(--dim);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.titan-command-item__arrow {
  color: var(--dim);
  font-size: 13px;
}

.titan-command-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
}

.titan-command-empty strong {
  color: var(--text);
}

.titan-command__footer {
  justify-content: flex-start;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 9px;
}

.titan-command__footer span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.titan-command-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .titan-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .titan-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .titan-command-shell {
    align-items: end;
    padding: 12px;
  }

  .titan-command {
    border-radius: 18px 18px 12px 12px;
  }

  .titan-command__footer {
    display: none;
  }
}

@media (max-width: 420px) {
  .titan-stat-grid {
    grid-template-columns: 1fr;
  }
}