:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef5ff;
  --text: #172033;
  --muted: #64748b;
  --line: #d9e2ee;
  --primary: #1d4ed8;
  --primary-hover: #2563eb;
  --radius: 8px;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

nav a {
  border-radius: var(--radius);
  color: #41506a;
  font-weight: 700;
  padding: 8px 12px;
  text-decoration: none;
}

nav a:hover { background: var(--surface-soft); color: var(--primary); }

.header-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.language-picker {
  align-items: center;
  color: #41506a;
  display: inline-flex;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.language-picker select {
  appearance: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  min-height: 38px;
  padding: 7px 34px 7px 11px;
}

.language-picker select:hover, .language-picker select:focus {
  border-color: #aac4eb;
  outline: none;
}

html[dir="rtl"] .language-picker select { padding: 7px 11px 7px 34px; }
html[dir="rtl"] .hero-panel, html[dir="rtl"] .feature-grid article, html[dir="rtl"] .download-card { text-align: right; }


.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(56px, 8vw, 104px) clamp(20px, 4vw, 56px);
}

.eyebrow {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.15; margin: 0; }

h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); max-width: 920px; }

h2 { font-size: clamp(2rem, 3vw, 3rem); }

h3 { font-size: 1.15rem; }

.lead {
  color: var(--muted);
  font-size: 1.16rem;
  max-width: 760px;
  margin: 22px 0 0;
}

.hero-actions, .download-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-actions { margin-top: 30px; }

.button {
  align-items: center;
  border-radius: var(--radius);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
}

.button.primary { background: var(--primary); color: #ffffff; }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { background: #ffffff; border: 1px solid var(--line); color: #253047; }
.button.secondary:hover { background: var(--surface-soft); border-color: #aac4eb; }

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 0;
  overflow: hidden;
}

.hero-panel img {
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.noscript-note {
  background: #fff7ed;
  border-top: 1px solid #fed7aa;
  color: #9a3412;
  margin: 0;
  padding: 12px clamp(20px, 4vw, 56px);
}

.window-bar {
  display: flex;
  gap: 7px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cbd5e1;
}

.mockup {
  display: grid;
  grid-template-columns: 34% 1fr;
  min-height: 330px;
}

.mockup aside {
  background: #f8fafc;
  border-right: 1px solid var(--line);
  color: #526176;
  padding: 22px;
}

.mockup section { padding: 22px; }

.mock-toolbar, .mock-row {
  background: #e8f1ff;
  border-radius: var(--radius);
  height: 34px;
  margin-bottom: 14px;
}

.mock-row { background: #f1f5f9; height: 44px; }
.mock-row.short { width: 72%; }

.hero-panel p { color: var(--muted); margin: 0; padding: 0 22px 22px; }

.section { padding: 72px clamp(20px, 4vw, 56px); }

.section-heading { max-width: 760px; margin-bottom: 28px; }

.feature-grid, .screenshot-grid, .download-grid {
  display: grid;
  gap: 16px;
}

.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.screenshot-grid, .download-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.feature-grid article, .download-card, figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0;
  padding: 22px;
}

.feature-grid p, .download-card p, figcaption { color: var(--muted); margin: 10px 0 0; }

.screenshot-placeholder {
  align-items: center;
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(135deg, #eef5ff, #eef5ff 12px, #f8fafc 12px, #f8fafc 24px);
  border: 1px dashed #aebed2;
  border-radius: var(--radius);
  color: #526176;
  display: flex;
  font-weight: 800;
  justify-content: center;
  text-align: center;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.download-card p { margin: 0; }

.impressum-modal {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 100;
}

.impressum-modal:target { display: flex; }

.modal-backdrop {
  background: rgba(15, 23, 42, 0.56);
  inset: 0;
  position: absolute;
}

.modal-window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  max-height: min(760px, 88vh);
  max-width: 920px;
  overflow: auto;
  padding: 24px;
  position: relative;
  width: min(100%, 920px);
}

.modal-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.5rem;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  width: 40px;
}

.modal-close:hover { background: var(--surface-soft); color: var(--primary); }

.impressum-card {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.impressum-card article {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.impressum-card address {
  color: var(--muted);
  font-style: normal;
  margin-top: 10px;
}

.impressum-card p {
  color: var(--muted);
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #334155;
  display: inline-block;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
  padding: 3px 7px;
  overflow-wrap: anywhere;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 24px clamp(20px, 4vw, 56px);
}

.site-footer p { margin: 0; }
.site-footer a { color: var(--primary); font-weight: 800; text-decoration: none; }

.stats-page {
  background: #f5f7fb;
}

.stats-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(24px, 4vw, 56px);
}

.stats-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.stats-header h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.stats-login, .stats-panel, .stats-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.stats-login {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 430px;
  padding: 24px;
}

.stats-login label {
  color: var(--muted);
  display: grid;
  font-weight: 700;
  gap: 6px;
}

.stats-login input {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  min-height: 44px;
  padding: 8px 10px;
}

.stats-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  color: #991b1b;
  margin: 0;
  padding: 10px 12px;
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.stats-grid article {
  padding: 20px;
}

.stats-grid strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.stats-grid span {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-top: 8px;
}

.stats-columns {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.stats-panel {
  margin-bottom: 16px;
  overflow: auto;
  padding: 20px;
}

.stats-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 14px;
}

.stats-panel table {
  border-collapse: collapse;
  font-size: 0.92rem;
  width: 100%;
}

.stats-panel th, .stats-panel td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.stats-panel th {
  color: #41506a;
  font-size: 0.78rem;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .feature-grid, .screenshot-grid, .download-grid, .impressum-card, .stats-grid, .stats-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .header-controls { align-items: flex-start; justify-content: flex-start; }
  .feature-grid, .screenshot-grid, .download-grid, .impressum-card, .stats-grid, .stats-columns { grid-template-columns: 1fr; }
  .mockup { grid-template-columns: 1fr; }
  .mockup aside { border-right: 0; border-bottom: 1px solid var(--line); }
  h1 { font-size: 2.35rem; }
}
