:root {
  color-scheme: dark;
  --bg: #050a08;
  --panel: rgba(8, 20, 17, 0.78);
  --line: rgba(182, 255, 52, 0.22);
  --text: #f5fff4;
  --muted: #9aae9f;
  --soft: #64786c;
  --accent: #b6ff34;
  --cyan: #52ffd2;
  --orange: #ffb15f;
  --radius: 8px;
  --display: "Manrope", "Noto Sans SC", sans-serif;
  --body: "Inter", "Noto Sans SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 70% 10%, rgba(182, 255, 52, 0.14), transparent 26rem),
    radial-gradient(circle at 20% 90%, rgba(82, 255, 210, 0.12), transparent 24rem),
    linear-gradient(180deg, #030705, #07130f 48%, #020504);
  color: var(--text);
  font-family: var(--body);
}

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(182, 255, 52, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 255, 52, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 42%, rgba(182, 255, 52, 0.1) 49%, transparent 56%);
  animation: scan 5.5s linear infinite;
}

@keyframes scan {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

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

.shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  margin-top: 12px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(9, 16, 14, 0.68);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 900 15px var(--display);
}

.brand span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #101827;
}

.back {
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hero {
  padding: 96px 0 34px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 20px;
  font: 900 clamp(48px, 9vw, 112px) / 0.92 var(--display);
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.test-groups {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(182, 255, 52, 0.12);
}

.group-head h2 {
  margin: 0;
  font: 900 clamp(25px, 3vw, 36px) / 1.15 var(--display);
}

.test-library {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.test-library.compact {
  grid-template-columns: repeat(3, 1fr);
}

.test-card {
  min-height: 176px;
  padding: 18px;
  border: 1px solid rgba(182, 255, 52, 0.18);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  background: rgba(8, 21, 18, 0.68);
  cursor: pointer;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.test-card:hover,
.test-card.active {
  border-color: rgba(182, 255, 52, 0.52);
  background: rgba(182, 255, 52, 0.085);
  transform: translateY(-3px);
}

.test-card.disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.test-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.test-card h2 {
  margin: 16px 0 10px;
  font: 900 21px/1.2 var(--display);
}

.test-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.start-panel,
.test-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(8, 21, 18, 0.88), rgba(4, 11, 9, 0.92));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.start-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  margin: 20px 0;
  padding: clamp(22px, 5vw, 42px);
  overflow: hidden;
}

.start-panel[hidden],
.test-panel[hidden] {
  display: none;
}

.start-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 90% 18%, rgba(182, 255, 52, 0.18), transparent 16rem),
    linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.04));
}

.start-panel > * {
  position: relative;
  z-index: 1;
}

.start-panel h2 {
  margin: 0 0 14px;
  font: 900 clamp(32px, 5vw, 58px) / 1.05 var(--display);
}

.start-panel p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.start-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.start-actions button {
  border: 1px solid rgba(182, 255, 52, 0.22);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #101827;
  background: var(--accent);
  cursor: pointer;
  font: 900 14px/1 var(--body);
  white-space: nowrap;
}

.start-actions .ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-head h2 {
  margin: 0;
  font: 900 clamp(28px, 4vw, 44px) / 1.1 var(--display);
}

.panel-desc {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

#progress {
  padding: 8px 11px;
  border: 1px solid rgba(182, 255, 52, 0.28);
  border-radius: 999px;
  color: #dfff9d;
  font-weight: 900;
}

.question-card,
.result-card {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 20%, rgba(182, 255, 52, 0.1), transparent 16rem),
    rgba(255, 255, 255, 0.04);
}

.question-card h3,
.result-card h2 {
  margin: 0 0 22px;
  font: 900 clamp(25px, 4vw, 42px) / 1.2 var(--display);
}

.options {
  display: grid;
  gap: 12px;
}

.options button,
.result-card button {
  width: 100%;
  border: 1px solid rgba(182, 255, 52, 0.18);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  font: 800 15px/1.5 var(--body);
  text-align: left;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.options button:hover,
.result-card button:hover {
  border-color: rgba(182, 255, 52, 0.45);
  background: rgba(182, 255, 52, 0.09);
  transform: translateY(-2px);
}

.result-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}

.result-stats div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.result-stats strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 24px;
}

.result-stats span {
  color: var(--muted);
  font-size: 12px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-card button,
.result-link {
  width: auto;
  background: var(--accent);
  color: #101827;
  text-align: center;
}

.result-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(182, 255, 52, 0.18);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  font: 800 15px/1.5 var(--body);
}

.result-link[hidden] {
  display: none;
}

.focus-session .hero,
.focus-session .test-groups {
  display: none;
}

.focus-session .shell {
  min-height: 100vh;
  display: grid;
  align-content: start;
}

.focus-session .topbar {
  margin-bottom: 26px;
}

.focus-session .start-panel,
.focus-session .test-panel {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .topbar {
    border-radius: 20px;
  }

  .hero {
    padding-top: 82px;
  }

  .panel-head,
  .result-stats,
  .test-library,
  .test-library.compact,
  .start-panel {
    grid-template-columns: 1fr;
  }

  .panel-head {
    display: grid;
  }

  .start-actions {
    display: grid;
    justify-content: stretch;
  }

  .start-actions button,
  .result-card button,
  .result-link {
    width: 100%;
  }
}
