:root {
  --bg: #ffffff;
  --bg-elev: #f4f6f8;
  --bg-soft: #f7f8fa;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #5e656e;
  --faint: #8b929a;
  --border: #e4e8ee;
  --primary: #eb5a37;
  --primary-dark: #d04e2f;
  --primary-soft: rgba(235, 90, 55, 0.12);
  --code-bg: #f4f6f8;
  --shadow: 0 24px 60px rgba(20, 22, 28, 0.08);
  --nav-h: 64px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --display: "Syne", var(--sans);
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 16px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1b1b1d;
  --bg-elev: #232326;
  --bg-soft: #202023;
  --card: #222225;
  --text: #ececec;
  --muted: #a3a3ab;
  --faint: #7d7d86;
  --border: rgba(255, 255, 255, 0.08);
  --primary-soft: rgba(235, 90, 55, 0.16);
  --code-bg: #161618;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { top: 12px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner, .wrap, .footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: 18px;
}
.brand svg { display: block; }
.nav-links { display: flex; gap: 16px; color: var(--muted); font-size: 14.5px; align-items: center; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn, .icon-btn, .menu-btn {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 999px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
}
.icon-btn, .menu-btn { width: 36px; justify-content: center; padding: 0; }
.search-btn kbd {
  font-family: var(--sans);
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--faint);
  white-space: nowrap;
}
.gh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.gh-pill strong {
  background: var(--bg-elev);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
  color: var(--text);
}
.menu-btn { display: none; }

