:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --text: #15171c;
  --muted: #5d6472;
  --border: #e2e5eb;
  --accent: #6b5bd6;
  --accent-text: #ffffff;
  --accent-soft: #eeebfb;
  --warn-soft: #fff6e0;
  --warn-border: #f2d58a;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121419;
    --surface: #1b1e25;
    --text: #eef0f4;
    --muted: #a1a8b5;
    --border: #2b2f38;
    --accent: #8f82ee;
    --accent-text: #121419;
    --accent-soft: #252140;
    --warn-soft: #2a2414;
    --warn-border: #5b4a1d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 16px;
}
.brand {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800;
}
nav a { color: var(--muted); text-decoration: none; font-weight: 600; margin-left: 18px; }
nav a:hover { color: var(--text); }

main { padding: 48px 0 64px; }
h1 { font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 1.4rem; letter-spacing: -0.01em; margin: 48px 0 12px; }
h3 { font-size: 1.05rem; margin: 24px 0 6px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.apps { display: grid; gap: 16px; margin-top: 32px; }
.app-card {
  display: flex; gap: 18px; align-items: center;
  text-decoration: none; color: inherit;
  transition: border-color .15s;
}
.app-card:hover { border-color: var(--accent); }
.app-card img { width: 72px; height: 72px; border-radius: 18px; flex: none; }
.app-card h3 { margin: 0 0 2px; font-size: 1.2rem; }
.app-card p { margin: 0; color: var(--muted); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

.app-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.app-hero img { width: 88px; height: 88px; border-radius: 22px; flex: none; }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-text);
  font-weight: 700; text-decoration: none; padding: 12px 22px; border-radius: 12px;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.shots {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.shots img {
  width: 200px; flex: none; border-radius: 18px; border: 1px solid var(--border);
  scroll-snap-align: start;
}

ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ol.steps li { counter-increment: step; position: relative; padding-left: 52px; }
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 20px; top: 20px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  font-weight: 800; font-size: .8rem; display: grid; place-items: center;
}
ol.steps li.card { padding-left: 60px; }
ol.steps strong { display: block; }
ol.steps p { margin: 4px 0 0; color: var(--muted); }

.note {
  background: var(--warn-soft); border: 1px solid var(--warn-border);
  border-radius: var(--radius); padding: 16px 20px; margin-top: 24px;
}
.note p { margin: 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.facts .card { padding: 16px 18px; }
.facts strong { display: block; }
.facts p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
table.controls td:first-child { font-weight: 600; white-space: nowrap; }

ul.features { padding-left: 20px; }
ul.features li { margin: 6px 0; }

.prose { max-width: 42em; }
.prose h2 { font-size: 1.2rem; margin-top: 32px; }

footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
footer.site .wrap { padding-top: 24px; padding-bottom: 32px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
footer.site a { color: var(--muted); }

@media (max-width: 520px) {
  main { padding-top: 32px; }
  nav a { margin-left: 12px; }
  .app-hero img { width: 68px; height: 68px; border-radius: 17px; }
  .shots img { width: 180px; }
}

.shots.wide img { width: 340px; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 520px) { .shots.wide img { width: 260px; } }
.hero-shot { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); margin-top: 32px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.gallery figcaption { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.credit { color: var(--muted); font-size: .9rem; margin-top: 32px; }
.app-hero img.pixel, .app-card img.pixel { image-rendering: pixelated; }

table.controls { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
table.controls th, table.controls td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
table.controls tr:last-child td { border-bottom: 0; }
table.controls th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
