/* Generated: design tokens from site.config.json */
:root {
  --primary: #1f4d3a;
  --primary-soft: #dfeae3;
  --accent: #a8442d;
  --accent-soft: #f7e3dc;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* weihnachtsbaum-vergleich.de, mobile first. Design tokens are prepended by build.py. */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --ink: #1b1f1c;
  --muted: #55605a;
  --line: #d9ded9;
  --radius: 10px;
  --wrap: 1200px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -10000px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--ink); color: #fff; padding: .6rem 1rem; }

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

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding-top: .75rem; padding-bottom: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.brand__mark {
  width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-bottom: 20px solid var(--primary);
}
.brand--logo { padding: .15rem 0; }
.brand__logo { display: block; height: 32px; width: auto; max-width: 100%; }
.nav { width: 100%; }
.nav ul { list-style: none; margin: 0; padding: 0 0 .25rem; display: flex; flex-wrap: wrap; gap: .25rem; }
.nav a { display: block; padding: .4rem .6rem; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav a:hover { background: var(--primary-soft); }
.nav a[aria-current="page"] { background: var(--primary); color: #fff; }

/* ---------- page ---------- */
.page { padding-top: 1.5rem; padding-bottom: 3rem; }
.page h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); line-height: 1.2; margin: 0 0 1rem; color: var(--primary); }
.page h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.25rem 0 .75rem; }
.page h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.page p, .page ul, .page ol { max-width: 70ch; }
.page li { margin: .25rem 0; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1rem 0; -webkit-overflow-scrolling: touch; }
.page table:not(.vtable) { border-collapse: collapse; margin: 1rem 0; }
.table-scroll > table:not(.vtable) { margin: 0; }
.page table:not(.vtable) th, .page table:not(.vtable) td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; }

/* ---------- comparison ---------- */
.vergleich { margin: 1.5rem 0 2rem; }

.finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.fgroup { border: 0; margin: 0 0 .75rem; padding: 0; min-width: 0; }
.fgroup legend { font-weight: 700; padding: 0; margin-bottom: .35rem; }
.fgroup--primary legend { font-size: 1.1rem; color: var(--primary); }
.fopts { display: flex; flex-wrap: wrap; gap: .4rem; }
.fopt { position: relative; }
.fopt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fopt span {
  display: inline-block; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); font-size: .95rem; line-height: 1.3;
}
.fopt input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.fopt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.fgroup--primary .fopt span { padding: .6rem 1rem; font-size: 1rem; }
.fmore { margin: .25rem 0 .75rem; }
.fmore summary { cursor: pointer; font-weight: 700; color: var(--primary); padding: .35rem 0; }
.fmore__body { padding-top: .5rem; }
.fbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.fbar .btn-reset { margin-left: auto; }
.fsort select { font: inherit; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.btn-reset { font: inherit; background: none; border: 0; color: var(--primary); text-decoration: underline; cursor: pointer; padding: .25rem 0; }

.fexact { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin-top: .6rem; }
.fexact label { font-weight: 600; }
.fexact input { font: inherit; width: 7.5rem; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.fexact__hint { flex-basis: 100%; font-size: .85rem; color: var(--muted); }
.fexact.is-active label { color: var(--primary); }
.fexact.is-active input { border: 2px solid var(--primary); background: var(--primary-soft); font-weight: 700; }

.vcount { color: var(--muted); font-size: .95rem; margin: .5rem 0; }
.vcount [data-summary] { color: var(--ink); }
.vcount [data-count] { font-weight: 700; color: var(--ink); }
.vcount__mix { display: block; margin-top: .3rem; padding: .35rem .6rem; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--ink); font-size: .92rem; }
.vcount__stand { display: none; }  /* every card says "Daten vom", on the desktop table the line comes back */
.vintro { font-size: .95rem; max-width: 80ch; margin: .25rem 0 1rem; }
.vnote { color: var(--muted); font-size: .9rem; }

/* table as cards on small screens: name, price and delivery, button, score, then the short facts */
.vtable { width: 100%; border-collapse: separate; border-spacing: 0; }
.vtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.vtable tbody, .vtable tr, .vtable th, .vtable td { display: block; }
.vtable tr.vrow {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; margin-bottom: .75rem;
}
.vrow > th, .vrow > td { text-align: left; font-weight: 400; padding: .3rem 0; min-width: 0; overflow-wrap: anywhere; }
.vrow > .c-model { order: 1; grid-column: 1 / -1; }
.vrow > .c-price { order: 2; }
.vrow > .c-delivery { order: 3; }
.vrow > .c-cta { order: 4; grid-column: 1 / -1; }
.vrow > .c-score { order: 5; grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .5rem; }
.vrow > .c-derivation { order: 6; grid-column: 1 / -1; padding-top: 0; }
.vrow > .c-needle { order: 7; }
.vrow > .c-stand { order: 8; }
.vrow > .c-light { order: 9; }
.vrow > .c-warranty { order: 10; }
.vrow > td[data-label]::before {
  content: attr(data-label); display: block; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}
.c-model { border-bottom: 1px solid var(--line); padding-bottom: .6rem !important; margin-bottom: .2rem; }
.m-provider { display: block; font-size: .85rem; color: var(--muted); }
.m-name { display: block; font-weight: 700; font-size: 1.1rem; }
.m-size { display: block; }
.m-hint { display: block; font-size: .9rem; color: var(--muted); }
.m-also { display: block; font-size: .9rem; color: var(--muted); }
.m-also--soldout { color: var(--accent); }
.c-needle, .c-stand, .c-light, .c-warranty { font-size: .95rem; }

/* score, tie marker, derivation */
.score__value { font-size: 1.2rem; color: var(--ink); }
.score__max { color: var(--muted); font-size: .9rem; }
.m-tie {
  display: inline-block; margin-left: .5rem; padding: 0 .45rem; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: .78rem; font-weight: 600; line-height: 1.6;
}
.vtable tr.vrow.is-tie { box-shadow: inset 4px 0 0 var(--primary-soft); }
.score summary { cursor: pointer; color: var(--primary); font-size: .92rem; }
.score__parts { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .88rem; }
.score__parts li { padding: .15rem 0; border-top: 1px solid var(--line); margin: 0; }
.score__note { font-size: .8rem; color: var(--muted); margin: .35rem 0 0; }

.m-more { margin-top: .4rem; font-size: .95rem; }
.m-more summary { cursor: pointer; color: var(--primary); }
.m-more dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem .75rem; margin: .5rem 0 0; }
.m-more dt { color: var(--muted); }
.m-more dd { margin: 0; }
.tag { display: inline-block; background: var(--primary-soft); color: var(--primary); border-radius: 4px; padding: 0 .4rem; font-weight: 600; font-size: .9rem; margin-right: .35rem; }
.small { display: block; font-size: .88rem; color: var(--muted); }
.c-price strong { font-size: 1.2rem; }
.soldout { color: var(--accent); }
.vtable tr.vrow.is-soldout { background: var(--accent-soft); }
.c-cta { padding-top: .6rem !important; }
.btn-out {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700;
  padding: .65rem 1.1rem; border-radius: 8px; min-height: 44px; border: 1px solid var(--accent);
}
.btn-out:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-out--soldout { background: var(--surface); color: var(--accent); }
.btn-out--soldout:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cta-none { display: inline-block; color: var(--accent); font-weight: 700; padding: .65rem 0; }
.stand { display: block; font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.vempty td { padding: 1rem; background: var(--surface); border-radius: var(--radius); }
.vempty .btn-reset { margin-left: .25rem; }

/* ---------- faq ---------- */
.faq { margin-top: 2.5rem; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .5rem; max-width: 70ch; }
.faq__item summary { cursor: pointer; font-weight: 600; }
.faq__a p { margin: .5rem 0 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--primary); color: #eef3ef; padding: 2rem 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer__brand { font-weight: 700; font-size: 1.05rem; margin: 0; }
.site-footer__links { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .35rem 1rem; }
.site-footer__note { max-width: 70ch; color: #d6e2da; }

/* ---------- larger screens ---------- */
@media (min-width: 900px) {
  .nav { width: auto; }
  .site-header__inner { flex-wrap: nowrap; justify-content: space-between; }
  .nav ul { flex-wrap: nowrap; }
  .fmore__body { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem 1.5rem; }
}

/* table: every row is a grid with fixed column widths, so it never gets wider than its box.
   The score derivation takes a full line under its row. */
@media (min-width: 1100px) {
  .vwrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .vtable {
    display: block;
    --cols: minmax(0, 2.1fr) 7rem minmax(0, 1.2fr) minmax(0, 1fr) 5.5rem 5.5rem minmax(0, 1.3fr) minmax(0, 1fr) 9.5rem;
  }
  .vtable thead { position: static; width: auto; height: auto; clip: auto; overflow: visible; display: block; }
  .vtable tbody { display: block; }
  .vtable tr, .vtable tr.vrow {
    display: grid; grid-template-columns: var(--cols); column-gap: .6rem;
    padding: .8rem .75rem; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  }
  .vtable thead tr { background: var(--bg); padding-top: .5rem; padding-bottom: .5rem; }
  .vtable thead th { text-align: left; font-size: .85rem; font-weight: 600; color: var(--muted); }
  .vtable thead .c-derivation { display: none; }
  .vrow > th, .vrow > td { padding: 0; margin: 0; border: 0; overflow-wrap: break-word; }
  .vrow > [class^="c-"] { order: 0; grid-column: auto; }  /* back to the column order of the table */
  .vtable thead .c-model { border: 0; padding: 0 !important; margin: 0; }
  .vrow > .c-score { border-top: 0; margin-top: 0; padding-top: 0; }
  .vrow > .c-derivation { grid-column: 1 / -1; padding-top: .35rem; }
  .vrow > td[data-label]::before { display: none; }
  .c-model { padding-bottom: 0 !important; }
  .c-needle, .c-stand, .c-light, .c-warranty { font-size: .9rem; }
  .m-tie { display: block; margin: .3rem 0 0; width: fit-content; border-radius: 6px; line-height: 1.35; padding: .15rem .4rem; }
  .score__max { white-space: nowrap; }
  .score__parts { columns: 2; column-gap: 2rem; }
  .score__parts li { break-inside: avoid; }
  .c-price strong { font-size: 1.1rem; }
  .c-cta { padding-top: 0 !important; text-align: right; }
  .cta-none { display: block; text-align: center; padding: .55rem 0; }
  .btn-out { display: block; text-align: center; padding: .55rem .6rem; font-size: .92rem; overflow-wrap: anywhere; }
  .vempty td { grid-column: 1 / -1; }
  .vcount__stand { display: inline; }
}
