:root {
  --bg: #111418;
  --surface: #1a1f26;
  --surface-deep: #0b0e12;
  --line: #2f3742;
  --line-strong: #3d4653;
  --fg: #e6e9ee;
  --fg-muted: #8a94a3;
  --fg-faint: #5f6876;
  --accent: #f2b632;
  --accent-hover: #f7c65a;
  --on-accent: #111418;
  --accent-soft: rgba(242, 182, 50, 0.22);
  --success: #4cc38a;
  --focus: #7cc4ff;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, Consolas, "Cascadia Mono", "SF Mono", monospace;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-pill: 999px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-12: 48px;
  --s-16: 64px;
  --s-24: 96px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3 { font-weight: 600; margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */

.site-header {
  padding: var(--s-6) 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--fg); }
.brand img { width: 28px; height: 28px; }
.nav-link {
  color: var(--fg-muted);
  font-size: 15px;
}
.nav-link:hover { color: var(--accent); }

/* ---------- sections ---------- */

section { padding-top: var(--s-16); }
@media (min-width: 900px) {
  section { padding-top: var(--s-24); }
}
section > .wrap > h2 {
  font-size: 24px;
  margin-bottom: var(--s-8);
}
@media (min-width: 900px) {
  section > .wrap > h2 { font-size: 32px; margin-bottom: var(--s-12); }
}

/* ---------- image frame ---------- */

.frame {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-deep);
  padding: var(--s-1);
  overflow: hidden;
}
.frame img { border-radius: 7px; width: 100%; height: auto; }
figure { margin: 0; }
figcaption {
  margin-top: var(--s-3);
  font-size: 13px;
  color: var(--fg-muted);
}

/* ---------- hero ---------- */

.hero { padding-top: var(--s-8); }
.hero + section { padding-top: var(--s-16); }
@media (min-width: 900px) {
  .hero + section { padding-top: var(--s-24); }
}
.hero .wrap {
  display: grid;
  gap: var(--s-8);
  align-items: start;
}
@media (min-width: 900px) {
  .hero { padding-top: var(--s-12); }
  .hero .wrap {
    grid-template-columns: 5fr 7fr;
    gap: var(--s-12);
    align-items: center;
  }
}
.hero h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
}
@media (min-width: 900px) {
  .hero h1 { font-size: 46px; }
}
.hero .lead {
  margin-top: var(--s-6);
  color: var(--fg-muted);
  max-width: 46ch;
}
.hero-media { min-width: 0; }

/* ---------- download button ---------- */

.cta { margin-top: var(--s-8); }

.dl {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: var(--s-1) var(--s-6);
  line-height: 1.25;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}
.dl:hover { background: var(--accent-hover); color: var(--on-accent); }
.dl:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dl-meta {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
  opacity: 0.8;
}
.dl[data-state="loaded"] .dl-unknown { display: none; }
.dl-known { display: none; }
.dl[data-state="loaded"] .dl-known { display: inline; }

.cta-meta {
  margin-top: var(--s-4);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-3) var(--s-6);
  font-size: 14px;
  color: var(--fg-muted);
}
.text-link {
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}
.text-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- how it works ---------- */

.steps {
  display: grid;
  gap: var(--s-8);
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-8); }
}
.step h3 {
  font-size: 18px;
  margin-bottom: var(--s-2);
}
.step p { color: var(--fg-muted); font-size: 15px; }
.step-num {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: var(--s-4);
}
@media (max-width: 899px) {
  .step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-4); }
  .step-num { grid-row: 1; font-size: 24px; margin: 0; padding-top: 1px; }
  .step h3 { grid-row: 1; }
  .step p { grid-column: 2; }
}

/* ---------- features ---------- */

