/* ICT Netwerk Nijmegen, mobile first, light and dark.

   A warm neutral page on a dot grid, small spaced-out capitals as section
   labels, and monospace for the small details (dates, numbers, buttons).
   The bold parts: the headings, in Big Shoulders Display (condensed, art
   deco), and square cards and buttons with a thick border and a hard
   shadow; the page's main card, such as the next MeetINN, is red.

   INN's red is for blocks; text in red uses a darker shade (a lighter one
   in dark mode), and text on red is ink, so both stay readable. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("fonts/BigShouldersDisplay.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --border: #e4e0d9;
  --text: #1c1917;
  --muted: #5c5650;
  --red: #f94744;      /* blocks */
  --red-text: #b3261e; /* text and links */
  --button: #c42b25;   /* with white text */
  --green: #166534;
  --green-bg: #d7f0dc;  /* a published status; green text on it */
  --yellow-bg: #fff1c2; /* a draft */
  --yellow: #6b4e00;
  --ink: #161414;      /* text on red, in both modes */
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --dot: #ddd8cf;       /* the dot grid behind the page */
  --edge: #1c1917;      /* the border and hard shadow of cards, buttons and fields: black, grey in dark mode */
}

/* Dark mode, when a visitor turns it on with the switch in the footer (the
   server then writes data-theme="dark"); light for everyone else. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191716;
  --surface: #232120;
  --border: #3a3633;
  --text: #f3f1ee;
  --muted: #b0a9a2;
  --red-text: #ff8a80;
  --green: #6fcf8f;
  --green-bg: #1e3a27;
  --yellow-bg: #3b3112;
  --yellow: #f2d272;
  --dot: #302c29;       /* as visible on the dark page as the light dots on the light one */
  --edge: #756d66;       /* 3:1 on the cards, so a field's border shows */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 1.0625rem/1.6 var(--body);
  overflow-wrap: break-word; /* a long address or word wraps rather than widening a phone's page */
  color: var(--text);
  /* Dots every 24px, on the content's left edge (24px in on a phone; see
     the wider screens for a centred column) and on the rows of 24px. */
  background: var(--bg) radial-gradient(var(--dot) 1px, transparent 1.5px) -12px -12px / 24px 24px;
  /* The footer at the bottom of the window, also on a short page. */
  display: flex; flex-direction: column; min-height: 100vh;
}

