/* Horizontal three-slice scroll: 240px end caps in the 1200 × 400 source.
   At 112px high, each cap stays 67.2px wide regardless of the title length. */
.hq-scroll {
  --scroll-height: 7rem;
  --scroll-cap: calc(var(--scroll-height) * .6);
  box-sizing: border-box;
  position: relative;
  display: inline-grid;
  place-items: center;
  inline-size: fit-content;
  max-inline-size: 100%;
  min-inline-size: calc(var(--scroll-cap) * 2 + 3rem);
  block-size: var(--scroll-height);
  padding: 0 .5rem;
  border: solid transparent;
  border-width: 0 var(--scroll-cap);
  border-image-source: url('/textures/scroll-banner-v1.png');
  border-image-slice: 0 240 fill;
  border-image-width: 0 var(--scroll-cap);
  border-image-repeat: stretch;
  color: #201910;
  text-align: center;
  vertical-align: middle;
}
.hq-scroll__text {
  position: relative;
  z-index: 1;
  min-inline-size: 0;
  max-inline-size: 100%;
  /* The blank band occupies the middle half of the source image. */
  max-block-size: calc(var(--scroll-height) * .48);
  margin-block-start: calc(var(--scroll-height) * -.055);
  overflow: auto;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  line-height: 1.1;
}
.hq-scroll__text > * { margin: 0; max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }

/* One rolled cap and one torn tip; only the blank middle grows horizontally. */
.hq-scroll--side {
  --scroll-height: 4rem;
  font-size: .8125rem;
  --scroll-left: calc(var(--scroll-height) * .64);
  --scroll-right: calc(var(--scroll-height) * .4);
  min-inline-size: 0; block-size: var(--scroll-height); justify-items: start;
  border-width: 0 var(--scroll-right) 0 var(--scroll-left);
  border-image-source: none; isolation: isolate;
  border-image-slice: 0 180 0 240 fill;
  border-image-width: 0 var(--scroll-right) 0 var(--scroll-left);
  padding-inline: 0 .15rem; text-align: left;
}
.hq-scroll--side .hq-scroll__text {
  margin-block-start: 0; max-block-size: calc(var(--scroll-height) * .56);
  padding-block: 2px; overflow-x: hidden; line-height: 1.15;
}
.hq-scroll--side .panel__title { color: #24180d; font-size: .8125rem; letter-spacing: .045em; }

.hq-scroll--side .hq-scroll__text > * { line-height: 1.15; }

/* Artwork and a separate flat SVG silhouette share the same fixed end slices. */
.hq-scroll--side::before,
.hq-scroll--side::after {
  content: ''; position: absolute; top: 0; bottom: 0;
  left: calc(-1 * var(--scroll-left)); right: calc(-1 * var(--scroll-right));
  border: solid transparent; border-width: 0 var(--scroll-right) 0 var(--scroll-left);
  border-image-slice: 0 180 0 240 fill;
  border-image-width: 0 var(--scroll-right) 0 var(--scroll-left);
  border-image-repeat: stretch; pointer-events: none;
}
.hq-scroll--side::before { z-index: 0; border-image-source: url('/textures/side-banner-v1.png'); }
.hq-scroll--side::after {
  z-index: -1; border-image-source: url('/textures/side-banner-shadow-v1.svg');
  transform: translate(3px,4px);
}
