:root {
  color-scheme: dark;
  --bg: #071014;
  --panel: #0e1b22;
  --panel-strong: #132933;
  --line: #284653;
  --text: #eef8f5;
  --muted: #a9c2c1;
  --signal: #31f7c8;
  --blue: #55a7ff;
  --amber: #ffcf5a;
  --danger: #ff5f7e;
  --ok: #8bff8f;
  --shadow: 0 18px 50px rgba(0, 0, 0, .34);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(49, 247, 200, .11), transparent 38rem),
    linear-gradient(180deg, #071014 0%, #08151a 50%, #05090c 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--signal);
}

a:hover {
  color: #b5fff0;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: .5rem;
  transform: translateY(-150%);
  background: var(--amber);
  color: #111;
  padding: .65rem .9rem;
  border-radius: 4px;
  z-index: 10;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(7, 16, 20, .86);
  backdrop-filter: blur(18px);
}

.site-footer {
  border-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted);
}

.nav,
.footer-inner,
.section {
  width: min(1160px, calc(100vw - 2rem));
  margin-inline: auto;
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(49, 247, 200, .25), rgba(85, 167, 255, .12));
  display: grid;
  place-items: center;
}

.brand-mark::before {
  content: "";
  width: 24px;
  height: 18px;
  background: linear-gradient(90deg, var(--signal) 16%, transparent 16% 28%, var(--amber) 28% 44%, transparent 44% 56%, var(--blue) 56% 74%, transparent 74% 84%, var(--danger) 84%);
  border-radius: 2px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  min-width: 0;
}

.nav-links a,
.button {
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  padding: .66rem .85rem;
  border-radius: 6px;
  background: rgba(15, 31, 39, .72);
  font-weight: 700;
}

.nav-links a[aria-current="page"],
.button.primary {
  border-color: rgba(49, 247, 200, .75);
  background: rgba(49, 247, 200, .14);
  color: #dffff8;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding-block: clamp(3rem, 7vw, 6rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.eyebrow {
  color: var(--signal);
  font-size: .82rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .11em;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  margin: .25rem 0 .65rem;
  max-width: 100%;
  overflow-wrap: normal;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.25rem;
}

.subtitle {
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  max-width: 58rem;
  overflow-wrap: anywhere;
}

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

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 1.5rem;
}

.console-visual {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(19, 41, 51, .92), rgba(9, 22, 28, .96));
  box-shadow: var(--shadow);
  justify-self: end;
  width: min(100%, 380px);
}

.console-visual img {
  display: block;
  width: 100%;
  border-radius: 8px;
}

.meter-row,
.channel-grid,
.stats-grid,
.challenge-shell {
  display: grid;
  gap: 1rem;
}

.meter-row {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 1rem;
}

.meter,
.strip,
.stat,
.challenge-list button,
.stage,
.info-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 27, 34, .82);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}

.meter {
  min-height: 102px;
  display: flex;
  align-items: end;
  padding: .65rem;
}

.meter span {
  width: 100%;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--signal), var(--blue));
}

.meter-88 {
  height: 88%;
}

.meter-74 {
  height: 74%;
}

.meter-63 {
  height: 63%;
}

.meter-42 {
  height: 42%;
}

.meter-35 {
  height: 35%;
}

.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

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

.strip {
  padding: 1.1rem;
}

.strip::before {
  content: "";
  display: block;
  height: 8px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--signal), var(--amber), var(--danger));
  margin-bottom: 1rem;
}

.strip p,
.stat p,
.info-panel p {
  color: var(--muted);
}

.challenge-shell {
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: start;
}

.challenge-list {
  display: grid;
  gap: .7rem;
}

.challenge-list button {
  color: var(--text);
  text-align: left;
  padding: 1rem;
  cursor: pointer;
}

.challenge-list button[aria-current="true"] {
  border-color: var(--signal);
  background: rgba(49, 247, 200, .12);
}

.stage {
  padding: clamp(1rem, 3vw, 1.4rem);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin-block: 1rem;
}

.evidence-item {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  padding: .8rem;
  background: rgba(255, 255, 255, .035);
}

.evidence-label {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

details {
  margin: 1rem 0;
}

summary {
  cursor: pointer;
  color: var(--signal);
  font-weight: 800;
}

pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #04090c;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 1rem 0;
  padding: 1rem;
}

legend {
  color: var(--signal);
  font-weight: 800;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.option-row label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .58rem .7rem;
  background: rgba(255, 255, 255, .04);
}

button,
.button {
  cursor: pointer;
}

.submit-button {
  border: 0;
  color: #001510;
  font-weight: 900;
  padding: .75rem 1rem;
  border-radius: 6px;
  background: var(--signal);
}

.result {
  min-height: 2rem;
  border-left: 4px solid var(--line);
  padding-left: 1rem;
}

.result.good {
  border-color: var(--ok);
}

.result.warn {
  border-color: var(--amber);
}

.stats-grid {
  grid-template-columns: repeat(5, 1fr);
}

.stat {
  padding: 1rem;
}

.stat strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.bar-list {
  display: grid;
  gap: .85rem;
}

.bar {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) minmax(140px, 2fr) 3rem;
  gap: .8rem;
  align-items: center;
}

.bar-track {
  height: 14px;
  border-radius: 999px;
  background: #10222a;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--signal), var(--blue));
}

.fill-100 {
  width: 100%;
}

.fill-73 {
  width: 73%;
}

.fill-64 {
  width: 64%;
}

.fill-55 {
  width: 55%;
}

.fill-45 {
  width: 45%;
}

.pulse-list {
  display: grid;
  gap: .75rem;
}

.pulse-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .8rem 1rem;
  background: rgba(255, 255, 255, .035);
}

.pulse-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer-inner {
  padding-block: 1.4rem;
}

@media (max-width: 880px) {
  .hero-grid,
  .challenge-shell,
  .channel-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .meter-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 1rem;
  }

  .nav-links,
  .hero-actions,
  .button-row {
    width: 100%;
  }

  .hero {
    min-height: auto;
  }

  .console-visual {
    justify-self: stretch;
    width: 100%;
  }

  h1 {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 560px) {
  .evidence-grid,
  .bar {
    grid-template-columns: 1fr;
  }

  .meter-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links a,
  .button,
  .submit-button {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
