/* The history page (historija.html): a header, a bar of chapters, the chapters, the sources. */
.hist-page main { background: var(--paper); }

/* header: the title over a large outlined "5000", and a pile of old prints that fan out when the page opens */
.hist-hero {
  position: relative; overflow: hidden; display: grid; gap: 40px; align-items: center;
  padding: clamp(110px, 16svh, 160px) var(--gutter) clamp(70px, 11svh, 110px);
  background: radial-gradient(ellipse 70% 60% at 78% 45%, rgba(23, 149, 160, .12), rgba(23, 149, 160, 0) 70%), var(--deep);
}
.hh-big {
  position: absolute; left: calc(var(--gutter) - .06em); bottom: -.2em; z-index: 0; pointer-events: none;
  font-family: var(--serif); font-weight: 500; font-size: clamp(11rem, 34vw, 36rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: lining-nums;
  color: transparent; -webkit-text-stroke: 1px rgba(246, 244, 238, .1);
  animation: hh-big 2.4s cubic-bezier(.2, .7, .2, 1) both;
}
.hist-hero-text { position: relative; z-index: 2; }
.hist-hero h1 { font-family: var(--serif); font-weight: 400; line-height: .95; letter-spacing: -.01em; font-size: clamp(3rem, 8.4vw, 7.4rem); animation: hh-up 1.1s .1s cubic-bezier(.2, .7, .2, 1) both; }
.hist-hero .eyebrow { animation: hh-up 1s cubic-bezier(.2, .7, .2, 1) both; }
.hist-lead { margin-top: 1.4rem; max-width: 34rem; font-size: 1.08rem; color: var(--fg-soft); animation: hh-up 1.1s .25s cubic-bezier(.2, .7, .2, 1) both; }
.hh-facts { display: flex; gap: clamp(28px, 4vw, 56px); margin-top: clamp(24px, 4svh, 40px); animation: hh-up 1.1s .4s cubic-bezier(.2, .7, .2, 1) both; }
.hh-facts div { padding-left: 14px; border-left: 1px solid var(--rule); }
.hh-facts dt { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-muted); }
.hh-facts dd { margin-top: .2rem; font-family: var(--serif); font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1; font-variant-numeric: lining-nums; }
.hh-facts small { font-size: .5em; letter-spacing: .04em; color: var(--fg-soft); }
.hh-start {
  display: inline-flex; align-items: center; gap: .7rem; min-height: 48px; margin-top: clamp(26px, 4svh, 40px); padding: 0 1.4rem;
  border: 1px solid var(--acc); border-radius: 999px; color: var(--fg); text-decoration: none;
  font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; transition: background .25s ease, color .25s ease;
  animation: hh-up 1.1s .55s cubic-bezier(.2, .7, .2, 1) both;
}
.hh-start:hover { background: var(--acc); color: var(--ink); }

