/* ============================================================
   Datenwache - Design System
   Fonts: Fraunces (Display-Serif) / IBM Plex Sans (Body) / IBM Plex Mono (Labels)
   Palette: warmes Papier, tiefes Pinie-Gruen, scharfer Terracotta-Akzent.
   Selbst gehostet, kein externer Font-Request (Datenschutz-konsistent).
   ============================================================ */

/* ---------- Fonts (self-hosted woff2) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces-wght.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces-wght-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/plex-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/plex-sans-700.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/plex-mono-500.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --paper:       #f5f1e8;
  --paper-2:     #efe9db;
  --card:        #fbf8f1;
  --ink:         #1c1a15;
  --ink-soft:    #4a463b;
  --ink-faint:   #736d5e;
  --line:        #ddd4c2;
  --line-soft:   #e7e0d0;

  --pine:        #12463c;
  --pine-2:      #0d332b;
  --pine-ink:    #0a2a23;
  --pine-tint:   #e6ede9;

  --accent:      #c14a1c;   /* Terracotta / Signal */
  --accent-2:    #a53d15;
  --accent-tint: #f6e4d8;

  --gold:        #b7822b;
  --ok:          #1f7a55;
  --no:          #b23b2e;

  --maxw: 1140px;
  --measure: 42rem;
  --radius: 3px;
  --radius-lg: 6px;
  --shadow: 0 1px 2px rgba(28,26,21,.05), 0 8px 26px -14px rgba(28,26,21,.28);
  --shadow-lift: 0 2px 4px rgba(28,26,21,.06), 0 18px 40px -18px rgba(28,26,21,.38);

  --sans: "Plex Sans", ui-sans-serif, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", "Menlo", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #0e1613;
    --paper-2:   #0a110e;
    --card:      #131e19;
    --ink:       #ece6d6;
    --ink-soft:  #b8b3a3;
    --ink-faint: #8b8676;
    --line:      #24322c;
    --line-soft: #1c2823;

    --pine:      #4bbf9f;
    --pine-2:    #2f8f76;
    --pine-ink:  #cdeee2;
    --pine-tint: #16241e;

    --accent:      #e8703d;
    --accent-2:    #f0865a;
    --accent-tint: #2a1912;

    --gold:      #d9a648;
    --ok:        #4bbf9f;
    --no:        #e5766a;

    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.5), 0 22px 46px -18px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --paper:#0e1613; --paper-2:#0a110e; --card:#131e19;
  --ink:#ece6d6; --ink-soft:#b8b3a3; --ink-faint:#8b8676;
  --line:#24322c; --line-soft:#1c2823;
  --pine:#4bbf9f; --pine-2:#2f8f76; --pine-ink:#cdeee2; --pine-tint:#16241e;
  --accent:#e8703d; --accent-2:#f0865a; --accent-tint:#2a1912;
  --gold:#d9a648; --ok:#4bbf9f; --no:#e5766a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.6);
  --shadow-lift: 0 2px 4px rgba(0,0,0,.5), 0 22px 46px -18px rgba(0,0,0,.7);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 90% at 88% -8%, color-mix(in srgb, var(--pine) 12%, transparent) 0%, transparent 55%),
    radial-gradient(100% 80% at -6% 4%, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 48%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -.012em; margin: 0 0 .5em; }

/* subtle paper grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; opacity:.6; } }
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity:.6; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.2rem); }
.kicker {
  font-family: var(--mono); font-weight: 500;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow { color: var(--ink-faint); }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(9px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: .58rem; text-decoration: none; color: var(--ink); }
.logo .mark {
  width: 30px; height: 30px; flex: none; border-radius: 7px;
  background: linear-gradient(150deg, var(--pine), var(--pine-2));
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 12%, transparent);
}
.logo .mark svg { width: 17px; height: 17px; }
.logo b { font-family: var(--serif); font-weight: 600; font-size: 1.32rem; letter-spacing: -.02em; }
.logo b span { color: var(--pine); }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  font-size: .9rem; font-weight: 500; text-decoration: none; color: var(--ink-soft);
  padding: .3rem 0; position: relative;
}
.nav a::after {
  content:""; position:absolute; left:0; right:100%; bottom: -2px; height: 2px;
  background: var(--accent); transition: right .28s cubic-bezier(.2,.7,.2,1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }
.theme-btn {
  font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-soft); width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
@media (max-width: 680px){ .nav a:not(.pill){ display:none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3.2rem, 8vw, 6rem) 0 clamp(2.4rem,5vw,3.4rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: end; }
@media (max-width: 900px){ .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.7rem); font-weight: 340; margin: .5rem 0 .2rem;
}
.hero h1 .em { font-weight: 600; font-style: italic; color: var(--pine); }
.hero .lede { font-size: clamp(1.06rem, 2.2vw, 1.24rem); color: var(--ink-soft); max-width: 34ch; margin: 1rem 0 1.6rem; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .5rem; }
.trust li {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .02em; color: var(--ink-soft);
  border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 70%, transparent);
  padding: .34rem .6rem; border-radius: 100px; display: inline-flex; align-items: center; gap: .4rem;
}
.trust li b { color: var(--pine); }
.trust svg { width: 13px; height: 13px; color: var(--accent); flex: none; }

/* featured card in hero */
.feature-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.feature-card .top { padding: 1.15rem 1.3rem .9rem; border-bottom: 1px solid var(--line-soft); background:
  linear-gradient(180deg, color-mix(in srgb, var(--pine-tint) 60%, transparent), transparent); }
