:root {
  color-scheme: light;
  --ink: #01233f;
  --muted: #586b7b;
  --accent: #126294;
  --surface: #fff;
  --border: #dce5ec;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f4f7fa;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

a:focus-visible, button:focus-visible, .close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1100;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px max(24px, calc((100% - 1240px) / 2));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.logo { display: inline-flex; flex-shrink: 0; }
.logo img { display: block; width: 220px; max-width: 100%; height: auto; }

.weather {
  padding: 16px 20px;
  background: #f1f6fa;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: .875rem;
}

.weather strong { font-weight: 650; }
#wetterdaten { margin: 6px 0 0; padding: 0; list-style: none; color: var(--muted); }
#wetterdaten:empty { display: none; }

main {
  max-width: 1288px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

.intro { margin-bottom: 36px; max-width: 760px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.04em;
}

.intro > p:last-child { margin: 0; color: var(--muted); font-size: 1.0625rem; }

.dashboard, .category {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 24px;
}

.dashboard > .parent, .dashboard > .category, .dashboard > h2 { grid-column: 1 / -1; }
.category-title { margin: 8px 0 20px; font-size: 1.5rem; letter-spacing: -.025em; }
.dashboard > .category-title { margin-bottom: 0; }

.tool-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 3px 12px rgb(1 35 63 / 3%);
  overflow-wrap: anywhere;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  background: #f7f9fb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 22px;
}

h3 { margin: 0 0 10px; font-size: 1.125rem; line-height: 1.4; letter-spacing: -.015em; }
.description { margin: 0 0 24px; color: var(--muted); font-size: .9375rem; }
.description a { text-underline-offset: 3px; }

.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: #edf4f9;
  color: #0b527f;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.45;
  transition: background-color .2s ease, color .2s ease;
}

.link-arrow { flex-shrink: 0; font-size: 1.2rem; }
.link:hover { background: var(--ink); color: #fff; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .875rem;
}

.site-footer a { text-underline-offset: 4px; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  background: rgb(1 35 63 / 55%);
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgb(1 35 63 / 20%);
}

.close {
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}
.close:hover { color: var(--ink); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tool-card:hover {
    transform: translateY(-4px);
    border-color: #b7ccdc;
    box-shadow: 0 12px 28px rgb(1 35 63 / 8%);
  }
}

@media (max-width: 1288px) {
  .site-footer { margin-inline: 24px; }
}

@media (max-width: 600px) {
  header { padding: 24px 20px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .logo img { width: 190px; }
  .weather { width: 100%; }
  main { padding: 36px 20px 44px; }
  .intro { margin-bottom: 28px; }
  .dashboard, .category { gap: 18px; }
  .tool-card { padding: 20px; }
  .site-footer { margin-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
