/* wildschweinborstenbuerste.net — the whole stylesheet. No framework, no build step. */

:root {
  --ink: #292524;
  --ink-soft: #57534e;
  --ink-faint: #78716c;
  --line: #e7e5e4;
  --bg-soft: #fafaf9;
  --accent: #065f46;
  --accent-hover: #064e3b;
  --wrap: 46rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: #fff;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
}

/* ---------- header / footer ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
}

.site-head .wrap,
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.brand {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}

.brand span {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.site-head nav ul,
.site-foot nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.site-head nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-head nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-head nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

main {
  padding-block: 2.5rem 3rem;
}

.site-foot {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.site-foot p {
  margin: 0;
}

/* ---------- article furniture ---------- */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
}

.byline,
.lede {
  color: var(--ink-faint);
  font-size: 0.9375rem;
  margin-top: 0.75rem;
}

.lede {
  font-size: 1.0625rem;
}

.toc {
  margin: 2rem 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg-soft);
}

.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
}

.toc li.sub {
  margin-left: 1rem;
}

/* ---------- article body ---------- */

.article-body {
  margin-top: 2rem;
}

.article-body > * + * {
  margin-top: 1.25rem;
}

.article-body h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.article-body h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
}

.article-body li + li {
  margin-top: 0.4rem;
}

.article-body strong {
  font-weight: 600;
}

.article-body blockquote {
  margin-inline: 0;
  padding-left: 1rem;
  border-left: 3px solid #d6d3d1;
  color: var(--ink-soft);
  font-style: italic;
}

.article-body figure {
  margin: 2rem 0;
}

.article-body figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink-soft);
}

.article-body img {
  display: block;
  width: 100%;
  border-radius: 0.5rem;
}

/* Tables came from TablePress; they must scroll rather than break the layout. */
.article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.article-body th {
  background: #f5f5f4;
  font-weight: 600;
}

.aff {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
}

.disclosure {
  margin-top: 2.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #f5f5f4;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ---------- YouTube facade ---------- */

.yt-facade {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #292524;
}

.yt-facade button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.yt-play {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: #dc2626;
  font-size: 1.5rem;
}

.yt-facade button:hover .yt-play {
  background: #ef4444;
}

.yt-title {
  font-weight: 500;
  font-size: 0.9375rem;
}

.yt-note {
  font-size: 0.75rem;
  color: #d6d3d1;
  max-width: 26rem;
}

.yt-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- comments ---------- */

.comments {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.comments > ol,
.replies {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comments > ol > li + li {
  margin-top: 1.5rem;
}

.comment {
  padding: 1.25rem;
  border-radius: 0.5rem;
  background: var(--bg-soft);
}

.comment header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.comment .who {
  font-weight: 600;
}

.comment time {
  color: var(--ink-faint);
}

.comment-body p {
  margin: 0 0 0.75rem;
}

.comment-body p:last-child {
  margin-bottom: 0;
}

.replies {
  margin: 1rem 0 0 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
}

/* Threads run five deep; stop compounding the indent so deep replies stay readable. */
.replies .replies .replies {
  margin-left: 0;
  padding-left: 0.75rem;
}

.replies li + li {
  margin-top: 1rem;
}

.replies .comment {
  background: #fff;
  border: 1px solid var(--line);
}

.closed {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #f5f5f4;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* ---------- /ratgeber/ archive ---------- */

.archive {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.archive li + li {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.archive h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.archive h2 a {
  color: var(--ink);
  text-decoration: none;
}

.archive h2 a:hover {
  text-decoration: underline;
}

.archive p {
  margin: 0 0 0.5rem;
  color: var(--ink-soft);
}

.archive time {
  font-size: 0.875rem;
  color: var(--ink-faint);
}

html {
  scroll-behavior: smooth;
}

:target {
  scroll-margin-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- product comparison tables ---------- */

/*
 * Recovered from the archived AAWP tables. Rendered as a real <table> with row headers,
 * so it stays readable to screen readers and scrolls horizontally on phones rather than
 * squashing. No prices and no Amazon thumbnails — see build.mjs for why.
 */
.cmp-wrap {
  margin: 2rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cmp {
  border-collapse: collapse;
  width: 100%;
  /* Nine columns need room; squeezed into the text column every cell wraps and the
     rows become absurdly tall. The wrapper scrolls horizontally when it must. */
  min-width: 66rem;
  table-layout: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* On wide screens let the table break out of the 46rem reading column. */
@media (min-width: 64rem) {
  .cmp-wrap {
    width: min(62rem, calc(100vw - 3rem));
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

.cmp caption {
  caption-side: top;
  padding-bottom: 0.75rem;
  font-weight: 600;
  text-align: left;
  color: var(--ink);
}

.cmp th,
.cmp td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.cmp thead th {
  background: #f5f5f4;
  font-weight: 600;
  white-space: nowrap;
}

.cmp tbody th {
  background: var(--bg-soft);
  font-weight: 600;
}

/* Wordy columns need explicit room or their content wraps one word per line. */
.cmp .col-name { min-width: 11rem; }
.cmp .col-besonderheiten { min-width: 14rem; }
.cmp .col-verankerung,
.cmp .col-borstenmaterial,
.cmp .col-handling { min-width: 9.5rem; }
.cmp .col-buy { min-width: 7rem; }
.cmp .col-ersterSchnitt,
.cmp .col-borstenreihen { text-align: center; }

.cmp tbody th .thumb {
  display: block;
  width: 72px;
  height: auto;
  margin-bottom: 0.4rem;
  border-radius: 0.25rem;
}

.cmp ul {
  margin: 0;
  padding-left: 1.1rem;
}

.cmp .yes {
  color: var(--accent);
  font-weight: 700;
}

.cmp .no {
  color: var(--ink-faint);
}

.cmp .buy {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border-radius: 0.3rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.cmp .buy:hover {
  background: var(--accent-hover);
  color: #fff;
}

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