.feature-card h3 { font-size: 1.35rem; margin: .35rem 0 .3rem; }
.feature-card p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.feature-card .rows { padding: .4rem 1.3rem 1rem; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .62rem 0; border-bottom: 1px dashed var(--line-soft); }
.frow:last-child { border-bottom: 0; }
.frow .n { font-family: var(--mono); color: var(--ink-faint); font-size: .8rem; width: 1.4rem; }
.frow .who { font-weight: 600; }
.frow .tag { font-family: var(--mono); font-size: .72rem; color: var(--pine); margin-left:auto; }
.frow.win { background: color-mix(in srgb, var(--accent-tint) 55%, transparent); margin: 0 -1.3rem; padding-left: 1.3rem; padding-right: 1.3rem; }
.frow.win .tag { color: var(--accent); }

/* ---------- Buttons / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  font-weight: 600; font-size: .92rem; padding: .62rem 1.05rem; border-radius: 100px;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.pill.primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px var(--accent); }
.pill.primary:hover { transform: translateY(-1px); background: var(--accent-2); }
.pill.ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.pill.ghost:hover { border-color: var(--ink-faint); }
.pill svg { width: 15px; height: 15px; }

/* ---------- Section headers ---------- */
.section { padding: clamp(2.4rem, 5vw, 3.6rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: .9rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.section-head .count { font-family: var(--mono); font-size: .78rem; color: var(--ink-faint); }

/* ---------- Article grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.card {
  background: var(--card); padding: 1.4rem 1.4rem 1.3rem; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: .55rem; min-height: 208px; position: relative;
  transition: background .2s ease, transform .2s ease;
}
.card:hover { background: color-mix(in srgb, var(--card) 40%, var(--paper)); }
.card .idx { font-family: var(--mono); font-size: .76rem; color: var(--ink-faint); }
.card .cat { position: absolute; top: 1.4rem; right: 1.4rem; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; padding: .2rem .5rem; border-radius: 100px; }
.card .cat.vergleich { color: var(--pine); background: var(--pine-tint); }
.card .cat.ratgeber { color: var(--accent); background: var(--accent-tint); }
.card h3 { font-size: 1.34rem; margin: .1rem 0 0; transition: color .2s ease; }
.card:hover h3 { color: var(--pine); }
.card p { margin: 0; font-size: .92rem; color: var(--ink-soft); flex: 1; }
.card .more { font-family: var(--mono); font-size: .78rem; color: var(--accent); display: inline-flex; align-items: center; gap: .35rem; }
.card .more svg { width: 13px; height: 13px; transition: transform .2s ease; }
.card:hover .more svg { transform: translateX(3px); }

/* ---------- Trust / method band ---------- */
.band { background: var(--pine); color: #eafaf3; border-radius: var(--radius-lg); padding: clamp(1.8rem,4vw,2.8rem); position: relative; overflow: hidden; }
:root[data-theme="dark"] .band, :root:not([data-theme="light"]) .band { background: linear-gradient(160deg, var(--pine-tint), var(--card)); color: var(--ink); border: 1px solid var(--line); }
.band h2 { color: #fff; }
:root[data-theme="dark"] .band h2 { color: var(--pine-ink); }
.band .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 1.2rem; }
@media (max-width: 760px){ .band .cols { grid-template-columns: 1fr; } }
.band .col h4 { color: #fff; font-size: 1.1rem; margin-bottom: .3rem; display:flex; align-items:center; gap:.5rem; }
:root[data-theme="dark"] .band .col h4 { color: var(--pine-ink); }
.band .col svg { width: 18px; height: 18px; color: color-mix(in srgb, var(--accent) 80%, #fff); }
.band .col p { margin: 0; font-size: .92rem; color: color-mix(in srgb, #eafaf3 80%, transparent); }
:root[data-theme="dark"] .band .col p { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-foot { margin-top: 3rem; background: var(--pine-ink); color: #cfe6dd; }
:root[data-theme="dark"] .site-foot, :root:not([data-theme="light"]) .site-foot { background: var(--paper-2); border-top: 1px solid var(--line); }
.site-foot .wrap { padding-top: 2.6rem; padding-bottom: 2rem; }
.foot-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; border-bottom: 1px solid color-mix(in srgb, #fff 12%, transparent); padding-bottom: 1.6rem; }
:root[data-theme="dark"] .foot-top { border-color: var(--line); }
.foot-top .brand b { font-family: var(--serif); font-size: 1.4rem; color: #fff; }
:root[data-theme="dark"] .foot-top .brand b { color: var(--ink); }
.foot-top p { max-width: 42ch; font-size: .9rem; color: color-mix(in srgb, #cfe6dd 85%, transparent); }
.foot-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.foot-links a { color: #cfe6dd; text-decoration: none; font-size: .9rem; }
:root[data-theme="dark"] .foot-links a { color: var(--ink-soft); }
.foot-links a:hover { color: #fff; text-decoration: underline; }
:root[data-theme="dark"] .foot-links a:hover { color: var(--ink); }
.foot-legal { margin-top: 1.4rem; font-size: .78rem; color: color-mix(in srgb, #cfe6dd 62%, transparent); font-family: var(--mono); line-height: 1.7; }

/* ---------- Article page ---------- */
.article-head { padding: clamp(2rem,5vw,3.4rem) 0 1.4rem; }
.crumb { font-family: var(--mono); font-size: .76rem; color: var(--ink-faint); margin-bottom: 1rem; }
.crumb a { color: var(--ink-faint); text-decoration: none; } .crumb a:hover { color: var(--accent); }
.article-head h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 400; max-width: 20ch; }
.article-head h1 .em { font-style: italic; color: var(--pine); font-weight:600; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; font-family: var(--mono); font-size: .78rem; color: var(--ink-faint); margin-top: 1rem; }
.article-meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.article-lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); max-width: var(--measure); margin: 1.3rem 0 0; }

.article-body { max-width: var(--measure); margin: 2rem auto 0; font-size: 1.08rem; }
.article-body > * { margin-inline: auto; }
.article-body h2 { font-size: 1.72rem; margin: 2.4rem 0 .7rem; font-weight: 600; }
.article-body h2::before { content: ""; display:block; width: 42px; height: 3px; background: var(--accent); margin-bottom: .8rem; border-radius: 2px; }
.article-body h3 { font-size: 1.3rem; margin: 1.8rem 0 .4rem; }
.article-body p { margin: 0 0 1.1rem; }
.article-body a { color: var(--pine); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--pine) 40%, transparent); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--pine); }
.article-body strong { font-weight: 600; }
.article-body ul, .article-body ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.article-body li { margin: .35rem 0; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote {
  margin: 1.6rem 0; padding: .2rem 0 .2rem 1.3rem; border-left: 3px solid var(--pine);
  font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink-soft);
}
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.article-body code { font-family: var(--mono); font-size: .86em; background: var(--pine-tint); padding: .1em .4em; border-radius: 4px; }

/* callouts */
.note {
  max-width: var(--measure); margin: 1.6rem auto; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--card); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: .96rem;
}
.note .h { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .35rem; }
.note.pine { border-left-color: var(--pine); }
.note.pine .h { color: var(--pine); }

/* comparison table */
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.8rem auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--card); }
thead th {
  background: var(--pine); color: #fff; font-family: var(--sans); font-weight: 600; text-align: left;
  padding: .7rem .85rem; position: sticky; top: 0; font-size: .86rem; letter-spacing: .01em;
}
:root[data-theme="dark"] thead th { background: var(--pine-tint); color: var(--pine-ink); }
tbody td, tbody th { padding: .62rem .85rem; border-top: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
tbody th { font-weight: 600; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--pine-tint) 35%, transparent); }
td .yes { color: var(--ok); font-weight: 600; }
td .nope { color: var(--no); font-weight: 600; }

/* affiliate / recommendation box */
.reco {
  max-width: var(--measure); margin: 1.8rem auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.reco .rt { padding: .55rem 1rem; background: var(--pine); color: #fff; font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
:root[data-theme="dark"] .reco .rt { background: var(--pine-tint); color: var(--pine-ink); }
.reco .rb { padding: 1.1rem 1.2rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.reco .rb .txt { flex: 1; min-width: 60%; }
.reco .rb h4 { font-size: 1.18rem; margin: 0 0 .25rem; }
.reco .rb p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* disclosure */
.disclosure {
  max-width: var(--measure); margin: 2.4rem auto 0; font-size: .84rem; color: var(--ink-faint);
  border-top: 1px dashed var(--line); padding-top: 1rem; line-height: 1.6;
}
.disclosure b { color: var(--ink-soft); }

/* sources */
.sources { max-width: var(--measure); margin: 1.4rem auto 0; font-size: .86rem; }
.sources h4 { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.sources ol { padding-left: 1.2rem; color: var(--ink-soft); }
.sources a { color: var(--pine); word-break: break-word; }

/* related */
.related { max-width: var(--maxw); margin: 3rem auto 0; }

/* generic prose page */
.page-body { max-width: var(--measure); margin: 1.6rem auto 0; font-size: 1.05rem; }
.page-body h2 { font-size: 1.5rem; margin: 2rem 0 .6rem; }
.page-body p { margin: 0 0 1rem; }
.page-body a { color: var(--pine); }
.page-body ul { padding-left: 1.2rem; } .page-body li { margin: .3rem 0; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.d1{animation-delay:.05s}.d2{animation-delay:.14s}.d3{animation-delay:.23s}.d4{animation-delay:.32s}.d5{animation-delay:.41s}.d6{animation-delay:.5s}
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* focus */
a:focus-visible, button:focus-visible, .pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
