/* ==========================================================================
   XI Regulus — Components
   Header, navigation, divider, card, button, form, footer, login.
   Requires tokens.css and base.css.
   ========================================================================== */

/* --- Divider (DESIGN-SYSTEM.md §8) --------------------------------------
   The restrained rule:  --------- * ---------
   ------------------------------------------------------------------------ */

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-gold);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background-color: var(--color-gold-40);
}
.divider__mark {
  font-size: .625rem;
  line-height: 1;
  transform: translateY(-1px);
}
.divider--short { max-width: 15rem; margin-inline: auto; }

/* --- Buttons (§14) -------------------------------------------------------
   Formal and rectangular. No pills, no shadows.
   ------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding-inline: var(--space-xl);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
}

.btn--primary {
  background-color: var(--color-ink);
  color: var(--color-ivory);
}
.btn--primary:hover { background-color: var(--color-forest); color: var(--color-ivory); }

.btn--secondary {
  background-color: transparent;
  color: var(--color-ink);
  border-color: var(--color-ink-28);
}
.btn--secondary:hover { border-color: var(--color-gold); color: var(--color-gold); }

.btn--block { width: 100%; }

.btn[disabled] { opacity: .5; cursor: default; }

/* --- Forms (§18) ---------------------------------------------------------
   Visible labels, ivory field, thin dark border, gold focus without glow.
   ------------------------------------------------------------------------ */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: left;
}

.field__label {
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--color-ink-70);
}

.field__input {
  width: 100%;
  min-height: var(--control-height);
  padding: .7rem .9rem;
  background-color: var(--color-ivory);
  color: var(--color-ink);
  border: 1px solid var(--color-ink-28);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}
.field__input:hover { border-color: var(--color-ink-55); }
.field__input:focus { border-color: var(--color-gold); outline: none; }
.field__input:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }

/* A stacked form: fields and the submit button in one rhythm. */
.form-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  max-width: var(--reading-width);
}
.form-stack .field { width: 100%; }
.form-stack .btn { margin-top: var(--space-sm); }

/* A checkbox with its label beside it, e.g. GDPR consent. */
.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-sm);
}
.field__check {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .15rem;
  accent-color: var(--color-gold);
}
.field__check:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }
.field__check-label {
  font-size: var(--size-small);
  line-height: var(--leading-body);
  color: var(--color-ink-70);
}

.field__input--textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: var(--leading-body);
}

/* Quiet, reserved space so the layout does not jump when a message appears. */
.form__message {
  min-height: 1.25em;   /* reserved, so the layout does not jump on error */
  font-size: var(--size-small);
  color: var(--color-burgundy);
}

/* --- Site header (§10) --------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
  background-color: var(--color-ivory);
  border-bottom: var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: 76px;
}

/* Only in the stacked header — below 900px the row is mark and Meny button,
   with no line for a rule to sit on. */
.site-header__divider { display: none; }

/* From tablet up the chrome is stacked: the lodge's name centred on its own
   line, the menu centred beneath it. Ten links do not fit beside a wordmark,
   and a centred pair of rows is closer to a printed title page anyway (§10). */
@media (min-width: 900px) {
  .site-header__inner {
    flex-direction: column;
    justify-content: center;
    gap: var(--space-sm);
    min-height: 0;
    padding-block: var(--space-md);
  }
  .site-nav__list { justify-content: center; }
  /* The §8 rule, separating the lodge's name from the menu. Stretched because
     a column flex item would otherwise shrink to the diamond alone. */
  .site-header__divider { display: flex; align-self: stretch; }
}


.site-header__mark {
  display: flex;
  white-space: nowrap;   /* the lodge's name must never wrap */
  align-items: baseline;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: .06em;
  border-bottom: 0;
}
.site-header__mark:hover { color: var(--color-gold); }
.site-header__mark span {
  font-family: var(--font-body);
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--color-ink-70);
}

/* --- Navigation ---------------------------------------------------------- */

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Ten links now. Wrapping to a second row is fine under a centred wordmark;
     overflowing the container is not. */
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
}