a { color: var(--red-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 2px; }
.featured :focus-visible { outline-color: var(--ink); } /* red on red would hardly show */
/* A message that takes the focus when the page opens, so a screen reader
   reads it, isn't something to act on: no ring. */
[tabindex="-1"]:focus { outline: none; }

/* Read by screen readers, not shown. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); border: 2px solid var(--edge); padding: 0.5rem 1rem; z-index: 3; }

/* The frame: header, main, footer */

/* One column for all three, so the logo, the headings and the cards share
   one left edge, on a dot of the grid: 1.5rem (24px) in. */
.bar, main, footer.site .inner { max-width: 48rem; margin: 0 auto; padding-inline: 1.5rem; }

/* The header, in the home page's style: the name in Big Shoulders, the
   links in the section labels' small capitals (the current page in red,
   on a red line), and the buttons like the red card's button. */
header.site { position: relative; background: var(--bg); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 0.75rem; min-height: calc(4.5rem - 1px); } /* 72px with the border */
/* INN's six tiles, and the name beside them in two lines, each as tall as
   a row of tiles: the capitals are 0.8em and the rows 1.25 tiles apart, so
   with a line height of 1em the capitals meet the tiles' top and bottom
   edges (once moved up by the space the font keeps above them). */
.brand { display: flex; align-items: flex-start; gap: 0.4em; margin-right: auto; font-size: clamp(1.125rem, 5.6vw, 1.375rem); color: var(--text); text-decoration: none; }
.brand img { display: block; height: 1.8em; width: auto; }
.brand > span { font: 650 1em/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin-top: -0.0855em; }
.brand > span span { display: block; white-space: nowrap; }
header.site nav a, footer.site .links a {
  display: block; padding: 0.5rem 0.375rem; border-bottom: 3px solid transparent; color: var(--text); text-decoration: none;
  font: 600 0.75rem/1.4 var(--body); text-transform: uppercase; letter-spacing: 0.08em;
}
header.site nav a:hover, footer.site .links a:hover { border-bottom-color: var(--border); }
:is(header.site nav, footer.site .links) a[aria-current="page"] { color: var(--red-text); border-bottom-color: var(--red); }
/* The language and Menu buttons (and the footer's places to follow INN),
   like the red card's button; the links the Menu opens in a card like the
   white event card, under the bar. */
.bar .lang, .menu summary, footer.site .social a {
  padding: 0.625rem; white-space: nowrap; color: var(--text); text-decoration: none;
  background: var(--surface); border: 2px solid var(--edge); box-shadow: 3px 3px 0 var(--edge);
  font: 700 0.75rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
}
.bar .lang:hover, footer.site .social a:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.bar .lang:active, footer.site .social a:active { transform: translate(3px, 3px); box-shadow: none; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
/* The triangle is decoration: screen readers skip it (the alternative text ""). */
.menu summary::after { content: " ▾"; content: " ▾" / ""; }
.menu[open] summary { transform: translate(3px, 3px); box-shadow: none; }
.menu[open] summary::after { content: " ▴"; content: " ▴" / ""; }
.menu nav {
  position: absolute; inset: calc(100% + 0.75rem) 1.5rem auto 1.5rem; z-index: 2; padding: 0.25rem 1rem;
  background: var(--surface); border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--edge);
}
/* header.site, to win from the bar's link rules above. */
header.site .menu nav a { padding: 0.875rem 0; border-bottom: 1px solid var(--border); }
header.site .menu nav a:last-child { border-bottom: 0; }
header.site .menu nav a[aria-current="page"] { border-bottom-color: var(--border); }
nav.wide { display: none; }

main { flex: 1 0 auto; width: 100%; padding-block: 3rem 4.5rem; }

/* The footer: the name in Big Shoulders and the buttons to follow INN; on
   the right the links under each other (for an organiser, logging out
   last), in the menu's small capitals, the last level with the buttons to
   follow INN. On a phone one under the other. */
footer.site { background: var(--bg); border-top: 1px solid var(--border); }
footer.site .inner { display: grid; gap: 1.5rem 3rem; padding-block: 3rem; }
footer.site .name { margin: 0; font: 650 1.75rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
/* Following INN, under the name: a line why, and the places as buttons, like the language button. */
footer.site .follow { margin: 1rem 0 0; font-size: 0.9375rem; }
footer.site .social { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.75rem 0 0; }
/* Closer together than in the bar; the text on the column's edge. */
footer.site .links { display: flex; flex-wrap: wrap; column-gap: 0.25rem; margin: -0.25rem -0.375rem; } /* on a phone, in a row */
footer.site .links a { padding-block: 0.25rem; }
/* The current page in red, without the red line: the text marks it enough. */
footer.site .links a[aria-current="page"] { border-bottom-color: transparent; }

/* Type */

h1, h2, h3 { margin: 0; }
h1 { font: 800 2.75rem/0.95 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 1rem; }
/* A section's heading: small spaced-out capitals in red, with a hairline. */
h2 {
  display: flex; align-items: center; gap: 0.75rem; margin: 3rem 0 1.5rem;
  font: 600 0.75rem/1.4 var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--red-text);
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
h3 { font: 600 1.125rem/1.3 var(--body); }

/* The kicker: a small monospace line above a title, such as MeetINN #26. */
.number, .kicker, .cards h3::before {
  display: block; font: 600 0.75rem/1.5 var(--mono); text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--red-text); margin: 0 0 0.375rem;
}
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.875rem; margin: -0.5rem 0 1rem; }
.meta { font: 0.8125rem/1.5 var(--mono); }
/* Labels: a fact's, a field's, a column's, in small monospace capitals. */
.facts dt, .form label, legend, .crumbs, .admin-events th, .door-search label, .cancelled-fold summary { font: 600 0.75rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }

.prose { max-width: 38rem; }
/* A heading in text, and a dialog's, in Big Shoulders; with no hairline, as an event's title. */
.prose h2, dialog.confirm h2 { display: block; font: 800 1.75rem/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--text); }
:is(.prose, dialog.confirm, .event) :is(h2, h3)::after { content: none; }
.prose h2 { margin: 3rem 0 1.5rem; }
/* A short red bar above a heading in text. */
.prose h2::before { content: ""; display: block; width: 2.5rem; height: 6px; background: var(--red); margin-bottom: 0.75rem; }
.prose img { max-width: 100%; height: auto; }
/* A photo, dithered grey (internal/dither), on red: multiplied, its light
   shades let the red through and its dark ones stay ink. In text, a
   paragraph with only an image is one. */
