/* Arbeitsblätter – Modern redesign
   Type: DM Sans (UI) + Source Serif 4 (display)
   Palette: warm off-white, deep ink, single deep-blue accent
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&display=swap');

:root {
  --bg:        oklch(98.5% 0.004 85);
  --bg-soft:   oklch(96% 0.006 85);
  --bg-card:   #ffffff;
  --ink:       oklch(22% 0.012 255);
  --ink-soft:  oklch(42% 0.012 255);
  --ink-mute:  oklch(60% 0.012 255);
  --rule:      oklch(90% 0.008 255);
  --rule-soft: oklch(94% 0.006 255);

  --accent:        oklch(42% 0.14 258);   /* deep eödl-ish blue */
  --accent-ink:    oklch(32% 0.13 258);
  --accent-soft:   oklch(94% 0.03 258);
  --highlight:     oklch(88% 0.10 92);    /* warm khaki yellow */
  --highlight-ink: oklch(45% 0.10 75);

  --serif: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 18px;

  --maxw: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

/* ───────────────────────── Header ───────────────────────── */

.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.brand a {
  text-decoration: none;
}
.brand__link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}
.brand__link:hover { text-decoration: none; }
.brand__logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}
.brand__divider {
  width: 1px;
  height: 28px;
  background: var(--rule);
}
.brand__text {
  color: var(--ink);
}
.brand__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand__sub {
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: all .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav a.is-active { color: var(--ink); background: var(--bg-soft); }

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  width: 220px;
  margin-left: 8px;
}
.nav-search input {
  border: 0;
  background: transparent;
  outline: none;
  flex: 1;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.nav-search input::placeholder { color: var(--ink-mute); }
.nav-search svg { color: var(--ink-mute); flex: none; }

/* Mobile-Header-Steuerung (Burger + Such-Icon) — ab 900px sichtbar, sonst aus */
.nav-toggle,
.nav-search-mobile { display: none; }

.nav-toggle {
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 0;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.site-header.is-nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.is-nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header.is-nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-search-mobile {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  margin-left: auto;
}
.nav-search-mobile:hover { color: var(--ink); text-decoration: none; }

/* ───────────────────────── Layout ───────────────────────── */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }

/* ───────────────────────── Hero ───────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('assets/Lehrerin-afs-english-w.webp') no-repeat;
  background-size: cover;
  background-position: 82% 35%;
  opacity: 0.2;
}
.hero > .container {
  position: relative;
  z-index: 1;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: end;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 20px;
}
.hero__eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 24px;
  text-wrap: balance;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero__lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  text-wrap: pretty;
}

.hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.stat {
  padding: 20px 0 0;
  border-right: 1px solid var(--rule);
  padding-right: 24px;
}
.stat:last-child { border-right: 0; padding-left: 24px; padding-right: 0; }
.stat__num {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat__label {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

.hero__actions {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all .15s;
  line-height: 1;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: var(--bg-soft); text-decoration: none; }

/* ───────────────────────── Section heads ───────────────────────── */

.sec-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.sec-head__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0;
}
.sec-head__sub {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 6px;
}
.sec-head__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
}

