/* ═══════════════════════════════════════════════════════════
   archive.css — Shared styles for /kategorien/*
   Uses tokens from styles.css (via root <link>).
   ═══════════════════════════════════════════════════════════ */

.archive {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 48px) 96px;
}

/* ───────────── Breadcrumb ───────────── */
.archive-breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.archive-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}
.archive-breadcrumb a:hover {
  color: var(--accent);
  border-color: color-mix(in oklch, var(--accent) 55%, transparent);
}
.archive-breadcrumb__sep { opacity: 0.5; }
.archive-breadcrumb__current { color: var(--ink); }

/* ───────────── Header ───────────── */
.archive-head {
  margin-bottom: 48px;
  display: grid;
  gap: 18px;
  max-width: 820px;
}
.archive-head__kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.archive-head__kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.archive-head__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.archive-head__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.archive-head__lede {
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
  text-wrap: pretty;
}

/* ───────────── Sub-category grid (Landing) ───────────── */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.sub-tile {
  display: block;
  position: relative;
  padding: 24px 24px 22px;
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}
.sub-tile::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.sub-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklch, var(--accent) 35%, transparent);
  box-shadow: 0 18px 40px -20px rgba(15, 42, 31, 0.22);
}
.sub-tile:hover::after { transform: scaleX(1); }
.sub-tile__count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sub-tile__count b { font-weight: 500; color: var(--ink); }
.sub-tile__count--empty { color: var(--muted); }
.sub-tile__count--empty b { color: var(--muted); }
.sub-tile__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 8px;
  text-wrap: balance;
}
.sub-tile__desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}
.sub-tile__arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  opacity: 0.5;
  transition: transform 0.22s ease, color 0.22s ease, opacity 0.22s ease;
}
.sub-tile:hover .sub-tile__arrow {
  transform: translate(2px, -2px);
  color: var(--accent);
  opacity: 1;
}

/* ───────────── Article list (Sub-category page) ───────────── */
.article-list {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.article-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.article-row--link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklch, var(--accent) 40%, transparent);
  box-shadow: 0 14px 36px -20px rgba(15, 42, 31, 0.25);
}
.article-row__img {
  width: 140px;
  height: 92px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: color-mix(in oklch, var(--accent) 12%, var(--bg-warm));
  flex: none;
}
.article-row__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-row__body {
  display: grid;
  gap: 6px;
}
.article-row__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: 14px;
  align-items: center;
}
.article-row__meta__dot { opacity: 0.5; }
.article-row__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.article-row--link:hover .article-row__title { color: var(--accent-deep, var(--accent)); }
.article-row__excerpt {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.article-row__arrow {
  width: 22px;
  height: 22px;
  color: var(--muted);
  opacity: 0.4;
  transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  justify-self: end;
  align-self: center;
}
.article-row--link:hover .article-row__arrow {
  color: var(--accent);
  opacity: 1;
  transform: translateX(4px);
}

/* Planned rows */
.article-row--planned {
  background: transparent;
  border-style: dashed;
  border-color: color-mix(in oklch, var(--line) 80%, transparent);
}
.article-row--planned .article-row__img {
  background: color-mix(in oklch, var(--accent) 6%, var(--bg));
  display: grid;
  place-items: center;
  color: color-mix(in oklch, var(--muted) 70%, transparent);
}
.article-row--planned .article-row__img svg {
  width: 32px;
  height: 32px;
  opacity: 0.55;
}
.article-row--planned .article-row__title {
  color: var(--ink-soft);
}
.article-row--planned:hover {
  transform: none;
  border-color: color-mix(in oklch, var(--accent) 28%, transparent);
}

/* Planned + klickbar → leichter Hover */
.article-row--link-soft {
  cursor: pointer;
}
.article-row--link-soft:hover {
  transform: translateY(-2px);
  background: color-mix(in oklch, var(--accent) 5%, var(--bg-soft));
  border-color: color-mix(in oklch, var(--accent) 32%, transparent);
  box-shadow: 0 12px 30px -22px rgba(15, 42, 31, 0.18);
}
.article-row--link-soft:hover .article-row__title {
  color: var(--accent-deep, var(--accent));
}
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in oklch, var(--accent) 28%, transparent);
  color: var(--accent-deep, var(--accent));
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.badge-soon::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-soon 2.4s ease-in-out infinite;
}
@keyframes pulse-soon {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

/* Empty state */
.archive-empty {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  color: var(--muted);
  font-family: var(--font-body);
}
.archive-empty__icon {
  width: 48px; height: 48px;
  color: var(--accent);
  opacity: 0.6;
  margin: 0 auto 12px;
}
.archive-empty__title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 8px;
  font-weight: 400;
}