.features {
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 900px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card--wide { grid-column: span 2; grid-row: span 2; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}
.card:hover { border-color: var(--line-strong); }
.card h3 { font-size: 18px; margin-bottom: var(--s-2); }
.card p { color: var(--fg-muted); font-size: 15px; }
.card--wide {
  display: grid;
  gap: var(--s-6);
  align-content: start;
}
@media (min-width: 900px) {
  .card--wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    align-content: stretch;
  }
}
.card--wide .frame { align-self: center; }
@media (min-width: 900px) {
  .card--wide .frame { max-width: 190px; justify-self: end; }
}
@media (max-width: 899px) {
  .card--wide .frame { max-width: 260px; justify-self: center; }
}

/* ---------- privacy panel ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 900px) {
  .panel { padding: var(--s-8); }
}
.panel p { max-width: 88ch; }
.panel p + p { color: var(--fg-muted); }
.panel .text-link { justify-self: start; }

/* ---------- open source ---------- */

.oss {
  display: grid;
  gap: var(--s-8);
}
@media (min-width: 900px) {
  .oss { grid-template-columns: 6fr 5fr; gap: var(--s-12); }
}
.oss-prose { display: grid; gap: var(--s-6); color: var(--fg-muted); }
.oss-links {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.oss-links a {
  display: block;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}
.oss-links a span {
  display: block;
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 2px;
}
.oss-links a:hover span { color: var(--fg-muted); }

/* ---------- faq ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 44px;
  padding: var(--s-4) 0;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.chev {
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: var(--s-2);
  border-right: 2px solid var(--fg-muted);
  border-bottom: 2px solid var(--fg-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 120ms ease;
}
.faq details[open] .chev { transform: rotate(225deg) translate(-2px, -2px); }
.faq .answer {
  color: var(--fg-muted);
  font-size: 15px;
  max-width: 78ch;
  padding-bottom: var(--s-6);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--s-12);
  padding: var(--s-8) 0 var(--s-16);
}
.footer-top {
  display: grid;
  gap: var(--s-6);
  padding-bottom: var(--s-8);
}
@media (min-width: 900px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--s-12);
  }
}
.footer-tag {
  margin-top: var(--s-3);
  color: var(--fg-muted);
  font-size: 15px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  font-size: 15px;
  color: var(--fg-muted);
}
.footer-nav a { color: var(--fg-muted); }
.footer-nav a:hover { color: var(--accent); }
.footer-nav a:not(:first-child)::before {
  content: "\00b7";
  color: var(--fg-faint);
  margin-right: var(--s-3);
}
.legal {
  color: var(--fg-muted);
  font-size: 13px;
  max-width: 92ch;
}

/* ---------- site additions (Phase 3) ---------- */

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.gh { flex: none; }

picture { display: block; }

/* ---------- text pages (privacy, impressum, 404) ---------- */

.page { padding-top: var(--s-8); padding-bottom: var(--s-8); }
@media (min-width: 900px) {
  .page { padding-top: var(--s-12); }
}
.prose { max-width: 72ch; }
.prose h1 { font-size: 32px; letter-spacing: -0.02em; }
.prose h2 {
  font-size: 20px;
  margin-top: var(--s-8);
  margin-bottom: var(--s-3);
}
.prose p, .prose li { color: var(--fg-muted); }
.prose p + p { margin-top: var(--s-4); }
.prose h1 + p { margin-top: var(--s-6); }
.prose ul { margin: var(--s-4) 0 0; padding-left: 20px; }
.prose li + li { margin-top: var(--s-2); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-hover); }
.prose .address {
  margin-top: var(--s-4);
  color: var(--fg);
  font-style: normal;
  line-height: 1.6;
}
.prose .updated { margin-top: var(--s-8); color: var(--fg-muted); font-size: 13px; }
.prose .lead-back { margin-bottom: var(--s-6); }

.notfound { text-align: center; padding: var(--s-24) 0; }
.notfound h1 { font-size: 32px; }
.notfound p { margin-top: var(--s-4); color: var(--fg-muted); }
.notfound .text-link { display: inline-block; margin-top: var(--s-6); }
