:root {
  --bg: #0c0c0d;
  --panel: #151515;
  --panel-2: #1c1c1e;
  --line: #2b2b2f;
  --text: #f4f4f5;
  --muted: #92929a;
  --soft: #c6c6cc;
  --accent: #ff4b12;
  --accent-2: #ff8b1f;
  --green: #46d36f;
  --blue: #49a7ff;
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 0%, rgba(255, 75, 18, 0.16), transparent 360px),
    radial-gradient(circle at 0% 20%, rgba(73, 167, 255, 0.12), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.page-glow {
  position: fixed;
  inset: auto 12% -160px auto;
  width: 420px;
  height: 420px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 75, 18, 0.18), transparent 68%);
  filter: blur(20px);
}

.topbar,
main,
footer {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  backdrop-filter: blur(18px);
}

.tab,
.mark-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: var(--soft);
  background: rgba(21, 21, 21, 0.76);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.tab {
  min-width: 138px;
  min-height: 44px;
  padding: 0 18px;
}

.tab.active,
.tab:hover,
.mark-tab:hover {
  color: var(--text);
  border-color: rgba(255, 75, 18, 0.5);
  background: rgba(255, 75, 18, 0.12);
  transform: translateY(-1px);
}

.mark-tab {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
}

.mark-tab span,
.logo-xl {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #ff4b12, #7c3aed 55%, #2f80ff);
  font-weight: 950;
}

.mark-tab span {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

main {
  min-height: calc(100vh - 146px);
  padding: 36px 0 44px;
}

.screen {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.screen.active {
  display: block;
  animation: screenIn 320ms ease forwards;
}

@keyframes screenIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[hidden] {
  display: none !important;
}

.hero {
  max-width: 760px;
  margin-bottom: 24px;
}

.kicker {
  margin: 0 0 9px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.96;
}

.hero-copy {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.55;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stats-strip article,
.chart-card,
.download-item,
.invite-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.stats-strip article {
  padding: 16px;
}

.stats-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stats-strip strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.chart-card {
  overflow: hidden;
}

.chart-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-head span,
.chart-head small {
  display: block;
  color: var(--muted);
}

.chart-head strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
}

.chart-head small.ok {
  color: #9af5b4;
}

.chart-head small.error {
  color: #ff9a9a;
}

.chart-wrap {
  padding: 12px;
  background: #111;
}

#line-chart {
  width: 100%;
  height: auto;
  display: block;
  min-height: 310px;
}

.grid line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.axis-labels text {
  fill: #6f7680;
  font-size: 12px;
}

.area {
  fill: url(#line-fill);
  opacity: 0;
  animation: areaIn 700ms ease 380ms forwards;
}

.line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 12px rgba(255, 75, 18, 0.35));
}

@keyframes areaIn {
  to {
    opacity: 1;
  }
}

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

.download-item {
  overflow: hidden;
}

.download-toggle {
  width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: 54px 1fr 26px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.platform-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  font-weight: 950;
  color: var(--green);
}

.platform-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: invert(1);
}

.platform-icon.linux {
  background: rgba(70, 211, 111, 0.12);
}

.download-toggle strong,
.download-toggle small {
  display: block;
}

.download-toggle strong {
  font-size: 20px;
}

.download-toggle small {
  margin-top: 4px;
  color: var(--muted);
}

.download-toggle b {
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--soft);
  border-bottom: 2px solid var(--soft);
  transform: rotate(45deg);
  transition: transform 220ms ease;
}

.download-toggle:focus {
  outline: none;
}

.download-toggle:focus-visible {
  outline: 2px solid rgba(255, 75, 18, 0.55);
  outline-offset: -4px;
}

.download-item.open .download-toggle b {
  transform: rotate(225deg);
}

.download-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 0;
  padding: 0 18px;
  overflow: hidden;
  transition:
    max-height 260ms ease,
    padding 260ms ease;
}

.download-item.open .download-body {
  max-height: 220px;
  padding: 0 18px 18px;
}

.build-card {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: var(--panel-2);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.build-card.ready:hover {
  border-color: rgba(255, 75, 18, 0.5);
  background: rgba(255, 75, 18, 0.12);
  transform: translateY(-2px);
}

.build-card span {
  font-weight: 900;
}

.build-card small {
  color: var(--muted);
}

.build-card.disabled {
  opacity: 0.52;
  cursor: default;
}

.invite-view {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
}

.invite-card {
  width: min(470px, 100%);
  padding: 28px;
  text-align: center;
}

.logo-xl {
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  border-radius: 20px;
  font-size: 42px;
}

.invite-card p:not(.kicker) {
  color: var(--soft);
  line-height: 1.5;
}

.invite-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.primary-btn,
.ghost-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 900;
}

.primary-btn {
  border: 0;
  color: #180701;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

code {
  display: block;
  margin-top: 18px;
  padding: 10px;
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
}

footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

@media (max-width: 760px) {
  .topbar,
  main,
  footer {
    width: min(100% - 20px, 1080px);
  }

  .topbar {
    min-height: 66px;
    justify-content: space-between;
  }

  .tab {
    min-width: 0;
    flex: 1;
    padding: 0 10px;
  }

  main {
    padding-top: 26px;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .download-toggle {
    grid-template-columns: 48px 1fr 22px;
    min-height: 76px;
    padding: 12px;
  }

  .platform-icon {
    width: 48px;
    height: 48px;
  }

  .download-body {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }

  .download-item.open .download-body {
    max-height: 280px;
    padding: 0 12px 12px;
  }

  footer {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
  }
}

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