/* HC-Maschinentechnik – Artikelbeschreibungen (Baukasten "hcd")
   Eine Datei für alle Beschreibungen. Gehört ins Child-Template, nicht in den Artikeltext.
   Regeln: alles hängt an .hcd, keine festen Breiten, kein JavaScript, liest sich auch ohne CSS. */

.hcd{
  --hcd-ink:#26292c; --hcd-muted:#62676d; --hcd-line:#d9dce0; --hcd-card:#fff; --hcd-soft:#eceef0;
  --hcd-accent:#ef2d2e; --hcd-warn:#a15c07; --hcd-warn-bg:#fff6e0;
  --hcd-head:"Roboto Condensed","Arial Narrow",Arial,sans-serif;
  color:var(--hcd-ink); font-size:15px; line-height:1.6; max-width:100%; overflow-wrap:break-word;
}
.hcd *,.hcd *::before,.hcd *::after{box-sizing:border-box}
.hcd :where(p,ul,ol,h3,h4,table,details,div){margin:0}
.hcd :where(p,ul,ol){padding:0}
.hcd > * + *{margin-top:16px}
.hcd > h3 + *{margin-top:12px}
.hcd p + p,.hcd p + ul,.hcd ul + p{margin-top:10px}
.hcd > p,.hcd > ul:not([class]),.hcd > ol{max-width:72ch}
.hcd ul:not([class]),.hcd ol{padding-left:20px}
.hcd li + li{margin-top:4px}
.hcd a{color:var(--hcd-accent);text-decoration:underline;text-underline-offset:2px}
.hcd strong{font-weight:700}

/* Abschnittsüberschrift */
.hcd h3{
  font-family:var(--hcd-head); font-size:19px; line-height:1.25; font-weight:600; letter-spacing:.02em;
  text-transform:uppercase; color:var(--hcd-ink); margin:0; padding-top:22px; border-top:1px solid var(--hcd-line);
}
.hcd > * + h3{margin-top:28px}
.hcd h4{font-family:inherit;font-size:15px;line-height:1.4;font-weight:700;text-transform:none;letter-spacing:0;margin:0;color:var(--hcd-ink)}

/* Einleitung */
.hcd .hcd-lead{font-size:17px;line-height:1.55;max-width:68ch}

/* Kennzahlen: <ul class="hcd-facts"><li><strong>2</strong> Schneiden</li></ul> */
/* 3 je Zeile (bei genau 4 Einträgen: 2 je Zeile). Die letzte Zeile füllt sich immer, es bleibt keine Lücke. */
.hcd .hcd-facts{list-style:none;display:flex;flex-wrap:wrap;gap:8px}
.hcd .hcd-facts li{
  margin:0; background:var(--hcd-card); border:1px solid var(--hcd-line); border-radius:4px; padding:11px 13px 10px;
  display:flex; flex-direction:column; gap:2px; font-size:12.5px; line-height:1.35; color:var(--hcd-muted); min-width:0;
  flex:1 1 calc(33.333% - 8px); hyphens:auto; -webkit-hyphens:auto;
}
.hcd .hcd-facts li:first-child:nth-last-child(4),.hcd .hcd-facts li:first-child:nth-last-child(4) ~ li{flex-basis:calc(50% - 8px)}
.hcd .hcd-facts strong{font-family:var(--hcd-head);font-size:22px;line-height:1.15;font-weight:600;color:var(--hcd-ink);letter-spacing:.01em}

/* Schlagworte: Werkstoffe, Anwendungen */
.hcd .hcd-tags{list-style:none;display:flex;flex-wrap:wrap;gap:6px}
.hcd .hcd-tags li{margin:0;background:var(--hcd-soft);border-radius:4px;padding:4px 10px;font-size:13.5px;line-height:1.4}

/* Häkchenliste */
.hcd .hcd-checks{list-style:none;display:grid;gap:8px;max-width:72ch}
.hcd .hcd-checks li{margin:0;position:relative;padding-left:26px}
.hcd .hcd-checks li::before{
  content:""; position:absolute; left:4px; top:.38em; width:11px; height:6px;
  border-left:2px solid var(--hcd-accent); border-bottom:2px solid var(--hcd-accent); transform:rotate(-45deg);
}

/* Karten nebeneinander: Ausführungen vergleichen */
.hcd .hcd-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.hcd .hcd-card{background:var(--hcd-card);border:1px solid var(--hcd-line);border-radius:4px;padding:14px 16px;min-width:0}
.hcd .hcd-card h4{font-family:var(--hcd-head);font-size:17px;text-transform:uppercase;letter-spacing:.02em;font-weight:600;margin-bottom:6px}
.hcd .hcd-card p{font-size:14.5px}

