/* ══════════════════════════════════════
   products.css
   Produktbereich – panta-flux.com
   Analog zu foyer.css – eigenständiger Raum
══════════════════════════════════════ */

/* ── Petrol als Leitfarbe – Standardwerte = helles Künstler-Theme ── */
body.produkte {
  --accent:   oklch(46% 0.13 198deg); /* dunkleres Petrol als CI-Standard Produktbereich */
  --accent-h: var(--mango);
  --glow-hi:  oklch(35% 0.08 198deg);
}

body.produkte::before {
  opacity: 0.12;
}

/* Wellen: helles Künstler-Theme */
body.produkte .wave-rings circle {
  stroke: oklch(78% 0.04 198deg);
}
body.produkte .wave-bg {
  opacity: 0.22;
}

/* Dark-Theme-Overrides für Produktbereich */
[data-theme="dark"] body.produkte {
  --bg:      oklch(12% 0.06 198deg);
  --glow-hi: oklch(38% 0.10 198deg);
  --accent:  var(--altgold);
}
[data-theme="dark"] body.produkte::before {
  opacity: 0.45;
}
[data-theme="dark"] body.produkte .wave-rings circle {
  stroke: oklch(52% 0.04 198deg); /* entsättigtes Petrol, analog zum Licht-Fix */
}
[data-theme="dark"] body.produkte .wave-bg {
  opacity: 0.20; /* zurück auf Basiswert Künstlerbereich */
}

/* ══════════════════════════════════════
   PRODUKT-ÜBERSICHTSSEITE
══════════════════════════════════════ */

/* ── Manifest ── */
.p-manifest {
  max-width: 800px;
  margin: 0 auto 3.5rem;
  text-align: center;
  padding: 3rem 1.4rem 0;
}
.p-manifest p {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text2);
  margin-bottom: 1rem;
}
.p-manifest p:last-child { margin-bottom: 0; }
.p-manifest::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 2rem auto 0;
  opacity: 0.5;
}

/* ── Produkt-Grid ── */
.p-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.4rem 5rem;
}

/* ── Produkt-Kachel ── */
.p-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-accent, var(--accent));
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.p-card:not(.p-card--soon):hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px oklch(0% 0 0 / 0.25);
}
.p-card--soon {
  opacity: 0.5;
  cursor: default;
}

/* ── Kachel-Visual ── */
.p-card-visual {
  background: oklch(12% 0.02 270deg);
  min-height: 140px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="light"] .p-card-visual {
  background: oklch(80% 0.02 240deg);
}
.p-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.p-card-visual-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 140px;
}

.p-card-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  background: var(--border);
  color: var(--text2);
  z-index: 2;
}

/* ── Kachel-Body ── */
.p-card-body {
  padding: 1.4rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}
.p-card-name {
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--card-accent, var(--accent));
}
.p-card-tagline {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
}
.p-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ── Tags ── */
.p-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  border: 1px solid;
  text-transform: uppercase;
}
.p-tag--platform { border-color: var(--border);                color: var(--text2); }
.p-tag--free     { border-color: oklch(52% 0.13 198deg / 0.6); color: var(--petrol); }
.p-tag--donation { border-color: oklch(72% 0.13 88deg / 0.5);  color: var(--altgold); }
.p-tag--premium  { border-color: oklch(72% 0.13 88deg / 0.5);  color: var(--altgold); }

/* ── CTA-Button ── */
.p-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
  padding: 0.55rem 1.2rem;
  border-radius: 5px;
  background: radial-gradient(ellipse at 50% 20%, oklch(85% 0.17 73deg), oklch(60% 0.17 73deg));
  color: var(--nacht);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--sans);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .25s, box-shadow .25s, opacity .2s;
  box-shadow: 0 2px 8px oklch(72% 0.17 73deg / 0.25);
  align-self: flex-start;
}
.p-card-cta:hover {
  background: radial-gradient(ellipse at 50% 20%, oklch(62% 0.13 198deg), oklch(38% 0.13 198deg));
  color: #fff;
  box-shadow: 0 4px 16px oklch(52% 0.13 198deg / 0.35);
}
.p-card-cta--disabled {
  background: var(--border);
  color: var(--text2);
  cursor: default;
}
.p-card-cta--disabled:hover { opacity: 1; }

