/* Categories index (/de/kategorien), category template (/de/kategorie/<slug>).
   Also loaded by landing.html for the shared pieces: ranked provider list, tool layout, switch, guide cards, FAQ grid. */

/* ---------- shared: switch (same look as on the start page) ---------- */
.switch { display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 46px; height: 26px; border-radius: 13px; background: var(--linie); position: relative; flex: none; transition: background .25s; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.switch input:checked + .track { background: var(--rot); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--rot); outline-offset: 3px; }
.dark .switch .track { background: rgba(255, 255, 255, .25); }

/* ---------- shared: tool layout (controls left, ranked list right) ---------- */
.tool-grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.tool-side { display: grid; gap: 24px; position: sticky; top: calc(var(--head-h) + 24px); }
.tool-side h2 { font-size: clamp(30px, 3.4vw, 48px); }
.tool-side .lead { font-size: 17px; }
.tool-side .label { font-weight: 700; font-size: 15px; display: block; margin-bottom: 8px; }
.tool-count { font-size: 15px; color: var(--granit); }
.tool-count b { font-size: 34px; color: var(--tinte); margin-right: 6px; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: 1fr; } .tool-side { position: static; } }

/* ---------- shared: ranked provider list ---------- */
.rk-list { list-style: none; margin: 0; padding: 0; }
.rk { display: grid; grid-template-columns: 40px 48px minmax(0, 1fr) auto auto; grid-template-areas: "pos logo who price act" ". . bar bar bar";
  gap: 6px 16px; align-items: center; padding: 16px 0 14px; border-top: 1px solid var(--linie); }
.rk:first-child { border-top: 2px solid var(--tinte); }
.rk-pos { grid-area: pos; font-size: 30px; line-height: 1; color: var(--granit); text-align: right; }
.rk .logo-tile { grid-area: logo; }
.rk-who { grid-area: who; min-width: 0; }
.rk-who > a { font-weight: 800; font-stretch: 108%; font-size: 19px; text-decoration: none; }
.rk-who > a:hover { color: var(--rot); }
.rk-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; color: var(--granit); margin-top: 2px; }
.rk-meta .zone { font-size: 13.5px; color: var(--tinte); }
.rk-meta .yes { color: var(--gruen); font-weight: 600; }
.rk-price { grid-area: price; text-align: right; font-size: clamp(26px, 2.6vw, 36px); line-height: 1; white-space: nowrap; }
.rk-price small { display: block; font-size: 13px; margin: 4px 0 0; }
.rk-act { grid-area: act; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.rk-act .cmp-label { display: none; }
.rk-out { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; text-decoration: none; padding: 8px 6px; border-radius: var(--r); white-space: nowrap; }
.rk-out:hover { color: var(--rot); }
.rk-bar { grid-area: bar; height: 5px; width: var(--w); background: var(--tinte); border-radius: 1px; transition: width .7s var(--ease); }
.rk.first .rk-bar { background: var(--rot); }
.rk.first .rk-pos { color: var(--rot); }
.rk-empty { padding: 24px 0; border-top: 2px solid var(--tinte); }
.rk-more { margin-top: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .rk-list.fresh .rk { animation: rk-in .55s var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
}
@keyframes rk-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 700px) {
  .rk { grid-template-columns: 28px 48px minmax(0, 1fr) auto; grid-template-areas: "pos logo who who" ". price price act" ". bar bar bar"; gap: 8px 12px; }
  .rk-pos { font-size: 24px; }
  .rk-price { text-align: left; font-size: 28px; }
}

/* ---------- shared: guide cards (one large, the rest beside it) ---------- */
.gd-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 28px 40px; align-items: start; }
.gd-side { display: grid; gap: 24px; }
.gd { text-decoration: none; display: grid; gap: 14px; align-content: start; }
.gd .imgbox { display: block; overflow: hidden; border-radius: var(--r); background: var(--eis); }
.gd img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--ease); }
.gd:hover img { transform: scale(1.03); }
.gd h3 { transition: color .2s; }
.gd:hover h3 { color: var(--rot); }
.gd p { color: var(--granit); margin: 6px 0 0; font-size: 16px; }
.gd-main h3 { font-size: clamp(26px, 2.6vw, 36px); }
.gd-small { grid-template-columns: 160px 1fr; gap: 18px; align-items: start; }
.gd-small img { aspect-ratio: 4 / 3; }
.gd-meta { font-size: 14px; color: var(--granit); }
.gd-grid.one { grid-template-columns: 1fr; max-width: 760px; }
@media (max-width: 900px) { .gd-grid { grid-template-columns: 1fr; } .gd-small { grid-template-columns: 120px 1fr; } }

/* ---------- shared: FAQ grid ---------- */
.fq-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.fq-grid h2 { font-size: clamp(30px, 3.4vw, 48px); position: sticky; top: calc(var(--head-h) + 24px); }
@media (max-width: 900px) { .fq-grid { grid-template-columns: 1fr; } .fq-grid h2 { position: static; } }

/* ---------- /de/kategorien: the mosaic ---------- */
.kx-head { padding: clamp(40px, 6vw, 80px) 0 clamp(24px, 3vw, 40px); }
.kx-head h1 { font-size: clamp(40px, 6vw, 88px); max-width: 14ch; }
.kx-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; margin-top: 22px; }
.kx-head .lead { margin: 0; max-width: 54ch; }
.kx { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(118px, 10.5vw, 156px); gap: 10px; }
.kt { grid-column: span var(--c); grid-row: span var(--r); position: relative; overflow: hidden; border-radius: var(--r); color: #fff; text-decoration: none; isolation: isolate;
  background: var(--nacht); display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(16px, 1.8vw, 26px); }
