.ckh .scene { position: relative }
.ckh .scene [hidden] { display: none !important }
.ckh .scene .castle-ink { display: none; pointer-events: none; position: absolute; inset: 0; width: 100%; height: 100%; background: #f3e8ce; stroke: #554630; stroke-width: .8 }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-still]) .ckh:not(.still) .scene .castle-ink.drawing {display: block; animation: castle-paper 2.9s linear forwards}
  .castle-ink.drawing path { stroke-dasharray: 1; animation: castle-stroke 2.5s ease-in-out both }
}
@keyframes castle-paper { 0%,85% { opacity: 1 } to { opacity: 0 } }
@keyframes castle-stroke { from {stroke-dashoffset: 1} to {stroke-dashoffset: 0} }
.ckh .comparison-block {padding-block: 1.5rem 2.2rem}
.ckh .comparison-block h2 {margin: 0 0 .85rem}
.ckh .history-comparison {margin: 0; width: min(100%, 40rem)}
.comparison-labels {display: flex; justify-content: space-between; color: #204838; font: 600 .85rem/1.5 system-ui; margin-bottom: .3rem}
.comparison-frame {--split: 54%; position: relative; aspect-ratio: 275/228; overflow: hidden; isolation: isolate; background: #ede8d9}
.comparison-modern,.comparison-old {position: absolute; inset: 0}
.comparison-modern {overflow:hidden}
/* Common crop measured on 400-unit reference views. The arch crown sits
   at the same position in both layers, whatever the slider value. */
.comparison-frame .comparison-old img,
.comparison-frame .comparison-modern img {position:absolute; max-width:none; height:auto; object-fit:fill}
.comparison-frame .comparison-old img {width:145.455%; left:-27.636%; top:-10.526%}
.comparison-frame .comparison-modern img {width:110.545%; left:-7.258%; top:-6.702%}
.comparison-frame img {display: block; width: 100%; height: 100%; object-fit: contain}
.comparison-old {clip-path: inset(0 calc(100% - var(--split)) 0 0); background: #f3ecdc}
.comparison-rule {position: absolute; inset-block: 0; left: var(--split); border-left: 2px solid #194c38; pointer-events: none}
.comparison-rule span {position: absolute; top: 72%; left: -1px; transform: translate(-50%,-50%); border-radius: 100%; background: #194c38; color: white; padding: .5rem; font: bold 1.2rem/1 system-ui; white-space: nowrap}
.comparison-frame input[type=range] {position: absolute; z-index: 1; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; touch-action: pan-y}
.comparison-frame:has(input:focus-visible) .comparison-rule span {outline:3px solid white; box-shadow:0 0 0 5px #194c38}
.history-comparison figcaption {padding-top: .6rem; color: var(--muted); font-size: .93rem}

/* Historic portrait and subject illustrations. */
#ckh-people .person summary {
  grid-template-columns: clamp(64px, 7vw, 88px) minmax(0, 1fr);
  gap: .5rem .85rem;
}
#ckh-people .barony-art {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}
#ckh-people .barony-credit {
  grid-column: 1 / -1;
  font-size: .8rem;
  line-height: 1.4;
  color: #40554a;
  text-decoration: underline;
  text-underline-offset: .14em;
}
