/* igelinfo.cloud – keine externen Schriften/Ressourcen (Datenschutz) */
:root {
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-2: #f2ede1;
  --text: #2b261f;
  --muted: #6b6254;
  --brand: #4a6b2f;
  --brand-dark: #34501f;
  --brand-soft: #e5edd8;
  --accent: #9a5b2b;
  --warn: #b3261e;
  --warn-soft: #fbe9e7;
  --info-soft: #fff4d6;
  --border: #e2dacb;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(60, 45, 20, .08);
  --maxw: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a16;
    --surface: #26231e;
    --surface-2: #2f2b24;
    --text: #ece6da;
    --muted: #b3a994;
    --brand: #9cc46f;
    --brand-dark: #b9da92;
    --brand-soft: #2f3a24;
    --accent: #e0a36c;
    --warn: #ff8a80;
    --warn-soft: #3a2422;
    --info-soft: #3a3320;
    --border: #3d382f;
    --shadow: 0 2px 10px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.25; font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.85rem); margin: 2em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .35em; }
small, .muted { color: var(--muted); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 100; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Header / Navigation */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.logo svg { width: 42px; height: 42px; flex: none; }
.logo span small { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; font: inherit; color: var(--text); cursor: pointer;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 500;
}
.main-nav a:hover { background: var(--surface-2); }
.main-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }
.main-nav a.nav-notfall { color: var(--warn); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 16px 16px; }
}

/* Hero */
.hero { background: linear-gradient(160deg, var(--brand-soft), var(--bg) 70%); padding: 48px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 340px; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { order: -1; } .hero-art svg { max-width: 220px; } }

.page-head { padding: 36px 0 8px; }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 46em; }

main { padding-bottom: 56px; }
.prose { max-width: 50em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px;
  background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; border: 0; cursor: pointer;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
@media (prefers-color-scheme: dark) { .btn, .btn:hover { color: #1c1a16; } }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--surface-2); color: var(--text); }
.btn.warn { background: var(--warn); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }

/* Cards & grids */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
a.card { display: block; text-decoration: none; color: var(--text); transition: transform .15s; }
a.card:hover { transform: translateY(-2px); color: var(--text); }
a.card .more { color: var(--brand); font-weight: 600; }
.icon { font-size: 1.8rem; line-height: 1; margin-bottom: 6px; display: block; }

/* Hinweisboxen */
.box { border-radius: var(--radius); padding: 18px 20px; margin: 22px 0; border: 1px solid var(--border); background: var(--surface-2); }
.box > :last-child { margin-bottom: 0; }
.box h3, .box h4 { margin-top: 0; }
.box.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.box.warn strong:first-child { color: var(--warn); }
.box.info { background: var(--info-soft); }
.box.ok { background: var(--brand-soft); }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Ja/Nein-Listen */
.yes, .no { list-style: none; padding-left: 0; }
.yes li, .no li { padding-left: 1.7em; position: relative; }
.yes li::before { content: "✔"; color: var(--brand); position: absolute; left: 0; font-weight: 700; }
.no li::before { content: "✘"; color: var(--warn); position: absolute; left: 0; font-weight: 700; }

/* Schritt-für-Schritt */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 3em; margin-bottom: 1em; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2em; height: 2em; border-radius: 50%;
  background: var(--brand); color: var(--bg); display: grid; place-items: center; font-weight: 700;
}

/* Seiten-Inhaltsverzeichnis */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0 8px; }
.toc ul { margin: 0; padding-left: 1.2em; columns: 2; }
@media (max-width: 600px) { .toc ul { columns: 1; } }

/* Bauanleitungen */
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 26px 0; box-shadow: var(--shadow); }
.plan > h2 { margin-top: 0; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.plan-meta li { background: var(--surface-2); border-radius: 999px; padding: 3px 12px; font-size: .9rem; margin: 0; }
.plan-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .plan-cols { grid-template-columns: 1fr; } }
figure { margin: 0 0 1em; }
figure svg { background: #fff; border: 1px solid var(--border); border-radius: 10px; display: block; width: 100%; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: 6px; }

.downloads { list-style: none; padding: 0; margin: 0; }
.downloads li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.downloads li:last-child { border-bottom: 0; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 28px 0; font-size: .95rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

.sources { font-size: .92rem; }
.sources li { word-break: break-word; }

@media print {
  .site-header, .site-footer, .btn-row, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .plan, .box { box-shadow: none; }
}

/* Screenreader-only */
.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; }

/* Fotos */
.photo-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin: 18px 0; }
.photo-grid.two { grid-template-columns: repeat(2, 1fr); }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); display: block; background: #fff; }
.photo-grid.two img { object-fit: contain; max-height: none; height: auto; }
@media (max-width: 760px) { .photo-grid, .photo-grid.two { grid-template-columns: 1fr; } .photo-grid img { max-height: none; height: auto; } }

