:root {
  color-scheme: dark;
  --background: #11120f;
  --panel: #181a16;
  --panel-raised: #1e211b;
  --line: #30342b;
  --line-strong: #454b3d;
  --text: #f1f2ea;
  --muted: #a6aa9b;
  --quiet: #74796d;
  --accent: #d7ff64;
  --accent-ink: #171a0f;
  --accent-soft: rgb(215 255 100 / 10%);
  --orange: #ff8d5c;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px),
    var(--background);
  background-size: 42px 42px;
}

button,
input {
  font: inherit;
}

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

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.wordmark,
.github-link {
  color: inherit;
  text-decoration: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.wordmark-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--accent);
  background: var(--panel-raised);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  transition: color 140ms ease;
}

.github-link:hover {
  color: var(--text);
}

.github-link svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

main {
  padding-block: 86px 68px;
}

.intro {
  max-width: 790px;
  margin-bottom: 52px;
}

.eyebrow,
.step-label {
  margin: 0;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.intro-copy {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 26px 80px rgb(0 0 0 / 28%);
}

.feature-panel,
.bundle-panel {
  padding: 30px;
}

.bundle-panel {
  border-left: 1px solid var(--line);
  background: #151713;
}

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

.panel-heading h2,
.instructions h2 {
  margin: 5px 0 0;
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.selection-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--quiet);
}

.selection-actions button {
  padding: 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.selection-actions button:hover {
  color: var(--accent);
}

.feature-list {
  display: grid;
  gap: 10px;
}

.feature-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 15px;
  min-height: 92px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(255 255 255 / 1.5%);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    transform 140ms ease;
}

.feature-card:hover {
  border-color: var(--line-strong);
  background: rgb(255 255 255 / 3%);
  transform: translateY(-1px);
}

.feature-card:has(input:checked) {
  border-color: rgb(215 255 100 / 35%);
  background: var(--accent-soft);
}

.feature-card:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.feature-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--panel-raised);
}

.feature-card:has(input:checked) .feature-icon {
  border-color: rgb(215 255 100 / 25%);
  color: var(--accent);
}

.feature-icon svg,
.copy-button svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.feature-copy,
.feature-title-row {
  display: flex;
  min-width: 0;
}

.feature-copy {
  flex-direction: column;
  gap: 5px;
}

.feature-title-row {
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.feature-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.feature-description {
  max-width: 560px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.48;
}

.dependency-tag {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--quiet);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feature-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-control {
  position: relative;
  width: 19px;
  height: 19px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--background);
}

.feature-card input:checked + .check-control {
  border-color: var(--accent);
  background: var(--accent);
}

.feature-card input:checked + .check-control::after {
  position: absolute;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid var(--accent-ink);
  border-left: 2px solid var(--accent-ink);
  content: "";
  left: 4px;
  top: 5px;
  transform: rotate(-45deg);
}

.bundle-heading {
  margin-bottom: 22px;
}

.feature-count {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.bundle-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0d0b;
}

.bundle-window-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 35px;
  padding-inline: 12px;
  border-bottom: 1px solid #252821;
}

.bundle-window-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #41463a;
}

.bundle-window-bar span:first-child {
  background: var(--orange);
}

.bundle-window-bar p {
  margin: 0 0 0 5px;
  color: #62685b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.bundle-preview pre {
  min-height: 118px;
  margin: 0;
  padding: 17px;
  overflow: hidden;
  color: #929989;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.bundle-preview code::first-line {
  color: var(--accent);
}

.selected-list {
  display: grid;
  gap: 9px;
  min-height: 116px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
}

.selected-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.selected-list li::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  box-shadow: 0 0 0 3px rgb(215 255 100 / 8%);
}

.selected-list .empty-selection {
  align-items: flex-start;
  color: var(--quiet);
  line-height: 1.5;
}

.selected-list .empty-selection::before {
  margin-top: 5px;
  background: var(--quiet);
  box-shadow: none;
}

.copy-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  color: var(--accent-ink);
  background: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition:
    filter 140ms ease,
    transform 140ms ease;
}

.copy-button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.copy-button:active:not(:disabled) {
  transform: translateY(0);
}

.copy-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.copy-button:disabled {
  color: var(--quiet);
  background: #292c25;
  cursor: not-allowed;
}

.copy-button.is-loading svg {
  animation: spin 800ms linear infinite;
}

.copy-status {
  min-height: 34px;
  margin: 12px 0 0;
  color: var(--quiet);
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
}

.copy-status.is-success {
  color: var(--accent);
}

.copy-status.is-error {
  color: var(--orange);
}

.instructions {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: 40px;
  margin-top: 58px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.instructions ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instructions li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.instructions li span {
  display: grid;
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 10px;
}

footer p {
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  main {
    padding-top: 62px;
  }

  .builder {
    grid-template-columns: 1fr;
  }

  .bundle-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .instructions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    min-height: 64px;
  }

  .github-link {
    font-size: 0;
  }

  .github-link svg {
    width: 20px;
  }

  main {
    padding-block: 48px;
  }

  .intro {
    margin-bottom: 34px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: clamp(40px, 14vw, 58px);
  }

  .intro-copy {
    font-size: 15px;
  }

  .feature-panel,
  .bundle-panel {
    padding: 21px;
  }

  .feature-card {
    grid-template-columns: minmax(0, 1fr) 20px;
  }

  .feature-icon {
    display: none;
  }

  .dependency-tag {
    display: none;
  }

  .instructions ol {
    grid-template-columns: 1fr;
  }

  .instructions li {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 10px;
  }

  .instructions li span {
    margin: 0;
  }

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

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