/* Melly News: "De Krant in kleur".
   One hand-written stylesheet, no build step. Fonts are self-hosted
   (static/fonts, open licence): Young Serif for headlines, Inter for text.

   Colour has a job:
     --yellow  Binnenkort (coming up)       Melly's yellow family
     --pink    Shout-out                    Melly's pink (#FEDAFE)
     --mint    Van de vloer (from the floor)
     --blue    small links and labels only  Melly's blue (#0000FF)
     --accent  acting: post, applaud        orange
   Every colour also has its label in words. */

@font-face { font-family: "Young Serif"; src: url("fonts/young-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --paper: #F6F3EE;
  --surface: #FFFFFF;
  --field: #FBF9F6;
  --ink: #161514;
  --muted: #5F5A54;
  --line: #E4DED6;
  --rule: #161514;
  --accent: #FF5A1F;
  --accent-soft: #FFE6DC;
  --yellow: #FFF7A8;
  --pink: #FEDAFE;
  --mint: #D3F0DF;
  --blue: #0000FF;
  --mat: #ECE7DF;
  --focus: #0000FF;
  --danger: #B42318;
  --logo-paper: #FFFFFF;
  --logo-flip: #FF5A1F;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141312;
    --surface: #1E1C1B;
    --field: #262321;
    --ink: #F3F0EC;
    --muted: #B3ACA4;
    --line: #34302D;
    --rule: #F3F0EC;
    --accent-soft: #3D2418;
    --yellow: #3A3514;
    --pink: #3A2238;
    --mint: #17342A;
    --blue: #9C9CFF;
    --mat: #2A2725;
    --focus: #FFF35C;
    --danger: #FF8A80;
    --logo-paper: #1E1C1B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--ink); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[lang="nl"] .headline, .headline { hyphens: auto; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1240px; }
main { padding-bottom: 4rem; }
main:focus { outline: none; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* ---------- Top bar (account) ---------- */
.site-header { margin-bottom: 4px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 12px; }
.brand { display: flex; color: var(--ink); text-decoration: none; }
.brand .logo { height: 26px; width: auto; display: block; }
.header-nav { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.header-me { display: flex; text-decoration: none; }
.lang-switch { margin: 0; }
.lang-switch button {
  font: inherit; font-size: .8rem; font-weight: 700; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; min-height: 32px; cursor: pointer;
}

/* ---------- Masthead ---------- */
.masthead { text-align: center; margin-bottom: 16px; }
.masthead-logo { display: inline-block; color: var(--ink); }
.masthead-logo .logo { width: min(290px, 80vw); height: auto; display: block; }
.masthead-line {
  margin-top: 8px; border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 5px 0;
  display: flex; justify-content: space-between; gap: 12px;
  font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.masthead-wide { display: none; }

/* ---------- Shared bits ---------- */
.section-label { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card h1, .page-title { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.15; margin: 0 0 .75rem; }

.field { margin: 0 0 14px; border: 0; padding: 0; }
.field > label, .field legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
input[type="email"], input[type="text"], input[type="date"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px;
}
input[type="email"]:focus, input[type="text"]:focus, input[type="date"]:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 44px; }
.hint { font-size: .85rem; color: var(--muted); margin: 4px 0 0; }
.error { color: var(--danger); font-size: .9rem; margin: 4px 0 0; font-weight: 600; }
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; margin: 4px 0; font-weight: 400; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.avatar-field { display: flex; gap: 14px; align-items: center; }
.avatar-field input[type="file"] { font-size: .9rem; max-width: 100%; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid transparent;
}
.button-primary { background: var(--accent); color: #000; font-weight: 800; }
.button-primary:hover { filter: brightness(.95); }
.button-quiet { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button-danger { background: var(--danger); color: #fff; }
.button-block { width: 100%; }
.button-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.signout { margin-top: 20px; text-align: center; }

.messages { margin-bottom: 14px; }
.message { background: var(--yellow); border-radius: 12px; padding: 10px 14px; margin: 0 0 8px; font-weight: 600; }

/* ---------- Front page layout ---------- */
.front { display: flex; flex-direction: column; gap: 14px; }
.front-side { display: flex; flex-direction: column; gap: 16px; }
.front-side > * { width: 100%; min-width: 0; }
.front-rule { border-top: 1px solid var(--rule); }

/* Composer: "Iets voor de krant?" */
.composer { background: var(--surface); border: 2px solid var(--ink); border-radius: 16px; padding: 14px; }
.composer-title { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; line-height: 1.15; }
.composer-prompt { margin: 2px 0 10px; font-size: .9rem; color: var(--muted); }
.composer-prompt b { color: var(--ink); }
.composer-form textarea { border-radius: 16px; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.composer-actions .button-primary { flex: 1; max-width: 220px; }
.photo-button { cursor: pointer; }
.photo-button:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.composer-previews { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 8px; }
.composer-previews img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--mat); }
.composer-previews .is-unpreviewable { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 10px; background: var(--mat); font-size: 1.6rem; }
.edit-photo { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.edit-photo img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; background: var(--mat); }
.edit-photo > div { flex: 1; min-width: 0; }
.composer-alt { margin-top: 10px; }
.js .composer-alt[hidden], .js .event-date[hidden] { display: none; }
.composer-more { margin-top: 6px; font-size: .9rem; }
.composer-more summary { cursor: pointer; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.composer-more[open] summary { margin-bottom: 10px; }
.kind-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-picker legend { width: 100%; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: inline-block; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .85rem; background: var(--surface); }
.chip-coming_up span { background: var(--yellow); border-color: transparent; }
.chip-shout_out span { background: var(--pink); border-color: transparent; }
.chip-floor span { background: var(--mint); border-color: transparent; }
.chip input:checked + span { outline: 2px solid var(--ink); outline-offset: 1px; font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Binnenkort in het gebouw */
.upcoming { background: var(--yellow); border-radius: 16px; padding: 14px 16px; }
.agenda-day { font-size: .75rem; font-weight: 800; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; margin: 14px 0 2px; }
.upcoming .agenda-day:first-of-type { margin-top: 8px; }
.agenda-list { list-style: none; margin: 0; padding: 0; }
.agenda-list li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.agenda-list li:last-child { border-bottom: 0; }
.agenda-time { width: 44px; flex: none; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 1px; }
.agenda-page .agenda-time { width: 92px; }
.agenda-what { font-size: .95rem; line-height: 1.35; min-width: 0; }
.agenda-what b { font-weight: 600; }
.agenda-what small { display: block; font-size: .82rem; color: color-mix(in srgb, var(--ink) 72%, transparent); }
.agenda-what a { text-decoration: none; }
.agenda-what a:hover { text-decoration: underline; }
.upcoming-more { margin: 8px 0 0; font-size: .85rem; font-weight: 700; }
.upcoming-more a { text-decoration: none; }
.upcoming-more a:hover { text-decoration: underline; }
.agenda-page .agenda-day { font-size: .8rem; margin-top: 22px; padding-bottom: 4px; border-bottom: 2px solid var(--ink); }

/* ---------- Posts ---------- */
/* Every post is a white card (as in design A), so it's clear what belongs
   to which post. Shout-outs keep their pink box. */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.post-top { display: flex; align-items: flex-start; gap: 8px; }
.post-kicker { flex: 1; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .78rem; min-height: 22px; }
.kind { display: inline-block; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.kind-floor { background: var(--mint); }
.kind-coming_up { background: var(--yellow); }
.kind-news { color: var(--blue); padding-left: 0; }
.kind-instagram { color: var(--blue); padding-left: 0; }
.post-instagram .photos { margin-top: 10px; }
.post-instagram .post-text { margin-top: 12px; }
.post-instagram .post-body { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.instagram-link { font-weight: 700; }
.kicker-date, .kicker-extra { color: var(--muted); }
.kicker-date::before, .kicker-extra::before { content: "· "; }
.post-kicker:has(.kind-news) .kicker-date::before, .post-kicker > .kicker-extra:first-child::before { content: ""; }

.headline { margin-top: 6px; font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.005em; overflow-wrap: break-word; }
.post-body { margin-top: 6px; overflow-wrap: anywhere; }
.post-body a, .byline a, .comment-body a { color: var(--blue); }
/* Photos: 1, 2 or 3 per post. Landscape photos fill their frame; portrait
   photos are shown whole on a mat (like a print in a passe-partout). */
.photos { display: grid; gap: 4px; margin-top: 12px; border-radius: 12px; overflow: hidden; }
.photo { display: block; position: relative; aspect-ratio: 3 / 2; background: var(--mat); overflow: hidden; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo.is-portrait { padding: 10px; }
.photo.is-portrait img { object-fit: contain; }
.photos-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.photos-2 .photo { aspect-ratio: 1 / 1; }
.photos-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.photos-3 .photo:first-child { grid-row: span 2; aspect-ratio: auto; }
.photos-3 .photo:first-child img { position: absolute; inset: 0; }
.photos-3 .photo:first-child.is-portrait img { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.photos-3 .photo:not(:first-child) { aspect-ratio: 4 / 3; }
.byline { margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.byline b { color: var(--ink); }
.byline a { color: var(--muted); text-decoration: none; }
.byline a:hover { text-decoration: underline; }

.post-lead { padding: 18px; }
.post-lead .headline { font-size: 1.65rem; line-height: 1.2; }
.post-lead .post-body { font-size: 1.05rem; }

/* Shout-out: a pink box */
.post-shout_out { background: var(--pink); border-color: transparent; padding: 18px; text-align: center; }
.post-shout_out .post-kicker { justify-content: center; }
.post-shout_out .headline { font-size: 1.5rem; line-height: 1.15; }
.post-shout_out .reaction-row { justify-content: center; }
.post-shout_out .comments, .post-shout_out .reacted-by { text-align: left; }

.post-menu { position: relative; }
.post-menu summary { list-style: none; cursor: pointer; padding: 0 6px; font-size: 1.3rem; line-height: 1; min-height: 32px; min-width: 32px; text-align: center; color: var(--muted); }
.post-menu summary::-webkit-details-marker { display: none; }
.post-menu-items { position: absolute; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 0; z-index: 5; min-width: 140px; box-shadow: 0 6px 20px rgb(0 0 0 / .12); }
.post-menu-items a, .post-menu-items button { display: block; width: 100%; padding: 8px 14px; text-decoration: none; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.post-menu-items form { margin: 0; }
.post-menu-items a:hover, .post-menu-items a:focus, .post-menu-items button:hover, .post-menu-items button:focus { background: var(--paper); }
.kicker-pinned { font-weight: 700; }
.badge-new { display: inline-block; font-weight: 800; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--paper); }

/* Applause: the main action, with the faces of who clapped */
.reactions { margin-top: 12px; }
.reaction-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.applause {
  font: inherit; font-weight: 800; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
}
.applause:hover { border-color: var(--accent); }
.applause.is-mine { border-color: var(--accent); background: var(--accent-soft); }
.applause-label { font-weight: 700; }
.applause-faces { display: inline-flex; }
.applause-faces .avatar + .avatar { margin-left: -8px; }
.applause-faces .avatar { border: 2px solid var(--surface); }
.post-shout_out .applause-faces .avatar { border-color: var(--pink); }
.applause-who { font-size: .82rem; color: var(--muted); }
.reaction-others { display: inline-flex; gap: 2px; }
.reaction {
  font: inherit; display: inline-flex; align-items: center; gap: 3px;
  min-height: 34px; min-width: 40px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; font-size: .95rem;
}
.reaction:hover { border-color: var(--line); background: var(--surface); }
.reaction:not(.has-count) span[aria-hidden] { filter: grayscale(.5); opacity: .6; }
.reaction:hover span[aria-hidden] { filter: none; opacity: 1; }
.reaction.is-mine { border-color: var(--accent); background: var(--accent-soft); }
.reaction-count { font-weight: 700; font-size: .8rem; }
.applause.pop span[aria-hidden], .reaction.pop span[aria-hidden] { display: inline-block; animation: pop .35s ease-out; }
@keyframes pop { 50% { transform: scale(1.45); } }
@media (prefers-reduced-motion: reduce) { .pop span[aria-hidden] { animation: none !important; } }
.reacted-by { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.reacted-by summary { cursor: pointer; }
.reacted-by ul { margin: 6px 0 0; padding-left: 0; list-style: none; }

/* Comments: deliberately quiet */
.comments { margin-top: 6px; font-size: .9rem; }
.comments > summary { cursor: pointer; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.comment-list { list-style: none; padding: 0; margin: 6px 0 8px; }
.comment { padding: 6px 0; border-top: 1px solid var(--line); }
.comment-author { font-weight: 700; margin-right: 4px; }
.comment-time { font-size: .8rem; margin-left: 4px; }
.inline-form { display: inline; margin-left: 6px; font-size: .8rem; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.comment-form textarea { font-size: .95rem; padding: 8px 12px; }

/* Automatic translation note */
.translated { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.translated summary { cursor: pointer; list-style: none; }
.translated summary::-webkit-details-marker { display: none; }
.translated-show { text-decoration: underline; }
.translated[open] .translated-show { display: none; }
.translated .original { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--line); color: var(--ink); font-size: .95rem; text-align: left; }

/* Avatars */
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover;
  background: hsl(var(--hue, 20) 70% 85%); color: #1c1a18; font-weight: 800; letter-spacing: .02em; }
.avatar-xs { width: 26px; height: 26px; font-size: .6rem; }
.avatar-sm { width: 32px; height: 32px; font-size: .72rem; }
.avatar-md { width: 40px; height: 40px; font-size: .85rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar-anon { background: var(--line); color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 2rem 0; }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.quote { margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--line); }
.credits { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); text-align: center; }
.credits strong { color: var(--ink); }

/* ---------- Phone: colleagues' news first ----------
   The composer lives on /new/, reached with the fixed "+ Plaatsen" button;
   the week's agenda shrinks to a "today" strip. Tablet and up: as before. */
.front-side { display: none; }
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20;
  display: inline-flex; align-items: center; gap: 6px; padding: 13px 20px; border-radius: 999px;
  background: var(--accent); color: #161514; font-weight: 800; text-decoration: none;
  box-shadow: 0 6px 18px rgb(0 0 0 / .22);
}
.fab span { font-size: 1.3rem; line-height: 1; }
.fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
body:has(.fab) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.compose-page { max-width: 640px; margin: 0 auto; }
.draft-note { margin: 6px 0 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--blue); text-decoration: underline; cursor: pointer; }
.compose-page .composer textarea { min-height: 9em; }

.today-strip { background: var(--yellow); border-radius: 14px; padding: 10px 14px; margin: 0 0 14px; }
/* One column: the same 14px between every block, no newspaper rule. */
.front-rule { display: none; }
.today-strip h2 { margin: 0 0 4px; }
.today-strip ul { list-style: none; margin: 0; padding: 0; }
.today-strip li { display: flex; gap: 10px; font-size: .92rem; line-height: 1.35; padding: 2px 0; min-width: 0; }
.today-strip .agenda-time { width: 40px; font-size: .85rem; }
.today-strip .today-what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-strip a { text-decoration: none; }
.today-strip .today-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; font-size: .85rem; font-weight: 700; }
.today-strip .today-foot a:hover { text-decoration: underline; }

/* ---------- Tablet and up: the front page ---------- */
@media (min-width: 760px) {
  .fab, .today-strip { display: none; }
  .front-rule { display: block; }
  body:has(.fab) { padding-bottom: 0; }
  .masthead-logo .logo { width: 460px; }
  .masthead-wide { display: inline; }
  .masthead-line { font-size: .75rem; padding: 7px 0; }
  .front { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; row-gap: 20px; align-items: start; }
  .front-side { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .front-rule { grid-column: 1 / -1; border-top: 3px solid var(--rule); padding-top: 3px; border-bottom: 1px solid var(--rule); margin: 4px 0 0; }
  .post-lead { grid-column: 1 / -1; }
  .post-lead .headline { font-size: 2.4rem; line-height: 1.1; }
  .post-lead { padding: 24px; }
  .post-shout_out:not(.post-lead) .headline { font-size: 1.45rem; line-height: 1.15; }
  .pager { grid-column: 1 / -1; }
}

/* ---------- Desktop: lead story with the composer beside it, 3 columns below ---------- */
@media (min-width: 1080px) {
  .masthead-logo .logo { width: 560px; }
  .front { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
  .front-side { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
  .post-lead { grid-column: 1 / span 2; grid-row: 1; }
  .post-lead { padding: 28px 32px; }
  .post-lead .headline { font-size: 3.2rem; line-height: 1.08; letter-spacing: -.01em; }
  .post-lead .post-body { font-size: 1.15rem; max-width: 62ch; }

  .front-rule { grid-row: 2; }
}

/* 404 / 500 */
.error-page { margin-top: 24px; }
.error-page .section-label { color: var(--muted); margin: 0 0 6px; }
.error-page p { margin: 0 0 12px; }

/* Composer: kind of post and anonymous are always visible */
.composer-kind { margin: 12px 0 8px; }
.composer-kind legend { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.composer-anon { margin: 4px 0 0; }
.composer-anon .hint { margin-left: 28px; font-size: .8rem; }
.composer .event-date { margin: 4px 0 8px; }

/* ---------- The posts below the lead: columns that close up ----------
   Without JavaScript: a plain grid. With it (app.js, data-masonry), each
   post spans as many 4px rows as it is tall, so the next post in a column
   sits right under it while the order stays left-to-right, newest first. */
.post-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
@media (min-width: 760px) {
  .post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 20px; align-items: start; margin-top: 20px; }
  .post-grid.is-masonry { grid-auto-rows: 4px; row-gap: 0; }
  .post-grid.is-masonry > * { align-self: start; }
}
@media (min-width: 1080px) {
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
}

/* Footer, privacy page */
.site-footer { border-top: 1px solid var(--line); margin-top: 8px; padding: 18px 0 28px; font-size: .82rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.site-footer a { color: var(--muted); }
/* "Kunstinstituut Melly" in Melly's own letter, in blue, as on kunstinstituutmelly.nl */
.melly-mark { display: block; width: min(100% - 112px, 380px); margin: 6px auto 14px; color: var(--blue) !important; }
.melly-mark-svg { display: block; width: 100%; height: auto; }
.melly-mark:hover, .melly-mark:focus-visible { opacity: .8; }
.prose { max-width: 720px; margin: 0 auto; padding: 24px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; margin: 26px 0 8px; }
.prose p, .prose li { line-height: 1.6; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 1.1rem; }
.prose a { color: var(--blue); }
.photo-rule { margin: 8px 0 0; }
.photo-rule a, .login-privacy a { color: var(--blue); }
.login-privacy { margin-top: 14px; text-align: center; }

/* Photo viewer (app.js): the photo large over the page, a cross to close */
.lightbox-open { overflow: hidden; }
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgb(14 13 12 / .97); display: none; align-items: center; justify-content: center; }
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: rgb(14 13 12 / .97); }
.lightbox-figure { margin: 0; max-width: min(1200px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.lightbox-figure img { display: block; max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; border-radius: 6px; pointer-events: auto; }
.lightbox-figure figcaption { color: #F3F0EC; font-size: .9rem; text-align: center; max-width: 60ch; }
.lightbox-figure figcaption:empty { display: none; }
.lightbox-close, .lightbox-nav {
  position: fixed; border: 0; cursor: pointer; color: #161514; background: #FFFFFF;
  width: 48px; height: 48px; border-radius: 50%; font: 400 30px/1 var(--sans);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgb(0 0 0 / .3);
}
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-nav[hidden] { display: none; }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: 3px solid #FFF35C; outline-offset: 3px; }
