:root {
  color-scheme: dark;
  --bg: #11151d;
  --panel: #1b2331;
  --text: #edf2ff;
  --muted: #b3bed2;
  --line: #354158;
  --accent: #a9bfff;
  --button: #25334e;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #fff;
  --text: #182332;
  --muted: #536177;
  --line: #ccd4e1;
  --accent: #244ac3;
  --button: #e9efff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.6 system-ui,
    sans-serif;
}
header,
main,
footer {
  width: min(1040px, calc(100% - 40px));
  margin: auto;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
a {
  color: var(--accent);
}
.brand {
  text-decoration: none;
  font-weight: 750;
  color: var(--text);
}
.brand span {
  font-weight: 400;
  color: var(--muted);
}
.intro {
  padding: 48px 0 24px;
}
h1 {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  margin: 12px 0 20px;
}
h2 {
  font-size: 24px;
  line-height: 1.3;
}
p {
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent);
}
.showcase {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  text-align: center;
}
.stage {
  height: 350px;
  display: grid;
  place-items: center;
}
#orbit {
  width: min(300px, 100%);
}
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.controls [role="group"] {
  display: flex;
  gap: 6px;
  margin-left: 12px;
}
button,
.button {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 18px;
  background: var(--button);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button[aria-pressed="true"] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.primary {
  background: #245cf3;
  color: white;
  border-color: #245cf3;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.hint {
  font-size: 14px;
  margin-bottom: 0;
}
.button-example {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}
.run {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  min-width: 235px;
}
#button-orbit {
  display: block;
  width: 48px;
  flex-shrink: 0;
}
#run-status {
  font-size: 13px;
}
.code,
.takeaway {
  padding: 24px 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
pre {
  max-height: 420px;
  max-width: 100%;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  font-size: 13px;
  line-height: 1.6;
}
summary {
  cursor: pointer;
  color: var(--accent);
}
.takeaway .controls {
  justify-content: flex-start;
}
footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
footer a {
  margin-left: 12px;
}
@media (max-width: 600px) {
  header,
  main,
  footer {
    width: calc(100% - 28px);
  }
  .intro {
    padding-top: 30px;
  }
  .showcase {
    padding: 18px 12px;
  }
  .stage {
    height: 280px;
  }
  #orbit {
    width: 230px;
  }
  .button-example {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .section-heading {
    align-items: flex-start;
  }
  button,
  .button {
    padding: 10px 14px;
  }
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}