.site-nav a {
  border-bottom: 0;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--color-ink-70);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--color-gold); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding-inline: var(--space-sm);
  background: transparent;
  border: 1px solid var(--color-ink-28);
  border-radius: var(--radius-sm);
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  cursor: pointer;
}

/* Between the collapse breakpoint and a comfortable desktop there are nine
   links to fit. Tighten them rather than drop a page from the menu. */
@media (min-width: 900px) and (max-width: 1279px) {
  .site-nav a         { font-size: .6875rem; letter-spacing: .08em; }
  .site-nav__list     { gap: var(--space-xs) var(--space-sm); }
  .site-header__inner { gap: var(--space-md); }
}

/* Mobile and tablet: the nav collapses into a simple formal panel (§21). */
@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background-color: var(--color-ivory);
    border-bottom: var(--hairline);
    display: none;
  }
  .site-nav[data-open="true"] { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-xs) var(--gutter) var(--space-md);
  }
  .site-nav__list li + li { border-top: 1px solid var(--color-ink-10); }
  .site-nav a {
    display: block;
    padding-block: var(--space-sm);
    min-height: 44px;
  }
}

/* --- Page heading -------------------------------------------------------- */

.page-head { padding-block: var(--space-xl) var(--space-lg); }
.page-head__eyebrow {
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--color-gold);
}
.page-head h1 { margin-top: var(--space-sm); }
.page-head p { margin-top: var(--space-md); color: var(--color-ink-70); }

/* --- Cards (§13) ---------------------------------------------------------
   Flat, thin-bordered, small radius, generous padding. Not SaaS cards.
   ------------------------------------------------------------------------ */

.card-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 600px)  { .card-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  min-height: 132px;
  background-color: rgba(228, 216, 193, .32);
  border: var(--hairline);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast),
              background-color var(--transition-fast);
}
.card:hover {
  color: inherit;
  border-color: var(--color-gold);
  background-color: rgba(228, 216, 193, .6);
}
.card__index {
  font-family: var(--font-display);
  font-size: var(--size-small);
  letter-spacing: .1em;
  color: var(--color-gold);
}
.card__title {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 500;
  line-height: 1.2;
}
.card__note {
  font-size: var(--size-small);
  color: var(--color-ink-70);
  margin-top: auto;
  padding-top: var(--space-sm);
}

/* The hub's card section. Footer supplies the spacing below it. */
.hub { padding-top: var(--space-xl); }

/* Rundtur-videon under korten på hem.html. Same hairline frame and radius
   as the cards, so it reads as part of the page rather than an embed. */
.demo-video { padding-top: var(--space-2xl); }
.demo-video__intro {
  margin-bottom: var(--space-lg);
  max-width: var(--reading-width);
  color: var(--color-ink-70);
}
.demo-video__player {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  aspect-ratio: 16 / 9;
  background-color: var(--color-ivory);
  border: var(--hairline);
  border-radius: var(--radius-md);
}
@media print { .demo-video { display: none; } }


/* --- Section grouping ----------------------------------------------------
   Month names, degree bodies, roster sections. Small, gold, letter-spaced,
   with a hairline running out from it (§8).
   ------------------------------------------------------------------------ */

.group + .group { margin-top: var(--space-2xl); }

.group__label {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--color-gold);
}
.group__label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background-color: var(--color-gold-40);
}

/* --- Entry list ----------------------------------------------------------
   Meetings, receptions, birthdays. Editorial blocks rather than table rows,
   so they reflow at any width and read as an archival publication (§16).
   ------------------------------------------------------------------------ */

.entry-list { display: flex; flex-direction: column; }

.entry {
  display: grid;
  gap: var(--space-2xs) var(--space-lg);
  padding-block: var(--space-md);
  border-top: 1px solid var(--color-ink-10);
}
.entry:last-child { border-bottom: 1px solid var(--color-ink-10); }

.entry__when {
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--color-ink-70);
}