/* ══════════════════════════════════════
   PRODUKT-EINZELSEITE
══════════════════════════════════════ */

/* ── Hero ── */
.p-hero {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.4rem 2rem;
}
.p-hero-visual {
  flex: 0 0 55%;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.p-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.p-hero-text {
  flex: 1;
  padding: 0 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
.p-hero-name {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  line-height: 1.1;
}
.p-hero-tagline {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text2);
  text-transform: uppercase;
}
.p-hero-lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.p-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.p-hero-fine {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ── Buttons – Gradient-Stil analog DW ── */
.p-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.3rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--sans);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .25s, box-shadow .25s, color .15s, opacity .2s, transform .15s;
  line-height: 1.2;
}
.p-btn:hover { transform: translateY(-1px); }

/* Primary (Download) – hell: Mango-Verlauf → Petrol-Verlauf */
.p-btn--primary {
  background: radial-gradient(ellipse at 50% 20%, oklch(85% 0.17 73deg), oklch(60% 0.17 73deg));
  color: var(--nacht);
  box-shadow: 0 2px 8px oklch(72% 0.17 73deg / 0.25);
}
.p-btn--primary:hover {
  background: radial-gradient(ellipse at 50% 20%, oklch(62% 0.13 198deg), oklch(38% 0.13 198deg));
  color: #fff;
  box-shadow: 0 4px 16px oklch(52% 0.13 198deg / 0.35);
}

/* Secondary (Spende) – hell: heller Changelog-Verlauf → Petrol-Verlauf */
.p-btn--secondary {
  background: radial-gradient(ellipse at 50% 20%, oklch(100% 0.005 198deg), oklch(92% 0.01 198deg));
  color: var(--accent);
  border: 1px solid oklch(78% 0.04 198deg);
  box-shadow: 0 2px 8px oklch(0% 0 0 / 0.06);
}
.p-btn--secondary:hover {
  background: radial-gradient(ellipse at 50% 20%, oklch(62% 0.13 198deg), oklch(38% 0.13 198deg));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px oklch(52% 0.13 198deg / 0.35);
}

/* Primary (Download) – dunkel: Mango-Verlauf → dunkler Changelog-Verlauf */
[data-theme="dark"] .p-btn--primary {
  background: radial-gradient(ellipse at 50% 20%, oklch(85% 0.17 73deg), oklch(60% 0.17 73deg));
  color: var(--nacht);
  box-shadow: 0 2px 8px oklch(72% 0.17 73deg / 0.25);
}
[data-theme="dark"] .p-btn--primary:hover {
  background: radial-gradient(ellipse at 50% 20%, oklch(34% 0.06 198deg), oklch(8% 0.01 240deg));
  color: var(--text);
  box-shadow: 0 4px 16px oklch(0% 0 0 / 0.40);
}

/* Secondary (Spende) – dunkel: Petrol-Verlauf → dunkler Changelog-Verlauf */
[data-theme="dark"] .p-btn--secondary {
  background: radial-gradient(ellipse at 50% 20%, oklch(62% 0.13 198deg), oklch(38% 0.13 198deg));
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px oklch(0% 0 0 / 0.30);
}
[data-theme="dark"] .p-btn--secondary:hover {
  background: radial-gradient(ellipse at 50% 20%, oklch(34% 0.06 198deg), oklch(8% 0.01 240deg));
  color: var(--text2);
  box-shadow: none;
}

.p-btn-meta {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.75;
  letter-spacing: 0.03em;
}

