:root {
  color-scheme: dark;
  --bg: #181818;
  --panel: #202020;
  --panel-strong: #252525;
  --text: #d7ddff;
  --text-strong: #f0f3ff;
  --muted: #8b8b8b;
  --line: #7f8797;
  --line-soft: #343844;
  --accent: #5eb1ff;
  --accent-strong: #0b7590;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
}

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

button {
  font: inherit;
}

.site-header,
.site-footer,
main {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.version {
  color: var(--muted);
  font-size: 13px;
}

.top-nav,
.site-footer div {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav a:hover,
.site-footer a:hover {
  color: var(--text);
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(420px, 0.9fr);
  align-items: center;
  gap: 72px;
  padding: 18px 0 72px;
}

.hero-copy {
  min-width: 0;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 720px;
  color: var(--text-strong);
  font-size: clamp(44px, 6.2vw, 82px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 660px;
  margin: 22px 0 0;
  color: #b8bed7;
  font-size: 17px;
}

.install-panel {
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.install-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.install-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 18px;
}

.install-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.copy-button,
.install-tab {
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.copy-button {
  min-width: 68px;
  padding: 6px 10px;
}

.copy-button:hover,
.install-tab:hover,
.install-tab.is-active {
  border-color: var(--accent);
  color: var(--text-strong);
}

.install-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 0;
}

.install-tab {
  padding: 6px 10px;
  font-size: 13px;
}

.command-box {
  margin: 14px 18px 18px;
  min-height: 76px;
  padding: 16px;
  overflow-x: auto;
  border-left: 3px solid var(--accent);
  background: #111315;
  color: var(--text-strong);
  font-size: 14px;
  line-height: 1.6;
}

.command-box code {
  white-space: pre-wrap;
  word-break: break-word;
}

.demo-panel {
  min-width: 0;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}

.demo-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line-soft);
}

.demo-tabs span {
  padding: 17px 12px;
  text-align: center;
  color: var(--text-strong);
  border-bottom: 2px solid transparent;
}

.demo-tabs .is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: #252735;
}

.demo-title {
  padding: 22px 22px 14px;
  text-align: center;
}

.demo-title h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 22px;
}

.demo-title p {
  margin: 2px 0 0;
  color: var(--muted);
}

.demo-table {
  margin: 0 22px;
  color: #c7cdeb;
}

.demo-head,
.demo-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr 0.8fr 0.8fr;
  gap: 14px;
  align-items: center;
}

.demo-head {
  padding: 7px 0;
  color: #bfc7e9;
  border-bottom: 1px dashed #aeb8d8;
}

.demo-row {
  min-height: 32px;
}

.demo-row span,
.demo-detail strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-row.is-selected {
  margin: 0 -6px;
  padding: 0 6px;
  background: var(--accent-strong);
  color: var(--text-strong);
}

.demo-detail {
  display: grid;
  gap: 6px;
  margin: 20px 22px 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.demo-detail div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
}

.demo-detail span {
  color: var(--muted);
}

.demo-detail strong {
  color: var(--text);
  font-weight: 400;
}

.demo-link {
  display: block;
  padding: 22px;
  color: var(--text);
  text-align: center;
}

.demo-link:hover {
  color: var(--accent);
}

.answer-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 0 86px;
  border: 1px solid var(--line-soft);
  background: var(--line-soft);
}

.answer-strip p {
  margin: 0;
  min-height: 88px;
  display: flex;
  align-items: center;
  padding: 18px;
  background: var(--panel);
  color: #c9d0ec;
}

.section {
  padding: 0 0 86px;
}

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

.section-heading h2,
.source-section h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line-soft);
  background: var(--line-soft);
}

.feature-grid article {
  min-height: 148px;
  padding: 20px;
  background: var(--panel);
}

.feature-grid h3 {
  margin: 0 0 10px;
  color: var(--text-strong);
  font-size: 16px;
}

.feature-grid p,
.source-section p {
  margin: 0;
  color: #aeb5cf;
}

.source-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  padding: 36px 0 86px;
  border-top: 1px dashed var(--line);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
}

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

@media (max-width: 920px) {
  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .answer-strip,
  .feature-grid,
  .source-section {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav,
  .site-footer div {
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero {
    gap: 28px;
    padding-bottom: 52px;
  }

  h1 {
    font-size: 38px;
  }

  .lead {
    font-size: 15px;
  }

  .install-header {
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }

  .command-box {
    font-size: 12px;
  }

  .answer-strip,
  .feature-grid,
  .source-section {
    grid-template-columns: 1fr;
  }

  .answer-strip {
    margin-bottom: 60px;
  }

  .section,
  .source-section {
    padding-bottom: 60px;
  }
}