/* the pile: four prints with a paper border; the main one in front keeps its caption */
.hh-pile { position: relative; z-index: 1; aspect-ratio: 5 / 4; width: 100%; max-width: 640px; justify-self: end; }
.hh-print { position: absolute; margin: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); animation: hh-fan 1.3s var(--d) cubic-bezier(.2, .7, .2, 1) both; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.hh-print img { display: block; width: 100%; height: auto; border: 7px solid #efe9db; background: #23201b; box-shadow: 0 26px 50px -18px rgba(0, 0, 0, .75), 0 2px 4px rgba(0, 0, 0, .4); filter: grayscale(.1) contrast(1.03); }
.hh-print.p1 { left: 10%; top: 24%; width: 74%; z-index: 4; --x: 0%; --y: 0%; --r: -1.6deg; --d: .35s; }
.hh-print.p2 { left: 46%; top: 0; width: 50%; z-index: 2; --x: 0%; --y: 0%; --r: 5deg; --d: .15s; }
.hh-print.p3 { left: 0; top: 4%; width: 46%; z-index: 1; --x: 0%; --y: 0%; --r: -7deg; --d: .05s; }
.hh-print.p4 { left: 60%; top: 64%; width: 40%; z-index: 3; --x: 0%; --y: 0%; --r: 3.5deg; --d: .25s; }
.hh-print img { opacity: .94; }
.hh-print.p1 img { opacity: 1; }
.hh-pile:hover .hh-print.p2 { --x: 6%; --y: -6%; --r: 8deg; }
.hh-pile:hover .hh-print.p3 { --x: -8%; --y: -4%; --r: -10deg; }
.hh-pile:hover .hh-print.p4 { --x: 6%; --y: 8%; --r: 6deg; }
.hh-pile:hover .hh-print.p1 { --r: 0deg; }
.hh-print figcaption { max-width: 60%; margin-top: .7rem; font-size: .74rem; line-height: 1.45; color: var(--fg-muted); transform: rotate(1.6deg); transform-origin: left top; }
.hh-river { position: absolute; left: 0; right: 0; bottom: 18px; width: 100%; height: 44px; z-index: 0; fill: none; }
.hh-river path:first-child { stroke: #0f6f78; stroke-width: 12; opacity: .45; stroke-linecap: round; }
.hh-river path + path { stroke: var(--river-light); stroke-width: 1.3; stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: hh-draw 2.6s .4s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes hh-up { from { opacity: 0; transform: translateY(26px); } }
@keyframes hh-big { from { opacity: 0; transform: translateY(8%); } }
@keyframes hh-fan { from { opacity: 0; transform: translate(0, 14%) rotate(0deg) scale(.94); } }
@keyframes hh-draw { to { stroke-dashoffset: 0; } }
@media (min-width: 900px) { .hist-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); min-height: 86svh; } }
@media (max-width: 899px) {
  .hist-hero { gap: 28px; padding-bottom: 84px; }
  .hh-big { font-size: 46vw; bottom: 40px; }
  .hh-pile { justify-self: center; max-width: 520px; margin-top: 8px; }
  .hh-facts dd { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hh-big, .hist-hero h1, .hist-hero .eyebrow, .hist-lead, .hh-facts, .hh-start, .hh-print { animation: none; }
  .hh-river path + path { animation: none; stroke-dashoffset: 0; }
  .hh-print { transition: none; }
}

/* bar of chapters: stays under the menu while the chapters scroll by (historija.js marks the current one) */
.chap-nav {
  position: sticky; top: 64px; z-index: 30;
  background: rgba(246, 244, 238, .95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(21, 26, 24, .08);
}
.chap-nav ol { list-style: none; display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--gutter); scrollbar-width: none; }
.chap-nav ol::-webkit-scrollbar { display: none; }
.chap-nav a {
  display: inline-flex; align-items: center; gap: .5em; min-height: 36px; padding: 0 14px; white-space: nowrap;
  border: 1px solid rgba(21, 26, 24, .16); border-radius: 999px; color: var(--ink); font-size: .84rem; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.chap-nav a b { font-weight: 500; color: var(--sand-dark); }
.chap-nav a:hover { border-color: var(--sand-dark); }
.chap-nav a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chap-nav a[aria-current="true"] b { color: var(--sand); }
@media (max-width: 768px) { .chap-nav { top: 58px; } }

/* a chapter: the years on the side (sticky on wide screens), the text and photos next to them */
.ch { display: grid; gap: 24px; padding: clamp(64px, 10vw, 130px) var(--gutter); scroll-margin-top: 110px; }
.ch > * { min-width: 0; }
.ch-yr { font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: .9; color: var(--acc); }
.ch-side .eyebrow { margin: .9rem 0 0; }
.ch h2 { margin-bottom: 1.4rem; }
.ch-body > p { max-width: 40rem; color: var(--fg-soft); }
.ch-body > p + p { margin-top: 1rem; }
.ch-body > p.lead { font-size: 1.14rem; color: var(--fg); }
.ch-body a { color: var(--acc); }
@media (min-width: 960px) {
  .ch { grid-template-columns: 240px minmax(0, 1fr); gap: 64px; }
  .ch-side { position: sticky; top: 140px; align-self: start; }
}

/* old photos: a light frame, the caption and the source under it */
.arch { display: grid; gap: 22px; margin-top: 2.2rem; max-width: 900px; }
@media (min-width: 640px) {
  .arch.two { grid-template-columns: 1fr 1fr; align-items: start; }
}
.ap { position: relative; margin: 0; }
.ap-frame { padding: 10px; background: #e7e2d5; box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 16px 32px -20px rgba(0, 0, 0, .4); }
.ap img { display: block; width: 100%; height: auto; filter: sepia(.1) contrast(1.02); }
.ap figcaption { margin-top: .6rem; font-size: .85rem; line-height: 1.45; color: var(--fg-muted); }
.ap figcaption b { display: block; font-weight: 500; color: var(--fg); }
.ap .tag {
  position: absolute; top: 18px; left: 18px; padding: 3px 8px; background: rgba(21, 26, 24, .82); color: var(--paper);
  font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; line-height: 1.3;
}

/* a few figures of the chapter */
.facts { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 24px; margin-top: 2.4rem; max-width: 900px; }
.facts li { padding-top: .9rem; border-top: 2px solid var(--acc); }
.facts .n { font-family: var(--serif); font-size: 2.5rem; line-height: 1; }
.facts .n small { font-size: 1.05rem; margin-left: .15em; }
.facts p { margin-top: .4rem; font-size: .9rem; color: var(--fg-muted); }

/* sources and the note to the owners of the photos */
.hist-sources { padding: 64px var(--gutter) 90px; }
.hist-sources ol { max-width: 46rem; padding-left: 1.2rem; font-size: .92rem; color: var(--fg-soft); }
.hist-sources a { color: var(--acc); }
.hist-sources li + li { margin-top: .45rem; }
.hist-note { max-width: 46rem; margin-top: 1.6rem; padding-left: .9rem; border-left: 2px solid var(--acc); font-size: .85rem; color: var(--fg-muted); }


/* a single old photo is kept near its own size; "then and now" inside a chapter */
.arch:not(.two) { max-width: 480px; }
.hist-tn { max-width: 440px; margin-top: 2.4rem; }
.hist-tn figcaption a { color: var(--acc); }

/* population by census: plain bars, the numbers next to them */
.bars { max-width: 40rem; margin: 2.6rem 0 0; }
.bars figcaption { font-weight: 500; font-size: .92rem; margin-bottom: .9rem; }
.bars ol { list-style: none; }
.bars li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) 4.4em; align-items: center; gap: 12px; margin: 8px 0; font-size: .86rem; font-variant-numeric: tabular-nums; }
.bars i { display: block; width: var(--w); height: 14px; background: var(--river); border-radius: 2px; }
.bars b { font-weight: 400; text-align: right; }
.bars-note { margin-top: .8rem; font-size: .85rem; color: var(--fg-muted); }

/* the river over the years: a row that scrolls sideways on phones, a grid on wide screens */
.strip { list-style: none; display: flex; gap: 14px; margin-top: 2.4rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.strip li { flex: 0 0 min(76vw, 320px); scroll-snap-align: start; }
.strip figure { margin: 0; }
.strip img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; filter: sepia(.1) contrast(1.02); }
.strip figcaption { margin-top: .45rem; font-size: .82rem; color: var(--fg-muted); }
.strip-src { margin-top: .4rem; font-size: .76rem; color: var(--fg-muted); }
@media (min-width: 960px) {
  .strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; max-width: 900px; }
}

/* Chapter "Kako se živjelo": small sections (.zv) about the railway, the river and the timber, two receipts, the cinema
   and the gatherings. Each one has its own little layout; together they read like a scrapbook of the town. */
.zv { margin-top: clamp(56px, 8vw, 96px); max-width: 980px; }
.zv-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 1.4rem; }
.zv-h span { font-family: var(--serif); font-size: 1.1rem; color: var(--acc); }
.zv-h h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1; }
.zv-h::after { content: ""; flex: 1; height: 1px; background: var(--rule); transform: translateY(-.35em); }
.zv > p { max-width: 40rem; color: var(--fg-soft); }
.zv > p + .rail-row { margin-top: 1.4rem; }
.zv-src { margin-top: .9rem; font-size: .76rem; color: var(--fg-muted); }