.photo, .prose p:has(> img:only-child) { background: var(--red); }
:where(.photo, .prose p:has(> img:only-child)) img { display: block; mix-blend-mode: multiply; }
.photo { width: fit-content; max-width: 100%; margin: 0 0 1.5rem; }
/* A photo fading into its card: the mask from the edge in, eased so there's no line where it starts or ends. linear-gradient(to <the edge>, var(--fade)). */
.photo { --fade: transparent, rgb(0 0 0 / 0.05) 8%, rgb(0 0 0 / 0.2) 17%, rgb(0 0 0 / 0.45) 27%, rgb(0 0 0 / 0.7) 37%, rgb(0 0 0 / 0.9) 47%, #000 55%; }
.photo img { max-width: 100%; height: auto; }
/* On the home page's cards: as wide as the card, cut to one shape, as the photos come in any. */
.event .photo, .cards .photo { width: auto; margin: 0 0 1.25rem; }
/* In a card, it fills the top up to the border: the padding is for the text. */
.event .photo, .cards .photo { max-width: none; margin: -1.5rem -1.5rem 1.25rem; }
.cards .photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
/* The home page's cards show their photos grey, as dithered: no red behind them. */
.cards .photo { background: none; }
.cards .photo img { mix-blend-mode: normal; }
/* Their bottom fading into the card, into the text, as the red card's on a phone. */
.cards .photo { margin-bottom: 0; mask-image: linear-gradient(to top, var(--fade)); }
.event .photo img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.image-form .photo img { max-width: 20rem; }
/* People on a page (the organisers): the photo a card, square, the name and text outside it; no number. */
.cards.people li { background: none; border: 0; box-shadow: none; padding: 0; }
.cards.people h3::before { content: none; }
.cards.people .photo img { aspect-ratio: 1; }
.cards.people .photo { margin: 0 0 1.25rem; border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--edge); mask-image: none; } /* a hard edge, not the home cards' fade */
.people p + p { margin-top: 0.75rem; }
/* The page's bottom padding alone sets the space above the footer. */
main > :last-child, .prose > :last-child { margin-bottom: 0; }

/* A page's opening: a kicker, the title, a line to go with it. */
.intro { margin-bottom: 3rem; }
.intro h1 { margin-bottom: 0.75rem; }
.intro .lede { font-size: 1.125rem; color: var(--muted); margin: 0; max-width: 32rem; }
/* A block cursor after the home page's title, blinking unless motion is reduced. */
.cursor { display: inline-block; width: 0.45em; height: 0.8em; margin-left: 0.08em; background: var(--red); vertical-align: -0.02em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* Messages, boxed alike: red for errors and warnings (notice), neutral for
   information (info), green for what worked (saved). */
.notice, .info, .saved { background: var(--surface); border: 2px solid var(--edge); border-left-width: 6px; padding: 0.75rem 1rem; font-weight: 600; }
.notice { border-left-color: var(--red); }
.saved { border-left-color: var(--green); }

/* A card: square, with a thick border and a hard shadow (soft grey in dark
   mode). The page's main card is on red, with ink text in both modes.
   :where, so any rule for a kind of card, .featured too, wins from this one. */
:where(.card, .event, .cards li, .stats li) {
  background: var(--surface); border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--edge);
  padding: 1.5rem; margin: 0 0 1.5rem;
}
.card > :last-child { margin-bottom: 0; }
.featured { background: var(--red); color: var(--ink); }
.featured a:not(.button) { color: var(--ink); }
/* The next event's photo on a phone: on top, its bottom fading into the red, into the text. */
.featured > .photo { margin-bottom: 0; mask-image: linear-gradient(to top, var(--fade)); }

/* An event in a list. */
.event :is(h2, h3) { display: block; margin: 0 0 0.375rem; font: 800 1.625rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--text); }
.event :is(h2, h3) a { color: inherit; text-decoration: none; }
.event :is(h2, h3) a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.event p { margin: 0.125rem 0 0; }
.event .where { color: var(--muted); }
.event .go { margin-top: 1rem; }
/* Struck through as heavy as the letters (a link's lines are 1px); after the hover rule, so also when hovered. */
.event.cancelled :is(h2, h3) a { text-decoration: line-through 0.08em; }

/* The events to come, on the home page: big titles, the next one on red. */
.events .event :is(h2, h3) { font-size: 2.25rem; }
.events .event:not(.featured) :is(h2, h3) { font-size: 1.875rem; }
.featured :is(h2, h3), .featured .number, .featured .where { color: var(--ink); }

