@font-face {
  font-family: "TeX Gyre Pagella";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/texgyrepagella-regular.woff2") format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/texgyrepagella-italic.woff2") format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/texgyrepagella-bold.woff2") format("woff2");
}
@font-face {
  font-family: "TeX Gyre Pagella";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/texgyrepagella-bolditalic.woff2") format("woff2");
}

:root {
  --ivory: #f4efe6;
  --ink: #241c14;
  --blue: #1a4478;
  --gold: #a6853c;
  --line: rgba(26, 68, 120, 0.18);
}

* { box-sizing: border-box; }

html { background: var(--ivory); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: "Book Antiqua", Palatino, "TeX Gyre Pagella", serif;
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: var(--blue); }

a:hover { text-decoration-thickness: 1px; }

img { max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(52rem, calc(100% - 2rem));
  margin: 0 auto;
}

.mast { position: relative; }

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2.6rem 0 0.85rem;
  text-decoration: none;
}

.brand .wordmark {
  height: auto;
  width: auto;
  max-height: 2.7rem;
  max-width: min(34rem, 72vw);
  object-fit: contain;
}

.account {
  position: absolute;
  top: 0.55rem;
  right: 0;
  z-index: 2;
  text-align: right;
}

.account summary {
  display: inline-block;
  list-style: none;
  cursor: pointer;
  color: var(--ivory);
  background: var(--blue);
  border: 1px solid var(--gold);
  padding: 0.35rem 0.8rem;
  font: inherit;
}

.account summary::-webkit-details-marker { display: none; }

.account-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  box-sizing: border-box;
  width: min(16.5rem, calc(100vw - 2rem));
  min-width: 0;
  max-width: calc(100vw - 2rem);
  padding: 0.9rem;
  text-align: left;
  background: var(--ivory);
  border: 1px solid var(--gold);
  overflow: hidden;
}

.account-panel form,
.account-panel label {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.account-panel input,
.account-panel button {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.account-panel a { display: block; margin: 0 0 0.35rem; }
.account-panel .error { margin: 0 0 0.55rem; }

.rule {
  border: 0;
  border-top: 1px solid var(--gold);
  margin: 0;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0.7rem 0;
}

nav a {
  color: var(--blue);
  text-decoration: none;
}

nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.22rem; }

.members-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  padding: 0.45rem 0 0.7rem;
  color: var(--blue);
  font-size: 0.98rem;
}

.members-bar img.mark {
  height: auto;
  width: auto;
  max-height: 1.7rem;
  object-fit: contain;
}

.members-bar a { color: var(--blue); }

main {
  width: min(40rem, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 1.6rem 0 3.2rem;
}

h1, h2 {
  font-weight: 400;
  color: var(--blue);
  line-height: 1.3;
  scroll-margin-top: 1.2rem;
}

h1 { font-size: 1.8rem; margin: 0 0 1rem; }
h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.8rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--gold);
}

p { margin: 0 0 1rem; }

.emblem, .roundel {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 1.3rem;
}

.emblem { max-height: 13rem; }
.roundel { max-height: 11rem; }

figure.plate { margin: 0 0 1.4rem; }
figure.plate img { display: block; margin: 0 auto; }
figure.hall { margin: 0.4rem 0 1.4rem; }
figure.hall img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; }
figure.hall figcaption { margin-top: 0.4rem; text-align: center; font-size: 0.95rem; color: var(--blue); }
figure.plate figcaption {
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.98rem;
  color: var(--blue);
}

figure.mark { margin: 1.4rem 0; }
figure.mark img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 15rem;
  margin: 0 auto;
}
figure.mark figcaption { margin-top: 0.5rem; text-align: center; font-size: 0.95rem; color: var(--blue); }

blockquote {
  margin: 0 0 1rem;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--gold);
}

blockquote p { margin: 0; }

nav.contents {
  margin: 0 0 1.6rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

nav.contents ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.98rem;
}

nav.contents a { text-decoration: none; }
nav.contents a:hover { text-decoration: underline; }

nav.reading { margin: 2.4rem 0 0; }
nav.reading h2 { margin-top: 0; }
nav.reading ul { margin: 0; padding: 0; list-style: none; }
nav.reading li { margin: 0 0 0.85rem; }
nav.reading span { display: block; font-size: 0.98rem; }

form.stack { display: grid; gap: 0.75rem; margin: 1.2rem 0 2rem; }
form.enquiry { position: relative; }
.enquiry-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.captcha-line { align-items: center; }
.captcha-line img {
  display: block;
  width: 10.5rem;
  height: auto;
  border: 1px solid var(--gold);
  background: var(--ivory);
}
label { display: grid; gap: 0.25rem; }
input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: #fbf8f2;
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
}
textarea { min-height: 8rem; resize: vertical; }
button, .button {
  font: inherit;
  color: var(--ivory);
  background: var(--blue);
  border: 1px solid var(--gold);
  padding: 0.4rem 0.9rem;
  width: fit-content;
  cursor: pointer;
  text-decoration: none;
}
.note { color: var(--blue); }
.error { color: #7a2e24; }
.checks { display: grid; gap: 0.35rem; }
.checks label { display: flex; gap: 0.5rem; align-items: baseline; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 0.4rem 0.35rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.day-group { margin: 0 0 1.8rem; }
.picture-grid { display: grid; gap: 1rem; }
.picture-grid figure { margin: 0; }
.picture-grid img { width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin: 0 0 1.2rem; }
.filters a[aria-current="true"] { text-decoration: underline; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.row-actions form { display: inline; }
.qr svg { width: 10.5rem; height: auto; background: white; }
.account-secret { font-family: ui-monospace, monospace; font-size: 0.95rem; word-break: break-all; }
footer { padding-bottom: 2rem; }
footer p { text-align: center; color: var(--blue); font-size: 0.98rem; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (max-width: 640px) {
  /* Clear the account control, which sits at the top right of the masthead. */
  .brand { flex-direction: column; gap: 0.4rem; padding-top: 3.6rem; }
  .brand .wordmark { max-height: 2.1rem; }
  .emblem { max-height: 10rem; }
  nav.contents ul { justify-content: flex-start; }
}

@media print {
  html, body { background: #fff; color: #000; }
  body { font-size: 11pt; line-height: 1.45; }
  main { width: auto; padding: 0; }
  .account, nav[aria-label="Pages"], nav.contents, nav.reading, .members-bar, .rule { display: none; }
  .brand { padding: 0 0 0.6rem; }
  h1, h2 { color: #000; }
  h2 { page-break-after: avoid; border-top: 0; padding-top: 0; }
  a { color: #000; text-decoration: none; }
  figure, blockquote, table { page-break-inside: avoid; }
  figure.hall img, figure.plate img, figure.mark img { max-width: 11cm; }
  figcaption { color: #000; }
  footer { border-top: 1px solid #999; }
}
