/* Aleksandra: porcelain, plum and a single line of measurement. */
.site-header {
  position: fixed;
  z-index: 12;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  color: var(--white);
  background: var(--ink-deep);
  border-inline-end: 1px solid #513959;
}
.rail-inner {
  min-height: 100%;
  max-height: 100%;
  padding: clamp(1.15rem,3vh,2rem) clamp(.85rem,1.7vw,1.9rem);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
}
.rail-head { padding-bottom: clamp(1.5rem, 6vh, 5rem); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: inherit;
  text-decoration: none;
  width: fit-content;
}
/* Separate shapes make up the same monogram in the rail, footer and opening. */
.brand-sign { position: relative; display: inline-block; flex: none; width: 2.48rem; aspect-ratio: 1; }
.mark-piece, .mark-piece i { position: absolute; inset: 0; display: block; }
.mark-piece { transition: transform .35s var(--ease); }
.mark-piece i { background: currentColor; }
.mark-left i { clip-path: polygon(46% 10%,55% 10%,27% 86%,11% 86%,17% 77%,24% 76%); }
.mark-right i { clip-path: polygon(49% 10%,58% 10%,85% 77%,94% 86%,73% 86%,74% 78%); }
.mark-bar i { background: var(--highlight); clip-path: polygon(23% 65%,84% 43%,89% 47%,83% 53%,18% 75%); }
.brand:is(:hover,:focus-visible) .mark-left { transform: translate(-.1rem,.08rem); }
.brand:is(:hover,:focus-visible) .mark-right { transform: translate(.1rem,.08rem); }
.brand:is(:hover,:focus-visible) .mark-bar { transform: translate(.13rem,-.09rem); }
.brand-wordmark {
  display: block;
  font: 400 clamp(1.22rem, 2vw, 1.77rem)/.97 var(--display);
  letter-spacing: -.04em;
}
.brand-wordmark small {
  display: block;
  margin-top: .4rem;
  font: 520 .61rem/1.2 var(--body);
  letter-spacing: .016em;
}
main, .footer { margin-inline-start: var(--rail-width); }
.footer .brand-wordmark { font-size: 1.75rem; }
.footer-grid { grid-template-columns: 1.2fr 1fr 1.03fr .85fr; gap: 1.5rem; }
.footer { background: var(--ink-deep); }