.kt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.1s var(--ease), opacity .4s; }
.kt::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 31, 51, .05) 20%, rgba(11, 31, 51, .82) 100%); transition: background .4s; }
.kt:hover img, .kt:focus-visible img { transform: scale(1.05); }
.kt::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--rot); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); z-index: 1; }
.kt:hover::before, .kt:focus-visible::before { transform: scaleX(1); }
.kt:focus-visible { outline-offset: 4px; }
.kt-name { font-size: clamp(20px, 1.9vw, 28px); font-stretch: 110%; line-height: 1.05; max-width: 16ch; }
.kt.big .kt-name { font-size: clamp(30px, 3.6vw, 56px); max-width: 12ch; }
.kt-desc { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .82); max-width: 40ch; }
.kt:not(.big):not(.mid) .kt-desc { display: none; }
.kt-stats { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); font-size: 14px; color: rgba(255, 255, 255, .82); }
.kt-stats b { color: #fff; font-size: 26px; line-height: 1; margin-right: 4px; }
.kt.big .kt-stats b { font-size: clamp(34px, 3.4vw, 52px); }
.kt-price b { color: #fff; }
.kt.strip { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; }
.kt.strip .kt-stats { margin: 0; padding: 0; box-shadow: none; flex-wrap: nowrap; justify-content: flex-end; text-align: right; }
.kt.none img { opacity: .35; filter: grayscale(1); }
.kt.none .kt-stats b { font-size: 18px; }
@media (max-width: 900px) {
  .kx { grid-template-columns: 1fr 1fr; grid-auto-rows: 132px; gap: 8px; }
  .kt { grid-column: span var(--mc); grid-row: span var(--mr); padding: 14px; }
  .kt.big .kt-name { font-size: clamp(30px, 8vw, 44px); }
  .kt.mid .kt-desc { display: none; }
  .kt-name { font-size: 19px; }
  .kt-stats { margin-top: 10px; padding-top: 8px; gap: 2px 12px; font-size: 13px; }
  .kt-stats b { font-size: 21px; }
  .kt.strip .kt-stats { flex-direction: column; align-items: flex-end; gap: 0; }
}

/* price ladder (dark band) */
.ladder-band .head h2 { max-width: 18ch; }
.ladder { list-style: none; margin: 0; padding: 0; max-width: 1040px; display: grid; gap: 4px; }
.lad { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr) 120px; gap: 18px; align-items: center; min-height: 48px; }
.lad a { font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lad a:hover { color: var(--rot); }
.lad-track { height: 14px; position: relative; }
.lad-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: rgba(255, 255, 255, .85); border-radius: 1px; transition: width .8s var(--ease); }
.lad.first .lad-fill { background: var(--rot); }
.lad-val { text-align: right; font-size: 26px; line-height: 1; }
.lad-val small { display: block; font-size: 12.5px; font-stretch: 100%; font-weight: 500; color: var(--nebel); margin-top: 3px; }
.lad.none .lad-val { font-size: 14px; font-weight: 500; font-stretch: 100%; color: var(--nebel); }
.ladder-note { color: var(--nebel); margin-top: 28px; max-width: 70ch; }
@media (max-width: 700px) {
  .lad { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 6px 0; }
  .lad-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- /de/kategorie/<slug> ---------- */
.kc-hero h1 { max-width: 16ch; }
.kc-hero .lead { max-width: 52ch; }
.kc-text .prose { margin-top: 24px; }
.kc-text-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.kc-text-grid h2 { font-size: clamp(30px, 3.4vw, 48px); }
.kc-text-grid .prose { margin-top: 0; }
@media (max-width: 900px) { .kc-text-grid { grid-template-columns: 1fr; } }
.kc-topics { list-style: none; margin: 0 0 clamp(40px, 5vw, 64px); padding: 0; border-top: 2px solid var(--tinte); }
.kc-topics a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--linie); text-decoration: none;
  font-weight: 800; font-stretch: 110%; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -.01em; line-height: 1.15; }
.kc-topics a .ph { font-size: 28px; flex: none; transition: transform .35s var(--ease); }
.kc-topics a:hover { color: var(--rot); }
.kc-topics a:hover .ph { transform: translateX(6px); }
.kc-others { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.kc-others::-webkit-scrollbar { display: none; }
.kc-others .kt { min-height: 150px; }
.kc-missing { padding: clamp(40px, 6vw, 88px) 0; }
.kx-band { padding-bottom: clamp(64px, 8vw, 112px); }
.kt-text { display: block; min-width: 0; }
@media (max-width: 900px) {
  .kt.m-sq { flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .kt.m-sq .kt-stats { flex-direction: row; align-items: baseline; justify-content: space-between; flex-wrap: wrap; text-align: left; margin-top: 10px; padding-top: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }
}
.tool-main { min-width: 0; }
.kt-stats > span { white-space: nowrap; }
/* photo heroes: a left scrim so white text holds on bright photos */
.kc-hero::after { background: linear-gradient(90deg, rgba(11, 31, 51, .72) 0%, rgba(11, 31, 51, .2) 65%, rgba(11, 31, 51, 0) 100%), linear-gradient(180deg, rgba(11, 31, 51, .55) 0%, rgba(11, 31, 51, 0) 28%, rgba(11, 31, 51, .85) 100%); }
.rk-empty { font-size: 18px; }
.kt.none .kt-stats > span { white-space: normal; }
@media (max-width: 640px) { .kc-hero h1 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; } }
/* darker scrim on tiles so names hold on bright photos */
.kt::after { background: linear-gradient(180deg, rgba(11, 31, 51, .18) 0%, rgba(11, 31, 51, .42) 45%, rgba(11, 31, 51, .88) 100%); }
