:root {
  --bg: #0b121c;
  --surface: #111a26;
  --surface-2: #152032;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #5eead4;
  --accent-2: #facc15;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --danger: #f87171;
  --shadow: 0 24px 60px rgba(6, 10, 18, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(94, 234, 212, 0.18), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(250, 204, 21, 0.2), transparent 40%),
    linear-gradient(180deg, #0b121c 0%, #0a0f1a 40%, #0b121c 100%);
  z-index: -1;
}

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 8vw 16px;
}

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

.brand-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(94, 234, 212, 0.6);
}

.brand-title {
  font-size: 20px;
  font-weight: 600;
}

.brand-sub {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 12px;
}

button {
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button.primary {
  background: var(--accent);
  color: #042016;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(94, 234, 212, 0.25);
}

button.primary:hover {
  transform: translateY(-1px);
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 999px;
}

button.ghost.small {
  padding: 6px 14px;
  font-size: 12px;
}

main {
  padding: 0 8vw 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 11px;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin-bottom: 16px;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(17, 26, 38, 0.6);
}

.meta-label {
  font-size: 12px;
  color: var(--muted);
}

.meta-value {
  font-size: 16px;
  margin-top: 6px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.pill {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.15);
  color: var(--accent);
}

.flow {
  list-style: none;
  display: grid;
  gap: 16px;
}

.flow-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.flow strong {
  display: block;
  margin: 6px 0 4px;
}

.flow p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.progress {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  transition: width 0.4s ease;
}

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

.api-lab {
  display: grid;
}

.panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
}

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

.module-list {
  display: grid;
  gap: 12px;
}

.api-panel {
  min-height: auto;
}

.api-copy {
  color: var(--muted);
  line-height: 1.6;
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11, 18, 28, 0.8);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.field input:focus {
  outline: 1px solid rgba(94, 234, 212, 0.5);
  border-color: rgba(94, 234, 212, 0.5);
}

.api-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.api-status {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
}

.api-status.ok {
  border-color: rgba(94, 234, 212, 0.35);
  color: var(--accent);
}

.api-status.error {
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger);
}

.api-output {
  margin: 0;
  min-height: 180px;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 16px;
  background: rgba(11, 18, 28, 0.85);
  color: #cbd5e1;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
}

.module {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
}

.module h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.module p {
  font-size: 12px;
  color: var(--muted);
}

.module .status {
  font-size: 12px;
  color: var(--accent);
}

.command-card {
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.15), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(94, 234, 212, 0.35);
  display: grid;
  gap: 10px;
}

.command-title {
  font-weight: 600;
}

.command-desc {
  font-size: 13px;
  color: var(--muted);
}

.command-footer {
  display: flex;
  gap: 8px;
}

.tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.callout {
  border-left: 2px solid var(--accent-2);
  padding-left: 12px;
  color: var(--muted);
  font-size: 13px;
}

.callout-title {
  color: var(--text);
  margin-bottom: 6px;
}

.quiz {
  display: grid;
  gap: 16px;
}

.quiz-question {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.6);
}

.quiz-question h4 {
  margin-bottom: 10px;
  font-size: 14px;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-options button {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
  border: 1px solid transparent;
}

.quiz-options button.correct {
  border-color: rgba(94, 234, 212, 0.6);
  color: var(--accent);
}

.quiz-options button.wrong {
  border-color: rgba(248, 113, 113, 0.6);
  color: var(--danger);
}

.logbook {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.logbook-body {
  display: grid;
  gap: 12px;
}

.logbook-entry {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
}

.entry-time {
  font-size: 12px;
  color: var(--muted);
}

.entry-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.entry-note {
  font-size: 13px;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 8vw 32px;
  font-size: 12px;
  color: var(--muted);
}

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

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

@media (max-width: 720px) {
  header.topbar {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  footer {
    flex-direction: column;
    gap: 8px;
  }
}
