/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #07090f;
  --surface:     #0d1117;
  --card:        #161b22;
  --card-hover:  #1c2333;
  --border:      #21262d;
  --border-muted: #30363d;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --text-subtle: #6e7681;
  --blue:        #58a6ff;
  --blue-dark:   #1f6feb;
  --green:       #3fb950;
  --green-dark:  #238636;
  --purple:      #bc8cff;
  --red:         #f85149;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
}

html { scroll-behavior: smooth; }

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

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

img { display: block; max-width: 100%; }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .875em;
  background: var(--border);
  padding: .15em .4em;
  border-radius: var(--radius-sm);
  color: var(--text);
}

kbd {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .8em;
  background: var(--card);
  border: 1px solid var(--border-muted);
  border-radius: 4px;
  padding: .1em .4em;
  color: var(--text-muted);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,9,15,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.01em;
}
.nav-brand:hover { text-decoration: none; opacity: .85; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: .9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); background: var(--card); }

.nav-github {
  display: flex !important;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-muted) !important;
  border-radius: var(--radius-sm) !important;
}
.nav-github:hover { border-color: var(--blue) !important; color: var(--blue) !important; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; opacity: .88; }

.btn-store {
  background: #107c10;
  color: #fff;
  border-color: #0e6b0e;
}
.btn-store:hover { background: #0e6b0e; opacity: 1; }

.btn-primary {
  background: var(--blue-dark);
  color: #fff;
  border-color: #388bfd;
}
.btn-primary:hover { background: #388bfd; opacity: 1; }

.btn-secondary {
  background: var(--green-dark);
  color: #fff;
  border-color: #2ea043;
}
.btn-secondary:hover { background: #2ea043; opacity: 1; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); background: var(--card); opacity: 1; }

.btn-full { width: 100%; justify-content: center; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(88,166,255,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(88,166,255,.1);
  border: 1px solid rgba(88,166,255,.25);
  color: var(--blue);
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-subtitle strong { color: var(--text); }

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-cta .btn { font-size: .95rem; padding: 12px 24px; }

.hero-platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-subtle);
  font-size: .82rem;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--card);
  border: 1px solid var(--border);
}

/* ── Section titles ───────────────────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Features ─────────────────────────────────────────────────────────────── */
.features {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.feature-card:hover {
  border-color: var(--blue-dark);
  background: var(--card-hover);
  box-shadow: 0 0 0 1px var(--blue-dark), var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(88,166,255,.08);
  border: 1px solid rgba(88,166,255,.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--blue);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.diff-added  { color: var(--green); font-weight: 600; }
.diff-removed{ color: var(--red);   font-weight: 600; }
.diff-changed{ color: var(--blue);  font-weight: 600; }

/* Extras grid */
.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.extra-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: .875rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.extra-item svg { flex-shrink: 0; color: var(--blue); }

/* ── Download ─────────────────────────────────────────────────────────────── */
.download {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.download-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.download-card-header svg { color: var(--text-muted); flex-shrink: 0; }
.download-card-header h3 { font-size: 1.15rem; font-weight: 700; }

.download-os-desc {
  color: var(--text-subtle);
  font-size: .85rem;
  margin-bottom: 18px;
  padding-left: 46px;
}

.download-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-note {
  margin-top: 14px;
  font-size: .8rem;
  color: var(--text-subtle);
}

/* Source CTA */
.source-cta {
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  padding: 28px 32px;
  background: var(--card);
}

.source-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.source-cta h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.source-cta p {
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Requirements ─────────────────────────────────────────────────────────── */
.requirements {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.req-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}

.req-card h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
}

.req-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.req-card li {
  font-size: .875rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}
.req-card li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--border-muted);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .95rem;
  color: var(--text-muted);
}
.footer-brand a { color: var(--blue); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: center;
}

.footer-links a {
  color: var(--text-subtle);
  font-size: .85rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color .15s;
}
.footer-links a:hover { color: var(--text); text-decoration: none; }

.footer-copy {
  font-size: .8rem;
  color: var(--text-subtle);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
  .hero { padding: 64px 0 48px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .source-cta-inner { flex-direction: column; }
  .source-cta-inner .btn { width: 100%; justify-content: center; }
  .extra-item { border-right: none; }
  .features-grid, .download-grid, .req-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ── Prose / Doc pages ────────────────────────────────────────────────────── */
.page-hero {
  padding: 72px 0 52px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(88,166,255,.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-badge {
  display: inline-block;
  background: rgba(88,166,255,.1);
  border: 1px solid rgba(88,166,255,.2);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 14px;
}
.page-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.prose {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}
.prose h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}
.prose h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 22px 0 8px;
}
.prose p {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
  font-size: .95rem;
}
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--blue); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol {
  padding-left: 20px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prose ul li, .prose ol li {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.65;
}
.prose ul li::marker { color: var(--border-muted); }
.prose ol li::marker { color: var(--blue); font-weight: 600; }
.prose code {
  font-size: .85em;
  background: var(--card);
  border: 1px solid var(--border);
  padding: .2em .45em;
  border-radius: var(--radius-sm);
}
.prose pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  margin: 16px 0 20px;
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.prose blockquote {
  border-left: 3px solid var(--blue-dark);
  padding: 12px 16px;
  margin: 20px 0;
  background: rgba(88,166,255,.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose blockquote p { margin: 0; color: var(--text-muted); font-style: italic; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: .9rem;
}
.prose th {
  text-align: left;
  padding: 10px 14px;
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.prose td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
  font-size: .9rem;
}
.prose tr:nth-child(even) td { background: rgba(255,255,255,.015); }
.prose .callout {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 20px 0;
  background: var(--card);
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.prose .callout-icon { flex-shrink: 0; margin-top: 1px; }
.prose .callout.tip   { border-color: rgba(63,185,80,.3);  background: rgba(63,185,80,.05); }
.prose .callout.warn  { border-color: rgba(210,153,34,.3); background: rgba(210,153,34,.05); }
.prose .callout.info  { border-color: rgba(88,166,255,.3); background: rgba(88,166,255,.05); }
.prose .callout.tip   .callout-icon { color: var(--green); }
.prose .callout.warn  .callout-icon { color: #d29922; }
.prose .callout.info  .callout-icon { color: var(--blue); }
.prose .step-grid {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
.prose .step-card {
  display: flex;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.prose .step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(88,166,255,.12);
  border: 1px solid rgba(88,166,255,.25);
  color: var(--blue);
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prose .step-body h3 { margin: 0 0 6px; font-size: .95rem; }
.prose .step-body p  { margin: 0; font-size: .875rem; }
.prose .kbd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}
.prose .kbd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: .875rem;
  color: var(--text-muted);
}
.prose .kbd-item kbd { background: var(--surface); }
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 48px;
}
.toc h2 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-subtle);
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: none !important;
}
.toc ol {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.toc li { font-size: .875rem; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--blue); text-decoration: none; }

@media (max-width: 640px) {
  .prose { padding: 40px 20px 64px; }
  .prose .step-card { flex-direction: column; gap: 10px; }
}