.entry__what {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 500;
  line-height: 1.25;
}

.entry__note {
  font-size: var(--size-small);
  color: var(--color-ink-70);
}

/* Two columns once there is room: when on the left, what on the right. */
@media (min-width: 700px) {
  .entry {
    grid-template-columns: 15rem 1fr;
    align-items: baseline;
  }
  .entry__note { grid-column: 2; }
}

/* --- Roster --------------------------------------------------------------
   Kontakter: role, name, telephone.
   ------------------------------------------------------------------------ */

.roster { display: flex; flex-direction: column; }

.roster__row {
  display: grid;
  gap: var(--space-2xs) var(--space-lg);
  padding-block: var(--space-md);
  border-top: 1px solid var(--color-ink-10);
}
.roster__row:last-child { border-bottom: 1px solid var(--color-ink-10); }

.roster__role {
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--color-ink-70);
}

.roster__name {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 500;
  line-height: 1.25;
}

.roster__tel {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.roster__note {
  font-size: var(--size-small);
  color: var(--color-ink-70);
}

@media (min-width: 700px) {
  .roster__row {
    grid-template-columns: 13rem 1fr auto;
    align-items: baseline;
  }
  /* Under the name, clear of the roll column. */
  .roster__note { grid-column: 2 / -1; }
}

/* --- Notice --------------------------------------------------------------
   A restrained aside: "för tider se hemsidan", deadline reminders.
   ------------------------------------------------------------------------ */

.notice {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-parchment);
  border-left: 2px solid var(--color-gold);
  border-radius: var(--radius-sm);
  font-size: var(--size-small);
}

/* --- Back link -----------------------------------------------------------
   The Muse leaf pages were dead ends. Every page now returns to the hub.
   ------------------------------------------------------------------------ */

.back-link {
  display: inline-block;
  margin-top: var(--space-2xl);
  border-bottom: 0;
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: var(--color-ink-70);
}
.back-link:hover { color: var(--color-gold); }


/* --- Gallery index -------------------------------------------------------
   Bildbanken. Photographic cards: flat, thin-bordered, 3:2 crop (§12), with
   the restrained treatment the design system asks of imagery.
   ------------------------------------------------------------------------ */

.gallery-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
  list-style: none;
}
@media (min-width: 600px)  { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-card {
  display: flex;
  flex-direction: column;
  border: var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: rgba(228, 216, 193, .32);
  transition: border-color var(--transition-fast);
}
.gallery-card:hover { color: inherit; border-color: var(--color-gold); }

.gallery-card__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background-color: var(--color-parchment);
  border-bottom: var(--hairline);
}
.gallery-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* §12: slightly desaturated and warm, not a glossy stock photo. */
  filter: saturate(.9);
  transition: filter var(--transition-normal);
}
.gallery-card:hover .gallery-card__media img { filter: saturate(1); }

.gallery-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-lg);
}

.gallery-card__degree {
  font-family: var(--font-display);
  font-size: var(--size-small);
  letter-spacing: .1em;
  color: var(--color-gold);
}

.gallery-card__title {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 500;
  line-height: 1.2;
}

.gallery-card__meta {
  margin-top: var(--space-2xs);
  font-size: var(--size-small);
  color: var(--color-ink-70);
}


/* --- Album ---------------------------------------------------------------
   A single gallery: a grid of photographs that open in the lightbox below.
   ------------------------------------------------------------------------ */

.album-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
}
@media (min-width: 600px)  { .album-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); } }
@media (min-width: 1024px) { .album-grid { grid-template-columns: repeat(4, 1fr); } }

.album-thumb {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: var(--hairline);
  border-radius: var(--radius-sm);
  background-color: var(--color-parchment);
  transition: border-color var(--transition-fast);
}
.album-thumb:hover { border-color: var(--color-gold); }

.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9);
  transition: filter var(--transition-normal);
}
.album-thumb:hover img { filter: saturate(1); }