/* ───────────────────────── Category grid ───────────────────────── */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cat-grid::after {
  content: "";
  grid-column: auto / -1;
  background: var(--bg-card);
}
.cat {
  background: var(--bg-card);
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: background .15s;
  min-height: 200px;
  position: relative;
}
.cat:hover { background: var(--bg-soft); text-decoration: none; }
.cat__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.cat__icon {
  flex: none;
}
.cat__icon--svg {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.cat__icon--image {
  width: 100%;
  max-width: 168px;
  margin: 0 auto;
  background: transparent;
}
.cat__icon--image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
}
.cat:has(.cat__icon--image) .cat__top {
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cat:has(.cat__icon--image) .cat__count {
  padding-top: 0;
  text-align: center;
}
.cat:has(.cat__icon--image) .cat__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cat__count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  padding-top: 10px;
}
.cat__title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
.cat__titlerow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat__prev {
  flex: none;
  width: 44px;
  height: 62px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 30, 50, .10);
}
.cat__desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}
.cat__arrow {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* group label sat in left of grid - alt approach: header above each row */
.cat-group {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin: 32px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat-group::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ───────────────────────── AFS callout ───────────────────────── */

.afs {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 56px 56px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.afs__eyebrow {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(75% 0.05 92);
  margin-bottom: 18px;
  font-weight: 600;
}
.afs__title {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 20px;
}
.afs__title em { color: oklch(85% 0.10 92); font-style: italic; }
.afs__body {
  font-size: 15.5px;
  color: oklch(85% 0.01 255);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 50ch;
}
.afs__pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.pillar {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid oklch(34% 0.012 255);
  border-radius: var(--r);
  background: oklch(26% 0.012 255);
}
.pillar__letter {
  font-family: var(--serif);
  font-size: 24px;
  color: oklch(85% 0.10 92);
  font-weight: 500;
  line-height: 1;
  padding-top: 2px;
}
.pillar__name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}
.pillar__desc {
  font-size: 12.5px;
  color: oklch(75% 0.012 255);
  margin-top: 2px;
}

/* ───────────────────────── Worksheet grid (category page) ───────────────────────── */

.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.toolbar__group {
  display: flex;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 3px;
}
.chip {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.chip.is-active {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: 0 1px 2px oklch(0% 0 0 / 0.06);
}
.toolbar__count { font-size: 13px; color: var(--ink-mute); }
.toolbar__spacer { flex: 1; }
.toolbar__sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.toolbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  flex: 1;
  max-width: 420px;
}
.toolbar-search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 13px;
  min-width: 120px;
}
.toolbar-search button {
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  cursor: pointer;
}
.toolbar-search button:hover {
  background: var(--accent-ink);
}
.toolbar-search__clear {
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.toolbar-search__clear:hover {
  color: var(--ink);
  text-decoration: none;
}
.toolbar-search svg {
  color: var(--ink-mute);
  flex: none;
}
.ws__snippet {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.page-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.page-arrows a,
.page-arrows span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--bg-card);
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
}
.page-arrows a:hover {
  border-color: var(--ink-mute);
  color: var(--ink);
  text-decoration: none;
}
.page-arrows .is-disabled {
  color: var(--ink-mute);
  opacity: 0.55;
}
.page-arrows__status {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toolbar__sort select {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 5px 8px;
  background: var(--bg-card);
  color: var(--ink);
}

.ws-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}
.ws {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--ink);
  transition: transform .2s;
  min-width: 0;
}
.ws__open {
  display: block;
  color: inherit;
  text-decoration: none;
}
.ws__open:hover {
  text-decoration: none;
}
.ws:hover { transform: translateY(-2px); text-decoration: none; }
.ws__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  flex: none;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 1px 2px oklch(0% 0 0 / 0.04);
  transition: box-shadow .2s, border-color .2s;
}
.ws:hover .ws__thumb {
  box-shadow: 0 8px 24px oklch(0% 0 0 / 0.08);
  border-color: var(--ink-mute);
}
.ws__thumb img.ws__page,
.ws__thumb svg.ws__page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.ws__thumb img.ws__page {
  object-fit: cover;
  object-position: top center;
}
.ws__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.ws__badge--new { background: var(--accent); }
.ws__pdf {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--rule);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ws__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11.5px;
  color: var(--ink-mute);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.ws__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ws__delete-form {
  display: inline-flex;
  margin: 0;
}
.ws__delete {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink-mute);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.ws__delete:hover {
  background: oklch(96% 0.018 25);
  border-color: oklch(76% 0.08 25);
  color: oklch(48% 0.14 25);
}
.ws__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.ws__author {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}

.notice {
  margin: -12px 0 24px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--bg-card);
  color: var(--ink-soft);
  font-size: 13px;
}

/* Pagination */
.pager {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 56px 0 0;
}
.pager a, .pager span {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid transparent;
}
.pager a:hover { background: var(--bg-soft); text-decoration: none; }
.pager .is-active {
  background: var(--ink);
  color: #fff;
}
.pager .is-disabled { color: var(--ink-mute); cursor: not-allowed; }

/* ───────────────────────── Page header (subpages) ───────────────────────── */

.page-head {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--rule);
}
.crumbs {
  font-size: 12.5px;
  color: var(--ink-mute);
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.crumbs a { color: var(--ink-mute); }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--rule); }

.page-head__title {
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 14px;
  text-wrap: balance;
}
.page-head__sub {
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 64ch;
  line-height: 1.55;
  margin: 0;
}
.page-head__row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
}
.page-head__chips {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.tag {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--bg-card);
}

/* ───────────────────────── Trainer ranking ───────────────────────── */

