:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #171a21;
  --muted: #5b6270;
  --border: #e2e5ee;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 40, 0.06), 0 4px 16px rgba(20, 24, 40, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #181b24;
    --text: #eceef4;
    --muted: #9aa1b2;
    --border: #2a2f3d;
    --accent: #818cf8;
    --accent-hover: #a5b0ff;
    --accent-soft: #232742;
    --shadow: none;
  }
}

* { 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); }
a:hover { color: var(--accent-hover); }

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

/* Header / Footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.site-nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 0.95rem; }
.site-nav a:hover { color: var(--text); }

.site-footer { margin-top: 64px; padding: 28px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Hero + Startseite */
.hero { padding: 56px 0 24px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.03em; }
.hero p { color: var(--muted); font-size: 1.15rem; margin: 0; max-width: 620px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 24px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.card .icon { font-size: 1.8rem; line-height: 1; margin-bottom: 10px; }
.card h2 { font-size: 1.1rem; margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Tool-Seiten */
.tool-head { padding: 36px 0 8px; }
.tool-head h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 6px; letter-spacing: -0.02em; }
.tool-head p { margin: 0; color: var(--muted); }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 20px; box-shadow: var(--shadow); }

.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row + .row { margin-top: 12px; }
label { font-size: 0.9rem; color: var(--muted); }

select, input[type="text"], input[type="number"], textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; max-width: 100%;
}
textarea { width: 100%; min-height: 200px; resize: vertical; }
select:focus, input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); border-radius: 10px; padding: 9px 16px;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 16px; }
.stat { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 0.85rem; }

.two-col { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
.box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-height: 220px; white-space: pre-wrap; overflow-wrap: anywhere; }
.box h3 { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.interim { color: var(--muted); }

.status { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }
.status.live::before { content: "●"; color: var(--danger); margin-right: 6px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.notice { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 0.92rem; color: var(--muted); margin-top: 16px; }
.warn { background: #fef3c7; color: #78350f; border-radius: 12px; padding: 12px 14px; margin-top: 16px; }
@media (prefers-color-scheme: dark) { .warn { background: #3a2f10; color: #fde68a; } }

.seo { margin-top: 40px; }
.seo h2 { font-size: 1.25rem; margin-top: 28px; }
.seo p, .seo li { color: var(--muted); }

.out-field { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.15rem; flex: 1 1 260px; }