/* After the events: the calendar, and the ones that have been. */
.after-events { margin-top: 1.5rem; }
/* A link onwards or back, such as to the archive. */
.more { font-weight: 600; }
.back { margin-top: 3rem; }
/* A calendar link, quiet: an event's own, and the home page's for all MeetINNs. */
.calendar { font-size: 0.875rem; color: var(--muted); }

/* An event's page */

.event-page.cancelled h1 .title { text-decoration: line-through 0.08em; } /* the title, not the number above it */
.event-facts { margin: 0 0 3rem; }
.event-facts > :last-child { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: 1fr; margin: 0 0 1.5rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0.125rem 0 0.875rem; }
.facts dd:last-child { margin-bottom: 0; }
.reserve { margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; color: var(--muted); font-size: 0.9375rem; }
.register { margin-top: 3rem; }
.register h2 { margin-top: 0; }
/* What a MeetINN is, and the admin's tools for the day: a row of small
   cards, numbered like a listing. */
.what > p { max-width: 38rem; }
.cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.5rem; counter-reset: card; }
.cards li { margin: 0; counter-increment: card; }
.cards h3 { font: 800 1.5rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 0.5rem; }
.cards h3::before { content: counter(card, decimal-leading-zero); } /* as a kicker (above) */
.cards p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* The archive, and the admin's past events: each MeetINN a row with its
   number, title and date, the whole row a link. The number, title and date
   are those of Beheer's events to come too (below). */