/* Sub-section on sub-category page */
.archive-section {
  margin-top: 48px;
}
.archive-section__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.archive-section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Responsive */
@media (max-width: 720px) {
  .archive { padding: 28px 16px 64px; }
  .article-row {
    grid-template-columns: 88px 1fr;
    grid-template-rows: auto auto;
    gap: 14px;
    padding: 12px;
  }
  .article-row__img { width: 88px; height: 72px; }
  .article-row__arrow { display: none; }
  .article-row__title { font-size: 18px; }
  .article-row__excerpt { display: none; }
  .article-row__body { grid-column: 2; }
  .article-row--planned .article-row__body { grid-column: 2; }
  .badge-soon { grid-column: 1 / -1; justify-self: start; }
}

/* ═══════════════════════════════════════════════════════════
   A-Z Index (krankheiten-a-z.html)
   ═══════════════════════════════════════════════════════════ */

.archive-head__actions {
  margin-top: 4px;
}
.archive-head__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
}
.archive-head__pill:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklch, var(--accent) 40%, transparent);
  color: var(--accent);
}

/* A-Z navigation (sticky letter-bar) */
.az-nav {
  position: sticky;
  top: 72px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px;
  margin: 0 -12px 28px;
  background: color-mix(in oklch, var(--bg) 94%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  justify-content: center;
}
.az-nav__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.az-nav__letter:hover {
  background: color-mix(in oklch, var(--accent) 18%, transparent);
  color: var(--accent-deep, var(--accent));
  transform: translateY(-1px);
}
.az-nav__letter--empty {
  color: color-mix(in oklch, var(--muted) 50%, transparent);
  pointer-events: none;
}

/* A-Z index sections */
.az-index {
  display: grid;
  gap: 36px;
}
.az-section {
  scroll-margin-top: 140px;
}
.az-section__letter {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 48px;
  line-height: 1;
  color: var(--accent);
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.az-section__letter::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  margin-bottom: 12px;
}
.az-section__letter span {
  display: inline-block;
  min-width: 56px;
}

.az-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.az-row__link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.az-row__link:hover {
  background: var(--bg-soft);
  border-color: color-mix(in oklch, var(--accent) 26%, transparent);
  transform: translateX(2px);
}
.az-row__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
}
.az-row__link:hover .az-row__title {
  color: var(--accent-deep, var(--accent));
}
.az-row__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: none;
}
.az-row__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.az-row__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.az-row__badge--pub {
  background: color-mix(in oklch, var(--accent) 14%, transparent);
  color: var(--accent-deep, var(--accent));
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
}
.az-row__badge--soon {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
}

@media (max-width: 720px) {
  .az-nav { top: 60px; padding: 8px; gap: 2px; }
  .az-nav__letter { min-width: 28px; height: 28px; font-size: 12px; padding: 0 5px; }
  .az-section__letter { font-size: 36px; }
  .az-section__letter span { min-width: 44px; }
  .az-row__link {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px;
  }
  .az-row__title { font-size: 17px; }
  .az-row__meta { justify-content: flex-start; }
  .az-row__cat { font-size: 9px; }
}