.rank-list {
  border-top: 1px solid var(--rule);
}
.rank-row {
  display: grid;
  grid-template-columns: 56px 64px 1fr 220px 120px 120px;
  align-items: center;
  gap: 24px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background .12s;
}
.rank-row:hover { background: var(--bg-soft); text-decoration: none; }
.rank-row__num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.rank-row__num--top {
  color: var(--accent);
}
.rank-row__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-soft);
  font-weight: 500;
}
.rank-row__avatar { position: relative; }
.rank-row__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.rank-row__name {
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
}
.rank-row__role {
  font-size: 12.5px;
  color: var(--ink-mute);
  margin-top: 2px;
}
.search-snippet {
  margin-top: 6px;
  max-width: 70ch;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.45;
}
.search-hits-grid {
  margin-top: 8px;
}
.search-hit__snippet {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
}
.rank-row__loc {
  font-size: 13px;
  color: var(--ink-soft);
}
.rank-row__contrib {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  text-align: right;
}
.rank-row__contrib small {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin-top: 2px;
  font-weight: normal;
}
.rank-row__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.rank-row__bar > div {
  height: 100%;
  background: var(--accent);
}

/* ───────────────────────── Footer ───────────────────────── */

.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--rule);
  margin-top: 96px;
  padding: 56px 0 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
}
.footer h4 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin: 0 0 16px;
  font-weight: 600;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer ul a {
  color: var(--ink-soft);
  font-size: 14px;
}
.footer ul a:hover { color: var(--ink); }
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__logo-link {
  align-self: flex-start;
}
.footer__logo {
  width: 200px;
  height: auto;
  object-fit: contain;
}
.footer__brand p {
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.55;
  max-width: 38ch;
  margin: 0;
}
.footer__bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-mute);
}
.footer__bottom a {
  color: inherit;
}

/* ───────────────────────── Search page ───────────────────────── */

.search-hero {
  padding: 80px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.search-hero__title {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
.search-hero__sub {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 36px;
}
.bigsearch {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 6px 6px 6px 18px;
  box-shadow: 0 1px 2px oklch(0% 0 0 / 0.03);
}
.bigsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.bigsearch input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 16px;
  padding: 12px 0;
}
.bigsearch button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--r-sm);
  padding: 10px 22px;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
}
.bigsearch button:hover { background: var(--accent-ink); }

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--ink-soft);
  font-size: 13px;
  text-decoration: none;
  line-height: 1.2;
}
.search-chip:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
  text-decoration: none;
}
.search-chip__word {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-chip__remove {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  opacity: 0.85;
}
.search-chip:hover .search-chip__remove {
  color: var(--accent);
  opacity: 1;
}

.suggested {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.suggested span { font-size: 12px; color: var(--ink-mute); padding: 6px 0; }
.suggested a {
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--bg-card);
}
.suggested a:hover { color: var(--ink); border-color: var(--ink-mute); text-decoration: none; }

/* AFS page */
.prose {
  max-width: 70ch;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
}
.prose p { margin: 0 0 1.2em; }
.prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 2.4em 0 0.6em;
  line-height: 1.15;
}
.prose h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  margin: 1.8em 0 0.4em;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.5;
}
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

.afs-diagram {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0 16px;
}
.afs-card {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 24px;
  background: var(--bg-card);
}
.afs-card__letter {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
}
.afs-card__name {
  font-weight: 600;
  font-size: 16px;
  margin: 16px 0 6px;
}
.afs-card__desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* small utility */
.muted { color: var(--ink-mute); }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.divider { height: 1px; background: var(--rule); margin: 48px 0; }

/* responsive */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .afs { grid-template-columns: 1fr; padding: 36px; }
  .ws-grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .rank-row { grid-template-columns: 40px 48px 1fr 80px; }
  .rank-row__loc, .rank-row__bar { display: none; }

  /* Header: kompaktere Abstände, Burger + Such-Icon einblenden */
  .site-header__inner { gap: 12px; padding: 12px 20px; }
  .nav-toggle { display: flex; }
  .nav-search-mobile { display: flex; }

  /* Navigation wird zum aufklappbaren Drawer unter der Leiste */
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 8px 16px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .10);
  }
  .site-header.is-nav-open .nav { display: flex; }
  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    font-size: 16px;
  }
  /* Inline-Suche im Drawer aus — Suche läuft übers Header-Icon */
  .nav .nav-search { display: none; }
}

/* mobile single column */
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: 1fr; }
  .ws-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}