.archive { list-style: none; padding: 0; margin: 0; }
.archive li {
  position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); column-gap: 1rem; align-items: baseline;
  padding-block: 0.875rem; border-bottom: 1px solid var(--border);
}
:is(.archive, .event-list) .nr { grid-row: 1 / span 2; font: 700 0.9375rem/1 var(--mono); color: var(--red-text); }
.archive li > a, .event-list .title { font: 800 1.375rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.archive li > a { color: var(--text); text-decoration: none; }
.archive li > a::after { content: ""; position: absolute; inset: 0; }
.archive li:hover > a, .event-list a:hover .title { color: var(--red-text); }
:is(.archive, .event-list) .when { grid-column: 2; margin-top: 0.25rem; font: 0.75rem/1.6 var(--mono); color: var(--muted); }

/* A cancelled ticket is void: dashed, flat and grey, the title struck through. */
.ticket.void { border-style: dashed; box-shadow: none; }
.ticket.void :is(h2, .number, .meta, .where) { color: var(--muted); }
.ticket.void h2 a { text-decoration: line-through 0.08em; }
/* The stub, below a dashed line to tear it off along. */
.event .stub {
  margin: 1.5rem -1.5rem -1.5rem; padding: 0.75rem 1.5rem; border-top: 2px dashed var(--edge);
  font: 600 0.75rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}

.big { font: 900 7rem/0.9 var(--display); color: var(--red); margin: 0; }

/* Buttons and forms */

/* Square, with a thick border and a hard shadow, in monospace capitals;
   pressed in when hovered and clicked. Red, or plain (secondary), or paper
   on the red card. */
button, .button {
  display: inline-block; padding: 0.875rem 1.125rem; border: 2px solid var(--edge); border-radius: 0;
  background: var(--button); color: #ffffff; box-shadow: 4px 4px 0 var(--edge); text-decoration: none; cursor: pointer;
  font: 700 0.8125rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  transition: transform 0.06s, box-shadow 0.06s;
}
button:hover, .button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--edge); }
button:active, .button:active { transform: translate(4px, 4px); box-shadow: none; }
:is(button, .button).secondary { background: var(--surface); color: var(--text); }
/* On red, a button keeps its black frame, in both modes. */
.featured .button { --edge: var(--ink); background: #fffcf6; color: var(--ink); } /* its border and shadows are --edge */
button.link {
  background: none; border: 0; box-shadow: none; padding: 0; color: var(--red-text); text-decoration: underline;
  font: inherit; text-transform: none; letter-spacing: normal; transform: none;
}

/* A field's label in the small monospace capitals of the event's facts. */
.form label { display: block; margin: 0 0 1rem; }
.form input:not([type="checkbox"]), .form textarea, .form select {
  display: block; width: 100%; margin-top: 0.375rem; padding: 0.625rem 0.75rem; font: 400 1rem/1.4 var(--body);
  border: 2px solid var(--edge); border-radius: 0; background: var(--surface); color: var(--text);
}
/* In ink, so a wrong field, red, keeps one red line. */
:is(.form, .door-search) :is(input, textarea, select):focus { outline: 2px solid var(--text); outline-offset: 2px; }
.form :is(input:not([type="checkbox"]), select, textarea)[aria-invalid="true"] { border-color: var(--red-text); }
.form textarea { resize: vertical; }
.form .row { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.form .row label { flex: 1 1 12rem; }
.form .row label.narrow { flex: 0 1 8rem; }
.form label.narrow { max-width: 16rem; }
fieldset { border: 2px solid var(--border); padding: 0.75rem 1rem 0; margin: 1.5rem 0; }
legend { color: var(--red-text); padding: 0 0.375rem; }
fieldset .hint { margin-top: 0; }
label.check { display: flex; gap: 0.5rem; align-items: center; margin: 0 0 1rem; font: 400 1rem/1.5 var(--body); text-transform: none; letter-spacing: normal; }
label.check input { width: 1.125rem; height: 1.125rem; accent-color: var(--button); }
.hp { position: absolute; left: -9999px; }

.yivi { margin: 1.5rem 0; }
/* The Yivi widget as one of the site's cards, with a dashed line under its
   header as on a ticket. Always light: the QR code wants a white ground.
   Its own CSS comes after this, so these rules go a class deeper. */
.yivi.yivi-web-form { width: 100%; min-width: 0; margin: 1.5rem 0; background: #ffffff; border: 2px solid var(--edge); border-radius: 0; box-shadow: 4px 4px 0 var(--edge); }
.yivi.yivi-web-form .yivi-web-header p { font: 700 0.75rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: #1c1917; }
.yivi.yivi-web-form .yivi-web-header .yivi-web-helper { background: #ffffff; }
.yivi.yivi-web-form .yivi-web-header .yivi-web-helper :is(p, a) { font: 400 0.875rem/1.5 var(--body); text-transform: none; letter-spacing: normal; }
.yivi.yivi-web-form .yivi-web-header .yivi-web-helper a { color: #b3261e; }
.yivi.yivi-web-form .yivi-web-content { margin: 0; border-radius: 0; border-top: 2px dashed #1c1917; }
/* On a phone: the site's red button to open the app, and a plain link to show the QR code instead. */
.yivi.yivi-web-form .yivi-web-button {
  padding: 0.875rem 1.125rem; border: 2px solid #1c1917; border-radius: 0; background: #c42b25; box-shadow: 4px 4px 0 #1c1917;
  font: 700 0.8125rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: #ffffff; transition: transform 0.06s, box-shadow 0.06s;
}
.yivi.yivi-web-form .yivi-web-button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #1c1917; }
.yivi.yivi-web-form .yivi-web-button:active { transform: translate(4px, 4px); box-shadow: none; }
.yivi.yivi-web-form .yivi-web-button-tertiary { font: 600 0.9375rem/1.4 var(--body); color: #b3261e; }
.yivi.yivi-web-form .yivi-web-button-tertiary:hover { color: #1c1917; }
/* Not the site's button look on the widget's other buttons, which are links. */
.yivi button, .yivi button:hover, .yivi button:active { box-shadow: none; transform: none; text-transform: none; letter-spacing: normal; }

/* The admin */

/* An event's page in the admin, the same head on each tab: the way back to
   Beheer, the title with its status, what to do first, and the tabs. */
.crumbs { margin: 0 0 0.75rem; }
.crumbs a { color: var(--red-text); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.event-head { margin-bottom: 1.5rem; }
.event-head .head-actions { margin-top: 1.5rem; }
/* Beheer: its title, and a new event beside it. */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; margin-bottom: 3rem; }
.page-head h1 { margin: 0; }
.event-head h1 { margin: 0 0 0.5rem; }
.meta-line { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
/* A status, as a label: green for published, yellow for a draft, grey for called off (also on the site). */
.status { display: inline-block; padding: 0.3rem 0.5rem; border: 2px solid var(--edge); background: var(--surface); color: var(--text);
  font: 700 0.6875rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
h1 .status { margin-left: 0.5rem; vertical-align: 0.6em; }
/* In an event's head, the status is the link to its page on the site: a small button, pressed in when hovered. */
a.status { text-decoration: none; box-shadow: 2px 2px 0 var(--edge); }
a.status:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--edge); }
a.status:active { transform: translate(2px, 2px); box-shadow: none; }
.status.published { background: var(--green-bg); color: var(--green); }
.status.draft { background: var(--yellow-bg); color: var(--yellow); }
.status.cancelled { background: var(--border); }
/* The tabs: a row of labels on a line, the open one a tab on it, in red. On a phone they scroll sideways;
   not up and down, by the bit of each tab under the line, which would catch the wheel scrolling the page. */
.tabs { display: flex; gap: 0.25rem; margin: 0 0 3rem; border-bottom: 2px solid var(--edge); overflow: auto hidden; }
.tabs a { margin-bottom: -2px; padding: 0.625rem 0.5rem; border: 2px solid transparent; border-bottom: 0; white-space: nowrap;
  color: var(--text); text-decoration: none; font: 700 0.6875rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; }
.tabs a:hover { color: var(--red-text); }
.tabs a[aria-current="page"] { background: var(--bg); border-color: var(--edge); color: var(--red-text); }
.tabs a:focus-visible { outline-offset: -4px; } /* inside the tab: the row clips what's outside it */
.tabs .count { color: var(--muted); }

/* Overzicht's numbers: a tile each, the places on red while it's to come. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.5rem; margin: 0 0 3rem; padding: 0; list-style: none; }
.stats li { margin: 0; } /* a card (above) */
.stats strong { display: block; font: 800 2.75rem/1 var(--display); }
.stats span { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.9375rem; }
.stats .featured span { color: var(--ink); }
.stats progress { display: block; width: 100%; height: 0.75rem; margin-top: 0.75rem; appearance: none; border: 2px solid currentColor; background: transparent; }
.stats progress::-webkit-progress-bar { background: transparent; }
.stats progress::-webkit-progress-value { background: var(--red); }
.stats progress::-moz-progress-bar { background: var(--red); }
.stats .featured progress::-webkit-progress-value { background: var(--ink); }
.stats .featured progress::-moz-progress-bar { background: var(--ink); }

/* Beheer's events to come: rows as in the archive (number, title, date),
   with the status and places on the right; all of it a link to its page. */
.event-list { margin: 0; padding: 0; list-style: none; }
.event-list li { margin: 0; border-bottom: 1px solid var(--border); }
.event-list a { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; column-gap: 1rem; align-items: baseline; padding-block: 0.875rem; color: inherit; text-decoration: none; }
.event-list .side { grid-row: 1 / span 2; grid-column: 3; align-self: start; display: flex; flex-direction: column; align-items: flex-end; gap: 0.375rem; font: 0.75rem/1.4 var(--mono); color: var(--muted); }

.actions { margin-top: 3rem; }
.actions form { margin: 0 0 1rem; }

/* Asking first (saving a change that mails everyone, cancelling someone):
   a card over the dimmed page (dialog.js), or without it in the page. */
dialog.confirm { max-width: min(34rem, calc(100% - 3rem)); padding: 1.5rem; color: var(--text); background: var(--surface); border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--edge); }
dialog.confirm:not(:modal) { position: static; margin: 1.5rem 0 0; }
dialog.confirm::backdrop { background: rgb(22 20 20 / 0.5); }
dialog.confirm h2 { margin: 0 0 1rem; }
dialog.confirm .facts { margin: 1rem 0 1.5rem; }
dialog.confirm .was { color: var(--muted); }
dialog.confirm .dialog-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin: 0; }
/* Side by side also on a phone: a long label wraps inside its button, both as tall, the text in the middle. */
dialog.confirm .dialog-actions > * { display: flex; align-items: center; justify-content: center; line-height: 1.3; text-align: center; }
@media (max-width: 40rem) { dialog.confirm .dialog-actions > * { flex: 1 1 0; padding-inline: 0.625rem; } } /* on a phone, each half the row */
/* The focus on the primary action as it opens, without the ring until a key is pressed (dialog.js). */
dialog.confirm.quiet :focus-visible { outline: none; }
dialog.confirm [hidden] { display: none; } /* the way back, until dialog.js shows it */

.table { overflow-x: auto; } /* a wide table scrolls on its own, not the page */
.admin-events { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.admin-events th { color: var(--muted); }
.admin-events th, .admin-events td { text-align: left; padding: 0.625rem 0.75rem 0.625rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-events thead th { border-bottom: 2px solid var(--edge); }
.admin-events tr.past td { color: var(--muted); }
/* Both lists, the registrations and the door's, for thumbs: taller rows, the name bold, and on
   the right a column as narrow as it can be. */
.admin-events td { padding-block: 0.875rem; }
.admin-events .name { font-weight: 600; }
.admin-events .org { font-size: 0.875rem; color: var(--muted); }
.admin-events .end { width: 1%; text-align: right; }

/* The volunteers' page at the door. On top, and on a phone staying there
   while the list scrolls: how many are in, the search, and who just came
   in; on the page's background, so the list slides under. */
.door-top { position: sticky; top: 0; z-index: 1; margin: 0 0 0.5rem; background: var(--bg); container-type: scroll-state; }
/* What Tab or a #gast-… link scrolls to stays clear of it. */
:root:has(.door-top) { scroll-padding-top: 13rem; }
.door-top-box { padding-block: 0.75rem; border-bottom: 1px solid transparent; }
/* A line under it only while the list scrolls under it: before that, the list's own head is the line. */
@container scroll-state(stuck: top) { .door-top-box { border-bottom-color: var(--edge); } }
.door-count, .list-count { margin: 0 0 0.75rem; font: 800 1.5rem/1 var(--display); text-transform: uppercase; }
.door-count strong, .list-count strong { color: var(--red-text); font-size: 2.25rem; }
.door-search { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem 1rem; margin: 0; }
.door-search label { flex: 1 1 12rem; }
.door-search input { display: block; width: 100%; margin-top: 0.375rem; padding: 0.75rem; font: 400 1.0625rem/1.4 var(--body); border: 2px solid var(--edge); background: var(--surface); color: var(--text); }
.door-latest { margin: 0.625rem 0 0; color: var(--muted); font: 0.8125rem/1.6 var(--mono); }
.door-latest .label { color: var(--text); font-weight: 700; }
.door-latest .who { white-space: nowrap; }
/* The door's rows: the button a good target; on the right, centred in the row, who's in as a
   green ✓ and the time, with undo as a quiet link under it, or the button. */
.door-list td { vertical-align: middle; }
.door-list .end { white-space: nowrap; }
.door-list .org { display: block; } /* under the name */
.door-list button:not(.link) { min-height: 2.75rem; padding: 0.75rem 1rem; box-shadow: 3px 3px 0 var(--edge); }
.door-list button:not(.link):hover { box-shadow: 1px 1px 0 var(--edge); }
.door-list button:not(.link):active { transform: translate(3px, 3px); box-shadow: none; }
.door-list .in-at { display: block; color: var(--green); font: 700 0.9375rem/1.4 var(--mono); }
.door-list .in-at + form { margin-top: 0.125rem; }
.door-list .cancelled td:not(:last-child) { color: var(--muted); }
.list-sub { margin: 0 0 1.5rem; color: var(--muted); font-size: 0.9375rem; }
/* Who cancelled, folded away under the list (Aanmeldingen, and the door), headed as the list is; the heading
   a finger's tap area. */
.cancelled-fold { margin-top: 1.5rem; }
.cancelled-fold summary { display: flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; border-bottom: 2px solid var(--edge); color: var(--muted); cursor: pointer; } /* a label (above) */
.cancelled-fold summary::-webkit-details-marker { display: none; }
.cancelled-fold summary::after { content: "▾"; content: "▾" / ""; }
.cancelled-fold[open] summary::after { content: "▴"; content: "▴" / ""; }
.cancelled-fold summary:hover { color: var(--text); }
/* Who's in is quiet; undo is a small link, with a finger's tap area (the padding, which the margin takes back). */
.door-list tr.in td { color: var(--muted); }
.door-list button.link { margin: -0.875rem 0; padding: 0.875rem 0; font-size: 0.8125rem; color: var(--muted); }
.door-list button.link:hover { color: var(--red-text); }
/* Cancelling someone from the list: a quiet link under the date, which asks first, in a dialog;
   its tap area a finger's, as undo's at the door. */
.cancel-reg { display: block; margin: -0.25rem 0 -0.625rem; padding-block: 0.625rem; font-size: 0.875rem; }
/* The registrations in two lines: the name with the organisation beside
   it, the address quiet under it; on the right when, Yivi, and Afmelden. */
.reg-list .name { margin-right: 0.375rem; }
.reg-list .email { display: block; margin-top: 0.125rem; font-size: 0.875rem; color: var(--muted); text-decoration: none; }
.reg-list .email:hover { color: var(--red-text); text-decoration: underline; }
.reg-list .end { padding-right: 0; }
/* On a phone when, Yivi and Afmelden under each other; side by side on a wider screen. */
.reg-list :is(.when, .yivi-yes) { white-space: nowrap; }
.reg-list .end .muted { font-size: 0.8125rem; }
.reg-list .when { font: 0.8125rem/1.6 var(--mono); color: var(--muted); }
.reg-list .yivi-yes { margin-left: 0.5rem; color: var(--green); font-size: 0.8125rem; font-weight: 700; }

/* Mail in the admin. The log: what it was in bold, when, by whom and to whom quiet under it; how it went on
   the right, red when some of it failed. */
.admin-events .sub { display: block; margin-top: 0.125rem; font-size: 0.8125rem; color: var(--muted); }
.mail-log .end { width: 40%; font-size: 0.875rem; overflow-wrap: anywhere; }
.mail-log tr.problem .end { color: var(--red-text); font-weight: 600; }
/* Buttons side by side, wrapping on a phone: announcing, or a message's, the primary one first. */
.actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1rem 0; }
.actions-row form { margin: 0; }
/* A message as it will go, in the dialog that asks before sending: scrolling on its own when long. */
.preview { max-height: 40vh; overflow: auto; margin: 0 0 1rem; padding: 0.75rem 1rem; border: 2px solid var(--border); background: var(--bg); }
.preview-subject { margin: 0 0 0.5rem; font-weight: 700; }
.preview .prose > :last-child { margin-bottom: 0; }

/* Wider screens */

/* Room for more space around the header's buttons. */
@media (min-width: 22.5rem) {
  .bar { gap: 1rem; }
  .bar .lang, .menu summary { padding-inline: 0.875rem; }
}

@media (min-width: 40rem) {
  main { padding-block: 4.5rem 6rem; }
  h1 { font-size: 3.5rem; }
  .events .event :is(h2, h3) { font-size: 3rem; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  /* The organisers as rows: the photo on the left, 15rem square; the name and text beside it, centred on it.
     The text no taller than the photo: the name's 2rem, then 8 lines of 1.5rem (0.9375rem/1.6), cut with an ellipsis. */
  .people { grid-template-columns: 1fr; }
  .cards.people li { display: grid; grid-template-columns: 15rem 1fr; column-gap: 1.5rem; align-items: center; }
  .cards.people li > .photo { margin: 0; }
  .cards.people li > div { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 9; overflow: hidden; } /* the name, and 8 lines */
  .events .event:not(.featured) :is(h2, h3) { font-size: 2.5rem; }
  /* The next event's photo on the card's right half, its left edge fading into the red; the text beside it. */
  .featured:has(> .photo) { position: relative; min-height: 16rem; padding-right: 38%; } /* the text into the fade, where it's red */
  .featured > .photo { position: absolute; inset: 0 0 0 50%; margin: 0; mask-image: linear-gradient(to right, var(--fade)); }
  .featured > .photo img { height: 100%; aspect-ratio: auto; }
  /* The home page's cards side by side: their photos portrait, for room. */
  .cards .photo img { aspect-ratio: 4 / 5; }
  .facts { grid-template-columns: max-content 1fr; gap: 0 1.5rem; }
  .facts dt { padding-top: 0.2rem; }
  /* The date beside the title. */
  .archive li, .event-list a { grid-template-columns: 3.5rem minmax(0, 1fr) auto; }
  .archive .nr { grid-row: auto; }
  .archive .when { grid-column: 3; margin: 0; white-space: nowrap; }
  .register .form, .subscribe-form { max-width: 28rem; }
  /* The footer's links, in their own column beside the name: right-aligned, the text on the column's edge. */
  footer.site .inner { grid-template-columns: 1fr auto; align-items: end; }
  /* Its last letters level with the bottom of the buttons beside it: past the link's padding, its line and the space under the letters. */
  footer.site .links { flex-direction: column; align-self: end; align-items: flex-end; margin-bottom: -0.6875rem; text-align: right; }
  .reg-list .end { white-space: nowrap; }
  .tabs a { padding: 0.75rem 1rem; font-size: 0.75rem; letter-spacing: 0.08em; }
}

/* Room for the menu's links in the bar. */
@media (min-width: 48rem) {
  /* The column is centred now: the dots go from the middle, so its edges,
     360px (15 dots) to each side of it, stay on the grid. */
  body { background-position: 50% -12px; }
  nav.wide { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 0.25rem; justify-content: flex-end; }
  .menu { display: none; }
}
