/* pfit.digital · Fallstudie */

.cs-head { padding-top: 64px; padding-bottom: 36px; }
.cs-head h1 { max-width: 820px; }
.byline { margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--mut); }

.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 72px; }
.cs-body { max-width: 760px; }
.cs-body section { padding-top: 48px; scroll-margin-top: 16px; }
.cs-body h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 14px; }
.cs-body h3 { margin-bottom: 6px; }
.cs-body p, .cs-body li { font-size: 17px; line-height: 1.65; color: #2B313C; }
.cs-body p + p { margin-top: 12px; }
.cs-body a { color: var(--acc-ink); }
.kern { font-weight: 700; color: var(--txt) !important; font-size: 19px !important; line-height: 1.45 !important; }
.callout { margin-top: 20px !important; padding: 18px 20px; background: var(--acc-soft); border-left: 3px solid var(--acc); border-radius: 0 10px 10px 0; }
.question { margin: 16px 0 !important; font-size: 20px !important; font-weight: 700; color: var(--acc-ink) !important; line-height: 1.4 !important; }
.rules, .limits, .ideas { margin: 12px 0; display: grid; gap: 10px; }
.rules li, .limits li, .ideas li { padding-left: 18px; position: relative; }
.rules li::before, .limits li::before, .ideas li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 2px; background: var(--acc); }
.criteria { margin: 10px 0 12px 22px; list-style: decimal; display: grid; gap: 4px; }
.limits { gap: 16px; }

/* Kernaussagen-Kasten */
.key { border: 1px solid var(--line); border-top: 4px solid var(--acc); border-radius: 14px; padding: 26px 28px; background: var(--bg); max-width: 960px; }
.key-title { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--acc-ink); margin-bottom: 14px; }
.key blockquote { border-left: 3px solid var(--acc-soft); padding: 2px 0 2px 16px; margin: 0 0 12px; }
.key blockquote p { font-size: 18px; line-height: 1.45; font-weight: 700; }
.key-facts { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.key-facts dt { font-family: var(--mono); font-weight: 700; font-size: 26px; line-height: 1; }
.key-facts dd { font-size: 12px; color: var(--mut); }
.key-meta { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--mut); }
.key-meta.draft { margin-top: 4px; color: var(--work-ink); }

/* Inhaltsverzeichnis */
.toc { background: var(--bg2); border-radius: 14px; padding: 20px 24px; max-width: 760px; }
.toc-title { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); margin-bottom: 8px; }
.toc ol { list-style: decimal; margin-left: 22px; display: grid; gap: 4px; font-size: 15px; }
.toc a { color: var(--txt); text-decoration: none; }
.toc a:hover { color: var(--acc-ink); text-decoration: underline; }
.toc a.on { color: var(--acc-ink); font-weight: 700; }

/* Breite Bildschirme: Verzeichnis läuft rechts neben dem Text mit */
@media (min-width: 1200px) {
  .cs-grid { grid-template-columns: minmax(0, 760px) minmax(220px, 1fr); column-gap: 56px; align-items: start; }
  .key { grid-column: 1 / -1; }
  .cs-body { grid-column: 1; grid-row: 2; }
  .toc { grid-column: 2; grid-row: 2; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding: 16px 18px; }
  .toc ol { font-size: 13px; gap: 6px; margin-left: 18px; }
  .toc a { color: var(--mut); }
  .toc a.on { color: var(--acc-ink); }
  .toc li::marker { color: var(--mut); }
}