/* Technische Zeichnungen Futterstation */
.drawings { display: grid; gap: 18px; margin: 14px 0 22px; }
.drawings figure { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 10px 14px; }
.drawings figcaption { color: #57544c; padding: 8px 6px 0; }
.drawings figcaption strong { color: #2c2a25; }
@media (min-width: 900px) { .drawings { grid-template-columns: 1fr 1fr; } .drawings figure:nth-child(n+3) { grid-column: 1 / -1; } .drawings figure:nth-child(n+3) svg { max-width: 760px; margin-inline: auto; } }
svg.tz { display: block; width: 100%; height: auto; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; border: 0; }
svg.tz .wood { fill: #ecd9ad; stroke: #2c2a25; stroke-width: 1.6; stroke-linejoin: round; }
svg.tz .wood2 { fill: #e0c892; stroke: #2c2a25; stroke-width: 1.2; }
svg.tz .cutf { fill: url(#hatch); }
svg.tz .felt { fill: #3b3a36; }
svg.tz .felt-l { stroke: #3b3a36; stroke-width: 4; stroke-linecap: round; }
svg.tz .hole { fill: #2c2a25; opacity: .86; }
svg.tz .slab { fill: #c9c5bb; stroke: #57544c; stroke-width: 1.4; }
svg.tz .slab-line { fill: none; stroke: #8f8a7d; stroke-width: 1.4; stroke-dasharray: 7 5; }
svg.tz .bowl { fill: #f7f2e6; stroke: #7d5320; stroke-width: 1.6; }
svg.tz .bowl2 { fill: #b0603b; opacity: .85; }
svg.tz .water { fill: #bcd9ea; stroke: #4f7f9c; stroke-width: 1.6; }
svg.tz .walk { fill: none; stroke: #a8722e; stroke-width: 3; stroke-linecap: round; }
svg.tz .hinge { fill: none; stroke: #2c2a25; stroke-width: 4; stroke-linejoin: round; }
svg.tz .cut { stroke: #d6334a; stroke-width: 1.6; stroke-dasharray: 14 4 3 4; }
svg.tz .dl { stroke: #57544c; stroke-width: 1.2; }
svg.tz .el { stroke: #57544c; stroke-width: 1; }
svg.tz .dt { font-size: 16px; font-weight: 700; fill: #2c2a25; }
svg.tz .tl { font-size: 17px; font-weight: 700; fill: #34521f; }
svg.tz .ts { font-size: 14.5px; fill: #57544c; }
svg.tz .tb { font-size: 20px; font-weight: 700; fill: #d6334a; }
svg.tz .ts-brown { fill: #7d5320; }
svg.tz .ts-white { fill: #fff; }
@media (max-width: 600px) { svg.tz .ts { font-size: 18px; } svg.tz .dt { font-size: 19px; } svg.tz .tl { font-size: 20px; } }

/* Einzelne Anleitung drucken */
@media print {
  body.print-one main > .wrap > *:not(.print-target) { display: none !important; }
  .plan { border: 0; padding: 0; }
  .drawings { display: block; }
  .drawings figure, .plan figure { break-inside: avoid; margin-bottom: 12px; }
  button[data-print] { display: none; }
  a[href]::after { content: none; }
}
.photo-grid.pair { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
@media (max-width: 760px) { .photo-grid.pair { grid-template-columns: 1fr; } }
