:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #11151e;
  --panel-soft: rgba(19, 23, 34, 0.78);
  --text: #f7f8fb;
  --muted: #9ca3b2;
  --line: rgba(255, 255, 255, 0.11);
  --acid: #d9ff57;
  --violet: #7864ed;
  --pink: #ff4f9d;
  --cyan: #58dce9;
  --shell: min(1180px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.5;
}
button,
input {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
::selection {
  color: #080a0e;
  background: var(--acid);
}
.shell {
  width: var(--shell);
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 18px;
  z-index: 50;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--acid);
  color: #090b10;
}
.skip-link:focus {
  top: 18px;
}
.glow {
  position: fixed;
  z-index: -1;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.14;
  pointer-events: none;
}
.glow-a {
  top: -280px;
  right: -180px;
  background: var(--violet);
}
.glow-b {
  bottom: -180px;
  left: -330px;
  background: var(--pink);
}

.site-header {
  width: min(1240px, calc(100vw - 24px));
  height: 70px;
  margin: 12px auto 0;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 12px;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(9, 11, 16, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.26);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--acid);
  color: #090b10;
  font-size: 12px;
  font-weight: 950;
  transform: rotate(-3deg);
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 13px;
}
.brand small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.18em;
}
.main-nav {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 12px;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}
.github-link {
  justify-self: end;
  font-size: 12px;
  font-weight: 800;
}
.github-link span {
  color: var(--acid);
}
.menu-button {
  display: none;
}