/* --- Lightbox ------------------------------------------------------------
   Dark, quiet, and out of the way: the photograph is the only bright thing
   on screen. Opacity-only motion (§19).
   ------------------------------------------------------------------------ */

/* Toggled with display, deliberately not with an opacity/visibility fade:
   `visibility` is a discrete transitioned property, so it stays hidden until
   the transition is half over, and focus() on anything inside is silently
   ignored until then. The design system asks for almost-invisible motion
   anyway (§19), so the lightbox simply appears. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  background-color: rgba(23, 22, 20, .985);
}
.lightbox[data-open="true"] { display: flex; }

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--gutter);
  border-bottom: 1px solid rgba(241, 235, 221, .14);
  color: var(--color-ivory-70);
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
}

.lightbox__figure {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: var(--space-lg) var(--gutter);
}

/* Every photograph in the archive is 344-384px wide — Muse downscaled them
   for the old 380px layout and the originals are not in the project. Allow a
   modest ~1.5x so it is not a postage stamp on a desktop, but no more than
   that, because past this it just looks soft. Raise the cap if and when the
   lodge supplies full-resolution photographs. */
.lightbox__img {
  width: min(100%, 34rem);
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid rgba(241, 235, 221, .16);
}

.lightbox__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--gutter) var(--space-xl);
}

.lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding-inline: var(--space-md);
  background: transparent;
  color: var(--color-ivory);
  border: 1px solid rgba(241, 235, 221, .28);
  border-radius: var(--radius-sm);
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.lightbox__btn:hover:not([disabled]) { border-color: var(--color-gold); color: var(--color-gold); }
.lightbox__btn[disabled] { opacity: .35; cursor: default; }
.lightbox__btn:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }

/* Keep the page behind the lightbox from scrolling. */
.lightbox-open { overflow: hidden; }

/* --- Footer (§24) -------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 2;
  margin-top: var(--space-section);
  padding-block: var(--space-2xl);
  background-color: var(--color-ink);
  color: rgba(241, 235, 221, .82);
  font-size: var(--size-small);
}
.site-footer__eyebrow {
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-nav);
  text-transform: uppercase;
  color: rgba(241, 235, 221, .70);
}

/* The founding year, set in the display face like a date on a title page. */
.site-footer__since {
  margin-top: var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--size-small);
  font-style: italic;
  letter-spacing: .06em;
  color: rgba(241, 235, 221, .60);
}

.site-footer__mark {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  color: var(--color-ivory);
  letter-spacing: .06em;
}
.site-footer__rule {
  height: 1px;
  margin-block: var(--space-lg);
  background-color: rgba(241, 235, 221, .26);
}
.site-footer a { color: var(--color-ivory); border-bottom-color: rgba(241, 235, 221, .25); }
.site-footer a:hover { color: var(--color-gold); border-bottom-color: var(--color-gold); }
.site-footer__meta { color: rgba(241, 235, 221, .66); font-size: var(--size-micro); letter-spacing: .06em; }

.site-footer__sponsor {
  margin-top: var(--space-md);
  color: rgba(241, 235, 221, .55);
  font-size: var(--size-micro);
}

/* --- Login ---------------------------------------------------------------
   Full-viewport, centred, discreet: the insignia, one field, one button.
   ------------------------------------------------------------------------ */

.login {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--space-2xl) var(--gutter);
  background-color: var(--color-ivory);
}

/* No stacking context here: the logo below blends with the ivory painted by
   .login, and a stacking context on this element would isolate it away. */
.login__inner {
  width: 100%;
  max-width: 26rem;
  text-align: center;
}

/* The insignia stands in for the page title. The source file has a white
   ground, so `multiply` drops the white against the ivory while leaving the
   blue and gold at full strength. */
.login__logo {
  margin: 0 auto;
  width: 100%;
  max-width: 24rem;
}

