/* welche-welches.de - one stylesheet, no framework, light and dark. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --tint: #f3eee5;
  --ink: #1c2230;
  --ink-soft: #3a4252;
  --muted: #5d6677;
  --line: #e6dfd3;
  --brand: #1f5f4f;
  --brand-ink: #ffffff;
  --brand-soft: #e2efe9;
  --accent: #e9a23b;
  --accent-ink: #2b1c03;
  --good: #2d7a4f;
  --bad: #b04a3a;
  --shadow: 0 1px 2px rgb(28 34 48 / 6%), 0 8px 24px rgb(28 34 48 / 6%);
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

/* Dark follows the device unless the reader chose with the switch (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c;
    --surface: #1a2029;
    --tint: #161b22;
    --ink: #ece8e1;
    --ink-soft: #d0ccc4;
    --muted: #a2aab7;
    --line: #2b333f;
    --brand: #74c7aa;
    --brand-ink: #0d1a16;
    --brand-soft: #1b2d28;
    --accent: #f0b252;
    --accent-ink: #241703;
    --good: #7fcf9c;
    --bad: #ee8f7f;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

:root[data-theme="dark"] {
  --bg: #12161c;
  --surface: #1a2029;
  --tint: #161b22;
  --ink: #ece8e1;
  --ink-soft: #d0ccc4;
  --muted: #a2aab7;
  --line: #2b333f;
  --brand: #74c7aa;
  --brand-ink: #0d1a16;
  --brand-soft: #1b2d28;
  --accent: #f0b252;
  --accent-ink: #241703;
  --good: #7fcf9c;
  --bad: #ee8f7f;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  color-scheme: dark;
}

:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); margin: 0 0 .5em; font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2em 0 .6em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

.eyebrow {
  margin: 0 0 .75rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
}

.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 62ch; }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: .7em 1.3em;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-buy { background: var(--accent); color: var(--accent-ink); }
.btn-buy:hover { filter: brightness(1.05); }

/* Header and footer */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 650 1.2rem/1 var(--serif); }
.logo img { border-radius: 8px; }
.logo-dash { color: var(--brand); }
.logo-tld { color: var(--muted); font-weight: 400; }

.main-nav { display: flex; gap: 6px; }
.main-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 550; padding: 8px 12px; border-radius: 8px; }
.main-nav a:hover { background: var(--tint); color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 6px; }

.theme-toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink-soft); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--brand); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle[data-mode="dark"] .icon-moon,
.theme-toggle:not([data-mode="dark"]) .icon-sun { display: none; }

@media (max-width: 430px) { .main-nav { display: none; } }

@media (max-width: 560px) {
  .logo span { font-size: 1.05rem; }
  .main-nav a:first-child { display: none; }
  .main-nav a { padding: 8px; font-size: .95rem; }
}

.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--tint); color: var(--muted); font-size: .95rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding: 40px 0 24px; }
.footer-grid > div { max-width: 46ch; }
.footer-brand { font: 650 1.15rem var(--serif); color: var(--ink); margin: 0 0 .3em; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-start; }
.footer-grid nav a { color: var(--ink-soft); }
.footer-fine { border-top: 1px solid var(--line); padding: 16px 0 28px; font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-fine p { margin: 0; }

/* Home */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--brand); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: var(--shadow); position: relative;
}
.hero-card::before {
  content: ""; position: absolute; inset: -10px 18px auto auto; width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); opacity: .22; z-index: -1;
}
.hero-card-title { font: 600 1.2rem var(--serif); margin: 0 0 14px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.checks li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
.checks li::before {
  content: ""; grid-row: span 2; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f5f4f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374c7aa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
}
:root[data-theme="dark"] .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374c7aa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.checks strong { font-weight: 650; }
.checks span { color: var(--muted); font-size: .95rem; }

@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-tinted { background: var(--tint); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 28px; }
.section-head h2 { margin: 0 0 .25em; }
.section-head p { margin: 0; color: var(--muted); }

/* Cards: the whole card is the link, through the heading's ::after */

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgb(28 34 48 / 8%), 0 16px 36px rgb(28 34 48 / 12%); }
.card:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.card-media { aspect-ratio: 1200 / 630; background: var(--tint); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }

