/* ===== Detailseiten (Pigment / Gemaelde) ===== */
.detail-head .lead { max-width: 60ch; }
.detail-head .eyebrow a { color: inherit; text-decoration: none; }
.detail-head .eyebrow a:hover { text-decoration: underline; }
.detail-head-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.swatch-card { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.swatch-card img { display: block; width: 100%; aspect-ratio: 400/284; object-fit: cover; }
.swatch-card .dot-lg { position: absolute; top: 14px; left: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--swatch); border: 2px solid rgba(255,255,255,.85); box-shadow: 0 1px 4px rgba(0,0,0,.3); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 24px; margin: 24px 0 0; }
.facts div { border-top: 1px solid var(--line); padding-top: 8px; min-width: 0; }
.facts dt { font: 500 11px/1.4 Inter, sans-serif; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.facts dd { margin: 2px 0 0; font-size: 15px; overflow-wrap: anywhere; }

.detail-body { padding: 56px 24px; }
.detail-body .prose { max-width: 72ch; font-size: 17px; line-height: 1.7; }
.detail-body .prose h2 { font-family: Fraunces, serif; font-weight: 300; font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 48px 0 12px; }
.detail-body .prose h3, .detail-body .prose h4, .detail-body .prose h5 { font-family: Fraunces, serif; font-weight: 600; font-size: 1.15rem; margin: 32px 0 8px; }
.detail-body .prose > :first-child { margin-top: 0; }
.detail-body .prose a { color: var(--vermilion); }
.detail-body .prose img { max-width: 100%; height: auto; border-radius: 6px; margin: 12px 0; }
.detail-body .prose table { border-collapse: collapse; font-size: 15px; }
.detail-body .prose td, .detail-body .prose th { border: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
.video { position: relative; aspect-ratio: 16/9; max-width: 800px; margin: 12px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

.figure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin: 24px 0 36px; }
.figure-grid figure { margin: 0; background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.figure-grid img { display: block; width: 100%; height: auto; }
.figure-grid figcaption { padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.figure-grid figcaption strong { display: block; color: var(--ink); font-weight: 600; }
.figure-grid figcaption p { margin: 4px 0 0; }

details.toggle { border-top: 1px solid var(--line); max-width: 80ch; }
details.toggle:last-of-type { border-bottom: 1px solid var(--line); }
details.toggle summary { cursor: pointer; padding: 14px 0; font: 600 1rem/1.4 Inter, sans-serif; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.toggle summary::-webkit-details-marker { display: none; }
details.toggle summary::after { content: '+'; color: var(--ink-2); font-weight: 400; }
details.toggle[open] summary::after { content: '–'; }
details.toggle .prose { padding: 0 0 20px; font-size: 15.5px; }

.detail-related { padding: 0 24px 72px; }
.detail-related h2 { font-family: Fraunces, serif; font-weight: 300; font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 0 0 20px; }
.detail-related .count { color: var(--ink-2); font-size: .7em; }
.muted { color: var(--ink-2); }
.source-note { font-size: 13px; color: var(--ink-2); padding-bottom: 48px; }
.source-note a { color: inherit; }

/* Gemaelde */
.detail-painting { padding: 40px 24px 0; }
.painting-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 40px; align-items: start; }
.painting-grid aside .facts { margin-top: 0; }
.painting-grid .links { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.painting-grid .links a { font: 500 13px/1 Inter, sans-serif; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; }
.painting-grid .links a:hover { border-color: var(--ink); }
.painting-grid .h3 { font-family: Fraunces, serif; font-weight: 600; font-size: 1.2rem; margin: 28px 0 12px; }
.pigment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pigment-grid .card { position: relative; display: block; text-decoration: none; color: inherit; }
.pigment-grid .card img { display: block; width: 100%; aspect-ratio: 400/284; object-fit: cover; }
.pigment-grid .card-body { padding: 8px 10px; }
.pigment-grid h3 { font: 600 13px/1.3 Inter, sans-serif; margin: 0; }
.pigment-grid .card-meta { display: none; }
.pigment-grid .dot { position: absolute; top: 8px; left: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--swatch); border: 1px solid rgba(255,255,255,.8); }

.hotspot { position: relative; border-radius: 10px; overflow: visible; background: var(--paper-2); }
.hotspot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.hotspot .marker { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid #fff; background: rgba(208,65,42,.9); box-shadow: 0 0 0 4px rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.4); cursor: pointer; padding: 0; transition: transform .2s; }
.hotspot .marker:hover, .hotspot .marker.is-active, .hotspot .marker:focus-visible { transform: scale(1.25); background: var(--ochre); outline: none; }
.hotspot-tip { position: absolute; transform: translate(-50%, calc(-100% - 20px)); max-width: min(320px, 80vw); background: var(--ink); color: var(--paper); padding: 12px 14px; border-radius: 8px; font-size: 14px; line-height: 1.5; z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,.35); pointer-events: none; }
.hotspot-tip.below { transform: translate(-50%, 20px); }
.hotspot-tip p { margin: 0; }
.hotspot-tip a { color: var(--ochre); }
.hotspot-tip strong { display: block; font-family: Fraunces, serif; font-size: 16px; margin-bottom: 2px; }
.hint { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }

@media (max-width: 820px) {
  .detail-head-grid, .painting-grid { grid-template-columns: 1fr; gap: 24px; }
  .swatch-card { max-width: 420px; }
  .detail-body { padding: 40px 24px; }
  .hotspot-tip { max-width: 86vw; }
}
@media (prefers-reduced-motion: reduce) { .hotspot .marker { transition: none; } }

/* Karten in den Bezugs-Rastern: keine Unterstreichung, Blockanker */
.detail-related .card, .detail-related .card *, .pigment-grid .card * { text-decoration: none; }
.detail-related .card { display: block; color: inherit; }
.detail-related .card img { display: block; width: 100%; aspect-ratio: 400/284; object-fit: cover; }