.hero {
  min-height: 700px;
  padding: 105px 0 90px;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: 72px;
}
.eyebrow {
  margin: 0 0 17px;
  color: var(--acid);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.eyebrow i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 15px var(--acid);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 24px;
  font-size: clamp(52px, 6.4vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.067em;
}
h1 em {
  color: var(--acid);
  font-style: normal;
}
h2 {
  margin-bottom: 0;
  font-size: clamp(35px, 4.4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.052em;
}
.lede {
  max-width: 620px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 18px;
}
.hero-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.button {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}
.button:hover {
  transform: translateY(-2px);
}
.primary {
  color: #090b10;
  background: var(--acid);
}
.secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}
.light {
  color: #090b10;
  background: var(--text);
}
.revision {
  margin-top: 32px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #747b8a;
  font-size: 10px;
}
.revision code {
  color: #c4c8d2;
}
.revision time {
  display: none;
}

.hero-card {
  min-height: 460px;
  padding: 50px 32px 30px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 10%, rgba(120, 100, 237, 0.3), transparent 34%),
    linear-gradient(145deg, #1b2030, #0e1119);
  box-shadow:
    0 42px 110px rgba(0, 0, 0, 0.5),
    inset 0 1px rgba(255, 255, 255, 0.08);
  transform: rotate(1.2deg);
}
.hero-card::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 24px;
  pointer-events: none;
}
.hero-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.hero-card-top b {
  color: var(--acid);
}
.reels {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.4);
}
.reels span {
  display: grid;
  place-items: center;
  aspect-ratio: 0.83;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: linear-gradient(145deg, #30364a, #181c28);
  color: #ffc84b;
  font:
    900 clamp(20px, 3vw, 36px) Impact,
    sans-serif;
  text-shadow: 0 5px 14px rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 -12px 18px rgba(0, 0, 0, 0.22);
}
.reels span:nth-child(3n + 1) {
  color: var(--pink);
}
.reels span:nth-child(4n + 2) {
  color: var(--cyan);
}
.authority {
  margin-top: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.14em;
}
.authority i {
  height: 1px;
  background: linear-gradient(90deg, var(--line), var(--acid));
}
.authority strong {
  color: var(--acid);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}
.facts div {
  padding: 27px max(22px, calc((100vw - 1180px) / 8));
  display: flex;
  gap: 10px;
  align-items: baseline;
  border-right: 1px solid var(--line);
}
.facts div:last-child {
  border-right: 0;
}
.facts strong {
  color: var(--acid);
  font-size: 25px;
}
.facts span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.section {
  padding: 112px 0;
  scroll-margin-top: 80px;
}
.section-heading {
  margin-bottom: 46px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px);
  gap: 36px;
  align-items: end;
}
.section-heading > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}
.build-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.build-card {
  min-height: 510px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.mock-card {
  background: linear-gradient(150deg, #151a25, #0d1017);
}
.live-card {
  background: linear-gradient(145deg, #654adc, #3b287f 48%, #19122e);
}
.build-card::after {
  content: '';
  position: absolute;
  top: -135px;
  right: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: var(--acid);
  filter: blur(80px);
  opacity: 0.17;
}
.live-card::after {
  background: var(--pink);
  opacity: 0.3;
}
.card-kicker {
  margin-bottom: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.15em;
}
.card-kicker b {
  padding: 7px 10px;
  border: 1px solid rgba(217, 255, 87, 0.35);
  border-radius: 99px;
  color: var(--acid);
  font-size: 8px;
}
.live-card .card-kicker {
  color: rgba(255, 255, 255, 0.6);
}
.live-card .card-kicker b {
  border: 0;
  color: #2c164a;
  background: #ff9bcd;
}
.build-card h3 {
  margin-bottom: 10px;
  font-size: 30px;
  letter-spacing: -0.04em;
}
.build-card > p:not(.warning) {
  max-width: 480px;
  margin-bottom: 24px;
  color: var(--muted);
}
.live-card > p:not(.warning) {
  color: rgba(255, 255, 255, 0.7);
}
dl {
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
}
dl div {
  min-height: 49px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}
.live-card dt {
  color: rgba(255, 255, 255, 0.58);
}
.warning {
  padding: 10px 13px;
  display: flex;
  gap: 9px;
  align-items: center;
  border-radius: 9px;
  background: rgba(8, 5, 25, 0.23);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}
.warning span {
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  height: 19px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-weight: 900;
}
.card-actions {
  margin-top: auto;
  padding-top: 16px;
}
.copy-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.live-card .copy-button {
  color: rgba(255, 255, 255, 0.68);
}

.viewer-section {
  border-block: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(120, 100, 237, 0.12), rgba(255, 79, 157, 0.04));
}
.viewer-heading {
  align-items: center;
}
.viewer-tabs {
  justify-self: end;
  padding: 4px;
  display: flex;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}
.viewer-tabs button {
  min-width: 100px;
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.viewer-tabs button[aria-selected='true'] {
  color: #090b10;
  background: var(--acid);
}
.viewer-shell {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: #07090d;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.42);
}
.viewer-bar {
  min-height: 48px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #151922;
  color: var(--muted);
  font-size: 10px;
}
.viewer-lights {
  display: flex;
  gap: 6px;
}
.viewer-lights i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6262;
}
.viewer-lights i:nth-child(2) {
  background: #ffc14f;
}
.viewer-lights i:nth-child(3) {
  background: #64d77b;
}
.viewer-address {
  padding: 6px 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0d1017;
}
.viewer-bar > a {
  justify-self: end;
  color: var(--acid);
  font-weight: 800;
}
.viewer-stage {
  position: relative;
  aspect-ratio: 16/9;
  min-height: 520px;
  background: #05070a;
}
.viewer-stage iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  border: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.viewer-stage iframe.loaded {
  opacity: 1;
}
.viewer-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
}
.viewer-loading span {
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--acid);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.viewer-loading.hidden {
  display: none;
}
.viewer-note {
  margin: 14px 4px 0;
  color: var(--muted);
  font-size: 11px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.text-link {
  color: var(--acid);
  font-size: 11px;
  font-weight: 850;
}
.flow {
  display: grid;
  grid-template-columns: 1fr 72px 1fr 72px 1fr;
  align-items: center;
}
.flow > article {
  min-height: 255px;
  padding: 27px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
}
.flow > article > span {
  color: var(--acid);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}
.flow h3 {
  margin: auto 0 8px;
  font-size: 20px;
}
.flow p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
}
.flow code {
  width: max-content;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #d1d4de;
  font-size: 10px;
}
.flow > i {
  color: var(--acid);
  text-align: center;
  font-size: 25px;
  font-style: normal;
}
.flow .rgs-node {
  border-color: rgba(217, 255, 87, 0.38);
  background: linear-gradient(150deg, rgba(217, 255, 87, 0.1), var(--panel-soft));
}
.invariant-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.invariant-grid article {
  padding: 20px;
  display: flex;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.invariant-grid article > span {
  color: var(--acid);
  font:
    800 9px ui-monospace,
    monospace;
}
.invariant-grid h3 {
  margin-bottom: 5px;
  font-size: 13px;
}
.invariant-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.links-section {
  border-top: 1px solid var(--line);
}
.daily-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
}
.commands {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-soft);
}
.commands h3 {
  margin-bottom: 18px;
  font-size: 17px;
}
.commands button {
  width: 100%;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.commands span,
.commands b,
.commands code {
  display: block;
}
.commands b {
  margin-bottom: 4px;
  font-size: 11px;
}
.commands code {
  color: var(--muted);
  font-size: 10px;
}
.commands em {
  color: var(--acid);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.resource-grid a {
  min-height: 135px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.024);
  transition:
    transform 0.18s,
    border-color 0.18s;
}
.resource-grid a:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 255, 87, 0.42);
}
.resource-grid small {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.resource-grid strong {
  align-self: end;
  font-size: 14px;
}
.resource-grid span {
  color: var(--acid);
}

.site-footer {
  min-height: 165px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.muted-mark {
  background: #222834;
  color: var(--text);
}
.site-footer p {
  margin: 0;
}
.site-footer > a:last-child {
  color: var(--text);
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  padding: 11px 15px;
  border: 1px solid rgba(217, 255, 87, 0.3);
  border-radius: 10px;
  background: #171c27;
  color: var(--acid);
  font-size: 11px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s ease;
}
.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    padding: 18px;
    flex-direction: column;
    gap: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #11151e;
  }
  .main-nav.open {
    display: flex;
  }
  .menu-button {
    display: block;
    justify-self: end;
    border: 0;
    background: transparent;
    color: var(--text);
    font-weight: 800;
  }
  .github-link {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 82px;
  }
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .facts div:nth-child(2) {
    border-right: 0;
  }
  .facts div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .build-grid,
  .daily-grid {
    grid-template-columns: 1fr;
  }
  .flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .flow > i {
    transform: rotate(90deg);
  }
  .invariant-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .viewer-stage {
    min-height: 430px;
  }
}

