:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #64646b;
  --border: #e3e3de;
  --accent: #3b5bdb;
  --accent-text: #ffffff;
  --accent-soft: #edf0ff;
  --ok: #2b8a3e;
  --ok-soft: #ebfbee;
  --warn: #a35c00;
  --warn-soft: #fff6e5;
  --error: #c92a2a;
  --error-soft: #fff0f0;
  --code-bg: #f0f0ec;
  --radius: 14px;
  --coffee: #ffdd00;
  --coffee-text: #1c1c1e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --surface: #1b1b1f;
    --text: #ececee;
    --muted: #9d9da5;
    --border: #2d2d33;
    --accent: #7d93ff;
    --accent-text: #0f1330;
    --accent-soft: #1f2440;
    --ok: #69db7c;
    --ok-soft: #15291a;
    --warn: #ffc069;
    --warn-soft: #2e2412;
    --error: #ff8787;
    --error-soft: #331a1a;
    --code-bg: #26262b;
  }
}

* { 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;
}
main, header, footer { max-width: 680px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
code {
  font: 0.88em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

header { padding-top: 28px; display: flex; align-items: center; gap: 10px; font-weight: 650; }
header svg { width: 28px; height: 28px; }

.hero { padding: 40px 0 28px; }
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
.hero p { margin: 0; color: var(--muted); font-size: 18px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.badge {
  font-size: 14px; color: var(--muted);
  border: 1px solid var(--border); background: var(--surface);
  padding: 4px 12px; border-radius: 999px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
h2 { font-size: 20px; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: 15px; font-weight: 700;
}

/* Drop zone */
.drop {
  display: block; position: relative; cursor: pointer;
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 36px 16px; text-align: center;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.dragging, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop svg { width: 40px; height: 40px; color: var(--accent); }
.drop strong { display: block; font-size: 18px; margin-top: 8px; }
.drop span { color: var(--muted); font-size: 15px; }

details.manual { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
details.manual summary { cursor: pointer; color: var(--muted); }
details.manual > ol { margin-top: 14px; }
details.options { margin-top: 16px; font-size: 15px; }
details.options summary { cursor: pointer; color: var(--muted); }
details.options .field { margin-top: 12px; }
details.options label { display: block; font-weight: 600; margin-bottom: 4px; }
details.options p { margin: 6px 0 0; color: var(--muted); }
input[type="text"] {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
}
input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Progress */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--muted); }
.steps li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border);
}
.steps li.active { color: var(--text); }
.steps li.active::before { border-color: var(--accent); border-right-color: transparent; animation: spin .8s linear infinite; }
.steps li.done { color: var(--text); }
.steps li.done::before { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 3px var(--surface); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.active::before { animation: none; } }

/* Result */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--bg); border-radius: 10px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 24px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-text);
  border: 0; border-radius: 10px; padding: 12px 20px;
}
.button svg { width: 20px; height: 20px; }
.link-button { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 8px 4px; text-decoration: underline; }
.file-name { color: var(--muted); font-size: 14px; margin: 12px 0 0; overflow-wrap: anywhere; }

.notice { border-radius: 10px; padding: 12px 16px; margin-top: 16px; font-size: 15px; }
.notice p { margin: 0; }
.notice p + p, .notice ul { margin-top: 6px; }
.notice ul { padding-left: 20px; margin-bottom: 0; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.error { background: var(--error-soft); color: var(--error); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }

/* Instructions */
ol.howto { margin: 0; padding-left: 22px; }
ol.howto > li { margin-bottom: 14px; padding-left: 4px; }
ol.howto > li:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }

.tabs { display: flex; gap: 4px; margin: 10px 0 0; border-bottom: 1px solid var(--border); }
.tabs button {
  font: inherit; font-size: 15px; background: none; border: 0; cursor: pointer;
  color: var(--muted); padding: 6px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab-panel { padding-top: 10px; }
.tab-panel ol { margin: 0; padding-left: 20px; }
.tab-panel li { margin-bottom: 6px; }
.path { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy {
  font: inherit; font-size: 13px; cursor: pointer; color: var(--accent);
  background: var(--accent-soft); border: 0; border-radius: 6px; padding: 2px 10px;
}

.faq details { border-top: 1px solid var(--border); padding: 12px 0; }
.faq details:last-child { padding-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

.header-coffee {
  margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--coffee-text); background: var(--coffee); border-radius: 999px; padding: 6px 14px;
}
.coffee-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 17px; text-decoration: none;
  color: var(--coffee-text); background: var(--coffee);
  border-radius: 12px; padding: 14px 24px;
  transition: transform .1s;
}
.coffee-button:hover { transform: translateY(-1px); }
.support { text-align: center; }
.support .cup { font-size: 44px; line-height: 1; }
.support h2 { justify-content: center; margin: 12px 0 8px; font-size: 22px; }
.support p { color: var(--muted); margin: 0 auto 20px; max-width: 460px; }

dialog.thanks {
  width: min(440px, calc(100vw - 32px)); padding: 28px 24px 20px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
}
dialog.thanks::backdrop { background: rgb(0 0 0 / 0.45); }
dialog.thanks .cup { font-size: 44px; line-height: 1; }
dialog.thanks h2 { justify-content: center; margin: 12px 0 8px; }
dialog.thanks p { color: var(--muted); margin: 0 0 12px; }
dialog.thanks .coffee-button { width: 100%; margin-top: 8px; }
dialog.thanks .link-button { margin-top: 8px; color: var(--muted); }

footer { padding: 12px 16px 48px; color: var(--muted); font-size: 14px; text-align: center; }

[hidden] { display: none !important; }
@media (max-width: 480px) {
  .card { padding: 18px; }
  .stats { gap: 8px; }
  .stat b { font-size: 20px; }
}

.step-note { margin: 14px 0 0; font-size: 15px; }

/* Legal pages (Impressum, Datenschutz) */
.legal { padding-top: 32px; padding-bottom: 8px; }
.legal h1 { font-size: clamp(26px, 5vw, 34px); margin-bottom: 20px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; display: block; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--text); overflow-wrap: anywhere; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal address { font-style: normal; margin-bottom: 12px; }
.back { display: inline-block; margin-top: 8px; }
header a.home { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; }