.hero {
  position: relative;
  padding: 88px 0 0;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 40px;
  width: 760px;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(235, 90, 55, 0.22), transparent 68%);
  pointer-events: none;
}
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.hero h1 {
  position: relative;
  margin: 28px 0 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.hero h1 span { display: block; }
.accent { color: var(--primary); }
.italic { font-style: italic; font-weight: 750; }
.lede {
  position: relative;
  margin: 0 auto;
  max-width: 460px;
  color: var(--muted);
  font-size: 18px;
}
.cta-row {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 15px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost {
  background: var(--bg-elev);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: color-mix(in srgb, var(--text) 20%, var(--border)); }

.stage {
  position: relative;
  margin-top: 56px;
  height: 520px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
}
.stage::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--bg));
  z-index: 3;
  pointer-events: none;
}
.phone {
  margin: 0;
  width: 230px;
  height: 470px;
  border-radius: 32px;
  overflow: hidden;
  border: 8px solid #111;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  background: #000;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.phone-main { width: 260px; height: 520px; z-index: 2; }
.phone-side { transform: translateY(36px); }
.shot-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  text-align: left;
}
.shot {
  margin: 0;
}
.shot img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #000;
}
.shot figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.device {
  width: 300px;
  height: 210px;
  margin: 0 -6px;
  border-radius: 16px;
  background: #121418;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  overflow: hidden;
  position: relative;
  color: #ececec;
  text-align: left;
}
.device.mid {
  width: 400px;
  height: 248px;
  z-index: 2;
  margin-top: -18px;
}
.device-top {
  display: flex;
  gap: 5px;
  padding: 10px 12px 0;
}
.device-top i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3a3d46;
  display: block;
}
.chip {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.14em;
  background: #2a211c;
  color: #f0b7a4;
  border-radius: 999px;
  padding: 3px 8px;
  z-index: 2;
}
.market {
  display: grid;
  grid-template-columns: 72px 1fr;
  height: calc(100% - 18px);
  padding: 8px;
  gap: 8px;
}
.side-mini, .mock-side {
  background: #191c22;
  border-radius: 8px;
  padding: 8px;
}
.side-mini span, .mock-side span {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: #2c313b;
  margin-bottom: 7px;
}
.side-mini span.on { background: #eb5a37; width: 70%; }
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-top: 22px;
}
.tile {
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(160deg, #2a3142, #171a22);
}
.tile:nth-child(2) { background: linear-gradient(160deg, #3a2a55, #171a22); }
.tile:nth-child(3) { background: linear-gradient(160deg, #1e3a34, #171a22); }
.tile:nth-child(4) { background: linear-gradient(160deg, #3a2c24, #171a22); }
.lyrics {
  padding: 62px 18px 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.lyrics p { margin: 0 0 8px; font-size: 17px; white-space: nowrap; }
.lyrics .dim { color: #8d9098; font-size: 15px; }
.ext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}
.cover {
  margin: 36px 12px 12px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 30%, #f2c14e, transparent 40%),
    linear-gradient(160deg, #7a3b2a, #1a120f 70%);
}
.track { padding: 48px 12px 0 0; }
.track b { display: block; font-size: 14px; }
.track small { color: #9aa0aa; }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 28px; margin-top: 16px; }
.bars i {
  display: block;
  width: 4px;
  background: #eb5a37;
  border-radius: 4px;
  height: 40%;
}
.bars i:nth-child(2) { height: 80%; }
.bars i:nth-child(3) { height: 55%; }
.bars i:nth-child(4) { height: 100%; }
.bars i:nth-child(5) { height: 35%; }

.section { padding: 88px 0; }
.kicker {
  display: inline-flex;
  border-radius: 999px;
  background: #3a241e;
  color: #f0b7a4;
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 5px 10px;
  font-weight: 700;
}
[data-theme="light"] .kicker { background: #fff1ec; color: #c2410c; }
.center { text-align: center; }
.section h2 {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 16px 0 10px;
}
.sub { color: var(--muted); margin: 0 auto 36px; max-width: 520px; }

.bento {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 16px;
}
.stack { display: grid; gap: 16px; }
.theme-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  min-height: 180px;
  box-shadow: var(--shadow);
}
.theme-card.tall { min-height: 376px; }
.theme-card .label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  padding: 4px 8px;
  border-radius: 8px;
  z-index: 2;
}
.mock {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  height: 100%;
  padding: 14px;
  background: var(--panel, #16161c);
}
.theme-card.tall .mock { min-height: 340px; }
.theme-card.tall .mock-main { height: 100%; align-content: stretch; }
.theme-card.tall .swatch { height: auto; min-height: 78px; }
.mock-side { background: color-mix(in srgb, var(--accent) 75%, #111); }
.mock-side span { background: rgba(255,255,255,0.35); }
.mock-side span:first-child { background: #fff; width: 62%; }
.mock-main { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-content: start; padding-top: 8px; }
.swatch {
  height: 64px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 55%, #1a1a1a);
}
.swatch.wide { grid-column: span 2; }
.player {
  grid-column: 1 / -1;
  margin-top: 8px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}

.theme-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 15px;
}
.theme-links a { color: var(--primary); font-weight: 650; }
.theme-links a:hover { text-decoration: underline; }

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 22px 26px;
  min-height: 168px;
  text-align: left;
  transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); transform: translateY(-2px); }
.icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 18px;
}
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); }

.install h2 { color: var(--primary); }
.terminal {
  width: min(720px, 100%);
  margin: 0 auto;
  background: #1a1c21;
  color: #e8e8e8;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow);
}
.tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  color: #9aa0aa;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tabs button[aria-selected="true"] {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--primary);
}
.cmd {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 16px 20px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
}
.prompt { color: var(--primary); }
.cmd code { flex: 1; white-space: pre-wrap; word-break: break-all; }
.copy {
  border: 0;
  background: transparent;
  color: #9aa0aa;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.copy:hover, .copy.copied { background: rgba(255,255,255,0.06); color: #fff; }

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.1fr;
  gap: 24px;
}
.footer h3 {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.footer a, .footer li { color: var(--muted); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--text); }
.badge {
  display: inline-flex;
  margin-left: 8px;
  background: var(--bg-elev);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
  color: var(--text);
}
.supporters { display: flex; flex-wrap: wrap; gap: 10px; }
.supporters a {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--card);
}
.copyline {
  margin-top: 36px;
  color: var(--faint);
  font-size: 14px;
}

.layout {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 180px;
  gap: 28px;
  padding: 28px 0 72px;
}
.sidebar, .toc {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow: auto;
}
.sidebar a, .toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}
.sidebar a.active, .toc a.active {
  background: #3a241e;
  color: #f6c7b6;
}
[data-theme="light"] .sidebar a.active { background: #fff1ec; color: #c2410c; }
.sidebar .group { margin: 14px 10px 6px; font-size: 12px; letter-spacing: 0.08em; color: var(--faint); }
.doc h1 { font-family: var(--display); letter-spacing: -0.04em; font-size: 42px; margin: 0 0 8px; }
.doc .lead { color: var(--muted); margin-top: 0; }
.doc h2 { margin: 32px 0 8px; font-size: 26px; letter-spacing: -0.03em; scroll-margin-top: 84px; }
.doc h3 { margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc li { margin: 6px 0; }
.doc a { color: var(--primary); }
.toc-title { font-size: 12px; letter-spacing: 0.08em; color: var(--faint); margin: 0 0 8px; }
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
}
code { font-family: var(--mono); font-size: 0.92em; }
.callout {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--muted);
}
.steps { counter-reset: step; padding: 0; list-style: none; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  margin: 12px 0;
}
.steps li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
}

.page-hero { padding: 48px 0 8px; }
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.045em;
  margin: 0 0 8px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.filters button {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
}
.filters button[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
}
.card .body { padding: 14px 16px 16px; }
.card h3 { margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.meta { color: var(--faint); font-size: 13px; margin-bottom: 6px; }

.posts { display: grid; gap: 12px; }
.post {
  display: block;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  background: var(--card);
}
.post:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.post h2 { margin: 4px 0; font-size: 24px; letter-spacing: -0.03em; }
.article { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 80px; }
.article h1 { font-family: var(--display); letter-spacing: -0.04em; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 60;
  display: grid;
  align-items: start;
  justify-items: center;
  padding-top: 12vh;
}
.overlay[hidden] { display: none; }
.dialog {
  width: min(640px, calc(100% - 24px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.dialog input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 18px;
  outline: none;
  border-bottom: 1px solid var(--border);
}
.results { max-height: 360px; overflow: auto; padding: 8px; }
.results a, .empty {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
}
.results a small { display: block; color: var(--faint); }
.results a:hover, .results a.active { background: var(--bg-elev); }
.empty { color: var(--muted); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; display: flex; gap: 6px; overflow: auto; }
  .sidebar .group { display: none; }
  .sidebar a { white-space: nowrap; }
  .toc { display: none; }
  .bento, .features, .footer-grid, .grid { grid-template-columns: 1fr; }
  .theme-card.tall { min-height: 220px; }
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 16px;
    flex-direction: column;
  }
  .nav-links.open { display: flex; }
  .gh-pill span, .search-btn span, .search-btn kbd { display: none; }
  .search-btn { width: 36px; padding: 0; justify-content: center; }
  .stage { height: 420px; }
  .phone, .phone-main { width: 28vw; height: 380px; }
  .shot-row { grid-template-columns: repeat(3, 1fr); }
  .lyrics p { font-size: 12px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 46px; }
  .cta-row { flex-direction: column; align-items: center; }
  .phone-side { display: none; }
  .phone-main { width: min(240px, 70vw); height: 460px; }
  .stage { height: 480px; }
  .shot-row { grid-template-columns: 1fr 1fr; }
}