/* ── Text-Sections ── */
.p-text {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.4rem 1.5rem;

}
hr.p-divider {
  border: none;
  border-top: 1px solid var(--accent);
  margin: 0 auto;
  max-width: 1100px;
  width: calc(100% - 2.8rem);
}
.p-text-inner {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.p-text-inner h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
}
.p-text-inner h3 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  margin: 1.4rem 0 0.5rem;
}
.p-text-inner p {
  margin-bottom: 1rem;
  line-height: 1.75;
}
.p-text-inner p:last-child { margin-bottom: 0; }
.p-text-inner a { color: var(--accent); text-decoration: none; }
.p-text-inner a:hover { color: var(--accent-h); }

/* ── Feature-Liste ── */
.p-list {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
}
.p-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.4rem;
  line-height: 1.65;
}
.p-list li::before {
  content: '⬠';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 0.28em;
}

/* ── FAQ – Accordion ── */
.p-faq { display: flex; flex-direction: column; gap: 0; }

.p-faq-item {
  background: radial-gradient(ellipse at 50% 0%, oklch(34% 0.06 198deg), oklch(8% 0.01 240deg));
  border: 1px solid var(--border);
  border-bottom: none;
  overflow: hidden;
}
.p-faq-item:first-child { border-radius: 6px 6px 0 0; }
.p-faq-item:last-child  { border-radius: 0 0 6px 6px; border-bottom: 1px solid var(--border); }

.p-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .15s, color .15s;
}
.p-faq-item summary::-webkit-details-marker { display: none; }
.p-faq-item summary::after {
  content: '▸';
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.85rem;
  transition: transform .2s, color .15s;
}
.p-faq-item summary:hover {
  background: var(--petrol);
  color: #fff;
}
.p-faq-item summary:hover::after { color: #fff; }
.p-faq-item[open] summary {
  background: var(--petrol);
  color: #fff;
}
.p-faq-item[open] summary::after {
  transform: rotate(90deg);
  color: #fff;
}
.p-faq-item p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--border);
}
.p-faq-item p a { color: var(--accent); text-decoration: none; }
.p-faq-item p a:hover { color: var(--accent-h); }

/* ── Sections-Trennlinie ── */
.p-divider {
  border: none;
  border-top: 1px solid oklch(22% 0.06 198deg);
  margin: 0 1.4rem;
  max-width: calc(1100px - 2.8rem);
  margin-left: auto;
  margin-right: auto;
}
[data-theme="light"] .p-divider {
  border-top-color: oklch(78% 0.04 198deg);
}

/* ── Ko-fi Icon im Button ── */
.p-btn-icon {
  width: 1.4rem;
  height: 1.4rem;
  vertical-align: middle;
}

