:root {
  --void: #0b0f14;
  --void-deep: #06090d;
  --panel: rgba(13, 18, 24, 0.92);
  --panel-strong: rgba(9, 13, 18, 0.98);
  --panel-soft: rgba(15, 21, 28, 0.84);
  --line: rgba(61, 242, 224, 0.2);
  --line-strong: rgba(61, 242, 224, 0.44);
  --accent: #3df2e0;
  --accent-dim: rgba(61, 242, 224, 0.1);
  --accent-glow: rgba(61, 242, 224, 0.22);
  --text: #edf7f6;
  --text-dim: #93a5a8;
  --text-soft: #5f7479;
  --danger: #ff6b7b;
  --danger-soft: rgba(255, 107, 123, 0.12);
  --good-soft: rgba(61, 242, 224, 0.12);
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(61, 242, 224, 0.08), transparent 24%),
    radial-gradient(circle at left center, rgba(61, 242, 224, 0.04), transparent 28%),
    linear-gradient(180deg, #080b10 0%, #0b0f14 62%, #07151b 100%);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 242, 224, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 242, 224, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.2;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 100%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24vh;
  background: linear-gradient(180deg, rgba(61, 242, 224, 0), rgba(61, 242, 224, 0.18));
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.side-rail,
.panel,
.signal-banner,
.topbar,
.site-footer {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 21, 28, 0.94), rgba(9, 14, 19, 0.98));
  box-shadow: var(--shadow);
}

.side-rail,
.panel,
.signal-banner,
.topbar,
.site-footer,
.btn,
.btn-secondary,
.filter-pill,
.prompt-chip,
.status-pill,
.rail-chip,
.data-chip,
.inline-pill,
.signal-link {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.side-rail::before,
.panel::before,
.signal-banner::before,
.topbar::before,
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 18px;
  width: 54px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}

.side-rail {
  padding: 22px 20px;
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(61, 242, 224, 0.22), rgba(61, 242, 224, 0.06));
  border: 1px solid var(--line-strong);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: inset 0 0 0 1px rgba(61, 242, 224, 0.08), 0 0 18px rgba(61, 242, 224, 0.12);
}

