:root {
  --bg: #0f1419;
  --bg-elev: #171d25;
  --bg-panel: #12171e;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eef5;
  --muted: #8b98a8;
  --accent: #3d9a7a;
  --accent-soft: rgba(61, 154, 122, 0.16);
  --warn: #c4a35a;
  --radius: 10px;
  --topbar-h: 56px;
  --font: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: local("IBM Plex Sans"), local("Segoe UI");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.topbar {
  height: var(--topbar-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 1rem 0 1.1rem;
  background: linear-gradient(180deg, #1a222c 0%, var(--bg-elev) 100%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-mark {
  width: 0.55rem;
  height: 1.55rem;
  border-radius: 2px;
  background: linear-gradient(180deg, #5ec4a0 0%, var(--accent) 55%, #2a6b56 100%);
  box-shadow: 0 0 0 1px rgba(94, 196, 160, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-text strong {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

.tabs {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  height: 100%;
  margin-left: 0.5rem;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0 0.95rem;
  height: 100%;
  cursor: pointer;
  position: relative;
  transition: color 160ms ease;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: var(--text);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  animation: tab-in 180ms ease;
}

@keyframes tab-in {
  from {
    transform: scaleX(0.4);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.topbar-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
}

.chip-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
}

.chip-value {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #b7e6d3;
  border: 1px solid rgba(61, 154, 122, 0.35);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: var(--bg-panel);
}

.panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.panel.is-active {
  opacity: 1;
  pointer-events: auto;
}

.panel[hidden] {
  display: block !important;
}

#beszel-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
}

.checks {
  height: 100%;
  overflow: auto;
  padding: 2.25rem 1.5rem 2.5rem;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(61, 154, 122, 0.14), transparent 55%),
    radial-gradient(700px 380px at 90% 0%, rgba(70, 110, 160, 0.12), transparent 50%),
    var(--bg-panel);
}

.checks-hero {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--warn);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checks-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

.checks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  max-width: 60rem;
}

.check-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  padding: 1.1rem 1.15rem 1.2rem;
  min-height: 9.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 160ms ease, transform 160ms ease;
}

.check-card:hover {
  border-color: rgba(61, 154, 122, 0.35);
  transform: translateY(-1px);
}

.check-card h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.check-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  flex: 1;
}

.badge {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px solid rgba(196, 163, 90, 0.35);
  background: rgba(196, 163, 90, 0.1);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.checks-hint {
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.checks-hint code {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: #c5d0dc;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}

@media (max-width: 860px) {
  .checks-grid {
    grid-template-columns: 1fr;
  }

  .brand-sub {
    display: none;
  }

  .topbar {
    gap: 0.6rem;
  }
}

@media (max-width: 560px) {
  .topbar-meta {
    display: none;
  }

  .tab {
    padding: 0 0.7rem;
    font-size: 0.82rem;
  }
}