/* the railway: photos in a row with a line of track under them */
.rail-row { list-style: none; display: flex; gap: 18px; margin-top: 1.8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 44px; position: relative; }
.rail-row li { flex: 0 0 min(72vw, 290px); scroll-snap-align: start; position: relative; }
.rail-row li::after {
  /* a piece of track under every photo; side by side they make one track */
  content: ""; position: absolute; left: -18px; right: 0; bottom: -34px; height: 16px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 3px / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 11px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(21, 26, 24, .5) 10px 15px);
  opacity: .55;
}
.rail-row li:first-child::after { left: 0; }
.rail-row figure { margin: 0; }
.rail-row img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; filter: sepia(.12) contrast(1.03); }
.rail-row figcaption { margin-top: .55rem; font-size: .84rem; line-height: 1.45; color: var(--fg-muted); }
.rail-row figcaption b { display: block; font-weight: 500; color: var(--fg); }
@media (min-width: 960px) { .rail-row { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; } }

/* a newspaper clipping, pinned with a strip of tape */
.clip { position: relative; margin: 0; padding: 10px; background: #f3efe4; transform: rotate(-1.6deg); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .55); }
.clip::before { content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%) rotate(2deg); background: rgba(225, 214, 180, .75); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.clip img { display: block; width: 100%; height: auto; filter: contrast(1.05); }
.clip figcaption { margin-top: .5rem; font-size: .8rem; color: var(--fg-muted); }
.zv-pair { display: grid; gap: 34px; margin-top: 2rem; align-items: start; }
.zv-pair .clip { max-width: 260px; justify-self: center; }
@media (min-width: 760px) { .zv-pair { grid-template-columns: minmax(0, 1fr) 240px; } }

/* timber on the river: one wide photo with the caption laid over it, a second photo beside */
.wide { position: relative; margin: 1.8rem 0 0; overflow: hidden; }
.wide img { display: block; width: 100%; height: auto; filter: sepia(.18) contrast(1.06); }
.wide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 22px 18px;
  background: linear-gradient(transparent, rgba(12, 16, 14, .78)); color: var(--paper); font-size: .86rem;
}
.wide figcaption b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.1; }
.zv-split { display: grid; gap: 24px; margin-top: 24px; align-items: center; }
.zv-split figure { margin: 0; }
.zv-split img { display: block; width: 100%; height: auto; filter: sepia(.1) contrast(1.03); }
.zv-split figcaption { margin-top: .5rem; font-size: .84rem; color: var(--fg-muted); }
.zv-split figcaption b { display: block; font-weight: 500; color: var(--fg); }
@media (min-width: 760px) { .zv-split { grid-template-columns: 1fr 1fr; gap: 40px; } }

