* { box-sizing: border-box; }
html, body { height: 100%; }

:root,
html[data-theme="light"] {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --card: #ffffff;
  --border: #e5e5e5;
  --edge: #e6e6e6;
  --accent: #5a5aff;
  --accent-2: #7272ff;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0b0e;
  --text: #e9e9f1;
  --muted: #b1b1c7;
  --card: #121218;
  --border: #232334;
  --edge: #1a1a26;
  --accent: #b38aff;
  --accent-2: #c1a7ff;
  color-scheme: dark;
}

html, body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family: 'Silkscreen', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 5%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 2px solid var(--edge);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 5%;
}

.logo { font-weight: 700; font-size: 20px; letter-spacing: 0.5px; }

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.nav-links a { padding: 8px 4px; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-bottom-color: var(--accent); text-decoration: none; }

button, .btn {
  font-family: 'Silkscreen', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: 0.5px;
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--text);
  border-radius: 0;
  font-size: 14px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  user-select: none;
  background: var(--card);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}

.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: var(--card); }
.btn-toggle { justify-self: end; min-width: 80px; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 5%;
  border-bottom: 2px solid var(--edge);
}

.hero-text h1 { font-size: 34px; margin: 0 0 12px 0; line-height: 1.2; }
.hero-text p { margin: 0 0 20px 0; color: var(--muted); max-width: 52ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art img { background: var(--bg); border: 2px solid var(--text); }

.features h2,
.downloads h2,
.docs h2 { font-size: 24px; margin: 0 0 20px 0; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card { background: var(--card); border: 2px solid var(--border); padding: 18px; }
.card h3 { margin: 0 0 8px 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

.download-card .download-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.icon {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.bullets { margin: 0 0 16px 16px; padding: 0; }
.bullets li { margin: 6px 0; }

.muted { color: var(--muted); }

.notes {
  margin-top: 16px;
  border: 2px solid var(--border);
  padding: 12px;
  background: var(--card);
}

.ordered { margin: 0 0 16px 18px; padding: 0; }
.ordered li { margin: 6px 0; }

.site-footer { border-top: 2px solid var(--edge); background: var(--bg); }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 5%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.footer-logo { width: 24px; height: 24px; image-rendering: pixelated; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 40px 5%; }
  .hero-text h1 { font-size: 28px; }
}

@media (max-width: 640px) {
  .nav { grid-template-columns: auto auto 1fr; gap: 12px; }
  .nav-links { order: 2; grid-column: 1 / span 2; }
  .btn-toggle { order: 3; justify-self: end; }
  .section { padding: 36px 5%; }
  .hero-text p { max-width: none; }
  .grid { grid-template-columns: 1fr; }
}
/* Make links inside the Install/Docs section visibly accented */
#install a:not(.btn),
.docs a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 2px;
}

#install a:not(.btn):hover,
.docs a:not(.btn):hover {
  color: var(--accent-2);
  text-decoration: underline;
}

#install a:not(.btn):focus-visible,
.docs a:not(.btn):focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

