/* BBC'77 kranten: an old-newspaper sheet on the site's navy page. Used by /krant/ (public/krant.js).
   Fonts are self-hosted (SIL Open Font License): Playfair Display, EB Garamond, UnifrakturMaguntia. */
@font-face { font-family: "Krant Display"; src: url("/fonts/playfair-display.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Krant Serif"; src: url("/fonts/eb-garamond.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Krant Serif"; src: url("/fonts/eb-garamond-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Krant Fraktur"; src: url("/fonts/unifraktur-maguntia.woff2") format("woff2"); font-display: swap; }

.krant-wrap {
  --k-paper: #E2E0DB;
  --k-paper-2: #D8D5CF;
  --k-ink: #2E2E2E;
  --k-ink-soft: #4A4845;
  --k-bar: #3A3A3A;
  --k-rule: #3A3A3A;
  --k-display: "Krant Display", "Playfair Display", Didot, "Bodoni 72", Georgia, serif;
  --k-serif: "Krant Serif", "EB Garamond", Garamond, Georgia, serif;
  --k-fraktur: "Krant Fraktur", "UnifrakturMaguntia", "Old English Text MT", serif;
  max-width: 1000px; margin: 0 auto; padding: 0 0 64px;
}

/* ---------- overview of all papers */
.krant-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; margin-top: 28px; }
.krant-card { display: block; text-decoration: none; color: var(--k-ink); background: var(--k-paper); padding: 18px 18px 20px;
  box-shadow: var(--shadow-photo, 0 10px 30px rgba(0,0,0,.35)); transition: transform .25s ease, box-shadow .25s ease; }
.krant-card:hover, .krant-card:focus-visible { transform: translateY(-4px) rotate(-.6deg); box-shadow: var(--shadow-photo-lg, 0 20px 48px rgba(0,0,0,.42)); }
.krant-card .kc-ed { font-family: var(--k-fraktur); font-size: 22px; text-align: center; border-bottom: 3px double var(--k-rule); padding-bottom: 6px; }
.krant-card .kc-title { font-family: var(--k-display); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; text-align: center; font-size: 20px; line-height: 1.05; margin: 10px 0; }
.krant-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 2px solid var(--k-ink); filter: sepia(.15); }
.krant-card .kc-meta { font-family: var(--k-serif); font-style: italic; color: var(--k-ink-soft); margin-top: 10px; font-size: 16px; }

/* ---------- toolbar above the sheet */
.krant-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 18px 0 16px; }
.krant-bar .kb-nav { display: flex; align-items: center; gap: 8px; }
.krant-bar button, .krant-bar a.kb-btn {
  font: 600 15px/1 var(--font-body, system-ui); color: var(--ink, #E4EEF8); background: var(--surface, #12233A);
  border: 1px solid var(--line, #26405E); border-radius: var(--radius-sm, 8px); min-height: 44px; min-width: 44px; padding: 0 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.krant-bar button:hover:not([disabled]) { border-color: var(--blue, #6FA3E8); }
.krant-bar button[disabled] { opacity: .35; cursor: default; }
.krant-bar .kb-count { color: var(--muted, #93ACC6); min-width: 120px; text-align: center; font-variant-numeric: tabular-nums; }
.krant-preview { background: #5c4a14; color: #ffe9a8; padding: 10px 14px; border-radius: var(--radius-sm, 8px); margin-top: 16px; }

/* ---------- the sheet */
.krant-stage { perspective: 2200px; }
.krant-sheet {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(120,100,70,.10), transparent 70%),
    var(--k-paper);
  color: var(--k-ink); padding: clamp(18px, 4vw, 48px) clamp(14px, 4.4vw, 50px) clamp(22px, 4vw, 46px);
  box-shadow: 0 30px 70px rgba(0,0,0,.45), 0 2px 0 rgba(255,255,255,.06) inset;
  font-family: var(--k-serif); transform-origin: left center; backface-visibility: hidden;
}
.krant-page[hidden] { display: none; }
.krant-sheet.turn-out-next { animation: k-out-next .32s ease-in forwards; }
.krant-sheet.turn-in-next { animation: k-in-next .38s ease-out; }
.krant-sheet.turn-out-prev { animation: k-out-prev .32s ease-in forwards; transform-origin: right center; }
.krant-sheet.turn-in-prev { animation: k-in-prev .38s ease-out; transform-origin: right center; }
@keyframes k-out-next { to { transform: rotateY(-70deg); opacity: .2; } }
@keyframes k-in-next { from { transform: rotateY(55deg); opacity: .2; transform-origin: right center; } to { transform: none; opacity: 1; } }
@keyframes k-out-prev { to { transform: rotateY(70deg); opacity: .2; } }
@keyframes k-in-prev { from { transform: rotateY(-55deg); opacity: .2; transform-origin: left center; } to { transform: none; opacity: 1; } }

/* masthead */
.k-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.k-top::before, .k-top::after { content: ""; border-top: 3px solid var(--k-rule); }
.k-kicker { font-family: var(--k-display); font-weight: 700; font-size: clamp(14px, 2vw, 22px); letter-spacing: .04em; }
.k-ed-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 6px 0 14px; }
.k-year { font-family: var(--k-serif); font-style: italic; font-weight: 600; font-size: clamp(20px, 3.4vw, 38px); }
.k-year.r { text-align: right; }
.k-edition { font-family: var(--k-fraktur); font-size: clamp(28px, 5.4vw, 58px); line-height: 1; display: flex; align-items: center; gap: .4em; text-align: center; }
.k-edition::before, .k-edition::after { content: "✻"; font-family: var(--k-serif); font-size: .5em; }
.k-rules { border-top: 7px solid var(--k-rule); border-bottom: 2px solid var(--k-rule); height: 12px; }
.k-title { font-family: var(--k-display); font-weight: 900; text-transform: uppercase; text-align: center; letter-spacing: .1em;
  font-size: clamp(30px, 7.6vw, 80px); line-height: .98; margin: .32em 0 .3em; text-wrap: balance; }
.k-running { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-style: italic; font-size: 18px; border-bottom: 3px double var(--k-rule); padding-bottom: 8px; margin-bottom: 26px; }
.k-running b { font-family: var(--k-display); font-style: normal; text-transform: uppercase; letter-spacing: .08em; font-size: 16px; }
.k-masthead { margin-bottom: 30px; }

/* page grid: wide main column + side column, then a bottom row */
.k-grid { display: grid; grid-template-columns: minmax(0, 2.35fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.k-col { display: grid; gap: 0; min-width: 0; }
.k-col.zij { gap: 0; }
.k-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 26px; margin-top: 30px; align-items: stretch; }
.k-bottom .k-block { height: 100%; }
.k-block { border: 2px solid var(--k-bar); background: rgba(255,255,255,.12); position: relative; min-width: 0; }
.k-col > .k-block + .k-block { margin-top: 26px; }
.k-col.zij > .k-block + .k-block { margin-top: 0; border-top: 0; }
.k-pad { padding: 18px 20px; }
.k-text { font-style: italic; font-size: 18px; line-height: 1.42; color: var(--k-ink-soft); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.k-text p { margin: 0 0 .7em; }
.k-text p:last-child { margin-bottom: 0; }

/* clamp long texts; "Lees verder" opens the reader */
.k-clamp { max-height: 300px; overflow: hidden; position: relative; }
.k-clamp::after { content: ""; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(transparent, var(--k-paper)); pointer-events: none; }
.k-more { display: inline-block; margin-top: 10px; font: italic 600 17px/1.2 var(--k-serif); color: var(--k-ink); background: none; border: 0; border-bottom: 2px solid var(--k-ink); padding: 4px 0; cursor: pointer; min-height: 32px; }
.k-more:hover { border-bottom-style: double; }

/* dark heading bar (kader, lijst) */
.k-barhead { background: var(--k-bar); color: #F4F1EA; font-family: var(--k-serif); font-style: italic; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.1; text-align: center; padding: 22px 16px; margin: 0; text-wrap: balance; }

/* kop (lead) */
.k-kop .k-headline { font-family: var(--k-display); font-weight: 900; font-size: clamp(26px, 3.8vw, 42px); line-height: 1.08; text-align: center; padding: 22px 20px; margin: 0; border-bottom: 2px solid var(--k-bar); text-wrap: balance; }
.k-kop figure, .k-foto figure, .k-artikel figure, .k-citaat figure { margin: 0; }
.k-photo { display: block; width: 100%; height: auto; cursor: zoom-in; background: var(--k-paper-2); }
.k-bw .k-photo { filter: grayscale(1) contrast(1.05); }
.k-kop figcaption, .k-foto figcaption, .k-artikel figcaption { font-style: italic; font-size: 15px; color: var(--k-ink-soft); padding: 8px 14px; border-top: 1px solid rgba(0,0,0,.25); }
.k-kop-body { padding: 16px 20px 20px; border-top: 2px solid var(--k-bar); }
.k-kop-body .k-text { font-size: 19px; }
.k-foto { background: transparent; }
.k-foto .k-photo { aspect-ratio: auto; }
.k-placeholder { display: grid; place-items: center; aspect-ratio: 4 / 3; background: repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 10px, transparent 10px 20px); color: var(--k-ink-soft); font-style: italic; }

/* artikel with drop cap */
.k-artikel h3 { font-family: var(--k-display); font-weight: 900; font-size: 24px; line-height: 1.12; margin: 0 0 12px; text-wrap: balance; }
.k-drop { float: left; font-family: var(--k-fraktur); font-style: normal; font-size: 64px; line-height: 1; color: #F4F1EA; background: var(--k-bar);
  width: 1.25em; height: 1.25em; display: grid; place-items: center; margin: 4px 14px 4px 0; padding-top: .06em; }

/* lijst */
.k-items { list-style: none; margin: 0; padding: 18px 20px; display: grid; gap: 14px; }
.k-items b { display: block; font-style: italic; font-weight: 700; font-size: 19px; color: var(--k-ink); }
.k-items span { font-style: italic; font-size: 17px; color: var(--k-ink-soft); line-height: 1.35; }

/* feiten */
.k-feiten h3 { font-family: var(--k-display); font-size: 20px; margin: 0 0 10px; }
.k-feiten ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.k-feiten li { font-style: italic; font-size: 18px; color: var(--k-ink-soft); }

/* citaat */
.k-citaat blockquote { margin: 0; padding: 50px 24px 18px; font-style: italic; font-size: 22px; line-height: 1.35; color: var(--k-ink); position: relative; }
.k-citaat blockquote::before { content: "“"; font-family: var(--k-display); font-size: 90px; line-height: .6; position: absolute; left: 18px; top: 44px; opacity: .3; }
.k-citaat cite { display: block; padding: 0 24px 20px; font-size: 16px; font-style: normal; letter-spacing: .04em; text-transform: uppercase; color: var(--k-ink-soft); }
.k-citaat cite::before { content: "— "; }

.k-empty { text-align: center; font-style: italic; color: var(--k-ink-soft); padding: 60px 0; }
.k-foot { margin-top: 30px; border-top: 3px double var(--k-rule); padding-top: 10px; display: flex; justify-content: space-between; font-style: italic; color: var(--k-ink-soft); }

/* ---------- reader and photo overlays */
.k-overlay { position: fixed; inset: 0; z-index: 60; background: var(--scrim, rgba(5,12,22,.86)); display: none; align-items: center; justify-content: center; padding: 20px; }
.k-overlay.open { display: flex; }
.k-reader { background: var(--k-paper); color: var(--k-ink); max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; padding: clamp(22px, 5vw, 48px); position: relative; font-family: var(--k-serif); box-shadow: var(--shadow-modal); }
.k-reader h2 { font-family: var(--k-display); font-weight: 900; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; margin: 0 0 18px; padding-right: 40px; }
.k-reader .k-text { font-size: 20px; }
.k-reader img { width: 100%; height: auto; margin-bottom: 18px; display: block; }
.k-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: var(--k-bar); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.k-lb figure { margin: 0; max-width: min(1200px, 100%); }
.k-lb img { max-width: 100%; max-height: 82vh; display: block; margin: 0 auto; box-shadow: var(--shadow-modal); }
.k-lb figcaption { color: #E4EEF8; text-align: center; margin-top: 12px; font-family: var(--k-serif); font-style: italic; font-size: 18px; }
.k-lb .k-close { position: fixed; }

/* ---------- small screens: one column, smaller masthead */
@media (max-width: 760px) {
  .k-grid { grid-template-columns: 1fr; gap: 22px; }
  .k-bottom { grid-template-columns: 1fr; gap: 22px; margin-top: 22px; }
  .k-ed-row { grid-template-columns: auto 1fr auto; }
  .k-edition::before, .k-edition::after { display: none; }
  .k-edition { justify-content: center; }
  .k-title { letter-spacing: .05em; }
  .k-text { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .krant-sheet[class*="turn-"] { animation: none !important; } .krant-card { transition: none; } }

/* ---------- print: every page on its own sheet of paper */
@media print {
  body { background: #fff !important; }
  header.site, .krant-bar, .krant-preview, .k-more, .k-overlay, footer { display: none !important; }
  .krant-wrap { padding: 0; max-width: none; }
  .krant-sheet { box-shadow: none; animation: none !important; }
  .krant-page[hidden] { display: block !important; }
  .krant-page + .krant-page { break-before: page; }
  .k-clamp { max-height: none; } .k-clamp::after { display: none; }
}
