/*
Theme Name: Format Elf
Theme URI: https://formatelf.de/
Author: Format Elf Redaktion
Author URI: https://formatelf.de/
Description: Werkplan-Magazintheme für Format Elf — Architektur, Bauen und Wohnen. Technische-Zeichnung-Ästhetik: Millimeterpapier, Plankopf, Bemaßungslinien.
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: formatelf
Tags: custom-menu, featured-images, translation-ready
*/

/* ====================================================================
   Schriften (self-hosted)
   ==================================================================== */
@font-face {
  font-family: 'Big Shoulders';
  src: url('assets/fonts/big-shoulders-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Big Shoulders';
  src: url('assets/fonts/big-shoulders-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fragment Mono';
  src: url('assets/fonts/fragment-mono-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fira Sans';
  src: url('assets/fonts/fira-sans-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fira Sans';
  src: url('assets/fonts/fira-sans-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Fira Sans';
  src: url('assets/fonts/fira-sans-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ====================================================================
   Token / Grundraster
   ==================================================================== */
:root {
  --papier: #f9f8f4;
  --raster-fein: #f0ede6;
  --raster-grob: #e8e4db;
  --tusche: #2d2d2d;
  --tusche-hell: #6f6c66;
  --blatt: #ffffff;
  --blatt-grau: #f4f3ef;
  --rotstift: #ff4d00;
  --schrift-display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --schrift-mono: 'Fragment Mono', 'Courier New', monospace;
  --schrift-text: 'Fira Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--schrift-text);
  font-size: 17px;
  line-height: 1.65;
  color: var(--tusche);
  background-color: var(--papier);
  background-image:
    linear-gradient(var(--raster-fein) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--raster-fein) 0.5px, transparent 0.5px),
    linear-gradient(var(--raster-grob) 1px, transparent 1px),
    linear-gradient(90deg, var(--raster-grob) 1px, transparent 1px);
  background-size: 10px 10px, 10px 10px, 50px 50px, 50px 50px;
}

h1, h2, h3, h4 {
  font-family: var(--schrift-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.05;
  margin: 0 0 0.5em;
  font-weight: 700;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.bahn { max-width: 76rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.mono-label {
  font-family: var(--schrift-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.skiplink {
  position: absolute; left: -9999px; top: 0;
  background: var(--tusche); color: #fff; padding: 0.5rem 1rem; z-index: 100;
}
.skiplink:focus { left: 0; }

/* ====================================================================
   Plankopf (Header)
   ==================================================================== */
.plankopf-zone { padding-top: 2.5rem; }

.plankopf {
  border: 1.5px solid var(--tusche);
  background: var(--blatt);
  display: flex;
  flex-direction: column;
}
.plankopf > * { border-bottom: 1px solid var(--tusche); }
.plankopf > *:last-child { border-bottom: 0; }

.plankopf-marke {
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 0.9rem;
  text-decoration: none;
}
.plankopf-marke svg { flex: 0 0 auto; }
.marke-wort {
  font-family: var(--schrift-display);
  font-weight: 700; font-size: 1.9rem; letter-spacing: 0.02em;
  text-transform: uppercase; line-height: 1;
}
.marke-claim {
  font-family: var(--schrift-mono);
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--tusche-hell); margin-top: 0.3rem;
}

.plankopf-felder {
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.plankopf-feld {
  padding: 0.8rem 1rem;
  border-right: 1px solid var(--tusche);
}
.plankopf-feld:last-child { border-right: 0; }
.plankopf-feld .feld-name {
  display: block;
  font-family: var(--schrift-mono);
  font-size: 0.56rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--tusche-hell);
  margin-bottom: 0.35rem;
}
.plankopf-feld .feld-wert {
  font-family: var(--schrift-mono);
  font-size: 0.72rem;
}
.feld-wert.rotstift-chip {
  display: inline-block;
  border: 1.5px solid var(--rotstift);
  color: var(--rotstift);
  padding: 0 0.35rem;
}

.plankopf-nav { background: var(--blatt-grau); }
.plankopf-nav ul {
  list-style: none; margin: 0; padding: 0.85rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.7rem;
}
.plankopf-nav a {
  font-family: var(--schrift-mono);
  font-size: 0.72rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.08em;
  text-decoration: none;
}
.plankopf-nav a:hover,
.plankopf-nav .current-menu-item > a,
.plankopf-nav .current_page_item > a { color: var(--rotstift); }

@media (min-width: 900px) {
  .plankopf { flex-direction: row; align-items: stretch; }
  .plankopf > * { border-bottom: 0; border-right: 1px solid var(--tusche); }
  .plankopf > *:last-child { border-right: 0; }
  .plankopf-marke { flex: 0 0 auto; flex-direction: column; align-items: flex-start; justify-content: center; }
  .plankopf-felder { flex: 1 1 auto; }
  .plankopf-nav { display: flex; align-items: center; }
}
@media (max-width: 560px) {
  .plankopf-felder { grid-template-columns: 1fr 1fr; }
  .plankopf-feld:nth-child(3) { border-top: 1px solid var(--tusche); grid-column: span 2; border-right: 0; }
}

/* ====================================================================
   Bemaßungslinien + Schnitt-Labels
   ==================================================================== */
.masslinie-zeile {
  display: flex; align-items: center; gap: 1rem;
  padding: 2rem 0;
}
.masslinie { position: relative; height: 1px; background: var(--tusche); flex: 1; }
.masslinie::before, .masslinie::after {
  content: ''; position: absolute; top: -4px;
  width: 1px; height: 9px; background: var(--tusche); transform: rotate(45deg);
}
.masslinie::before { left: 0; }
.masslinie::after { right: 0; }
.masslinie-text {
  font-family: var(--schrift-mono);
  font-size: 0.625rem; letter-spacing: 0.12em;
  color: var(--tusche-hell); text-transform: uppercase;
}

.schnitt-zeile {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.8rem;
}
.schnitt-zeile .masslinie { flex: 0 0 3rem; }
.schnitt-zeile .masslinie + .schnitt-label + .masslinie { flex: 1; }
.schnitt-label {
  border: 1px solid var(--tusche);
  background: var(--blatt);
  padding: 0.25rem 1rem;
  font-family: var(--schrift-mono);
  font-size: 0.66rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.1em;
}
h2.schnitt-label { font-family: var(--schrift-mono); margin: 0; line-height: 1.6; }

/* ====================================================================
   Leitartikel (Lead)
   ==================================================================== */
.leitartikel {
  display: grid; grid-template-columns: 1fr;
  border: 1px solid var(--tusche);
  background: var(--blatt);
  margin-bottom: 4.5rem;
}
.leit-bild { position: relative; border-bottom: 1px solid var(--tusche); }
.leit-bild-kopf {
  display: flex; justify-content: space-between;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--tusche);
  background: var(--blatt-grau);
  font-family: var(--schrift-mono);
  font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.leit-bild-rahmen { aspect-ratio: 16 / 9; overflow: hidden; position: relative; background: var(--blatt-grau); }
.leit-bild-rahmen img { width: 100%; height: 100%; object-fit: cover; }
.leit-bild-rahmen .fadenkreuz-h,
.leit-bild-rahmen .fadenkreuz-v {
  position: absolute; background: var(--rotstift); opacity: 0.3; pointer-events: none;
}
.fadenkreuz-h { top: 50%; left: 0; width: 100%; height: 1px; }
.fadenkreuz-v { top: 0; left: 50%; width: 1px; height: 100%; }

.leit-text { padding: 2rem; display: flex; flex-direction: column; }
.leit-ref {
  font-family: var(--schrift-mono);
  font-size: 0.625rem; color: var(--rotstift); letter-spacing: 0.1em;
  margin-bottom: 1rem; text-transform: uppercase;
}
.leit-text h1, .leit-text .leit-titel {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin-bottom: 1.2rem;
}
.leit-titel a { text-decoration: none; }
.leit-titel a:hover { color: var(--rotstift); }
.leit-exzerpt { font-size: 0.95rem; margin: 0 0 1.8rem; }

.dokument-knopf {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--schrift-mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  border: 2px solid var(--tusche);
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  width: fit-content;
  background: var(--blatt);
  transition: background 0.15s, color 0.15s;
}
.dokument-knopf:hover { background: var(--tusche); color: #fff; }

@media (min-width: 900px) {
  .leitartikel { grid-template-columns: 7fr 5fr; }
  .leit-bild { border-bottom: 0; border-right: 1px solid var(--tusche); }
}

/* ====================================================================
   Positionskarten (Artikel-Teaser)
   ==================================================================== */
.positionsraster {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  margin-bottom: 4.5rem;
}
@media (min-width: 700px) { .positionsraster { grid-template-columns: repeat(3, 1fr); } }

.positionskarte {
  position: relative;
  display: block;
  border: 1px solid var(--tusche);
  background: var(--blatt);
  padding: 1.6rem;
  text-decoration: none;
  transition: border-color 0.15s;
}
.positionskarte:hover { border-color: var(--rotstift); }
.positionskarte:hover .positionskarte-titel { color: var(--rotstift); }
.positions-tab {
  position: absolute; top: -0.7rem; left: -0.15rem;
  background: var(--tusche); color: #fff;
  font-family: var(--schrift-mono);
  font-size: 0.5rem; letter-spacing: 0.12em;
  padding: 0.15rem 0.5rem; text-transform: uppercase;
}
.positionskarte-titel { font-size: 1.25rem; margin-bottom: 0.8rem; }
.positionskarte p { font-size: 0.8rem; color: var(--tusche-hell); margin: 0 0 1.2rem; }
.positionskarte .karten-fuss {
  font-family: var(--schrift-mono);
  font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase;
}

/* Bildkarten-Leiste (mit Thumbnails, gemeinsamer Rahmen) */
.blattkarten {
  display: grid; grid-template-columns: 1fr;
  border: 1px solid var(--tusche);
  background: var(--blatt);
  margin-bottom: 4.5rem;
}
.blattkarte {
  padding: 2rem;
  border-bottom: 1px solid var(--tusche);
  display: flex; flex-direction: column; align-items: flex-start;
}
.blattkarte:last-child { border-bottom: 0; }
.blattkarte:nth-child(2) { background: var(--blatt-grau); }
.blattkarte-bild {
  width: 100%; aspect-ratio: 1 / 1;
  border: 1px solid var(--tusche);
  margin-bottom: 1.4rem;
  overflow: hidden;
  background: var(--blatt-grau);
}
.blattkarte-bild img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter 0.2s; }
.blattkarte:hover .blattkarte-bild img { filter: grayscale(0); }
.blattkarte h3 { font-size: 1.45rem; margin-bottom: 0.4rem; }
.blattkarte .blatt-rubrik {
  font-family: var(--schrift-mono);
  font-size: 0.6rem; color: var(--tusche-hell);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin: 0 0 1.3rem;
}
.blattkarte-link {
  font-family: var(--schrift-mono);
  font-size: 0.66rem; letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid var(--tusche);
  padding-bottom: 0.1rem;
  text-transform: uppercase;
}
.blattkarte-link:hover { color: var(--rotstift); border-color: var(--rotstift); }
@media (min-width: 700px) {
  .blattkarten { grid-template-columns: repeat(3, 1fr); }
  .blattkarte { border-bottom: 0; border-right: 1px solid var(--tusche); }
  .blattkarte:last-child { border-right: 0; }
}

/* ====================================================================
   Prüfstempel (Mission)
   ==================================================================== */
.pruefstempel-zone { padding: 3.5rem 0 5rem; }
.pruefstempel {
  max-width: 42rem; margin: 0 auto;
  border: 4px solid var(--tusche);
  background: var(--blatt);
  padding: 2.8rem 2.5rem;
  position: relative;
}
.pruefstempel-reiter {
  position: absolute; top: -0.7rem; left: 50%; transform: translateX(-50%);
  background: var(--papier);
  padding: 0 1rem;
  font-family: var(--schrift-mono);
  font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.pruefstempel p {
  font-size: 1.1rem; font-weight: 700; text-align: center;
  line-height: 1.6; margin: 0;
}

/* ====================================================================
   Fußzeile (Plankopf-Spiegel)
   ==================================================================== */
.fusszeile-zone { padding: 0 0 4rem; }
.fusszeile {
  border: 1.5px solid var(--tusche);
  background: var(--blatt);
  display: flex; flex-direction: column;
}
.fusszeile > * { border-bottom: 1px solid var(--tusche); }
.fusszeile > *:last-child { border-bottom: 0; }
.fuss-marke { padding: 1.5rem; }
.fuss-marke .marke-wort { font-size: 1.2rem; }
.fuss-marke p {
  font-family: var(--schrift-mono);
  font-size: 0.6rem; color: var(--tusche-hell);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin: 0.8rem 0 0;
}
.fuss-marke .fuss-copy { margin-top: 1.8rem; font-size: 0.56rem; color: var(--tusche); }

.fuss-spalten { display: grid; grid-template-columns: 1fr 1fr; flex: 1; }
.fuss-spalte { padding: 1.5rem; border-right: 1px solid var(--tusche); }
.fuss-spalte:last-child { border-right: 0; }
.fuss-spalte .spalten-name {
  display: block;
  font-family: var(--schrift-mono);
  font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: underline;
  margin-bottom: 1rem;
}
.fuss-spalte ul { list-style: none; margin: 0; padding: 0; }
.fuss-spalte li { margin-bottom: 0.5rem; }
.fuss-spalte a {
  font-family: var(--schrift-mono);
  font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
}
.fuss-spalte a:hover { color: var(--rotstift); }

.fuss-stempel {
  padding: 1.5rem; background: var(--blatt-grau);
  display: flex; flex-direction: column; justify-content: center; gap: 0.8rem;
}
.druckdatum {
  border: 1.5px solid var(--rotstift); color: var(--rotstift);
  text-align: center; padding: 0.6rem;
  font-family: var(--schrift-mono); text-transform: uppercase;
}
.druckdatum .feld-name { display: block; font-size: 0.56rem; letter-spacing: 0.12em; }
.druckdatum .feld-wert { font-size: 0.78rem; }

@media (min-width: 900px) {
  .fusszeile { flex-direction: row; }
  .fusszeile > * { border-bottom: 0; border-right: 1px solid var(--tusche); }
  .fusszeile > *:last-child { border-right: 0; }
  .fuss-marke { flex: 0 0 30%; }
  .fuss-stempel { flex: 0 0 22%; }
}

/* ====================================================================
   Artikelseite (Werkblatt)
   ==================================================================== */
.werkblatt-kopf { margin-bottom: 2rem; }
.brotkrumen {
  font-family: var(--schrift-mono);
  font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tusche-hell);
  padding: 1.6rem 0 0;
}
.brotkrumen a { text-decoration: none; }
.brotkrumen a:hover { color: var(--rotstift); }

.werkblatt {
  border: 1px solid var(--tusche);
  background: var(--blatt);
  margin-bottom: 4rem;
}
.werkblatt-titelzeile {
  border-bottom: 1px solid var(--tusche);
  padding: 2.4rem 2rem 2rem;
}
.werkblatt-titelzeile h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin: 0 auto 1rem; max-width: 46rem; }
.werkblatt-titelzeile .werkblatt-meta { max-width: 46rem; margin-left: auto; margin-right: auto; }
.werkblatt-meta {
  display: flex; flex-wrap: wrap; gap: 1.6rem;
  font-family: var(--schrift-mono);
  font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tusche-hell);
}
.werkblatt-meta .meta-rot { color: var(--rotstift); }

.werkblatt-bild { border-bottom: 1px solid var(--tusche); }
.werkblatt-bild img { width: 100%; }

.werkblatt-inhalt {
  padding: 2.4rem 2rem 3rem;
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: break-word;
}
.werkblatt-inhalt > p:first-child { font-size: 1.08rem; }
.werkblatt-inhalt h2 {
  font-size: 1.6rem; margin: 2.4em 0 0.7em;
  padding-top: 1.2rem;
  border-top: 1px solid var(--raster-grob);
}
.werkblatt-inhalt h3 { font-size: 1.2rem; margin: 1.8em 0 0.6em; }
.werkblatt-inhalt a { color: var(--tusche); text-decoration-color: var(--rotstift); text-decoration-thickness: 1.5px; }
.werkblatt-inhalt a:hover { color: var(--rotstift); }
.werkblatt-inhalt ul, .werkblatt-inhalt ol { padding-left: 1.4rem; }
.werkblatt-inhalt li { margin-bottom: 0.4rem; }
.werkblatt-inhalt img { border: 1px solid var(--tusche); }
.werkblatt-inhalt figure { margin: 2rem 0; }
.werkblatt-inhalt figcaption {
  font-family: var(--schrift-mono);
  font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tusche-hell); padding-top: 0.5rem;
}

/* Tabellen — Aufmaß-Stil */
.werkblatt-inhalt table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem; margin: 1.8rem 0;
  background: var(--blatt);
}
.werkblatt-inhalt th {
  font-family: var(--schrift-mono);
  font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-align: left; background: var(--tusche); color: #fff;
  padding: 0.55rem 0.75rem; font-weight: 400;
}
.werkblatt-inhalt td { border: 1px solid var(--raster-grob); padding: 0.55rem 0.75rem; }
.werkblatt-inhalt tbody tr:nth-child(even) { background: var(--blatt-grau); }

/* Mobil: enge Innenabstände, Tabellen horizontal scrollbar statt Layout-Sprengung */
@media (max-width: 700px) {
  .werkblatt-titelzeile { padding: 1.8rem 1.2rem 1.4rem; }
  .werkblatt-inhalt { padding: 1.8rem 1.2rem 2.4rem; }
  .werkblatt-inhalt table { display: block; overflow-x: auto; }
  .prueffragen .antwort { padding-left: 1.1rem; }
}

/* Randnotiz — die hauseigene Hinweis-Behandlung (KEIN border-l-4-Callout) */
.randnotiz {
  position: relative;
  border: 1px dashed var(--tusche);
  background: var(--papier);
  padding: 1.3rem 1.4rem 1.1rem;
  margin: 2rem 0;
  font-size: 0.9rem;
}
.randnotiz::before {
  content: attr(data-ref);
  position: absolute; top: -0.65rem; left: -0.15rem;
  background: var(--tusche); color: #fff;
  font-family: var(--schrift-mono);
  font-size: 0.5rem; letter-spacing: 0.12em;
  padding: 0.15rem 0.5rem; text-transform: uppercase;
}
.randnotiz p { margin: 0; }

/* Infografik — Werkblatt-Einbettung */
.werk-infografik { margin: 2.4rem 0; }
.werk-infografik img { border: 1px solid var(--tusche); width: 100%; height: auto; background: var(--papier); }
.werk-infografik figcaption {
  font-family: var(--schrift-mono);
  font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tusche-hell); padding-top: 0.5rem;
}
.einbett-box { margin-top: 0.4rem; }
.einbett-box summary {
  cursor: pointer; display: inline-block;
  border-bottom: 1px dashed var(--tusche-hell);
}
.einbett-box textarea {
  display: block; width: 100%; margin-top: 0.5rem;
  border: 1px dashed var(--tusche); background: var(--blatt-grau);
  font-family: var(--schrift-mono); font-size: 0.66rem;
  padding: 0.6rem; color: var(--tusche);
}

/* Blockzitat — Vermerk-Stil */
.werkblatt-inhalt blockquote {
  margin: 2rem 0; padding: 0 0 0 1.4rem;
  border-left: 1px solid var(--tusche);
  font-style: italic; color: var(--tusche-hell);
}

/* Prüffragen (FAQ) — nummerierte Aufklapp-Positionen */
.prueffragen { margin: 2.5rem 0 1rem; counter-reset: frage; }
.prueffragen details {
  border: 1px solid var(--tusche);
  background: var(--blatt);
  margin-bottom: -1px;
}
.prueffragen summary {
  counter-increment: frage;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  font-weight: 700; font-size: 0.95rem;
}
.prueffragen summary::-webkit-details-marker { display: none; }
.prueffragen summary::before {
  content: "F." counter(frage, decimal-leading-zero);
  font-family: var(--schrift-mono);
  font-weight: 400; font-size: 0.66rem; letter-spacing: 0.08em;
  color: var(--rotstift);
  flex: 0 0 auto;
}
.prueffragen summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--schrift-mono);
  color: var(--tusche-hell);
}
.prueffragen details[open] summary::after { content: "–"; }
.prueffragen details[open] summary { border-bottom: 1px dashed var(--raster-grob); }
.prueffragen .antwort { padding: 1rem 1.1rem 1.2rem 3.1rem; font-size: 0.9rem; }
.prueffragen .antwort p { margin: 0 0 0.6em; }
.prueffragen .antwort p:last-child { margin-bottom: 0; }

/* ====================================================================
   Rechenblätter (Werkzeuge) — Formularblatt-Optik
   ==================================================================== */
.rechenblaetter {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  margin-bottom: 4.5rem;
}
@media (min-width: 980px) { .rechenblaetter { grid-template-columns: 1fr 1fr; } }

.rechenblatt {
  border: 1px solid var(--tusche);
  background: var(--blatt);
  display: flex; flex-direction: column;
}
.rb-kopf {
  display: flex; justify-content: space-between;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--tusche);
  background: var(--blatt-grau);
  font-family: var(--schrift-mono);
  font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.rb-kopf span:first-child { color: var(--rotstift); }
.rb-koerper { padding: 1.6rem 1.5rem 1.8rem; display: flex; flex-direction: column; gap: 1.3rem; flex: 1; }
.rb-intro { margin: 0; font-size: 0.88rem; color: var(--tusche-hell); }
.rb-intro a { color: var(--tusche); text-decoration-color: var(--rotstift); text-decoration-thickness: 1.5px; }
.rb-intro a:hover { color: var(--rotstift); }

.rb-felder { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 560px) { .rb-felder { grid-template-columns: 1fr 1fr; } }
.rb-feld .feld-name {
  display: block;
  font-family: var(--schrift-mono);
  font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--tusche-hell);
  margin-bottom: 0.4rem;
}
.rb-feld input, .rb-feld select {
  width: 100%;
  border: 1px solid var(--tusche);
  background: var(--papier);
  font-family: var(--schrift-mono);
  font-size: 0.85rem;
  color: var(--tusche);
  padding: 0.55rem 0.7rem;
  border-radius: 0;
}
.rb-feld input:focus, .rb-feld select:focus { outline: none; border-color: var(--rotstift); }

.rb-phasen { border: 1px dashed var(--tusche); margin: 0; padding: 0.9rem 1rem 1rem; }
.rb-phasen legend { padding: 0 0.5rem; color: var(--tusche-hell); }
.rb-phasen-raster { display: grid; grid-template-columns: 1fr; gap: 0.35rem 1.2rem; }
@media (min-width: 560px) { .rb-phasen-raster { grid-template-columns: 1fr 1fr; } }
.rb-phase {
  display: flex; align-items: baseline; gap: 0.5rem;
  font-family: var(--schrift-mono); font-size: 0.66rem;
  letter-spacing: 0.02em; cursor: pointer;
}
.rb-phase input { accent-color: var(--rotstift); margin: 0; flex: 0 0 auto; transform: translateY(1px); }
.rb-phase strong { font-weight: 400; color: var(--rotstift); }

.rb-ergebnis {
  margin-top: auto;
  border: 1.5px solid var(--rotstift);
  padding: 0.9rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.rb-ergebnis .feld-name {
  font-family: var(--schrift-mono);
  font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--rotstift);
}
.rb-wert { font-family: var(--schrift-mono); font-size: 1.15rem; color: var(--tusche); }
.rb-hinweis { font-size: 0.78rem; color: var(--tusche-hell); }
.rb-ergebnis-schlicht { border: 0; padding: 0; margin-top: auto; }

.rb-tabelle {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem;
}
.rb-tabelle th {
  text-align: left; font-weight: 400;
  font-family: var(--schrift-mono); font-size: 0.66rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--tusche-hell);
  padding: 0.5rem 0.6rem 0.5rem 0;
  border-bottom: 1px solid var(--raster-grob);
}
.rb-tabelle td {
  text-align: right; font-family: var(--schrift-mono);
  padding: 0.5rem 0; border-bottom: 1px solid var(--raster-grob);
  white-space: nowrap;
}
.rb-tabelle .rb-summe th, .rb-tabelle .rb-summe td {
  border-bottom: 0; border-top: 1.5px solid var(--tusche);
  color: var(--tusche); font-weight: 700;
}
.rb-tabelle .rb-summe td { color: var(--rotstift); }

/* Eingebettetes Rechenblatt im Artikel */
.werkblatt-inhalt .rechenblatt { margin: 2.4rem 0; }
.werkblatt-inhalt .rechenblatt p.rb-intro { font-size: 0.88rem; }

/* ====================================================================
   Archiv / Suche / 404
   ==================================================================== */
.archiv-kopf { margin: 0 auto 2.4rem; max-width: 46rem; text-align: center; }
.archiv-kopf h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.archiv-kopf .archiv-beschreibung { max-width: 46rem; margin: 0 auto; font-size: 0.95rem; }

.archivliste { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 4rem; }
@media (min-width: 700px) { .archivliste { grid-template-columns: repeat(3, 1fr); } }

.seitennummern {
  margin: 0 0 4rem;
  font-family: var(--schrift-mono); font-size: 0.72rem;
}
.seitennummern .page-numbers {
  border: 1px solid var(--tusche); background: var(--blatt);
  padding: 0.4rem 0.8rem; text-decoration: none; margin-right: 0.4rem;
}
.seitennummern .page-numbers.current { background: var(--tusche); color: #fff; }
.seitennummern a.page-numbers:hover { border-color: var(--rotstift); color: var(--rotstift); }

.suchformular { display: flex; gap: 0; max-width: 30rem; margin: 1.5rem 0 3rem; }
.suchformular input[type="search"] {
  flex: 1; border: 1px solid var(--tusche); background: var(--blatt);
  font-family: var(--schrift-mono); font-size: 0.8rem;
  padding: 0.7rem 0.9rem; outline: none;
}
.suchformular input[type="search"]:focus { border-color: var(--rotstift); }
.suchformular button {
  border: 1px solid var(--tusche); border-left: 0;
  background: var(--tusche); color: #fff;
  font-family: var(--schrift-mono); font-size: 0.66rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0 1.2rem; cursor: pointer;
}
.suchformular button:hover { background: var(--rotstift); border-color: var(--rotstift); }

.fehlerblatt { text-align: center; padding: 5rem 0; }
.fehlerblatt .fehler-code {
  font-family: var(--schrift-mono); font-size: 0.72rem;
  color: var(--rotstift); letter-spacing: 0.14em;
}
.fehlerblatt h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