/* Text neben Bild */
.hcd .hcd-split{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:20px;align-items:center}
.hcd .hcd-split > *{min-width:0}
.hcd img{max-width:100%;height:auto;display:block;border-radius:4px}
.hcd .hcd-figure{background:var(--hcd-card);border:1px solid var(--hcd-line);border-radius:4px;padding:8px}
.hcd .hcd-figure img{width:100%}
.hcd .hcd-caption{font-size:12.5px;line-height:1.4;color:var(--hcd-muted);margin-top:8px;padding:0 4px 2px}

/* Tabellen: immer in <div class="hcd-scroll"> */
.hcd .hcd-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;background:var(--hcd-card);border:1px solid var(--hcd-line);border-radius:4px}
.hcd table{width:100%;border-collapse:collapse;margin:0;font-size:14px;line-height:1.45;font-variant-numeric:tabular-nums}
.hcd th,.hcd td{padding:9px 12px;text-align:left;vertical-align:top;border:0;border-bottom:1px solid var(--hcd-line)}
.hcd tr:last-child > td,.hcd tr:last-child > th{border-bottom:0}
.hcd thead th{
  font-size:11.5px; line-height:1.3; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--hcd-muted);
  border-bottom:2px solid var(--hcd-ink); vertical-align:bottom;
}
.hcd tbody th{font-weight:700}
@media (min-width:641px){.hcd tbody th{white-space:nowrap}}
.hcd td .hcd-tags li{background:var(--hcd-soft);font-size:13px;padding:2px 8px;white-space:nowrap}
.hcd .hcd-num{text-align:right}

/* Hinweise */
.hcd .hcd-note{background:var(--hcd-card);border:1px solid var(--hcd-line);border-left:3px solid var(--hcd-ink);border-radius:4px;padding:12px 16px;max-width:72ch}
.hcd .hcd-warn{background:var(--hcd-warn-bg);border-color:#ecd9a8;border-left-color:var(--hcd-warn)}
.hcd .hcd-note > strong:first-child{display:block;margin-bottom:2px}

/* Formel */
.hcd .hcd-formula{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14px;background:var(--hcd-soft);border-radius:4px;padding:10px 14px;max-width:max-content;overflow-x:auto}

/* Videos */
.hcd .hcd-videos{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.hcd .hcd-video{position:relative;aspect-ratio:16/9;background:#000;border-radius:4px;overflow:hidden;max-width:100%}
.hcd .hcd-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.hcd .hcd-videos .hcd-caption{padding:0}

/* Aufklappbare Abschnitte: <details class="hcd-fold"> */
.hcd .hcd-folds{display:grid;gap:6px}
.hcd details.hcd-fold{background:var(--hcd-card);border:1px solid var(--hcd-line);border-radius:4px}
.hcd details.hcd-fold > summary{
  cursor:pointer; list-style:none; padding:12px 40px 12px 16px; font-weight:700; position:relative; line-height:1.4;
}
.hcd details.hcd-fold > summary::-webkit-details-marker{display:none}
.hcd details.hcd-fold > summary::after{
  content:""; position:absolute; right:17px; top:50%; width:8px; height:8px; margin-top:-6px;
  border-right:2px solid var(--hcd-muted); border-bottom:2px solid var(--hcd-muted); transform:rotate(45deg); transition:transform .15s;
}
.hcd details.hcd-fold[open] > summary::after{transform:rotate(-135deg);margin-top:-2px}
.hcd details.hcd-fold > summary:focus-visible{outline:2px solid var(--hcd-accent);outline-offset:2px}
.hcd .hcd-fold-body{padding:0 16px 14px}
.hcd .hcd-fold-body .hcd-scroll{border:0;border-top:1px solid var(--hcd-line);border-radius:0;margin:0 -16px -14px}
.hcd .hcd-fold-body p + .hcd-scroll{margin-top:12px}

@media (max-width:640px){
  .hcd{font-size:15px}
  .hcd .hcd-lead{font-size:16px}
  .hcd h3{font-size:18px;padding-top:18px}
  .hcd > * + h3{margin-top:24px}
  .hcd .hcd-facts li{flex-basis:calc(50% - 8px)}
  .hcd .hcd-split{grid-template-columns:minmax(0,1fr)}
  .hcd th,.hcd td{padding:8px 10px}
  .hcd td{overflow-wrap:anywhere;hyphens:auto;-webkit-hyphens:auto}
}
@media (prefers-reduced-motion:reduce){.hcd details.hcd-fold > summary::after{transition:none}}
