/* Der PID-Regler als Platine (Entwurf vom 2026-11-25).
   Eine Werkbank: dunkler Grund, die Platine groß; Schaltplan und Stückliste liegen als Papier daneben.
   Wie Platine und Schaltplan selbst aussehen, steht im <style>, den tools/platine-bauen.mjs in die Seite setzt. */

@font-face { font-family: "Nunito"; src: url("../../assets/schrift/nunito-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root { color-scheme: dark; --papier: #fffdf5; --tinte: #1b1b1b; --hell: #e9d9a8; --rot: #d94a3a; --gelb: #c79a00; --gruen: #2e9a45; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #17181b; color: #d9d4c7; }
body { font: 16px/1.6 Nunito, system-ui, sans-serif; min-height: 100vh; }

.leiste { display: flex; align-items: center; gap: 1rem; padding: .45rem 1rem; background: #101114; border-bottom: 1px solid #2a2a30; min-height: 2.6rem; font-size: 15px; line-height: 1.4; }
.leiste a { color: var(--hell); text-decoration: none; white-space: nowrap; }
.leiste a:hover, .leiste a:focus-visible { text-decoration: underline; }
.leiste p { margin: 0; flex: 1; text-align: center; color: #a9a397; font-size: .9rem; }
@media (max-width: 640px) { .leiste p span { display: none; } }
html.eingebettet .leiste { display: none; }

.werkbank { max-width: 1180px; margin: 0 auto; padding: clamp(14px, 2.4vw, 32px) clamp(10px, 2vw, 24px) 48px; }
.kopf { max-width: 46rem; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; margin: .2em 0 .4em; color: #f3ecd8; font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.2; margin: 0 0 .5em; }

/* ---------- Die Platine mit ihren vier Ansichten ---------- */
.ansicht { margin: 1.6rem 0 2.6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.ansicht > input { position: absolute; opacity: 0; pointer-events: none; }
.ansicht > label { padding: .35rem .95rem; border: 1px solid #5a5446; border-radius: 4px; color: var(--hell); cursor: pointer; font-size: .95rem; user-select: none; }
.ansicht > label:hover { background: #24252a; }
.ansicht > input:checked + label { background: var(--hell); color: #17181b; border-color: var(--hell); font-weight: 700; }
.ansicht > input:focus-visible + label { outline: 2px solid #fff; outline-offset: 2px; }
.brettbild { flex: 0 0 100%; margin: .4rem 0 0; }
.brettbild svg { filter: drop-shadow(0 14px 22px #000a); }
#a-best:checked ~ .brettbild .unten, #a-plan:checked ~ .brettbild .unten,
#a-loet:checked ~ .brettbild .oben, #a-film:checked ~ .brettbild .oben { display: none; }
.brettbild figcaption { margin-top: .9rem; font-size: .95rem; max-width: 52rem; color: #c9c3b4; }
.zu { display: none; }
#a-best:checked ~ .brettbild .zu--best, #a-plan:checked ~ .brettbild .zu--plan,
#a-loet:checked ~ .brettbild .zu--loet, #a-film:checked ~ .brettbild .zu--film { display: inline; }
.zahlen { flex: 0 0 100%; margin: .2rem 0 0; font-size: .92rem; color: #a9a397; }
.zahlen b { color: #f3ecd8; }

/* ---------- Schaltplan und Stückliste: Papier auf der Werkbank ---------- */
.blatt { background: var(--papier); color: var(--tinte); border-radius: 3px; padding: clamp(14px, 2.6vw, 34px); margin: 0 0 2rem; box-shadow: 0 14px 30px #0008; color-scheme: light; }
.blatt p { max-width: 50rem; }
.blatt__vor { margin-top: 0; }
.blatt__plan { overflow-x: auto; margin: 1rem calc(-1 * clamp(14px, 2.6vw, 34px)); padding: 0 clamp(14px, 2.6vw, 34px); border-top: 1px solid #0002; border-bottom: 1px solid #0002; }
.blatt__plan svg { min-width: 820px; }
.stufen { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem 2rem; margin: 1.4rem 0; }
.stufen div { border-top: 2px solid var(--tinte); padding-top: .5rem; }
.stufen dt { font-weight: 700; }
.stufen dd { margin: .2rem 0 0; font-size: .96rem; line-height: 1.55; }
.f-p { color: var(--rot); } .f-i { color: var(--gelb); } .f-d { color: var(--gruen); }

.liste { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.liste th, .liste td { text-align: left; padding: .32rem .7rem .32rem 0; border-bottom: 1px solid #0002; vertical-align: top; }
.liste th { border-bottom: 2px solid var(--tinte); font-size: .85rem; }
.liste td:first-child, .liste th:first-child { text-align: right; padding-right: 1rem; width: 3.2rem; }
.liste td:nth-child(3) { white-space: nowrap; }
@media (max-width: 620px) { .liste { font-size: .86rem; } .liste td:nth-child(2) { max-width: 7.5rem; } }

.merk { max-width: 50rem; }
.merk details { border-top: 1px solid #8886; padding: .7rem 0; }
.merk summary { cursor: pointer; }
.merk li { margin: .35rem 0; }

@media print {
  html, body { background: #fff; color: #000; }
  .leiste, .ansicht > label { display: none; }
  .blatt { box-shadow: none; }
  .brettbild svg { filter: none; }
}