.brand-mark span {
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-kicker,
.section-label,
.metric-label,
.command-label,
.signal-label,
.field-label,
.result-summary-label,
.topbar-copy,
.audit-label {
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.brand-name,
.hero-title,
.section-title,
.page-title,
.topbar-label {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.brand-name {
  font-size: 1.36rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rail-copy {
  color: var(--text-dim);
  line-height: 1.75;
  font-size: 0.94rem;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(61, 242, 224, 0.1);
  background: rgba(61, 242, 224, 0.02);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.rail-link:hover,
.rail-link.is-active {
  background: rgba(61, 242, 224, 0.08);
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateX(4px);
}

.rail-index {
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
  font-size: 0.78rem;
}

.rail-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.rail-chip {
  padding: 10px 12px;
  border: 1px solid rgba(61, 242, 224, 0.18);
  background: rgba(61, 242, 224, 0.05);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.topbar {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-label {
  font-size: 1.08rem;
  text-transform: uppercase;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(61, 242, 224, 0.6);
}

.topbar-divider {
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.signal-banner {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.signal-banner.is-alert {
  border-color: rgba(255, 107, 123, 0.24);
  background: linear-gradient(180deg, rgba(38, 16, 20, 0.94), rgba(13, 18, 24, 0.98));
}

.signal-banner.is-stable {
  border-color: var(--line-strong);
}

.signal-copy {
  color: var(--text-dim);
  line-height: 1.65;
}

.signal-link {
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(61, 242, 224, 0.08);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
}

.hero,
.split-grid,
.metric-grid,
.metric-grid-compact,
.card-grid,
.result-grid {
  display: grid;
  gap: 18px;
}

.hero {
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.9fr);
}

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

.panel {
  padding: 22px;
}

.hero-panel {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(14, 20, 27, 0.94), rgba(9, 13, 18, 0.99)),
    linear-gradient(120deg, rgba(61, 242, 224, 0.08), transparent 30%);
}

.accent-panel {
  background:
    linear-gradient(180deg, rgba(10, 15, 20, 0.98), rgba(5, 9, 12, 0.98)),
    radial-gradient(circle at top right, rgba(61, 242, 224, 0.12), transparent 26%);
}

.hero-title,
.page-title {
  margin: 10px 0 0;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.95;
  max-width: 12ch;
}

.section-title,
.page-title {
  font-size: clamp(1.32rem, 2vw, 2.1rem);
}

.lead,
.page-copy,
.metric-meta,
.incident-copy,
.feature-copy,
.timeline-copy,
.audit-copy,
.result-card-copy,
.rail-copy,
.signal-copy,
.empty-state {
  color: var(--text-dim);
  line-height: 1.75;
}

.command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.command-cell {
  padding: 14px;
  border: 1px solid rgba(61, 242, 224, 0.12);
  background: rgba(61, 242, 224, 0.04);
}

.command-value {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
}

.button-row,
.hero-inline-list,
.prompt-chip-row,
.table-stats,
.compact-row,
.topbar-status,
.footer-links,
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-row {
  margin-top: 22px;
}

.button-row.compact-row {
  margin-top: 0;
}

.btn,
.btn-secondary,
.filter-pill,
.prompt-chip,
.status-pill,
.inline-pill,
.data-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn,
.btn-secondary {
  padding: 12px 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover,
.btn-secondary:hover,
.filter-pill:hover,
.prompt-chip:hover,
.signal-link:hover {
  transform: translateY(-1px);
}

.btn {
  background: var(--accent);
  color: var(--void);
  border-color: rgba(61, 242, 224, 0.8);
  box-shadow: 0 0 24px rgba(61, 242, 224, 0.18);
}

.btn-secondary,
.filter-pill,
.prompt-chip,
.inline-pill,
.data-chip,
.signal-link {
  background: rgba(61, 242, 224, 0.06);
  border-color: rgba(61, 242, 224, 0.16);
  color: var(--text);
}

.btn-secondary.compact,
.filter-pill,
.prompt-chip {
  padding: 10px 12px;
  font-size: 0.74rem;
}

.filter-pill.is-active {
  border-color: var(--line-strong);
  background: rgba(61, 242, 224, 0.14);
}

.inline-pill,
.data-chip {
  padding: 9px 11px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-heading,
.panel-header,
.toolbar,
.node-card-top,
.namespace-card-top,
.pod-card-top,
.incident-header,
.timeline-top,
.audit-row-top,
.result-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.feature-card,
.incident-card,
.table-row,
.result-card,
.node-card,
.namespace-card,
.pod-card,
.audit-row,
.timeline-body {
  border: 1px solid rgba(61, 242, 224, 0.12);
  background: rgba(61, 242, 224, 0.04);
  padding: 16px;
}

.metric-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card-alert {
  background: linear-gradient(180deg, rgba(255, 107, 123, 0.1), rgba(61, 242, 224, 0.02));
  border-color: rgba(255, 107, 123, 0.2);
}

.metric-value {
  margin-top: 10px;
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
}

.metric-value-small {
  font-size: 1.2rem;
}

.score-badge {
  min-width: 104px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(61, 242, 224, 0.12);
  color: var(--accent);
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.35rem;
}

.inline-link {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
}

.inline-link:hover {
  text-decoration: underline;
}

.stack-list,
.table-list,
.timeline-list,
.result-structured {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.table-row,
.incident-card {
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.table-row:hover,
.incident-card:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
  background: rgba(61, 242, 224, 0.08);
}

.table-title,
.incident-title,
.timeline-title,
.feature-title,
.result-card-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table-meta,
.incident-meta,
.timeline-meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 6px;
}

.metric-inline {
  color: var(--text-dim);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.status-pill {
  padding: 8px 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: "IBM Plex Mono", monospace;
}

.status-pill.good {
  border-color: rgba(61, 242, 224, 0.24);
  background: var(--good-soft);
  color: var(--accent);
}

.status-pill.warn {
  border-color: rgba(255, 107, 123, 0.24);
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.neutral {
  border-color: rgba(61, 242, 224, 0.16);
  background: rgba(61, 242, 224, 0.05);
  color: var(--text);
}

.timeline-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 12px;
}

.timeline-marker {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 10px;
  box-shadow: 0 0 0 4px rgba(61, 242, 224, 0.06);
}

.timeline-marker.good {
  background: var(--accent);
}

.timeline-marker.warn {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 107, 123, 0.06);
}

.timeline-body {
  padding: 16px 18px;
}

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

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

.search-input,
.text-area {
  width: 100%;
  background: rgba(7, 10, 14, 0.92);
  color: var(--text);
  border: 1px solid rgba(61, 242, 224, 0.16);
  padding: 14px 16px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.search-input:focus,
.text-area:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(61, 242, 224, 0.08);
}

.text-area {
  min-height: 160px;
  resize: vertical;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.tip-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.tip-item {
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  color: var(--text-dim);
  line-height: 1.7;
}

.log-shell {
  padding: 0;
  overflow: hidden;
}

.log-lines {
  display: flex;
  flex-direction: column;
}

.log-line {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(61, 242, 224, 0.08);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.log-index {
  color: var(--text-soft);
}

.log-text {
  color: #d5fbf7;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-summary-card {
  border: 1px solid rgba(61, 242, 224, 0.14);
  background: rgba(61, 242, 224, 0.05);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.code-block {
  margin: 12px 0 0;
  padding: 18px;
  background: rgba(5, 8, 11, 0.96);
  border: 1px solid rgba(61, 242, 224, 0.14);
  overflow: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: #c9faf4;
}

.details-disclosure {
  margin-top: 4px;
}

.details-disclosure summary {
  cursor: pointer;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.76rem;
}

.audit-label {
  display: inline-block;
  min-width: 70px;
  margin-right: 10px;
}

.audit-error {
  color: #ffb7c0;
}

.site-footer {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links a {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.empty-state {
  padding: 16px;
  border: 1px dashed rgba(61, 242, 224, 0.18);
  background: rgba(61, 242, 224, 0.03);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
    height: auto;
  }

  .hero,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .metric-grid-compact,
  .card-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .page-heading,
  .panel-header,
  .toolbar,
  .pod-card-top,
  .node-card-top,
  .namespace-card-top,
  .incident-header,
  .timeline-top,
  .audit-row-top,
  .result-card-top,
  .site-footer,
  .signal-banner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .signal-banner {
    display: flex;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .metric-grid,
  .metric-grid-compact,
  .card-grid,
  .result-grid,
  .command-strip,
  .namespace-metrics {
    grid-template-columns: 1fr;
  }

  .log-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