/* two receipts: the scan next to a clean copy of what it says, on lined paper */
.rcpt { display: grid; gap: 28px; margin-top: 1.8rem; align-items: start; }
@media (min-width: 820px) { .rcpt { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; } }
.rcpt-scan { margin: 0; padding: 10px; background: #e7e2d5; box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .45); }
.rcpt-scan img { display: block; width: 100%; height: auto; }
.ledger {
  position: relative; padding: 26px 24px 22px 46px; background-color: #fbf9f3;
  background-image: linear-gradient(90deg, transparent 32px, rgba(190, 70, 60, .35) 32px 33px, transparent 33px),
    repeating-linear-gradient(transparent 0 29px, rgba(23, 149, 160, .16) 29px 30px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 34px -22px rgba(0, 0, 0, .45);
  font-variant-numeric: tabular-nums;
}
.ledger-to { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-muted); }
.ledger-t { font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; margin: .2rem 0 1rem; }
.ledger ol { list-style: none; }
.ledger li { display: flex; align-items: baseline; gap: 8px; line-height: 30px; font-size: .92rem; }
.ledger li i { flex: 1; min-width: 12px; border-bottom: 1px dotted rgba(21, 26, 24, .35); transform: translateY(-.3em); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ledger li em { font-family: var(--serif); font-size: 1.12rem; }
.ledger li.sum { font-weight: 500; }
.ledger li.total { margin-top: 6px; border-top: 2px solid var(--ink); font-weight: 500; font-size: 1rem; }
.ledger li.total b { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.ledger-sign { margin-top: 1rem; font-size: .8rem; color: var(--fg-muted); }
.quote { margin: 2rem 0 0; max-width: 38rem; padding-left: 20px; border-left: 2px solid var(--acc); }
.quote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.3; }
.quote cite { display: block; margin-top: .5rem; font-style: normal; font-size: .78rem; color: var(--fg-muted); }
.rcpt.small { grid-template-columns: 1fr; margin-top: 2.4rem; }
.rcpt.small .rcpt-scan { max-width: 240px; }
@media (min-width: 820px) { .rcpt.small { grid-template-columns: 200px minmax(0, 1fr); align-items: center; } }
.rcpt.small p { color: var(--fg-soft); max-width: 34rem; }
.rcpt.small p b { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; color: var(--fg); }

/* the cinema: a dark board with the programme, lit by a row of bulbs */
.kino { display: grid; gap: 30px; margin-top: 1.8rem; align-items: start; }
@media (min-width: 900px) { .kino { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); } }
.board {
  position: relative; padding: 34px clamp(20px, 3vw, 36px) 30px; background: #12100d; color: #f3ead6;
  box-shadow: inset 0 0 0 1px rgba(243, 234, 214, .08), 0 24px 48px -26px rgba(0, 0, 0, .8);
}
.board::before, .board::after {
  /* the bulbs along the top and the bottom edge */
  content: ""; position: absolute; left: 14px; right: 14px; height: 8px;
  background: radial-gradient(circle, #ffd889 0 2.4px, rgba(255, 196, 92, .25) 3.2px, transparent 4.5px) 0 0 / 18px 8px repeat-x;
}
.board::before { top: 10px; } .board::after { bottom: 10px; }
.board-k { font-size: .7rem; letter-spacing: .4em; text-transform: uppercase; color: #e9b75c; }
.board-t { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: .95; margin: .3rem 0 1.4rem; letter-spacing: .02em; }
.board ol { list-style: none; columns: 2 220px; column-gap: 28px; }
.board li { break-inside: avoid; display: grid; grid-template-columns: 3.6em 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(243, 234, 214, .1); font-size: .82rem; }
.board li i { font-style: normal; color: #e9b75c; font-variant-numeric: tabular-nums; }
.board li b { font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.board-note { margin-top: 1.2rem; font-size: .8rem; color: rgba(243, 234, 214, .62); }
.kino-side .clip { transform: rotate(1.4deg); max-width: 300px; }
.kino-side p { margin-top: 1.6rem; font-size: .92rem; color: var(--fg-soft); }

/* gatherings: a mosaic, the year written large over every photo */
.mosaic { display: grid; gap: 12px; margin-top: 1.8rem; grid-template-columns: 1fr 1fr; }
.mosaic figure { position: relative; margin: 0; overflow: hidden; }
.mosaic figure:first-child { grid-column: 1 / -1; }
.mosaic img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; filter: sepia(.12) contrast(1.04); transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.mosaic figure:first-child img { aspect-ratio: 2 / 1; }
.mosaic figure:hover img { transform: scale(1.03); }
.mosaic figcaption { position: absolute; inset: auto 0 0 0; padding: 50px 16px 12px; background: linear-gradient(transparent, rgba(12, 16, 14, .8)); color: var(--paper); font-size: .8rem; line-height: 1.35; }
.mosaic figcaption b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: .9; margin-bottom: .2rem; }
@media (max-width: 560px) { .mosaic { grid-template-columns: 1fr; } .mosaic img, .mosaic figure:first-child img { aspect-ratio: 4 / 3; } }

/* Chapter "Ulice kroz vrijeme": one street or place per block (.ul). The photos of the same place stand on a time line,
   oldest first. A photo of today is added at the end of a line once it exists (none are shown before that). */
.ul { scroll-margin-top: 120px; margin-top: clamp(56px, 8vw, 100px); }
.ul-h { display: grid; gap: 4px 24px; align-items: end; max-width: 980px; }
.ul-h h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: .95; }
.ul-h p { color: var(--fg-soft); max-width: 34rem; font-size: .95rem; }
.ul-span { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); }
@media (min-width: 900px) { .ul-h { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ul-h .ul-span { grid-column: 1 / -1; } }

/* the time line: a row that scrolls sideways, the line runs through the year marks */
.tl { position: relative; margin-top: 1.6rem; }
.tl ol {
  list-style: none; display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 18px 0; scrollbar-width: thin; scrollbar-color: var(--acc) transparent;
}
.tl li { position: relative; flex: 0 0 min(78vw, 300px); scroll-snap-align: start; padding-top: 58px; }
.tl li::before { /* the line */
  content: ""; position: absolute; top: 22px; left: 0; right: -20px; height: 1px; background: var(--rule);
}
.tl li:last-child::before { right: 50%; }
.tl li::after { /* the mark on the line */
  content: ""; position: absolute; top: 17px; left: 0; width: 11px; height: 11px; border-radius: 50%;
  background: var(--acc); box-shadow: 0 0 0 4px var(--sec-bg);
}
.tl .yr { position: absolute; top: -6px; left: 22px; font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.tl figure { margin: 0; }
.tl img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; filter: contrast(1.02); background: #ddd8cb; }
.tl figcaption { margin-top: .55rem; font-size: .84rem; line-height: 1.45; color: var(--fg-muted); }
.tl figcaption b { display: block; font-weight: 500; color: var(--fg); }
/* a row longer than the screen shows a soft edge on the right */
.tl::after { content: ""; position: absolute; top: 0; right: 0; bottom: 18px; width: 60px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--sec-bg)); }

/* one place gets a large photo and a small grid: the mosque being built */
.build { display: grid; gap: 14px; margin-top: 1.6rem; max-width: 980px; }
.build figure { position: relative; margin: 0; overflow: hidden; }
.build img { display: block; width: 100%; height: 100%; object-fit: cover; }
.build figcaption { position: absolute; inset: auto 0 0 0; padding: 40px 14px 10px; background: linear-gradient(transparent, rgba(12, 16, 14, .78)); color: var(--paper); font-size: .78rem; }
.build figcaption b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1; }
@media (min-width: 760px) {
  .build { grid-template-columns: 1.1fr 1fr 1fr; grid-template-rows: 230px 230px; }
  .build .big { grid-row: 1 / 3; }
}
@media (max-width: 759px) { .build { grid-template-columns: 1fr 1fr; } .build .big { grid-column: 1 / -1; } .build img { aspect-ratio: 4 / 3; } }

.ul-credit { margin-top: .6rem; font-size: .76rem; color: var(--fg-muted); }
.ul-credit a { color: var(--acc); }

/* links between the cinema of 1968 and its building in 1996 */
.zv-more { margin-top: .8rem !important; font-size: .85rem; }
.zv-more a, .tl figcaption a { color: var(--acc); }
.zv { scroll-margin-top: 120px; }

/* Local photographs keep their original proportions, including scans and collages. */
.town-print { margin: 0; min-width: 0; }
.town-print img { display: block; max-width: 100%; height: auto; }
.town-print figcaption { margin-top: .6rem; font-size: .82rem; line-height: 1.45; color: var(--fg-muted); }
.school-layout, .river-pair, .film-sequence { display: grid; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; }
.school-layout { max-width: 60rem; }
.school-layout figure { padding: clamp(10px, 1.5vw, 20px); background: #f8f5ed; box-shadow: 0 15px 38px -28px #22312c; }
.school-layout .quote { margin-top: 1.5rem; }
.memoir { max-width: 60rem; margin-top: 2rem; border-block: 1px solid var(--rule); }
.memoir summary { padding: 1rem .2rem; color: var(--acc); cursor: pointer; font-weight: 500; }
.memoir-body, .memoir-sign { max-width: 64ch; margin-inline: auto; }
.memoir .memoir-body p { margin: 0 0 1.2em; line-height: 1.7; }
.memoir-body p:first-child { font-family: var(--serif); font-size: 1.65rem; line-height: 1.15; }
.memoir-sign { padding-bottom: 2rem; font-style: italic; }
.bank-story { max-width: 65ch; }
.news-clipping { margin-top: 2.5rem; max-width: 50rem; }
.news-clipping img { border: 6px solid #f8f5ed; }
.news-clipping a { color: var(--acc); }
.news-clipping figcaption a { display: inline-flex; align-items: center; min-height: 44px; }
.film-sequence { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.film-sequence figure:first-child { grid-column: 1 / -1; }
.river-pair { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.bridge-lead { max-width: 56rem; margin: 1.4rem 0; }
.bridge-views { display: grid; grid-auto-flow: column; grid-auto-columns: min(76vw, 18rem); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-color: var(--acc) transparent; }
.bridge-views figure { scroll-snap-align: start; }
@media (min-width: 760px) {
  .school-layout { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); }
  .film-sequence { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .film-sequence figure:first-child { grid-column: 1; grid-row: span 2; align-self: center; }
  .bridge-views { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

#opcinska-liga table { width: 100%; max-width: 34rem; border-collapse: collapse; margin: 1.5rem 0; font-variant-numeric: tabular-nums; }
#opcinska-liga caption { text-align: left; font-weight: 600; margin-bottom: .6rem; }
#opcinska-liga th, #opcinska-liga td { text-align: left; padding: .4rem .3rem; border-bottom: 1px solid currentColor; }
#opcinska-liga tr > :last-child { text-align: right; }