/* ── Changelog ── */
.p-changelog {
  max-height: 280px;
  overflow-y: auto;
  background: radial-gradient(ellipse at 50% 0%, oklch(34% 0.06 198deg), oklch(8% 0.01 240deg));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.p-changelog-entry { margin-bottom: 1.5rem; }
.p-changelog-entry:last-child { margin-bottom: 0; }
.p-changelog-version {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-right: 0.75rem;
}
.p-changelog-date {
  font-size: 0.78rem;
  color: var(--text2);
  letter-spacing: 0.04em;
}
.p-changelog .p-list { margin-top: 0.6rem; }

/* ── Letzter Abstand vor Footer ── */
.p-text:last-of-type { padding-bottom: 4rem; }

/* ── Responsive ── */
@media (max-width: 780px) {
  .p-hero { flex-direction: column; }
  .p-hero-visual { flex: none; max-height: 220px; }
  .p-hero-text { padding: 1.5rem 0 0; }
}

/* ── Story-Bild float rechts ── */
.p-story-img {
  float: right;
  width: 38%;
  margin: 0 0 1rem 2.5rem;
  border-left: none;
  border-right: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.p-story-img img {
  width: 100%;
  height: auto;
  display: block;
}
.p-story-img-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.5;
}
.p-story-clear { clear: both; }
@media (max-width: 780px) {
  .p-story-img {
    float: none;
    width: 100%;
    margin: 0 0 1.5rem 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* ── Hero-Video ── */
.p-hero-video {
  position: relative;
  display: block;
  text-decoration: none;
}
.p-hero-video:hover .p-hero-video-play {
  transform: translate(-50%, -50%) scale(1.12);
  background: oklch(72% 0.17 73deg / 0.95);
}
.p-hero-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: oklch(52% 0.13 198deg / 0.88);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.15rem;
  transition: transform .2s, background .2s;
  pointer-events: none;
}

/* ── Spaltenteiler auf --divider (überschreibt altgold aus style.css) ── */
body.produkte .k-col-body {
  column-rule-color: var(--accent);
}

/* ── Changelog + FAQ im hellen Theme ── */
[data-theme="light"] .p-changelog,
[data-theme="light"] .p-faq-item {
  background: radial-gradient(ellipse at 50% 0%, oklch(100% 0.005 198deg), oklch(92% 0.01 198deg));
}

/* ── k-text-inner h2 im Produktbereich vereinheitlichen ── */
body.produkte .k-text-inner h2 {
  color: var(--accent);
  font-size: 1.3rem;
}

/* ── Story-Bild: Crossfade-Slideshow ── */
.p-story-img--crossfade {
  position: relative;
}
.p-story-img--crossfade img {
  display: block;
  width: 100%;
  height: auto;
}
.p-story-img--crossfade img:nth-child(2) {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  animation: crossfade 12s infinite;
}
@keyframes crossfade {
  0%   { opacity: 1; }
  40%  { opacity: 1; }
  50%  { opacity: 0; }
  90%  { opacity: 0; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .p-story-img--crossfade img:nth-child(2) { animation: none; opacity: 0; }
}

/* ── Hero-Fine-Links ── */
.p-hero-fine a {
  color: var(--accent);
  text-decoration: none;
}
.p-hero-fine a:hover {
  color: var(--accent-h);
}

/* ══════════════════════════════════════
   MANUAL
══════════════════════════════════════ */

/* ── Nummerierte Liste ── */
.p-list--ol {
  margin-left: 1.5rem;
  list-style: none;
  counter-reset: p-counter;
}
.p-list--ol li {
  counter-increment: p-counter;
}
.p-list--ol li::before {
  content: counter(p-counter) '.';
  font-weight: 600;
  color: var(--accent);
  top: 0.2em;
}

/* ── Hinweis-Box (neutral) ── */
.p-note {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 0.8rem 1rem;
  margin-left: 2.75rem;
  margin-bottom: 1.2rem;
  font-size: 1.0rem;
  color: var(--text2);
  line-height: 1.65;
}

/* ── Warn-Box (Mango) ── */
.p-warn {
  background: var(--surface);
  border-left: 3px solid var(--mango);
  border-radius: 0 6px 6px 0;
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
  font-size: 1.0rem;
  color: var(--text);
  line-height: 1.65;
}
[data-theme="light"] .p-note,
[data-theme="light"] .p-warn {
  background: oklch(96% 0.006 88deg);
}

/* ── Screenshot ── */
.p-manual-img-wrap {
  margin: 1.5rem 0;
}
.p-manual-img {
  width: 80%;
  max-width: 80%;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: block;
  margin: auto;
}
.p-manual-caption {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 0.5rem;
  line-height: 1.5;
  font-style: italic;
  text-align: center;
}

/* ── Code inline ── */
.p-text-inner code,
.p-manual-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  color: var(--text);
}

/* ══════════════════════════════════════
   MANUAL – LAYOUT MIT FLOATING TOC
══════════════════════════════════════ */

.p-manual-layout {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.4rem 4rem;
}

/* ── TOC – Sidebar ── */
.p-manual-toc {
  flex: 0 0 210px;
  position: sticky;
  top: 5rem; /* unter dem Header */
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.p-manual-toc-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1rem 1rem 1.1rem;
}
.p-manual-toc-title {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.p-manual-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-main;
}
.p-manual-toc-list > li {
  margin-bottom: 0.5rem;
}
.p-manual-toc-list a {
  font-size: 0.82rem;
  color: var(--text2);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  transition: color .15s;
}
.p-manual-toc-list a:hover { color: var(--accent); }

/* Unterebene */
.p-manual-toc-list ol {
  list-style: none;
  padding: 0.3rem 0 0 0.8rem;
  margin: 0;
  border-left: 1px solid var(--border);
}
.p-manual-toc-list ol li { margin-bottom: 0.3rem; }
.p-manual-toc-list ol a { font-size: 0.78rem; }

.p-manual-toc-back {
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}
.p-manual-toc-back a {
  font-size: 0.78rem;
  color: var(--text2);
  text-decoration: none;
  transition: color .15s;
}
.p-manual-toc-back a:hover { color: var(--accent); }

/* ── TOC-Actions (Drucken / PDF) ── */
.p-manual-toc-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.p-manual-toc-action {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text2);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.p-manual-toc-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.p-manual-toc-action svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
}

/* ── @media print ── */
@media print {
  /* Alles ausblenden, was nicht zum Inhalt gehört */
  header, footer, .p-manual-toc, .wave-bg, body::before { display: none !important; }

  /* Layout auf einspaltig umstellen */
  .p-manual-layout {
    display: block;
    padding: 0;
    max-width: 100%;
  }
  .p-manual-content { width: 100%; }

  /* Hintergrund und Farben druckfreundlich */
  body, main {
    background: #fff !important;
    color: #000 !important;
    overflow: visible !important;
    height: auto !important;
  }
  .p-manual-h2, .p-manual-title { color: #000 !important; }
  .p-divider { border-top-color: #ccc !important; }
  .p-note, .p-warn {
    border-left-color: #999 !important;
    background: #f5f5f5 !important;
    color: #000 !important;
  }
  .p-manual-img { max-width: 80%; }

  /* Seitenumbrüche sinnvoll setzen */
  .p-manual-section { page-break-inside: avoid; }
  .p-manual-h2 { page-break-after: avoid; }
  .p-manual-img-wrap { page-break-inside: avoid; }
}

/* ── Content ── */
.p-manual-content {
  flex: 1;
  min-width: 0;
}

/* ── Kopfzeile ── */
.p-manual-head {
  margin-bottom: 0;
}
.p-manual-title {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.p-manual-subtitle {
  font-size: 0.8rem;
  color: var(--text2);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* ── Sections ── */
.p-manual-section {
  padding: 2rem 0 0.5rem;
}
.p-manual-section p {
  margin-bottom: 1rem;
  line-height: 1.75;
}
.p-manual-section p:last-child { margin-bottom: 0; }
.p-manual-section a { color: var(--accent); text-decoration: none; }
.p-manual-section a:hover { color: var(--accent-h); }

/* ── Überschriften ── */
.p-manual-h2 {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.p-manual-h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.p-manual-h4 {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 0.6rem;
}

/* ── Divider im Manual ── */
.p-manual-content .p-divider {
  margin: 0;
  max-width: 100%;
  width: 100%;
}

/* ── Nummerierte Liste ── */
.p-list--ol {
  list-style: none;
  counter-reset: p-ol-counter;
  padding: 0;
}
.p-list--ol[start="3"] { counter-reset: p-ol-counter 2; }
.p-list--ol[start="4"] { counter-reset: p-ol-counter 3; }
.p-list--ol li { counter-increment: p-ol-counter; }
.p-list--ol li::before {
  content: counter(p-ol-counter) '.';
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  top: 0.2em;
  min-width: 1.4rem;
}

/* ── Responsive: TOC klappt über den Content ── */
@media (max-width: 780px) {
  .p-manual-layout {
    flex-direction: column;
    gap: 0;
    padding-top: 2rem;
  }
  .p-manual-toc {
    position: static;
    flex: none;
    width: 100%;
    max-height: none;
    margin-bottom: 1.5rem;
  }
  .p-manual-toc-inner {
    border-radius: 6px;
    border-left: 3px solid var(--accent);
  }
}