/* Bilder */
figure { margin: 24px 0; }
figure img { border-radius: 10px; border: 1px solid var(--line); background: #fff; width: 100%; }
figcaption { margin-top: 8px; font-size: 13px; color: var(--mut); }
.cs-body figure.wide { margin-left: 0; margin-right: 0; }
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fig-pair figure { margin: 24px 0 0; }
.phone-fig { max-width: 300px; }
@media (max-width: 600px) { .fig-pair { grid-template-columns: 1fr; } }

/* Sieben Schritte */
.steps7 { list-style: none; counter-reset: s; margin-top: 22px; display: grid; gap: 30px; }
.steps7 > li { counter-increment: s; position: relative; padding-left: 52px; }
.steps7 > li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 10px; background: var(--acc); color: #fff; font-family: var(--mono); font-weight: 700; display: grid; place-items: center; }
.steps7 figure { margin: 16px 0 0; }
.steps7 figure img { border: 0; }
@media (max-width: 600px) {
  .steps7 > li { padding-left: 0; padding-top: 46px; }
}

/* Architektur */
.arch { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--bg2); display: grid; gap: 18px; }
.arch-layer { display: grid; gap: 10px; }
.arch-layer + .arch-layer { border-top: 1px dashed var(--line); padding-top: 16px; }
.cs-body .arch-label { font-family: var(--mono); font-size: 12px; line-height: 1.4; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; }
.arch-label span { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 6px; background: var(--acc); color: #fff; margin-right: 6px; letter-spacing: 0; }
.arch-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.svc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.svc-name { font-weight: 700; font-size: 17px; }
.svc-role { margin-left: 8px; font-family: var(--mono); font-size: 11px; color: var(--acc-ink); background: var(--acc-soft); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.cs-body .svc p { font-size: 14px; line-height: 1.5; margin-top: 6px; color: var(--mut); }
.arch-layer.tool .svc { border-style: dashed; }
.flow { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.flow-step { font-family: var(--mono); font-size: 12px; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.flow-step:not(:last-child)::after { content: "→"; margin-left: 10px; color: var(--mut); }
.flow-step:last-child { border-color: var(--acc); color: var(--acc-ink); }
.cs-body .flow-step { font-size: 12px; line-height: 1.3; }

/* Presse */
.cs-body h3 { margin-top: 22px; }
.cite { font-family: var(--mono); font-size: 14px !important; background: var(--bg2); border-radius: 10px; padding: 14px 16px; word-break: break-word; }
.downloads { display: grid; gap: 6px; margin: 10px 0; }
.downloads li { font-size: 15px; }
.cs-body .contact { margin-top: 10px; font-family: var(--mono); font-size: 15px; }

/* Abschluss-Karte und eingeklappte Anhänge */
.next { margin-top: 28px; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; background: var(--bg2); }
.next-title { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--acc-ink); margin-bottom: 12px; }
.next-list { display: grid; gap: 10px; }
.cs-body .next-list li { font-size: 15px; }
.next-list a { display: grid; gap: 2px; text-decoration: none; color: var(--txt); padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.next-list a:hover { border-color: var(--acc); }
.next-list b { color: var(--txt); }
.next-list span { color: var(--mut); font-size: 14px; }
@media (min-width: 700px) { .next-list { grid-template-columns: 1fr 1fr 1fr; } }
.anhang { margin-top: 14px; }
.anhang > summary { cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--acc-ink); padding: 8px 0; list-style: none; }
.anhang > summary::-webkit-details-marker { display: none; }
.anhang > summary::before { content: "▸ "; }
.anhang[open] > summary::before { content: "▾ "; }

/* Tabellen */
.table-wrap { margin: 22px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { text-align: left; font-weight: 700; margin-bottom: 8px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); font-weight: 400; }
tbody th { font-weight: 700; white-space: nowrap; padding-right: 18px; }
td.num { font-family: var(--mono); white-space: nowrap; }
tr.sum th, tr.sum td { font-weight: 700; border-bottom: 2px solid var(--txt); }
@media (max-width: 600px) {
  table { font-size: 14px; }
  tbody th { white-space: normal; }
  /* Vergleichstabelle als Karten: eine je Arbeitspaket, Spaltenname vor jedem Wert */
  .compare thead { display: none; }
  .compare tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .compare tr.sum { border-bottom: 2px solid var(--txt); }
  .compare th, .compare td { display: block; border: 0; padding: 2px 0; }
  .compare th { margin-bottom: 4px; }
  .compare td::before { content: attr(data-label); display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); margin-top: 6px; }
}

/* Druckansicht */
@media print {
  .site-header, .site-footer, .skip, .toc, .btn, .btnrow, .key-meta.draft { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
  .cs-head { padding: 0 0 12pt; }
  .cs-body { max-width: none; }
  .cs-body p, .cs-body li, .kern { color: #000 !important; }
  .key { border-color: #000; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  figure, table, .key, .steps7 > li { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .cs-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; word-break: break-all; }
  .callout { background: none; border-left: 2px solid #000; }
  .next, .anhang > summary { display: none; }
}