/* The illustrations are light pastels; dimmed a little they do not glare on a dark page. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.card-media, .article-hero) img { filter: brightness(.86) saturate(.95); }
}
:root[data-theme="dark"] :is(.card-media, .article-hero) img { filter: brightness(.86) saturate(.95); }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-cat { margin: 0 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.card h3 { margin: 0 0 8px; font-size: 1.3rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:focus-visible { outline: none; }
.card-teaser { margin: 0 0 14px; color: var(--ink-soft); font-size: .98rem; }
.card-meta { margin: auto 0 0; color: var(--muted); font-size: .88rem; }

.card-featured { display: grid; grid-template-columns: 1.25fr 1fr; margin-bottom: 24px; }
.card-featured .card-media { aspect-ratio: auto; min-height: 100%; }
.card-featured .card-body { padding: clamp(22px, 3vw, 40px); justify-content: center; }
.card-featured h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.card-featured .card-teaser { font-size: 1.05rem; }

@media (max-width: 860px) {
  .card-featured { grid-template-columns: 1fr; }
  .card-featured .card-media { aspect-ratio: 1200 / 630; }
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 24px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.steps h3 { margin: 14px 0 8px; }
.steps p { margin: 0; color: var(--ink-soft); }
.step-no { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 700 1.1rem var(--serif); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.trust > div { max-width: 68ch; }
.trust h2 { margin-top: 0; }
.trust p { color: var(--ink-soft); margin: 0; }

.empty { color: var(--muted); }

/* Article */

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; padding: 0; margin: 24px 0 0; font-size: .9rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin: 0 .55em; color: var(--line); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--ink-soft); }

.article-head { max-width: 820px; padding-top: clamp(24px, 4vw, 48px); }
.byline { color: var(--muted); font-size: .93rem; margin: 18px 0 0; }

.article-hero { margin: 28px 0 0; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1200 / 630; background: var(--tint); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }

.article-grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: clamp(32px, 5vw, 72px); margin-top: 40px; }
.article-main { min-width: 0; }

.toc { position: relative; }
.toc nav { position: sticky; top: 92px; border-left: 2px solid var(--line); padding-left: 18px; }
.toc-title { margin: 0 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .93rem; line-height: 1.4; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--brand); }
.toc li { position: relative; }
.toc a { transition: color .15s ease; }
.toc a[aria-current] { color: var(--brand); font-weight: 650; }
@media (min-width: 961px) {
  .toc a[aria-current]::before {
    content: ""; position: absolute; left: -20px; top: 0; bottom: 0; width: 2px;
    border-radius: 2px; background: var(--brand);
  }
}

@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
  .toc nav { position: static; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; background: var(--surface); }
}

.disclosure { font-size: .88rem; color: var(--muted); background: var(--tint); border-radius: 10px; padding: 10px 14px; margin: 0 0 28px; }

.quick { background: var(--brand-soft); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 8px; }
.quick h2 { margin: 0 0 .4em; font-size: 1.4rem; }
.quick p { margin: 0 0 14px; }
.quick-list { margin: 0; padding: 0; list-style: none; counter-reset: q; display: grid; gap: 10px; }
.quick-list li { counter-increment: q; display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; }
.quick-list li::before { content: counter(q); grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 700 .85rem var(--sans); margin-top: 1px; }
.quick-list a { font-weight: 650; }
.quick-list span { color: var(--ink-soft); font-size: .95rem; }

.prose { font-size: 1.06rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin-bottom: .35em; }
.prose blockquote, .prose .tip {
  margin: 1.6em 0; padding: 16px 20px; border-left: 4px solid var(--accent);
  background: var(--surface); border-radius: 0 12px 12px 0; color: var(--ink-soft);
}
.prose .tip strong:first-child { color: var(--ink); }
.prose .sources { font-size: .92rem; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 650; background: var(--tint); }
.table-scroll { overflow-x: auto; }

.products { margin: 2em 0; }
.product {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px); margin: 0 0 20px; box-shadow: var(--shadow);
}
.product:target { outline: 3px solid var(--accent); }
.product-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.product-rank { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); font: 700 1.3rem var(--serif); }
.product h3 { margin: 0 0 4px; }
.badge { display: inline-block; margin: 0 0 6px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bestfor { margin: 0; color: var(--ink-soft); font-size: .97rem; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 4px 0 22px; }
.proscons ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .96rem; }
.proscons li { padding-left: 24px; position: relative; }
.pros li::before, .cons li::before { position: absolute; left: 0; font-weight: 800; }
.pros li::before { content: "+"; color: var(--good); }
.cons li::before { content: "−"; color: var(--bad); }
.pc-title { margin: 0 0 8px !important; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.pros .pc-title { color: var(--good); }
.cons .pc-title { color: var(--bad); }
@media (max-width: 600px) { .proscons { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 36px 16px 0; position: relative;
  font-weight: 650; font-size: 1.04rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.5rem; color: var(--brand); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 16px; color: var(--ink-soft); }
.faq details p { margin: 0; }

.checked { margin-top: 32px; font-size: .88rem; color: var(--muted); }

/* Pages */

.page { padding-top: clamp(24px, 4vw, 48px); }
.page .prose h2 { font-size: 1.45rem; }

.notfound { padding: clamp(48px, 10vw, 120px) 0; }

/* Admin */

.admin { padding: 48px 0; }
.admin-note { color: var(--muted); font-size: .93rem; }
.stats { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; }
.stats th, .stats td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.stats th:first-child { text-align: left; white-space: normal; font-weight: 550; }
.stats thead th { background: var(--tint); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stats tfoot th, .stats tfoot td { font-weight: 700; border-bottom: 0; background: var(--tint); }
