:root {
  --ink: #111;
  --muted: #555;
  --border: #e5e5e5;
  --bg: #fafafa;
  --card: #fff;
  --accent: #0f6e56;
  --accent-soft: #e8f5f1;
  --ok: #0a7a3e;
  --warn: #9a6700;
  --radius: 10px;
  --max: 46rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
}

a { color: var(--accent); }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.brand span { color: var(--accent); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: .85rem;
}

.lang-toggle a {
  padding: .35rem .7rem;
  text-decoration: none;
  color: var(--muted);
}

.lang-toggle a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.breadcrumb {
  font-size: .85rem;
  color: var(--muted);
  margin: 1.25rem 0 .5rem;
}

.breadcrumb a { color: var(--muted); }

h1 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.2;
  margin: 0 0 .75rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 .75rem;
  padding-top: .25rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.4rem 0 .4rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .85rem;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.disclosure {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  font-size: .9rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.disclosure-footer {
  max-width: var(--max);
  margin: 0 auto 1.25rem;
  padding: .5rem 1rem;
  font-size: .8rem;
  line-height: 1.45;
  background: transparent;
  border: none;
  color: #777;
  text-align: center;
}

/* Anchor targets: keep product title visible under sticky header */
article.card[id],
.card[id],
section[id] {
  scroll-margin-top: 5.5rem;
}


.quick-picks {
  display: grid;
  gap: .75rem;
  margin: 1.25rem 0 1.75rem;
}

@media (min-width: 640px) {
  .quick-picks { grid-template-columns: repeat(3, 1fr); }
}

.pick {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  background: var(--card);
}

.pick .label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: .15rem .45rem;
  border-radius: 999px;
  margin-bottom: .4rem;
}

.pick strong { display: block; margin-bottom: .25rem; }
.pick p { margin: 0; font-size: .9rem; color: var(--muted); }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 36rem;
}

th, td {
  text-align: left;
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--bg);
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td { border-bottom: 0; }

/* Comparison table — auto layout + min-widths (no cell overlap) */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

table.compare {
  table-layout: auto;
  width: 100%;
  min-width: 40rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .86rem;
  line-height: 1.35;
}

table.compare th,
table.compare td {
  padding: .6rem .7rem;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
  /* prevent overflow painting into next cell */
  overflow: hidden;
}

table.compare th {
  white-space: nowrap;
}

/* Model */
table.compare th:nth-child(1),
table.compare td:nth-child(1) {
  min-width: 9.5rem;
  max-width: 14rem;
}

/* Narrow numeric / short cols: kW, Liter, Wh, AC W, ECE, Gewicht, Preis */
table.compare th:nth-child(2),
table.compare td:nth-child(2),
table.compare th:nth-child(4),
table.compare td:nth-child(4),
table.compare th:nth-child(6),
table.compare td:nth-child(6) {
  min-width: 4.75rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

table.compare th:nth-child(4),
table.compare td:nth-child(4) {
  text-align: left;
  min-width: 5.5rem; /* Gewicht / ECE */
}

table.compare th:nth-child(6),
table.compare td:nth-child(6) {
  min-width: 6.25rem; /* Preis */
}

/* Mid cols: Verbrauch / Anschluss / AC detail */
table.compare th:nth-child(3),
table.compare td:nth-child(3) {
  min-width: 7.5rem;
  max-width: 11rem;
}

/* Für wen / Voor wie — allow wrap, keep room */
table.compare th:nth-child(5),
table.compare td:nth-child(5) {
  min-width: 7rem;
  max-width: 11rem;
  white-space: normal;
}

table.compare .num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

table.compare .fuel {
  white-space: normal;
  font-variant-numeric: tabular-nums;
}

table.compare .fuel span {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-top: .1rem;
}

table.compare td:nth-child(1) strong {
  display: inline;
  hyphens: manual;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  table.compare {
    min-width: 38rem;
    font-size: .8rem;
  }
  table.compare th,
  table.compare td {
    padding: .5rem .5rem;
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin: 1rem 0 1.25rem;
  background: var(--card);
}

.card .price-note {
  font-size: .9rem;
  color: var(--muted);
  margin: .35rem 0 0.85rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: .92rem;
  padding: .55rem 1rem;
  border-radius: 8px;
}

.btn:hover { filter: brightness(1.05); }

.btn-secondary {
  background: #fff;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
}

.pros-cons {
  display: grid;
  gap: .75rem;
  margin: .75rem 0 0;
}

@media (min-width: 560px) {
  .pros-cons { grid-template-columns: 1fr 1fr; }
}

.pros, .cons {
  background: var(--bg);
  border-radius: 8px;
  padding: .75rem .9rem;
  font-size: .9rem;
}

.pros h4, .cons h4 {
  margin: 0 0 .4rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.pros h4 { color: var(--ok); }
.cons h4 { color: var(--warn); }

.pros ul, .cons ul, .faq ul, .list-clean {
  margin: 0;
  padding-left: 1.1rem;
}

.pros li, .cons li { margin: .2rem 0; }

.faq details {
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: .5rem 0 0;
  color: var(--muted);
}

.note {
  font-size: .9rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: .85rem;
  margin: 1rem 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem 2.5rem;
  color: var(--muted);
  font-size: .85rem;
}

.site-footer .inner {
  max-width: var(--max);
  margin: 0 auto;
}

.site-footer a { color: var(--muted); }

.hero-home {
  padding: 2.5rem 0 1rem;
}

.hero-home h1 { margin-bottom: .5rem; }

.card-list {
  display: grid;
  gap: .85rem;
  margin-top: 1.5rem;
}

.card-list a.guide-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: border-color .15s, box-shadow .15s;
}

.card-list a.guide-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(15, 110, 86, .08);
}

.guide-card .tag {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.guide-card h2 {
  margin: .25rem 0 .35rem;
  font-size: 1.15rem;
  padding: 0;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

/* Alternatives (non-diesel) */
.alt-grid {
  display: grid;
  gap: .75rem;
  margin: 1rem 0 1.25rem;
}

@media (min-width: 640px) {
  .alt-grid { grid-template-columns: 1fr 1fr; }
}

.alt {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  background: var(--card);
}

.alt h3 {
  margin: 0 0 .35rem;
  font-size: 1rem;
}

.alt .when {
  font-size: .88rem;
  margin: 0 0 .4rem;
}

.alt .when strong { color: var(--ok); font-weight: 600; }

.alt .trade {
  font-size: .88rem;
  color: var(--muted);
  margin: 0;
}

.alt .trade strong { color: var(--warn); font-weight: 600; }

table a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--border);
}

table a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.toc-mini {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  font-size: .85rem;
  margin: 0 0 1rem;
}

.toc-mini a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.toc-mini a:hover { color: var(--accent); border-bottom-color: var(--accent); }

a.pick {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
a.pick:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
  text-decoration: none;
}
a.pick strong { color: var(--ink); }
