:root {
  --bg: #06131f;
  --bg-soft: #0e2335;
  --card: rgba(8, 28, 42, 0.72);
  --line: rgba(157, 201, 208, 0.25);
  --text: #e9f8ff;
  --muted: #9ac1cf;
  --accent: #ff914d;
  --accent-2: #16d9d1;
  --danger: #ff6a6a;
  --ok: #43d38f;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, #103651 0%, transparent 35%),
    radial-gradient(circle at 100% 0%, #5f2b1d 0%, transparent 30%),
    var(--bg);
  overflow-x: hidden;
}

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: -2;
}

.bg-orb-1 {
  width: 360px;
  height: 360px;
  background: rgba(22, 217, 209, 0.16);
  top: 8%;
  right: -80px;
}

.bg-orb-2 {
  width: 420px;
  height: 420px;
  background: rgba(255, 145, 77, 0.16);
  bottom: -130px;
  left: -90px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(#fff 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  z-index: -1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 0;
}

.brand {
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  background: linear-gradient(110deg, var(--accent), #ffc267);
  color: #1b160f;
  font-weight: 800;
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  letter-spacing: 0.06em;
}

.brand-text {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.header-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-badge {
  border: 1px solid var(--line);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.status-badge.ok {
  color: #00170d;
  background: var(--ok);
  border-color: transparent;
}

.status-badge.fail {
  color: #2b0000;
  background: var(--danger);
  border-color: transparent;
}

.hero {
  margin-top: 1.2rem;
  padding: 2.4rem;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(130deg, rgba(10, 38, 56, 0.95), rgba(8, 26, 39, 0.9)),
    var(--card);
}

.eyebrow {
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.04;
}

.hero-copy {
  margin-top: 0.95rem;
  max-width: 70ch;
  color: var(--muted);
}

.hero-points {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-points span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  background: rgba(14, 45, 65, 0.52);
  font-size: 0.88rem;
}

.workbench {
  margin: 1.6rem 0 2.5rem;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: var(--card);
  backdrop-filter: blur(6px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  border: none;
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--muted);
  padding: 1rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.tab-btn.active {
  color: #00140e;
  background: linear-gradient(120deg, var(--accent-2), #79fff9);
}

.tab-panel {
  display: none;
  padding: 1.2rem;
  animation: rise 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.panel-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.43rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.panel-grid input,
.panel-grid textarea,
.panel-grid select {
  width: 100%;
  border: 1px solid rgba(189, 224, 233, 0.25);
  border-radius: 10px;
  background: rgba(2, 21, 32, 0.72);
  color: var(--text);
  padding: 0.66rem 0.72rem;
  font: inherit;
}

.panel-grid input:focus,
.panel-grid textarea:focus,
.panel-grid select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(22, 217, 209, 0.2);
}

.cta-btn {
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.97rem;
  cursor: pointer;
  color: #1f140b;
  background: linear-gradient(115deg, var(--accent), #ffc267);
  padding: 0.76rem 1rem;
  transition: transform 0.15s ease, filter 0.2s ease;
}

.cta-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.full-width {
  grid-column: 1 / -1;
}

.result-box {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: rgba(5, 22, 34, 0.8);
  border-radius: 14px;
  min-height: 64px;
  padding: 0.9rem;
}

.empty-hint {
  color: var(--muted);
}

.error {
  color: #ffd6d6;
  background: rgba(136, 18, 18, 0.25);
  border: 1px solid rgba(255, 80, 80, 0.4);
  padding: 0.6rem;
  border-radius: 10px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.kpi-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  background: rgba(16, 43, 62, 0.54);
}

.kpi-card .label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-card .value {
  margin-top: 0.2rem;
  font-weight: 700;
  word-break: break-word;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid rgba(159, 205, 216, 0.2);
  padding: 0.5rem 0.65rem;
}

th {
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.meta-note {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.83rem;
}

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

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

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

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

  .hero {
    padding: 1.4rem;
  }
}