.login__logo img {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.login__divider { margin-block: var(--space-lg) var(--space-xl); }

.login__form { display: flex; flex-direction: column; gap: var(--space-md); }

/* --- Anmälda -------------------------------------------------------------
   The meeting picker above the list of registered brothers.
   ------------------------------------------------------------------------ */

.anmalda-picker {
  max-width: 30rem;
  margin-bottom: var(--space-xl);
}

.anmalda-summary {
  margin-bottom: var(--space-lg);
}

/* A list of names has no "when" column, so keep it single-column at every
   width — otherwise a guest's lodge lands beside the name instead of under it. */
.entry-list--names .entry { grid-template-columns: 1fr; }
.entry-list--names .entry__note { grid-column: 1; }

/* The standing note from the fasta listan, and the free text someone wrote in
   the anmälan form. Allergies, mostly — the CM cooks from this list. */
.entry__message {
  font-size: var(--size-small);
  color: var(--color-ink-70);
}

/* --- Tags ----------------------------------------------------------------
   Small designations beside a name. Gold marks a standing role; burgundy
   marks something the board needs to act on or notice.
   ------------------------------------------------------------------------ */

.tag {
  display: inline-block;
  padding: 1px var(--space-xs);
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--size-micro);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  vertical-align: middle;
}

.tag--fast      { color: var(--color-gold); }
.tag--cancelled { color: var(--color-burgundy); }

/* A cancelled broder stays on the list, struck through, so the board can see
   who is missing rather than inferring it from a shorter list. */
/* The line is on the name itself: a parent's text-decoration cannot be removed
   by a child, so the tag beside it would be struck through too. */
.is-struck { text-decoration: line-through; }
.entry.is-cancelled { opacity: .72; }

.anmalda-actions { margin-top: var(--space-xl); }

/* --- Print ---------------------------------------------------------------
   The Anmälda list on paper: the meeting, the fasta listan and the
   registrations, and nothing else. The browser's print dialog is what offers
   "Spara som PDF", so no library is involved.
   ------------------------------------------------------------------------ */

.print-only { display: none; }

@media print {
  /* Ink on paper, not the ivory ground. */
  :root { --color-ivory: #fff; }

  body { background: #fff; color: #000; font-size: 11pt; }
  body::after { display: none; }              /* the paper-grain overlay */

  .site-header,
  .site-footer,
  .no-print,
  .page-head__eyebrow,
  .page-head .prose { display: none !important; }

  .print-only { display: block; }

  .print-head {
    margin-bottom: var(--space-xs);
    font-family: var(--font-body);
    font-size: 9pt;
    font-weight: 600;
    letter-spacing: .16em;
  }

  .page-head { padding: 0; }
  .page-head h1 { font-size: 20pt; margin-bottom: var(--space-sm); }
  .container { max-width: none; padding: 0; }

  /* The summary is information, not a coloured panel. */
  .notice {
    background: none;
    border-left: 0;
    border-bottom: 1pt solid #000;
    padding: 0 0 var(--space-sm);
    font-size: 10pt;
  }

  .group__label { color: #000; font-size: 9pt; }
  .group__label::after { background: #000; }
  .group + .group { margin-top: var(--space-lg); }

  .entry {
    padding-block: 4pt;
    border-top: .5pt solid #999;
    break-inside: avoid;
  }
  .entry:last-child { border-bottom: .5pt solid #999; }
  .entry__what { font-size: 12pt; }
  .entry__note { font-size: 9pt; color: #444; }

  /* One line per person on paper: the roll sits beside the name, not under
     it, which roughly halves the length of a 21-name list. */
  .entry-list--names .entry {
    grid-template-columns: 1fr auto;
    align-items: baseline;
    column-gap: var(--space-lg);
  }
  .entry-list--names .entry__note {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  /* The roll is pinned to row 1; the note needs a row of its own or the two
     land on top of each other. */
  .entry-list--names .entry__message { grid-column: 1 / -1; grid-row: 2; }
  .entry__message { font-size: 9pt; color: #444; }

  .entry.is-cancelled { opacity: 1; }
  .tag { border-color: #000; color: #000; font-size: 7pt; }

  a { border-bottom: 0; }
  a[href]::after { content: ""; }             /* no printed URLs */
}
