:root {
  color-scheme: dark;
  --background: #0d0f0e;
  --surface: #151816;
  --text: #f1f3ee;
  --muted: #a1a8a2;
  --line: #2a2f2b;
  --accent: #b9f227;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
}

a { color: inherit; }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.page {
  width: min(760px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: 14px;
}

header { border-bottom: 1px solid var(--line); }
footer {
  margin-top: auto;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.name {
  font-weight: 700;
  text-decoration: none;
}

nav { display: flex; gap: 20px; }
nav a,
footer a { color: var(--muted); }
nav a:hover,
footer a:hover { color: var(--text); }

main { padding: 100px 0 80px; }

.label {
  margin: 0 0 18px;
  color: var(--accent);
  font: 700 12px/1.4 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: clamp(42px, 8vw, 68px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.intro,
.usage {
  max-width: 660px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.intro code,
.usage code { color: var(--text); }

.install {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 38px 0 26px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.install code {
  min-width: 0;
  padding-left: 4px;
  overflow: hidden;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.install button {
  padding: 10px 14px;
  color: #11140f;
  background: var(--accent);
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

.install button.copied { background: var(--text); }

.demo {
  width: min(880px, calc(100vw - 48px));
  margin: 34px 0 28px 50%;
  transform: translateX(-50%);
  overflow: hidden;
  background: #0a0c0b;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.demo #demo-player { min-height: 350px; }
.demo .ap-wrapper { border: 0; }
.demo .ap-player { max-width: none; }
.demo .ap-terminal { background: #0a0c0b; }

.demo-caption {
  margin: -14px 2px 2px;
  color: var(--muted);
  font: 11px/1.5 "SFMono-Regular", Consolas, monospace;
}

.demo-formats {
  margin: -14px 2px 28px;
  color: #707770;
  font: 11px/1.5 "SFMono-Regular", Consolas, monospace;
  text-align: right;
}
.demo-formats a { color: var(--muted); }
.demo-formats a:hover { color: var(--accent); }

.note {
  margin-top: 38px;
  padding: 20px 22px;
  color: var(--muted);
  background: var(--surface);
  border-left: 2px solid var(--accent);
  font-size: 14px;
  line-height: 1.55;
}

.note p { margin: 0; }
.note p + p { margin-top: 10px; }
.note strong { color: var(--text); }

@media (max-width: 620px) {
  .page { width: min(100% - 28px, 760px); }
  header,
  footer { padding: 20px 0; }
  main { padding: 68px 0 56px; }
  h1 { font-size: clamp(40px, 13vw, 58px); }
  .intro,
  .usage { font-size: 16px; }
  .install { grid-template-columns: 1fr; }
  .install code { padding: 6px 4px; }
  .install button { width: 100%; }
  .demo {
    width: calc(100vw - 28px);
  }
  .demo #demo-player { min-height: 300px; }
}
