:root {
  --bg: #16171b;
  --bg-alt: #1b1c21;
  --card: #202127;
  --card-hover: #2a2c34;
  --line: #2e3038;
  --text: #e8e9ec;
  --muted: #9a9ca6;
  --accent: #40aaa0;
  --accent-strong: #52c4b8;
  --coral: #f08c6e;
  --radius: 12px;
  --wrap: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font: 0.88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #121317;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-all;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(22, 23, 27, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.brand.small { font-size: 14px; }
.brand.small img { border-radius: 5px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .nav-cta {
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 8px;
}

/* Hero */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--accent-strong); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px; }
h1 { font-size: clamp(36px, 4.6vw, 54px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 20px; }
.lede { font-size: 19px; color: #c4c6cd; max-width: 34em; margin: 0 0 32px; }

.download { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 650;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #0d1413; padding: 14px 28px; min-width: 260px; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-label { font-size: 18px; }
.btn-sub { font-size: 13px; font-weight: 500; opacity: 0.75; }
.btn-secondary { background: var(--card-hover); color: var(--text); border: 1px solid var(--line); padding: 10px 18px; font-size: 15px; }
.btn-secondary:hover { background: #33353e; }
.other-platforms, .mobile-note { margin: 0; color: var(--muted); font-size: 14px; }
.mobile-note { max-width: 30em; }
.fineprint { color: #6f717b; font-size: 13px; margin: 18px 0 0; }

/* App mock */
.mock { display: flex; justify-content: center; }
.mock-window {
  width: 100%;
  max-width: 400px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}
.mock-titlebar {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  background: #1d1e23; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.mock-titlebar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3c45; }
.mock-titlebar i:nth-child(1) { background: #ff5f57; }
.mock-titlebar i:nth-child(2) { background: #febc2e; }
.mock-titlebar i:nth-child(3) { background: #28c840; }
.mock-titlebar span { margin-left: auto; margin-right: auto; transform: translateX(-24px); }
.mock-body { padding: 14px; }
.card { background: var(--card); border-radius: 10px; padding: 14px; }
.now-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.now-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.now-sub { color: var(--muted); font-size: 13px; }
.now-lr { font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); text-align: right; }
.env { display: block; width: 100%; height: 34px; margin: 12px 0; background: #18191e; border-radius: 6px; }
.env path { fill: none; stroke: #5a5c66; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.env.playing path { stroke: var(--accent); }
.mock-play {
  width: 100%; height: 42px;
  border: 0; border-radius: 8px;
  background: var(--accent); color: #0d1413;
  font: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer;
}
.mock-play:hover { background: var(--accent-strong); }
.mock-play.playing { background: #46464e; color: var(--text); }
.mock-hint { margin: 8px 0 0; text-align: center; font-size: 12px; color: #6f717b; }
.mock-section { margin: 14px 2px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: #7c7e88; text-transform: uppercase; }
.mock-presets { display: flex; flex-direction: column; gap: 4px; }
.preset {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 8px 12px;
  background: var(--card); border: 1px solid transparent; border-radius: 8px;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.preset:hover { background: var(--card-hover); }
.preset.selected { background: rgba(64, 170, 160, 0.3); border-color: var(--accent); }
.preset b { display: block; font-size: 14px; font-weight: 600; }
.preset small { display: block; font-size: 12px; color: var(--muted); }
.preset span { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.preset.selected span { color: var(--text); }

/* Sections */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--bg-alt); }
h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 28px; }
h3 { font-size: 18px; margin: 0 0 8px; }
.section-lede { color: var(--muted); margin: -16px 0 32px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature p { margin: 0; color: #b4b6be; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 15px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: #1d1e24; }
tr:last-child td { border-bottom: 0; }
td:last-child { white-space: normal; color: #b4b6be; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.two-col p { color: #c4c6cd; font-size: 17px; }
.bands { display: flex; flex-direction: column; gap: 8px; }
.band {
  display: grid; grid-template-columns: 80px 100px 1fr; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
}
.band span { font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent-strong); }
.band em { font-style: normal; color: var(--muted); font-size: 14px; }

.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.platform {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.platform.detected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.platform.detected h3::after {
  content: "Your system";
  margin-left: 10px; padding: 2px 8px; border-radius: 99px;
  background: rgba(64, 170, 160, 0.2); color: var(--accent-strong);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px;
}
.platform .meta { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.platform ol { margin: 20px 0 0; padding-left: 20px; color: #b4b6be; font-size: 14px; }
.platform li + li { margin-top: 6px; }

details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 17px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 18px; color: #b4b6be; }

.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0; color: #6f717b; font-size: 13px; }

/* 404 */
.notfound { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; }
.notfound p { color: var(--muted); }

@media (max-width: 920px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid, .two-col { grid-template-columns: 1fr; gap: 40px; }
  .features, .platforms { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .features, .platforms { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .btn-primary { width: 100%; }
  .band { grid-template-columns: 70px 90px 1fr; padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.hero-grid > *, .two-col > * { min-width: 0; }

/* GitHub link */
.gh-link { display: inline-flex; align-items: center; gap: 6px; }
.gh-icon { flex: none; }

/* Footer links */
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-inner > p { flex-basis: 100%; }

/* Guide cards on the home page */
.guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide {
  display: block; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  transition: border-color 0.15s, background 0.15s;
}
.guide:hover { text-decoration: none; border-color: var(--accent); background: var(--card-hover); }
.guide h3::after { content: " →"; color: var(--accent-strong); }
.guide p { margin: 0; color: #b4b6be; font-size: 15px; }

/* Guide pages */
.article-page { padding: 40px 0 72px; }
.article-page h1 { font-size: clamp(32px, 4.2vw, 46px); margin-top: 12px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; }
.crumbs a { color: var(--muted); }
.try {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-top: 10px;
}
.try b { display: block; }
.try small { display: block; color: var(--muted); font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 2px; }
.try-play {
  flex: none; min-width: 96px; height: 40px; padding: 0 18px;
  border: 0; border-radius: 8px; background: var(--accent); color: #0d1413;
  font: inherit; font-weight: 700; cursor: pointer;
}
.try-play:hover { background: var(--accent-strong); }
.try-play.playing { background: #46464e; color: var(--text); }
.try-note { color: #6f717b; font-size: 13px; margin: 10px 0 0; }

.prose { margin-top: 40px; font-size: 17px; color: #c9cbd2; }
.prose h2 { font-size: 26px; margin: 44px 0 14px; color: var(--text); }
.prose h3 { font-size: 18px; margin: 26px 0 6px; color: var(--text); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose b { color: var(--text); }

.cta {
  margin-top: 56px; padding: 32px;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 16px;
}
.cta h2 { margin-bottom: 10px; }
.cta > p { color: #b4b6be; margin: 0 0 22px; }
.related { margin-top: 48px; }
.related h2 { font-size: 22px; margin-bottom: 12px; }
.related ul { margin: 0; padding-left: 20px; }
.related li { margin: 6px 0; }

@media (max-width: 920px) { .guides { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .guides { grid-template-columns: 1fr; }
  .nav-links .gh-link span { display: none; }
  .nav-links a.gh-link { display: inline-flex; }
  .try { flex-direction: column; align-items: stretch; }
  .cta { padding: 22px; }
}

.platform .alt-formats { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.verify { margin: 24px 0 0; font-size: 14px; color: var(--muted); }
