@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #0b1410;
  --bg-2: #12201a;
  --panel: #162820;
  --panel-2: #1c3328;
  --line: rgba(163, 230, 180, 0.18);
  --text: #e8f5ec;
  --muted: #9bb5a6;
  --accent: #7dff9a;
  --accent-2: #ffc857;
  --signal: #5ad1ff;
  --danger: #ff7b72;
  --ok: #3dd68c;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(125, 255, 154, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(90, 209, 255, 0.1), transparent 50%),
    linear-gradient(180deg, #08110d 0%, var(--bg) 40%, #0e1a14 100%);
  min-height: 100vh;
  line-height: 1.55;
}

a {
  color: var(--signal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--accent);
  color: #041008;
  padding: 8px 12px;
  border-radius: 8px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 17, 13, 0.82);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--accent), #2f9e5f 55%, var(--signal));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(125, 255, 154, 0.25);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.92rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 90px);
  padding: 28px 0 48px;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 10px 0 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(125, 255, 154, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(125, 255, 154, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(125, 255, 154, 0);
  }
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 42ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #041008;
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.hero-panel {
  background:
    linear-gradient(160deg, rgba(28, 51, 40, 0.95), rgba(14, 28, 22, 0.92)),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 10px,
      rgba(125, 255, 154, 0.03) 10px,
      rgba(125, 255, 154, 0.03) 11px
    );
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.story-progress {
  display: flex;
  gap: 6px;
}

.story-progress span {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.story-progress span.on {
  background: linear-gradient(90deg, var(--accent), var(--signal));
}

.story-stage {
  flex: 1;
  display: none;
  animation: rise 0.45s ease;
}

.story-stage.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.story-stage h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.story-stage p {
  color: var(--muted);
  margin: 0 0 12px;
}

.story-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.section {
  margin: 64px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(125, 255, 154, 0.35);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.card p,
.card li {
  color: var(--muted);
  font-size: 0.95rem;
}

.card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--accent-2);
  margin-bottom: 10px;
}

.tag.ok {
  color: var(--ok);
}

.tag.warn {
  color: var(--accent-2);
}

.tag.signal {
  color: var(--signal);
}

.topo {
  background: #0a130f;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  overflow-x: auto;
}

.topo svg {
  width: 100%;
  min-width: 720px;
  height: auto;
}

.topo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.abbr-grid .card {
  cursor: pointer;
  min-height: 120px;
}

.abbr-grid .card.open {
  border-color: var(--signal);
  background: linear-gradient(180deg, #1d3a2d, #12241c);
}

.abbr-full {
  display: none;
  margin-top: 8px;
  color: var(--text);
  font-size: 0.92rem;
}

.abbr-grid .card.open .abbr-full {
  display: block;
}

.abbr-grid .card.open .hint {
  display: none;
}

.hint {
  color: var(--signal);
  font-size: 0.82rem;
  margin-top: 8px;
}

.q-block {
  background: rgba(255, 200, 87, 0.06);
  border: 1px dashed rgba(255, 200, 87, 0.35);
  border-radius: var(--radius);
  padding: 16px;
}

.q-block h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  color: var(--accent-2);
}

textarea,
input,
select {
  width: 100%;
  background: #0a130f;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  outline: 2px solid rgba(90, 209, 255, 0.35);
  border-color: var(--signal);
}

.opinion-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.opinion-item {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.opinion-item strong {
  display: block;
  margin-bottom: 4px;
}

.opinion-meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 6px;
  font-family: var(--font-mono);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: rgba(125, 255, 154, 0.08);
  font-family: var(--font-display);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.timeline {
  position: relative;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--signal));
}

.tl-item {
  position: relative;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(125, 255, 154, 0.2);
}

.checklist label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}

.checklist input {
  width: auto;
  margin-top: 4px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
}

.tab.active {
  background: rgba(90, 209, 255, 0.15);
  color: var(--signal);
  border-color: rgba(90, 209, 255, 0.4);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: rise 0.35s ease;
}

.footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--accent);
  color: #041008;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  transform: translateY(120%);
  opacity: 0;
  transition: 0.25s ease;
  z-index: 80;
}

.toast.show {
  transform: none;
  opacity: 1;
}

.team-card {
  position: relative;
  overflow: hidden;
}

.team-aka {
  color: var(--signal);
  font-size: 0.88rem;
  margin: 0 0 10px;
}

.team-quote {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent-2);
  color: var(--text);
  font-style: italic;
  background: rgba(255, 200, 87, 0.06);
  border-radius: 0 10px 10px 0;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.quiz-options {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.quiz-options button {
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
}

.quiz-options button:hover {
  border-color: var(--signal);
}

.quiz-options button.correct {
  border-color: var(--ok);
  background: rgba(61, 214, 140, 0.12);
}

.quiz-options button.wrong {
  border-color: var(--danger);
  background: rgba(255, 123, 114, 0.1);
}

.quiz-feedback {
  min-height: 1.4em;
  color: var(--accent-2);
}

.search-hits {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.search-hits a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  background: var(--panel-2);
}

.search-hits a:hover {
  border-color: var(--accent);
}

.vote-n {
  font-family: var(--font-mono);
  color: var(--accent);
}

.confetti-bit {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 90;
  animation: fall 1.2s ease-out forwards;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(540deg);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .hero,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
  }
}