.view-intro {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0,.96fr) minmax(0,1.04fr);
  gap: clamp(.85rem,2.15vw,2.25rem);
  align-items: stretch;
  padding-inline-start: var(--gutter);
}
.intro-copy {
  min-width: 0;
  width: 100%;
  container-type: inline-size;
  align-self: center;
  padding-block: clamp(2.45rem,5.4vw,5.5rem);
  z-index: 2;
}
.intro-copy .eyebrow { display: flex; gap: .6rem; align-items: center; font-size: .8rem; margin: 0 0 clamp(.95rem,3.1vh,2.5rem); letter-spacing: .11em; }
.intro-copy .eyebrow::before { content: ""; flex: 0 0 clamp(.65rem,2vw,2rem); height: 1px; background: var(--accent); }
.intro-copy h1 {
  color: var(--ink);
  font-size: clamp(3.22rem,7vw,8.65rem);
  font-size: clamp(3.22rem, 20.7cqi, 8.65rem);
  line-height: .99;
  letter-spacing: -.063em;
  margin-inline-start: -.032em;
}
.intro-copy h1 span { color: #573264; }
.intro-byline { margin-top: clamp(1rem,3vh,2rem); color: #553260; font-size: clamp(1rem,1.98vw,1.38rem); font-weight: 420; letter-spacing: -.03em; }
.intro-copy .actions { gap: .62rem; margin-top: clamp(1.12rem,3.5vh,2.6rem); }
.intro-detail { display: inline-block; margin-top: clamp(1.2rem,4vh,2.55rem); color: var(--accent); font-size: .91rem; text-decoration-color: #9474a1; text-underline-offset: .33em; }
/* In normal flow the atlas has one heading. Only the decorative frame pins. */
.atlas-entrance { position: relative; }
.atlas-shutter {
  position: relative;
  display: grid;
  align-items: center;
  color: var(--white);
  background: radial-gradient(ellipse at 83% 44%,#714a80,#44274e 55%,#2d1837);
  border-block: 1px solid #815d8e;
  isolation: isolate;
  overflow: clip;
}
.atlas-title {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: .9rem 2rem;
  align-items: center;
  padding-block: clamp(1.55rem,3.3vw,3.05rem);
}
.atlas-title h2 { font-size: clamp(2.3rem,5.7vw,5.2rem); }
.atlas-title p { max-width: 27rem; margin-top: .88rem; font-size: .96rem; color: #f0e3f4; }
.atlas-title .atlas-title-drawing, .atlas-cuts { display: none; }
.cut-enhanced {
  --atlas-angle-start: 66%;
  --atlas-angle-end: 35%;
  --atlas-stroke: 0;
  --atlas-split: 0;
  --atlas-trace-alpha: 0;
  --cut-distance: clamp(8.75rem,28svh,17rem);
}
.cut-enhanced::after { content: ""; display: block; block-size: var(--cut-distance); }
.cut-enhanced .atlas-shutter {
  position: sticky;
  top: var(--nav-height);
  min-height: max(18rem, calc(100svh - var(--nav-height)));
}
.cut-enhanced .atlas-title { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); }
.cut-enhanced .atlas-title-drawing {
  display: grid;
  min-height: clamp(9rem,26vw,23rem);
  opacity: .7;
  filter: brightness(0) invert(.91) sepia(.18);
}
.cut-enhanced .atlas-cuts { display: block; position: absolute; inset: 0; pointer-events: none; }
.cut-enhanced[data-cut-state="open"] .atlas-cuts { visibility: hidden; }
.atlas-fragment, .atlas-fragment img, .atlas-seam, .atlas-seam i { position: absolute; inset: 0; width: 100%; height: 100%; }
.atlas-fragment { background: #bdaccb; }
.atlas-fragment img { object-fit: cover; object-position: center 41%; filter: saturate(.72) contrast(.94); }
.atlas-fragment::after { content:""; position: absolute; inset: 0; background: linear-gradient(100deg,#29163530,transparent 65%); }
.atlas-fragment-left {
  clip-path: polygon(0 0,var(--atlas-angle-start) 0,var(--atlas-angle-end) 100%,0 100%);
  transform: translate3d(calc(var(--atlas-split) * -71%),calc(var(--atlas-split) * -11%),0);
}
.atlas-fragment-right {
  clip-path: polygon(var(--atlas-angle-start) 0,100% 0,100% 100%,var(--atlas-angle-end) 100%);
  transform: translate3d(calc(var(--atlas-split) * 72%),calc(var(--atlas-split) * 13%),0);
}
.atlas-seam { clip-path: inset(0 0 calc((1 - var(--atlas-stroke)) * 100%) 0); opacity: var(--atlas-trace-alpha); filter: drop-shadow(0 0 4px #382342bb); }
.atlas-seam i {
  background: #f2f9c4;
  clip-path: polygon(var(--atlas-angle-start) 0,calc(var(--atlas-angle-start) + max(.24%,2px)) 0,calc(var(--atlas-angle-end) + max(.24%,2px)) 100%,var(--atlas-angle-end) 100%);
}
.body-chart { position: relative; width: 100%; height: 100%; min-height: inherit; display: grid; place-items: center; }
.body-chart canvas { display: block; width: 100%; height: 100%; position: absolute; object-fit: contain; }
.catalog-chart { min-height: clamp(7rem,15vw,12rem); background: #e8dbef; border-inline-start: 1px solid #d0bcd9; overflow: hidden; }
.journey .section-heading, .journey-steps { max-width: 39rem; }
.journey-image { background: #c9b7d6; }
.portrait-surface { background: #e6d9ec; }
.portrait-surface img { aspect-ratio: 1.12; }
.journey-image, .portrait-surface { overflow: clip; }
.album-cover { background: linear-gradient(110deg,#f1e9f4,#ddcce8); }
.album-sleeve { border-color: #f6effa; border-radius: 0; }
.album-stage { isolation: isolate; }
.album-stage button { position: relative; overflow: hidden; }
.home-archive { background: #eae0f0; border-block: 1px solid var(--line); }
.archive-doors { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #b7a1c1; background: var(--paper); }
.archive-doors > a { container-type: inline-size; display: grid; grid-template-columns: minmax(0,1fr) clamp(2.8rem,6.5vw,6.7rem); gap: .48rem .65rem; align-content: center; align-items: center; min-height: 11rem; padding: clamp(1rem,3vw,2.6rem); text-decoration: none; background: linear-gradient(90deg,#e4edb8 49.9%,transparent 50%) right / 210% 100%; transition: background-position .55s var(--ease); }
.archive-doors > a + a { border-inline-start: 1px solid #b7a1c1; }
.archive-doors > a:is(:hover,:focus-visible) { background-position: left; }
.archive-doors > a > :not(img) { grid-column: 1; }
.archive-doors img { grid-column: 2; grid-row: 1 / 4; width: 100%; max-height: 8rem; object-fit: contain; filter: saturate(.78); }
.archive-doors span { color: var(--accent); font-weight: 550; font-size: .84rem; }
.archive-doors strong { font: 400 clamp(1.6rem,3.8vw,3.9rem)/1.02 var(--display); letter-spacing: -.035em; }
.archive-doors strong { font-size: clamp(1.6rem,11.4cqi,3.25rem); }
.archive-doors small { font-size: .84rem; }
.archive-local-links { display: flex; flex-wrap: wrap; gap: .55rem; padding-block: clamp(1.35rem,2.8vw,2.6rem) 0; }
.original-section { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.75fr); gap: clamp(1.45rem,4.5vw,4rem); align-items: start; border-top: 1px solid var(--line); }
.original-section > header { min-width: 0; container-type: inline-size; }
.original-section > header h2 {
  font-size: clamp(1.85rem,3.4vw,3.72rem);
  font-size: clamp(1.85rem,13.25cqi,3.72rem);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.original-section > header p { margin-top: .8rem; color: var(--muted); }
.original-copy { min-width: 0; overflow-wrap: anywhere; line-height: 1.78; }
.original-copy :is(p, ul, ol, table) + :is(p, ul, ol, table) { margin-top: .96rem; }
.original-copy :is(ul,ol) { padding-inline-start: 1.35rem; }
.original-copy li + li { margin-top: .44rem; }
.original-copy a { color: var(--accent); }
.original-copy:has(table) { overflow-x: auto; }
.original-copy table { border: 1px solid var(--line); min-width: 22rem; }
.original-copy :is(th,td) { overflow-wrap: normal; }
.original-copy :is(th,td):last-child { min-width: 7rem; }
.original-section .source-note { margin-top: 1.35rem; }
.operating-photo { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-block-start: 1px solid var(--line); }
.operating-photo h2 { font-size: clamp(1.95rem,3.15vw,3.2rem); margin-bottom: .65rem; }
.operating-photo p:last-child { max-width: 32rem; }
.mast-copy { container-type: inline-size; min-width: 0; overflow-wrap: anywhere; }
.with-art .mast-copy h1 { font-size: clamp(2.55rem,14.5cqi,6.1rem); }
.page-profile .mast-art { height: clamp(15rem,31vw,28rem); }
.page-profile .mast-art img { object-fit: contain; object-position: center; background: #e2d7eb; }
.scan-section > .original-copy { max-width: 60rem; margin-block: 1.05rem 1.65rem; }
.scans-grid, .ranking-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); align-items: start; gap: 1rem; }
.scan-card { min-width: 0; background: #fdf9ff; border: 1px solid #c6b3cf; }
.scan-link { display: grid; place-items: center; min-height: 12rem; padding: clamp(.55rem,1.4vw,1.2rem); text-decoration: none; background: #e8dfed; cursor: zoom-in; }
.scan-card img { width: 100%; height: clamp(12rem,23vw,19rem); object-fit: contain; transition: transform .4s var(--ease); }
.scan-link:hover img, .scan-link:focus-visible img { transform: scale(1.035); }
.scan-card figcaption { padding: .75rem .92rem .95rem; }
.scan-card figcaption p { font-weight: 600; line-height: 1.28; }
.scan-card figcaption span { color: var(--accent); font-size: .83rem; margin-top: .22rem; display: block; }
.scan-viewer .lightbox-head h2 { font-size: clamp(1.08rem,2.75vw,1.7rem); }
.scan-viewer img { display: block; width: 100%; height: auto; max-height: 70dvh; }
.scan-viewer .text-link { text-decoration-color: #e0ebae; }
:is(.gallery-shell,.lightbox) .secondary {
  color: var(--white);
  background: #503658;
  border-color: #c6afd0;
}
:is(.gallery-shell,.lightbox) .secondary:is(:hover,:focus-visible) {
  color: var(--ink);
  background: #f0e7f2;
  border-color: #f0e7f2;
}
:is(.gallery-shell,.lightbox) :focus-visible { outline-color: var(--highlight); }
.ranking-intro { display: grid; grid-template-columns: minmax(9rem,.42fr) minmax(0,1.58fr); align-items: start; gap: clamp(1.1rem, 3.9vw, 3.75rem); border-bottom: 1px solid var(--line); }
.ranking-intro h2 { font-size: clamp(2rem,4.5vw,4rem); }
.ranking-intro .original-copy { margin-top: .95rem; }
.ranking-cover img { object-fit: contain; height: clamp(9.5rem,20vw,14rem); }
.ranking-section .anchor-row { margin: .9rem 0 1.2rem; }
.ranking-card { display: grid; gap: .68rem; min-width: 0; }
.ranking-card h3 { line-height: 1.11; }
.ranking-card > p { min-height: 9rem; background: #ebe2ef; padding: .85rem; border: 1px solid var(--line); color: var(--muted); }

.local-map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #f1eaf6;
  font-size: clamp(.61rem, .9vw, .8rem);
  color: #51365d;
}
.map-raclawicka, .map-blacharska, .map-rymarska { position: absolute; background: #fbf8fd; border-block: 1px solid #a78db3; }
.map-raclawicka { z-index: 2; left: -10%; top: 70%; width: 121%; transform: rotate(-15deg); padding: .35rem 1rem .32rem 13%; }
.map-blacharska, .map-rymarska {
  top: -13%;
  width: 3.15rem;
  height: 91%;
  border: 0;
  border-inline: 1px solid #ba9fc2;
  transform: rotate(-22deg);
}
.map-blacharska { left: 25%; }
.map-rymarska { left: 62%; height: 87%; }
.map-blacharska span, .map-rymarska span { position: absolute; top: 36%; left: 34%; writing-mode: vertical-rl; }
.map-stop, .map-pin { position: absolute; z-index: 3; display: flex; align-items: center; gap: .29rem; }
.map-stop { inset: 67% auto auto 13%; color: #3f2950; padding: .15rem .38rem; border: 1px solid #b4a2bb; background: #faf5fd; }
.map-stop i { display: inline-block; background: #674c74; width: .44rem; height: .44rem; }
.map-pin {
  inset: 36% 12% auto auto;
  display: grid;
  grid-template-columns: auto 1fr;
  padding: .32rem .46rem .34rem;
  gap: 0 .37rem;
  color: var(--white);
  background: #42274d;
  line-height: 1.3;
}
.map-pin i { grid-row: 1 / span 2; place-self: center; width: .61rem; height: .61rem; background: var(--highlight); border-radius: 50%; }
.map-pin small { grid-column: 2; color: #e8dae9; font-size: .97em; }
.map-note { font-size: .82rem; color: var(--muted); width: 100%; }

@media (max-width: 69rem) {
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .brand-wordmark small { max-width: 7.25rem; }
}
@media (max-width: 56rem) {
  :root { --nav-height: 4.12rem; --gutter: clamp(1rem, 4vw, 2.05rem); }
  .site-header { position: sticky; inset: 0 0 auto; width: 100%; border-inline: 0; border-bottom: 1px solid #624769; }
  .rail-inner { min-height: var(--nav-height); overflow: visible; padding: 0; }
  .rail-head { min-height: var(--nav-height); display: flex; align-items: center; justify-content: space-between; gap: .62rem; padding: .42rem var(--gutter); }
  .brand-wordmark { font-size: clamp(1.34rem,4.5vw,1.76rem); }
  .brand-wordmark small { max-width: none; }
  .brand-sign { width: 2.23rem; }
  main, .footer { margin-inline-start: 0; }
}
@media (max-width: 41rem) {
  .view-intro { grid-template-columns: minmax(0,1fr); gap: 0; padding: 0; }
  .intro-copy { padding: 1.75rem var(--gutter) 1.55rem; }
  .intro-copy h1 { font-size: clamp(3.28rem,16.5cqi,6.65rem); }
  .intro-copy .eyebrow { margin-bottom: .8rem; }
  .intro-byline { margin-top: .75rem; font-size: clamp(.93rem,3.9vw,1.25rem); }
  .intro-copy .actions { margin-top: 1.05rem; }
  .intro-copy .button { font-size: .87rem; min-height: 2.82rem; padding-inline: .65rem; }
  .intro-detail { margin-top: .78rem; }
  .atlas-title { padding-block: 1.2rem; }
  .atlas-title p { font-size: .87rem; }
  .atlas-title h2 { font-size: clamp(2.3rem,9.4vw,4.1rem); }
  .archive-doors, .ranking-intro { grid-template-columns: 1fr; }
  .archive-doors > a + a { border-inline-start: 0; border-block-start: 1px solid #b7a1c1; }
  .archive-doors > a { min-height: 0; }
  .ranking-cover { max-width: 18rem; }
}
@media (max-width: 25rem) {
  .intro-copy .button { font-size: .83rem; padding-inline: .53rem; }
  .intro-copy .actions { gap: .44rem; }
  .brand-wordmark small { font-size: .59rem; }
  .brand { gap: .45rem; }
  .rail-head { padding-inline: .83rem; }
  .scan-viewer .lightbox-controls { flex-wrap: wrap; }
}
@media (max-width: 49rem) {
  .original-section { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 41rem) {
  .cut-enhanced { --atlas-angle-start: 72%; --atlas-angle-end: 29%; --cut-distance: clamp(6rem,24svh,12rem); }
  .cut-enhanced .atlas-shutter { min-height: max(15rem,calc(100svh - var(--nav-height) - 4.25rem)); }
  .cut-enhanced .atlas-title { width: calc(100% - 2 * var(--gutter)); grid-template-columns: 1fr; }
  .cut-enhanced .atlas-title-drawing { min-height: clamp(6.5rem,30vw,10rem); }
  .atlas-fragment img { object-position: center 37%; }
}
@media (prefers-reduced-motion: reduce) {
  .cut-enhanced::after { display: none; }
  .cut-enhanced .atlas-shutter { position: static; min-height: 0; }
  .cut-enhanced .atlas-title { grid-template-columns: minmax(0,1fr); }
  .cut-enhanced .atlas-cuts, .cut-enhanced .atlas-title-drawing { display: none; }
  .brand:is(:hover,:focus-visible) .mark-piece { transform: none; }
}