@media (max-width: 620px) {
  :root {
    --shell: min(100% - 28px, 1180px);
  }
  .site-header {
    height: 62px;
  }
  .hero {
    min-height: auto;
    padding: 72px 0;
  }
  h1 {
    font-size: 50px;
  }
  .lede {
    font-size: 15px;
  }
  .hero-actions,
  .card-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .button,
  .card-actions .button {
    width: 100%;
  }
  .revision {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-card {
    min-height: 330px;
    padding: 42px 18px 20px;
    border-radius: 24px;
  }
  .reels {
    gap: 4px;
    padding: 6px;
  }
  .reels span {
    border-radius: 7px;
    font-size: 20px;
  }
  .facts div {
    padding: 19px 14px;
    display: grid;
    gap: 2px;
  }
  .facts strong {
    font-size: 22px;
  }
  .section {
    padding: 78px 0;
  }
  .section-heading {
    grid-template-columns: 1fr;
    margin-bottom: 32px;
  }
  .build-card {
    min-height: 0;
    padding: 23px;
  }
  .card-kicker {
    margin-bottom: 38px;
  }
  .viewer-tabs {
    justify-self: start;
  }
  .viewer-bar {
    grid-template-columns: 1fr auto;
  }
  .viewer-address {
    display: none;
  }
  .viewer-bar > a {
    grid-column: 2;
  }
  .viewer-stage {
    min-height: 520px;
    aspect-ratio: 9/15;
  }
  .invariant-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }
  .site-footer {
    padding: 38px 0;
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

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