@charset "UTF-8";

/* ===========================================================================
   Kiwanis Føroyar — one hand-written stylesheet.

   There is no build step, no preprocessor and no framework. Everything the
   site needs is in this file, in the order a page is assembled:

     01. Fonts
     02. Design tokens
     03. Reset and base elements
     04. Layout primitives
     05. Buttons and links
     06. Site header
     07. Hero
     08. Section headings
     09. Cards
     10. Feature band
     11. Contact
     12. Site footer
     13. Icons
     14. Forms
     15. Calendar
     16. Prose (rendered markdown)
     17. Admin
     18. Responsive
     19. Motion and print

   Conventions: block__element--modifier. Colours, spacing and type sizes come
   from custom properties so a palette change is one edit, not forty.
   =========================================================================== */

/* --- 01. Fonts ------------------------------------------------------------
   Self-hosted, committed, SIL Open Font Licence. No CDN, no Google Fonts, no
   runtime request to a third party. Both families are variable fonts subset
   to Latin-1 plus the punctuation the site uses, which is enough for Faroese
   and keeps all three files together under ~110 KB.

   font-display: swap — text is readable immediately in the fallback face and
   reflows once; a blank page is worse than a reflow.
   ------------------------------------------------------------------------ */

@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/EBGaramond-Variable.woff2") format("woff2-variations"),
       url("/static/fonts/EBGaramond-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/EBGaramond-Italic-Variable.woff2") format("woff2-variations"),
       url("/static/fonts/EBGaramond-Italic-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/static/fonts/PublicSans-Variable.woff2") format("woff2-variations"),
       url("/static/fonts/PublicSans-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- 02. Design tokens ---------------------------------------------------- */

:root {
  /* Palette. Deep navy carries the hero and every heading; cream is the page;
     gold is the accent used for eyebrows, labels, links and icons; the dark
     brown band appears once, behind the feature section. */
  --navy: #1d3b5f;
  --navy-deep: #16304e;
  --cream: #faf6ef;
  --cream-deep: #f3ece0;
  --gold: #b8863b;
  --gold-bright: #cf9c4c;
  --brown: #2b211a;

  /* Text. Body copy on cream is a warm grey-brown rather than black, which
     reads softer against a warm background; on navy it is a light blue-grey.
     Both clear WCAG AA at body size against their own backgrounds. */
  --ink: #4a4039;
  --ink-strong: #2b211a;
  --ink-muted: #6f655c;
  --ink-on-navy: #c8d6e6;
  --ink-on-brown: #cbbfb2;

  /* Hairlines. A low-contrast warm tan; borders here are structural, never
     decorative, and there are no shadows anywhere in the design. */
  --hairline: #e5ddd971;
  --hairline-solid: #e3dbd3;
  --hairline-on-dark: #ffffff26;

  /* Feedback. */
  --danger: #9b2c22;
  --success: #2f6b46;

  /* Type. */
  --font-display: "EB Garamond", "Iowan Old Style", "Palatino Linotype",
                  Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", -apple-system, BlinkMacSystemFont,
               "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  --step-5: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);

  --tracking-wide: 0.14em;
  --tracking-wider: 0.2em;

  /* Spacing, on a 4px grid. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --shell: 1200px;
  --measure: 60ch;

  /* Corners are square or very nearly so; the design has no pill shapes. */
  --radius: 2px;

  --focus: 2px solid var(--gold);
  --focus-offset: 3px;
}

/* --- 03. Reset and base --------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-3); }
h4 { font-size: var(--step-2); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

/* Visible only when tabbed to; the first stop on every page. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-2);
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  font-size: var(--step--1);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.skip-link:focus {
  left: var(--space-4);
}

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

/* --- 04. Layout primitives ------------------------------------------------ */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--space-9);
}

.section--tight {
  padding-block: var(--space-8);
}

/* Full-bleed bands. Each sets its own text colours because the inherited
   ink colours are tuned for cream. */
.band--navy {
  background: var(--navy);
  color: var(--ink-on-navy);
}

.band--navy h1,
.band--navy h2,
.band--navy h3 {
  color: #fff;
}

.band--cream-deep {
  background: var(--cream-deep);
}

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

/* Card rows. auto-fit rather than a fixed count, so two clubs or four news
   items both look deliberate. */
.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.stack > * + * {
  margin-top: var(--space-4);
}

/* --- 05. Buttons and links ------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.btn--primary {
  background: var(--navy);
  color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--navy-deep);
  color: #fff;
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--hairline-solid);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--cream-deep);
  text-decoration: none;
}

.btn--danger {
  background: transparent;
  color: var(--danger);
  border-color: currentColor;
}

.btn--danger:hover,
.btn--danger:focus-visible {
  background: var(--danger);
  color: #fff;
  text-decoration: none;
}

.btn--small {
  padding: var(--space-2) var(--space-3);
  font-size: 0.75rem;
}

/* The recurring "LES MEIRA →" affordance: uppercase gold with an underline
   sitting a few pixels below the baseline. */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--gold);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}

.link-more:hover,
.link-more:focus-visible {
  color: var(--gold-bright);
  text-decoration: none;
}

.link-more .icon {
  transition: transform 150ms ease;
}

.link-more:hover .icon {
  transform: translateX(3px);
}

/* --- 06. Site header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--hairline-solid);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.wordmark__seal {
  width: 2.5rem;
  height: 2.5rem;
}

.wordmark:hover,
.wordmark:focus-visible {
  text-decoration: none;
  color: var(--navy-deep);
}

.nav {
  display: flex;
  justify-content: center;
  flex: 1;
  gap: var(--space-5);
}

.nav a {
  color: var(--ink-strong);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--gold);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* The donate button is the one button set in sentence case, matching the
   reference. Everything else — admin actions, form submits — stays uppercase
   with .btn's default, which reads as a control rather than a destination. */
.site-header .btn--primary {
  text-transform: none;
  letter-spacing: 0.01em;
}

/* Mobile menu. A <details> element, not JavaScript: it is keyboard-operable
   and works before htmx loads, or if it never does. */
.menu {
  display: none;
  position: relative;
}

.menu > summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: var(--space-3);
  cursor: pointer;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
}

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

.menu__bar {
  display: block;
  height: 2px;
  background: var(--navy);
}

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-3));
  min-width: 14rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--cream);
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
}

.menu__panel a {
  color: var(--ink-strong);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
}

.menu__panel .btn--primary {
  color: #fff;
}

/* --- 07. Hero ------------------------------------------------------------- */

.hero {
  background: var(--navy);
  color: var(--ink-on-navy);
  padding-block: var(--space-9);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--gold-bright);
  margin-bottom: var(--space-4);
}

.hero__body {
  max-width: var(--measure);
  margin-bottom: var(--space-6);
  color: var(--ink-on-navy);
}

.hero .link-more {
  color: var(--gold-bright);
}

/* The photo, with a cream stat card overlapping its lower-left corner. */
.hero__media {
  position: relative;
  isolation: isolate;
}

.hero__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

.stat-card {
  position: absolute;
  left: calc(-1 * var(--space-6));
  bottom: var(--space-6);
  background: var(--cream);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-6);
  min-width: 13rem;
  z-index: 1;
}

.stat-card__number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-5);
  line-height: 1;
  color: var(--navy);
  margin-bottom: var(--space-2);
}

.stat-card__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --- 08. Section headings ------------------------------------------------- */

.section-head {
  margin-bottom: var(--space-7);
}

.section-head__intro {
  max-width: var(--measure);
  color: var(--ink);
  margin-bottom: 0;
}

.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}

/* Small tan badge, e.g. TÍÐINDI & TILTØK. */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-4);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  line-height: 1.6;
}

.badge--filled {
  background: var(--cream-deep);
  border-color: transparent;
  margin-bottom: 0;
}

/* Inside a meta row the badge sits inline, so it must not carry the
   section-heading bottom margin. */
.card__meta .badge {
  margin-bottom: 0;
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--gold);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

/* --- 09. Cards ------------------------------------------------------------ */

.card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.card__label {
  margin-bottom: var(--space-3);
  color: var(--gold);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.card__title {
  font-size: var(--step-2);
  margin-bottom: var(--space-3);
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

.card__title a:hover,
.card__title a:focus-visible {
  color: var(--gold);
  text-decoration: none;
}

.card__body {
  color: var(--ink);
  margin-bottom: var(--space-5);
}

/* Cards sit in a grid row, so their bodies differ in length. Pushing the
   footer element down with auto margin lines every footer up on the same
   baseline without fixing a height. */
.card .hairline,
.card > .link-more {
  margin-top: auto;
}

.card > .link-more {
  align-self: flex-start;
}

/* A hairline rule inside a card, above the facts row. */
.hairline {
  border: 0;
  border-top: 1px solid var(--hairline-solid);
  margin: 0 0 var(--space-4);
}

/* Footer row of small line icons with text. */
.card__facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card__facts li,
.fact {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.card__facts .icon,
.fact .icon {
  color: var(--gold);
  flex: none;
}

/* The club card body is rendered markdown, so it needs the prose rules
   scaled back down to card size. */
.card__body.prose {
  font-size: var(--step-0);
  line-height: 1.65;
  max-width: none;
}

/* News card: calendar icon + date + category badge on one row. */
.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.card__date {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.card__date .icon {
  color: var(--gold);
}

.card--empty {
  color: var(--ink-muted);
  font-style: italic;
}

/* --- 10. Feature band ----------------------------------------------------- */

.feature {
  background: var(--brown);
  color: var(--ink-on-brown);
  padding-block: var(--space-9);
}

.feature__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.media-layout {
  display: grid;
  gap: var(--space-7);
}

.media-layout__image {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.media-layout--top .media-layout__image {
  aspect-ratio: 21 / 9;
}

.media-layout--left,
.media-layout--right {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
}

.media-layout--right {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.media-layout--right .media-layout__image {
  order: 2;
}

.media-layout--left .media-layout__image,
.media-layout--right .media-layout__image {
  aspect-ratio: 4 / 3;
  height: auto;
}

.media-layout--left .grid--3,
.media-layout--right .grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

@media (max-width: 48rem) {
  .media-layout--left,
  .media-layout--right {
    grid-template-columns: 1fr;
  }

  .media-layout--right .media-layout__image {
    order: 0;
  }
}

.feature__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.feature__box {
  border: 1px solid var(--hairline-on-dark);
  border-radius: var(--radius);
  padding: var(--space-7);
}

.feature__eyebrow {
  display: block;
  margin-bottom: var(--space-4);
  color: var(--gold-bright);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.feature__title {
  color: var(--gold-bright);
  font-size: var(--step-4);
  margin-bottom: var(--space-4);
}

.feature__body {
  color: var(--ink-on-brown);
  max-width: var(--measure);
}

/* --- 11. Contact ---------------------------------------------------------- */

.contact {
  text-align: center;
}

.contact__intro {
  max-width: var(--measure);
  margin-inline: auto;
  margin-bottom: var(--space-7);
  color: var(--ink);
}

.contact__details {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-7);
  margin-bottom: var(--space-8);
}

.contact__details .fact {
  font-size: var(--step-0);
}

.contact__form {
  max-width: 36rem;
  margin-inline: auto;
  text-align: left;
}

/* --- 12. Site footer ------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--hairline-solid);
  padding-block: var(--space-6);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.site-footer__seal {
  width: 6rem;
  height: 6rem;
  margin-right: auto;
}

.site-footer__copy {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.site-footer__note {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

/* --- 13. Icons ------------------------------------------------------------
   Hand-written inline SVG. No icon font, no icon library. Each icon inherits
   currentColor and sizes from the surrounding text.
   ------------------------------------------------------------------------ */

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}

.icon--lg {
  width: 1.5em;
  height: 1.5em;
}

/* --- 14. Forms ------------------------------------------------------------ */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.field {
  flex-direction: column;
  gap: var(--space-2);
}

.field > label,
.field__label {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-strong);
}

.field__hint {
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="password"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: var(--space-3);
  font-family: inherit;
  font-size: var(--step-0);
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.6;
}

.field textarea.field--code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--step--1);
  min-height: 22rem;
}

.field--invalid input,
.field--invalid textarea,
.field--invalid select {
  border-color: var(--danger);
}

.field__error {
  color: var(--danger);
  font-size: var(--step--1);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-5);
}

.form__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.notice {
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--hairline-solid);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: var(--cream-deep);
  color: var(--ink-strong);
}

.notice--error {
  border-left-color: var(--danger);
  color: var(--danger);
}

.notice--success {
  border-left-color: var(--success);
}

/* --- 15. Calendar --------------------------------------------------------- */

.calendar {
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: var(--cream);
}

.calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.calendar__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  color: var(--navy);
  text-decoration: none;
  font-size: var(--step-1);
}

.calendar__nav:hover,
.calendar__nav:focus-visible {
  background: var(--cream-deep);
  text-decoration: none;
}

.calendar__label {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--navy);
  text-transform: capitalize;
}

/* The grid is a real <table> because it is tabular data; the layout comes
   from table-layout: fixed rather than from CSS Grid. */
.calendar__grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 2px;
}

.calendar__grid th {
  padding-block: var(--space-2);
  text-align: center;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.day {
  text-align: center;
  padding-block: var(--space-3);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
}

/* Days borrowed from the neighbouring months, drawn but inert. */
.day--outside {
  color: #bdb4ab;
  background: transparent;
  border-color: transparent;
}

.day--past {
  color: var(--ink-muted);
  background: var(--cream-deep);
}

/* Confirmed or staff-blocked. Not colour alone: the cell is also hatched, so
   the state survives a monochrome print and colour-blind vision. */
.day--unavailable {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 5px,
    #ffffff26 5px 10px
  );
}

.calendar__legend {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.calendar__legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.swatch {
  width: 0.875rem;
  height: 0.875rem;
  border: 1px solid var(--hairline-solid);
  border-radius: 1px;
  background: #fff;
}

.swatch--busy {
  background: var(--navy);
  border-color: var(--navy);
}

/* --- 16. Prose ------------------------------------------------------------
   Rendered markdown. goldmark runs without the unsafe renderer option, so raw
   HTML in a post body is escaped rather than emitted.
   ------------------------------------------------------------------------ */

.prose {
  max-width: var(--measure);
  font-size: var(--step-1);
  line-height: 1.75;
}

.prose h2 { font-size: var(--step-3); margin-top: var(--space-7); }
.prose h3 { font-size: var(--step-2); margin-top: var(--space-6); }

.prose ul,
.prose ol {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
}

.prose li + li { margin-top: var(--space-2); }

.prose blockquote {
  margin: var(--space-5) 0;
  padding-left: var(--space-5);
  border-left: 2px solid var(--gold);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-strong);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--cream-deep);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}

/* --- 17. Admin ------------------------------------------------------------ */

/* Admin is a working tool read for long stretches, so its type runs a step
   larger than the public site's. Scoped to body.is-admin so the public pages
   keep the reference proportions. */
.is-admin {
  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.1875rem;
}

.is-admin .btn--small,
.is-admin .nav a,
.is-admin .thumb__meta,
.is-admin .badge,
.is-admin .muted {
  font-size: 0.875rem;
}

.is-admin .table th,
.is-admin .pill,
.is-admin .section-item__kind,
.is-admin .layout-card__taken,
.is-admin .stat-card__label,
.is-admin .stat-card__caption,
.is-admin .calendar__grid th {
  font-size: 0.8125rem;
}

.is-admin .field__label,
.is-admin .field__hint,
.is-admin .field__error,
.is-admin .choice,
.is-admin .layout-card__desc,
.is-admin .section-type__label,
.is-admin .section-type__desc,
.is-admin .section-item__preview {
  font-size: 0.9375rem;
}

/* The header actions sit on navy, so the default ghost/link colours vanish. */
.admin-header .site-header__actions a:not(.btn) {
  color: var(--ink-on-navy);
}

.admin-header .site-header__actions a:not(.btn):hover,
.admin-header .site-header__actions a:not(.btn):focus-visible {
  color: var(--gold-bright);
}

.admin-header .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.admin-header .btn--ghost:hover,
.admin-header .btn--ghost:focus-visible {
  background: #fff;
  border-color: #fff;
  color: var(--navy);
}

.admin-header {
  background: var(--navy);
  color: var(--ink-on-navy);
  border-bottom: 0;
}

.admin-header .wordmark,
.admin-header .nav a {
  color: #fff;
}

.admin-header .nav a[aria-current="page"] {
  border-bottom-color: var(--gold-bright);
}

.admin-header .nav a:hover,
.admin-header .nav a:focus-visible {
  color: var(--gold-bright);
}

.admin-main {
  padding-block: var(--space-7);
}

.admin-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.admin-card {
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.admin-card + .admin-card {
  margin-top: var(--space-5);
}

.admin-login {
  max-width: 24rem;
  margin: var(--space-9) auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.table th,
.table td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid var(--hairline-solid);
  vertical-align: top;
}

.table th {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  padding: 0.1rem var(--space-2);
  border-radius: var(--radius);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--cream-deep);
  color: var(--ink-muted);
}

.pill--live { background: #e3efe7; color: var(--success); }
.pill--draft { background: var(--cream-deep); color: var(--ink-muted); }
.pill--scheduled { background: #f6ecd9; color: var(--gold); }

.editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.editor__preview,
.preview {
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: var(--cream);
  min-height: 22rem;
  overflow-wrap: anywhere;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: var(--space-4);
}

.thumb {
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--cream-deep);
}

.thumb__meta {
  padding: var(--space-3);
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow-wrap: anywhere;
}

/* --- 18. Responsive ------------------------------------------------------- */

@media (max-width: 60rem) {
  .nav,
  .site-header__actions {
    display: none;
  }

  .menu {
    display: block;
    margin-left: auto;
  }

  .hero__inner,
  .feature__inner,
  .editor,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  /* Stacked: text leads, the photo follows at full width in a wider crop. */
  .hero__image {
    aspect-ratio: 4 / 3;
  }

  .stat-card {
    left: var(--space-4);
    bottom: var(--space-5);
    padding: var(--space-4) var(--space-5);
    min-width: 11rem;
  }

  .section {
    padding-block: var(--space-8);
  }
}

@media (max-width: 40rem) {
  .shell {
    padding-inline: var(--space-4);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .contact__details {
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
  }

  .feature__box {
    padding: var(--space-5);
  }

  .card {
    padding: var(--space-5);
  }

  .card__image {
    width: calc(100% + var(--space-5) * 2);
    margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) var(--space-4);
  }

  .calendar__grid th {
    font-size: 0.5rem;
    letter-spacing: 0.04em;
  }

  /* Tables become stacked records rather than scrolling sideways. */
  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border-bottom: 1px solid var(--hairline-solid);
    padding-block: var(--space-3);
  }

  .table td {
    border-bottom: 0;
    padding: var(--space-1) 0;
  }
}

/* --- 19. Motion and print ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .menu,
  .form__actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* --- 20. Page-level compositions ----------------------------------------- */
/*
   Everything below was written against the finished markup. Where a rule
   simply joins an existing selector, it is grouped with it rather than
   duplicated so the two can never drift apart.
*/

/* Hero: the headline is one admin-editable string. The break onto a second
   line comes from the measure, exactly as in the design reference — the em
   dash falls at the end of line one because the next word will not fit. A
   <br> would have hard-coded a break that is wrong on a phone, and splitting
   the string across two translation keys made the admin override print its
   tail twice. */
.hero__headline {
  color: #fff;
  font-size: var(--step-5);
  line-height: 1.05;
  margin-bottom: var(--space-5);
  /* Measured in display-font characters so both locales break after the dash:
     "Vit byggja — " is 13, "Vi bygger — " is 12, and the following word
     pushes past 15 in each. */
  max-width: 15ch;
  text-wrap: balance;
}

.hero__text {
  margin-bottom: var(--space-6);
  color: var(--ink-on-navy);
}

.stat-card__caption {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* A text link whose gold rule sits a few pixels below the baseline. */
.link-underlined {
  color: var(--gold-bright);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  font-weight: 600;
}

.link-underlined:hover,
.link-underlined:focus-visible {
  text-decoration-color: var(--gold-bright);
}

/* Section headings ---------------------------------------------------------*/

.section-head__heading {
  font-size: var(--step-4);
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: var(--space-4);
}

.band--navy .section-head__heading,
.feature .section-head__heading {
  color: #fff;
}

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.section--alt {
  background: var(--cream-deep);
}

.subheading {
  font-size: var(--step-2);
  color: var(--navy);
  margin-top: var(--space-7);
  margin-bottom: var(--space-4);
}

/* Layout helpers -----------------------------------------------------------*/

.shell--narrow {
  max-width: 48rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}

.split__main,
.split__aside {
  min-width: 0;
}

.toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

/* Bank details on /studla: label above value, numbers in tabular figures so
   they are easy to read off and copy. */
.account {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
}

.account dt {
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.account dd {
  margin: 0;
  color: var(--ink-strong);
  font-weight: 600;
}

.account__number {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  user-select: all;
}
/* Cards --------------------------------------------------------------------*/

.card--club,
.card--post {
  display: flex;
  flex-direction: column;
}

.card--post .card__body {
  flex: 1 1 auto;
}

.card__image {
  display: block;
  width: calc(100% + 2 * var(--space-6));
  max-width: none;
  margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-5);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.article__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: var(--space-6) 0;
  object-fit: cover;
  border-radius: var(--radius);
}

.media-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.media-card__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--cream-deep);
  border-radius: var(--radius);
}

.badge--on-dark {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
}

.badge--warn {
  color: var(--danger);
  border-color: var(--danger);
}

/* Feature band -------------------------------------------------------------*/

.feature__heading {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1.1;
  color: var(--gold-bright);
  margin-bottom: var(--space-4);
}

/* Contact band -------------------------------------------------------------*/

.contact-band {
  text-align: center;
}

.contact-band__heading {
  font-size: var(--step-4);
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: var(--space-3);
}

.contact-band__subtitle {
  max-width: var(--measure);
  margin-inline: auto;
  margin-bottom: var(--space-7);
  color: var(--ink);
}

.contact-band__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.contact-band__facts--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

/* Article (news / event detail) --------------------------------------------*/

.article__title {
  font-size: var(--step-4);
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: var(--space-3);
}

.article__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.article__excerpt {
  max-width: var(--measure);
  font-size: var(--step-1);
  color: var(--ink);
  margin-bottom: var(--space-6);
}

.article__back {
  display: inline-block;
  margin-top: var(--space-7);
}

/* Rental -------------------------------------------------------------------*/

/* Venues sit side by side so both calendars are visible at once; they stack
   on narrow screens (see the 60rem breakpoint). */
.venues {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
  align-items: start;
}

.venue {
  min-width: 0;
}

.venue__name {
  margin: 0 0 var(--space-4);
}

.venue__request {
  margin-top: var(--space-7);
}

.unit {
  margin-bottom: var(--space-7);
}

.unit__body {
  max-width: var(--measure);
}

.swatch--free {
  background: var(--cream);
  border: 1px solid var(--hairline-solid);
}

/* Forms, notices and tables ------------------------------------------------*/

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.form--block {
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--hairline-solid);
}

.form__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}

.save-status { font-size: 0.875rem; min-height: 1.25rem; }
.save-status__ok { color: var(--success); }
.save-status__failed { color: #a32d2d; }

.subnav {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--hairline-solid);
}
.subnav a {
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.subnav a[aria-current="page"] { border-bottom-color: var(--gold); font-weight: 600; }

.workspace {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: minmax(0, 1fr);
}
.workspace__preview { display: none; }

@media (min-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .workspace__preview {
    display: block;
    position: sticky;
    top: var(--space-4);
    height: calc(100vh - 2 * var(--space-4));
  }
  .preview__frame {
    width: 100%;
    height: calc(100% - 2rem);
    border: 1px solid var(--hairline-solid);
    border-radius: 8px;
    background: #fff;
  }
}
.preview__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-2); }

.notice--warn {
  border-color: var(--gold);
  background: #f6ecd9;
  color: #6d4f1c;
}

.notice--ok {
  border-color: var(--success);
  background: #e3efe7;
  color: var(--success);
}

.muted {
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.empty {
  color: var(--ink-muted);
  font-style: italic;
}

.table__prose {
  max-width: 32rem;
  white-space: pre-line;
}

/* Text sections ------------------------------------------------------------*/

.text-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.text-section__image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

/* Layout sections ----------------------------------------------------------*/

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-4);
}

.gallery figure { margin: 0; }

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.gallery figcaption {
  margin-top: var(--space-2);
  font-size: var(--step--1);
}

.cta__inner {
  max-width: 48rem;
  text-align: center;
}

.cta__inner--image {
  max-width: var(--shell);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  text-align: left;
}

.cta__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.cta__heading {
  font-size: var(--step-4);
  margin-bottom: var(--space-4);
}

.cta__body {
  margin-bottom: var(--space-6);
  font-size: var(--step-1);
}

/* Banner: a picture filling most of the screen, blurred behind a text card. */
.banner {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 85vh;
  padding: var(--space-8) var(--space-4);
  overflow: hidden;
  background: var(--navy);
}

.banner__image {
  position: absolute;
  inset: -2rem;
  width: calc(100% + 4rem);
  height: calc(100% + 4rem);
  object-fit: cover;
  filter: blur(8px) brightness(0.8);
}

.banner__card {
  position: relative;
  max-width: 42rem;
  padding: var(--space-8);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.92);
  color: var(--navy);
  text-align: center;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.25);
}

.banner__heading {
  margin-bottom: var(--space-4);
  font-size: var(--step-4);
  color: var(--navy);
}

.banner__body {
  margin-bottom: var(--space-6);
  font-size: var(--step-1);
}

.stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-6);
  text-align: center;
}

.stats__item {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-2);
}

.stats__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-5);
  line-height: 1;
  color: var(--gold);
}

.stats__label {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.info-card {
  padding: 0;
  overflow: hidden;
  color: var(--ink);
}

.info-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.info-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-6);
}

.info-card__title {
  font-size: var(--step-2);
  margin-bottom: var(--space-3);
  color: var(--navy);
}

.info-card__body > .link-more {
  margin-top: auto;
  align-self: flex-start;
  color: var(--gold);
}

.quote__inner {
  margin: 0 auto;
  text-align: center;
}

.quote__image {
  width: 6rem;
  height: 6rem;
  margin: 0 auto var(--space-5);
  border-radius: 50%;
  object-fit: cover;
}

.quote__text {
  margin: 0 0 var(--space-5);
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-style: italic;
  line-height: 1.35;
}

.quote__text p::before { content: "“"; }
.quote__text p::after { content: "”"; }

.quote__by {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--step--1);
}

.quote__by strong { color: var(--gold); }

.sponsors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-6) var(--space-8);
}

.sponsors__item a {
  color: inherit;
  text-decoration: none;
}

.sponsors__item img {
  display: block;
  max-width: 10rem;
  max-height: 4rem;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.2s, opacity 0.2s;
}

.sponsors__item :is(a:hover, a:focus-visible) img {
  filter: none;
  opacity: 1;
}

.sponsors__item span {
  font-family: var(--font-display);
  font-size: var(--step-2);
}

/* Section themes -----------------------------------------------------------*/
/* A home page section's background is chosen in the admin, not implied by its
   kind, so these come after the per-kind rules and override them. Each theme
   also resets text colours, because those rules assume a fixed background.
   Cards keep their own cream surface, so nothing here reaches inside one. */

.theme--cream { background: var(--cream); color: var(--ink); }
.theme--tint  { background: var(--cream-deep); color: var(--ink); }
.theme--navy  { background: var(--navy); color: var(--ink-on-navy); }
.theme--brown { background: var(--brown); color: var(--ink-on-brown); }

:is(.theme--cream, .theme--tint) :is(.hero__headline, .section-head__heading, .feature__heading, .contact-band__heading, .prose h2, .prose h3) {
  color: var(--navy);
}
.theme--navy :is(.hero__headline, .section-head__heading, .feature__heading, .contact-band__heading, .prose h2, .prose h3) {
  color: #fff;
}
.theme--brown :is(.hero__headline, .section-head__heading, .feature__heading, .contact-band__heading, .prose h2, .prose h3) {
  color: var(--gold-bright);
}

.theme--navy :is(.hero__text, .hero__body, .feature__body, .section-head__intro, .contact-band__subtitle, .text-section__body),
.theme--brown :is(.hero__text, .hero__body, .feature__body, .section-head__intro, .contact-band__subtitle, .text-section__body),
:is(.theme--cream, .theme--tint) :is(.hero__text, .hero__body, .feature__body, .section-head__intro, .contact-band__subtitle, .text-section__body) {
  color: inherit;
}

:is(.theme--cream, .theme--tint) :is(.hero__eyebrow, .link-underlined) { color: var(--gold); }
:is(.theme--navy, .theme--brown) :is(.hero__eyebrow, .link-underlined, .link-more, .prose a) { color: var(--gold-bright); }
:is(.theme--navy, .theme--brown) :is(.fact, .empty) { color: inherit; }

:is(.theme--navy, .theme--brown) .badge:not(.card .badge) {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
}

:is(.theme--cream, .theme--tint) .feature__box { border-color: var(--hairline-solid); }
:is(.theme--navy, .theme--brown) .feature__box { border-color: var(--hairline-on-dark); }

:is(.theme--cream, .theme--tint) .cta__heading { color: var(--navy); }
.theme--navy .cta__heading { color: #fff; }
.theme--brown .cta__heading { color: var(--gold-bright); }
:is(.theme--navy, .theme--brown) :is(.stats__value, .quote__by strong) { color: var(--gold-bright); }
:is(.theme--navy, .theme--brown) .quote__text { color: #fff; }
:is(.theme--cream, .theme--tint) .quote__text { color: var(--navy); }

/* Christmas backgrounds: original CSS/SVG artwork, so free of any licence. */
.theme--xmas-snow,
.theme--xmas-lights,
.theme--xmas-green {
  --xmas-flake: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-120 -120 240 240' fill='none' stroke='%23e8c46a' stroke-opacity='0.28' stroke-width='2.5' stroke-linecap='round'%3E%3Cg id='a'%3E%3Cpath d='M0 0V-44M0 -30L-10 -40M0 -30L10 -40M0 -16L-8 -24M0 -16L8 -24'/%3E%3C/g%3E%3Cuse href='%23a' transform='rotate(60)'/%3E%3Cuse href='%23a' transform='rotate(120)'/%3E%3Cuse href='%23a' transform='rotate(180)'/%3E%3Cuse href='%23a' transform='rotate(240)'/%3E%3Cuse href='%23a' transform='rotate(300)'/%3E%3C/svg%3E");
  color: #f4ead6;
  background-repeat: no-repeat, repeat, repeat, repeat, no-repeat;
}

.theme--xmas-snow {
  background-color: #0d1220;
  background-image:
    radial-gradient(circle at 48% 38%, rgb(255 190 80 / 0.18), transparent 35%),
    radial-gradient(circle, rgb(255 214 120 / 0.45) 0 1.5px, transparent 2.5px),
    var(--xmas-flake),
    var(--xmas-flake),
    linear-gradient(160deg, #0d1220, #1b1a22 55%, #2a2118);
  background-size: auto, 120px 120px, 150px 150px, 240px 240px, auto;
  background-position: 0 0, 20px 30px, 10px 10px, 110px 90px, 0 0;
}

.theme--xmas-lights {
  background-color: #1d1210;
  /* A string of fairy lights draped along the top edge, with soft warm light
     washing over the section and a few small sparkles. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100'%3E%3Cdefs%3E%3CradialGradient id='a'%3E%3Cstop offset='0' stop-color='rgb(255,200,110)' stop-opacity='.75'/%3E%3Cstop offset='.25' stop-color='rgb(255,200,110)' stop-opacity='.35'/%3E%3Cstop offset='1' stop-color='rgb(255,200,110)' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='b'%3E%3Cstop offset='0' stop-color='rgb(235,90,75)' stop-opacity='.75'/%3E%3Cstop offset='.25' stop-color='rgb(235,90,75)' stop-opacity='.35'/%3E%3Cstop offset='1' stop-color='rgb(235,90,75)' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='c'%3E%3Cstop offset='0' stop-color='rgb(255,225,160)' stop-opacity='.75'/%3E%3Cstop offset='.25' stop-color='rgb(255,225,160)' stop-opacity='.35'/%3E%3Cstop offset='1' stop-color='rgb(255,225,160)' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='d'%3E%3Cstop offset='0' stop-color='rgb(130,165,255)' stop-opacity='.75'/%3E%3Cstop offset='.25' stop-color='rgb(130,165,255)' stop-opacity='.35'/%3E%3Cstop offset='1' stop-color='rgb(130,165,255)' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M0 8Q100 58 200 8Q300 58 400 8' fill='none' stroke='%23e8c46a' stroke-opacity='.35' stroke-width='1.2'/%3E%3Ccircle cx='50' cy='34' r='15' fill='url(%23a)'/%3E%3Ccircle cx='50' cy='34' r='2.6' fill='%23fff3d6'/%3E%3Ccircle cx='100' cy='40' r='15' fill='url(%23b)'/%3E%3Ccircle cx='100' cy='40' r='2.6' fill='%23fff3d6'/%3E%3Ccircle cx='150' cy='34' r='15' fill='url(%23c)'/%3E%3Ccircle cx='150' cy='34' r='2.6' fill='%23fff3d6'/%3E%3Ccircle cx='250' cy='34' r='15' fill='url(%23b)'/%3E%3Ccircle cx='250' cy='34' r='2.6' fill='%23fff3d6'/%3E%3Ccircle cx='300' cy='40' r='15' fill='url(%23a)'/%3E%3Ccircle cx='300' cy='40' r='2.6' fill='%23fff3d6'/%3E%3Ccircle cx='350' cy='34' r='15' fill='url(%23d)'/%3E%3Ccircle cx='350' cy='34' r='2.6' fill='%23fff3d6'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 0%, rgb(255 190 100 / 0.14), transparent 60%),
    radial-gradient(ellipse at 85% 100%, rgb(225 90 80 / 0.12), transparent 55%),
    radial-gradient(circle at 90px 60px, rgb(255 230 170 / 0.9) 0 1.5px, rgb(255 210 130 / 0.2) 3px, transparent 5px),
    radial-gradient(circle at 150px 190px, rgb(255 230 170 / 0.7) 0 1.5px, rgb(255 210 130 / 0.2) 3px, transparent 5px),
    radial-gradient(circle at 40px 120px, rgb(255 200 120 / 0.8) 0 2px, rgb(255 190 110 / 0.2) 4px, transparent 6px),
    radial-gradient(circle at 250px 60px, rgb(255 150 120 / 0.7) 0 1.5px, rgb(255 140 110 / 0.2) 3px, transparent 5px),
    linear-gradient(160deg, #1d1210, #2c170f 55%, #25142b);
  background-size: 400px 100px, auto, auto, 233px 233px, 311px 311px, 421px 421px, 367px 367px, auto;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  background-repeat: repeat-x, no-repeat, no-repeat, repeat, repeat, repeat, repeat, no-repeat;
}
.theme--xmas-green {
  background-color: #0f3a2a;
  /* Tile sizes are unrelated primes-ish, so the layers never line up into a
     grid: it reads as scattered lights rather than a pattern. */
  background-image:
    radial-gradient(circle at 160px 120px, rgb(255 214 130 / 0.16), transparent 90px),
    radial-gradient(circle at 600px 380px, rgb(255 200 110 / 0.12), transparent 130px),
    radial-gradient(circle at 70px 140px, rgb(255 226 150 / 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 180px 60px, rgb(255 226 150 / 0.35) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 300px 250px, rgb(215 70 60 / 0.5) 0 3px, transparent 4px),
    radial-gradient(circle at 40px 270px, rgb(255 226 150 / 0.45) 0 2.5px, transparent 3.5px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 480'%3E%3Cg transform='translate(150 310) rotate(14)' fill='none' stroke='%23e8c46a' stroke-opacity='0.22' stroke-width='3' stroke-linecap='round'%3E%3Cg id='a'%3E%3Cpath d='M0 0V-38M0 -26L-8 -34M0 -26L8 -34M0 -14L-6 -20M0 -14L6 -20'/%3E%3C/g%3E%3Cuse href='%23a' transform='rotate(60)'/%3E%3Cuse href='%23a' transform='rotate(120)'/%3E%3Cuse href='%23a' transform='rotate(180)'/%3E%3Cuse href='%23a' transform='rotate(240)'/%3E%3Cuse href='%23a' transform='rotate(300)'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 690 690'%3E%3Cg transform='translate(470 150) rotate(-22) scale(0.7)' fill='none' stroke='%23e8c46a' stroke-opacity='0.18' stroke-width='3.5' stroke-linecap='round'%3E%3Cg id='b'%3E%3Cpath d='M0 0V-38M0 -26L-8 -34M0 -26L8 -34M0 -14L-6 -20M0 -14L6 -20'/%3E%3C/g%3E%3Cuse href='%23b' transform='rotate(60)'/%3E%3Cuse href='%23b' transform='rotate(120)'/%3E%3Cuse href='%23b' transform='rotate(180)'/%3E%3Cuse href='%23b' transform='rotate(240)'/%3E%3Cuse href='%23b' transform='rotate(300)'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 90px 210px, rgb(255 226 150 / 0.4) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 230px 40px, rgb(255 226 150 / 0.55) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 120px 330px, rgb(215 70 60 / 0.45) 0 3px, transparent 4px),
    radial-gradient(circle at 310px 150px, rgb(255 226 150 / 0.4) 0 2px, transparent 3px),
    radial-gradient(circle at 80px 70px, rgb(255 205 120 / 0.14), transparent 70px),
    radial-gradient(circle at 400px 300px, rgb(255 205 120 / 0.12), transparent 100px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 370 370'%3E%3Cg transform='translate(250 90) rotate(35) scale(0.75)' fill='none' stroke='%23e8c46a' stroke-opacity='0.2' stroke-width='3.5' stroke-linecap='round'%3E%3Cg id='c'%3E%3Cpath d='M0 0V-38M0 -26L-8 -34M0 -26L8 -34M0 -14L-6 -20M0 -14L6 -20'/%3E%3C/g%3E%3Cuse href='%23c' transform='rotate(60)'/%3E%3Cuse href='%23c' transform='rotate(120)'/%3E%3Cuse href='%23c' transform='rotate(180)'/%3E%3Cuse href='%23c' transform='rotate(240)'/%3E%3Cuse href='%23c' transform='rotate(300)'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 530 530'%3E%3Cg transform='translate(120 400) rotate(-8) scale(1.15)' fill='none' stroke='%23e8c46a' stroke-opacity='0.16' stroke-width='2.5' stroke-linecap='round'%3E%3Cg id='d'%3E%3Cpath d='M0 0V-38M0 -26L-8 -34M0 -26L8 -34M0 -14L-6 -20M0 -14L6 -20'/%3E%3C/g%3E%3Cuse href='%23d' transform='rotate(60)'/%3E%3Cuse href='%23d' transform='rotate(120)'/%3E%3Cuse href='%23d' transform='rotate(180)'/%3E%3Cuse href='%23d' transform='rotate(240)'/%3E%3Cuse href='%23d' transform='rotate(300)'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #145238, #0c2e22);
  background-size: 700px 560px, 910px 640px, 197px 197px, 251px 251px, 433px 433px, 317px 317px, 480px 480px, 690px 690px,
    283px 283px, 349px 349px, 389px 389px, 337px 337px, 410px 410px, 560px 560px, 370px 370px, 530px 530px, auto;
  background-position: 0 0;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat,
    repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, no-repeat;
}

.theme--xmas-snow :is(.hero__headline, .section-head__heading, .feature__heading, .contact-band__heading, .cta__heading, .prose h2, .prose h3),
.theme--xmas-lights :is(.hero__headline, .section-head__heading, .feature__heading, .contact-band__heading, .cta__heading, .prose h2, .prose h3),
.theme--xmas-green :is(.hero__headline, .section-head__heading, .feature__heading, .contact-band__heading, .cta__heading, .prose h2, .prose h3) {
  color: #f6d98a;
}

:is(.theme--xmas-snow, .theme--xmas-lights, .theme--xmas-green) :is(.hero__text, .hero__body, .feature__body, .section-head__intro, .contact-band__subtitle, .text-section__body, .fact, .empty) {
  color: inherit;
}
:is(.theme--xmas-snow, .theme--xmas-lights, .theme--xmas-green) :is(.hero__eyebrow, .link-underlined, .link-more, .prose a) { color: #f6d98a; }
:is(.theme--xmas-snow, .theme--xmas-lights, .theme--xmas-green) .badge:not(.card .badge) {
  color: #f6d98a;
  border-color: #f6d98a;
}
:is(.theme--xmas-snow, .theme--xmas-lights, .theme--xmas-green) .feature__box { border-color: rgb(246 217 138 / 0.4); }
:is(.theme--xmas-snow, .theme--xmas-lights, .theme--xmas-green) :is(.stats__value, .quote__by strong) { color: #f6d98a; }
:is(.theme--xmas-snow, .theme--xmas-lights, .theme--xmas-green) .quote__text { color: #fff; }

/* Admin: home page sections ------------------------------------------------*/

.section-list {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.section-item {
  display: grid;
  grid-template-columns: 2rem 6rem minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
}

.section-item:target {
  outline: var(--focus);
}

.section-item--hidden {
  background: transparent;
  border-style: dashed;
}

.section-item--hidden :is(.section-item__preview, .section-item__title) {
  opacity: 0.5;
}

.section-item__number {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--gold);
  text-align: center;
}

.section-item__preview {
  display: block;
  width: 6rem;
  height: 3.5rem;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  overflow: hidden;
}

.section-item__kind {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-item__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
}

.section-item__title a {
  color: var(--navy);
}

.section-item__actions,
.section-item__actions form {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}

.section-item__actions .btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.admin-card__legend {
  padding: 0 var(--space-2);
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--navy);
}

fieldset.admin-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin: 0;
  min-width: 0;
}

.field--inline label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--ink-strong);
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.choices--images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
}

.choice {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-size: var(--step--1);
}

.choice:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.choice:has(input:focus-visible) {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

.choice__swatch {
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
}

.choice--image {
  flex-direction: column;
  align-items: stretch;
  overflow-wrap: anywhere;
}

.choice--image img,
.choice__blank {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--cream-deep);
  border-radius: var(--radius);
}

.section-delete {
  margin-top: var(--space-6);
}

.layout-picker {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-4);
}

.layout-card,
.layout-card button {
  height: 100%;
}

.layout-card button {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.layout-card button:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.layout-card button:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

.layout-card__name {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--navy);
}

.layout-card__desc {
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* Each thumbnail is a little sketch drawn with six blocks. */
.layout-thumb {
  display: grid;
  gap: 4px;
  height: 6rem;
  padding: 8px;
  margin-bottom: var(--space-2);
  background: var(--cream-deep);
  border-radius: var(--radius);
}

.layout-thumb i {
  display: block;
  background: var(--hairline-solid);
  border-radius: 2px;
}

.layout-thumb--text { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); }
.layout-thumb--text i:nth-child(1) { grid-row: 1 / 4; background: var(--navy); opacity: 0.4; }
.layout-thumb--text i:nth-child(n + 5) { display: none; }

.layout-thumb--gallery { grid-template-columns: repeat(3, 1fr); }
.layout-thumb--gallery i { background: var(--navy); opacity: 0.4; }

.layout-thumb--cta { place-content: center; justify-items: center; grid-template-columns: 1fr; }
.layout-thumb--cta i:nth-child(1) { width: 8rem; height: 10px; background: var(--navy); }
.layout-thumb--cta i:nth-child(2) { width: 6rem; height: 6px; }
.layout-thumb--cta i:nth-child(3) { width: 3rem; height: 14px; background: var(--gold); }
.layout-thumb--cta i:nth-child(n + 4) { display: none; }

.layout-thumb--banner { place-content: center; justify-items: center; grid-template-columns: 1fr; background: rgb(0 40 80 / 0.35); }
.layout-thumb--banner i:nth-child(1) { width: 7rem; height: 10px; background: #fff; }
.layout-thumb--banner i:nth-child(2) { width: 5rem; height: 6px; background: #fff; }
.layout-thumb--banner i:nth-child(3) { width: 3rem; height: 12px; background: var(--gold); }
.layout-thumb--banner i:nth-child(n + 4) { display: none; }

.layout-thumb--stats { grid-template-columns: repeat(3, 1fr); grid-template-rows: 2fr 1fr; align-items: center; }
.layout-thumb--stats i:nth-child(-n + 3) { height: 60%; background: var(--gold); }
.layout-thumb--stats i:nth-child(n + 4) { height: 6px; }

.layout-thumb--cards { grid-template-columns: repeat(3, 1fr); grid-template-rows: 3fr 2fr; }
.layout-thumb--cards i:nth-child(-n + 3) { background: var(--navy); opacity: 0.4; }

.layout-thumb--events { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 3fr; }
.layout-thumb--events i:nth-child(-n + 3) { background: var(--gold); }
.layout-thumb--events i:nth-child(n + 4) { background: #fff; border: 1px solid var(--hairline-solid); }

.layout-thumb--quote { place-content: center; justify-items: center; grid-template-columns: 1fr; }
.layout-thumb--quote i:nth-child(1) { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); opacity: 0.4; }
.layout-thumb--quote i:nth-child(2) { width: 9rem; height: 8px; }
.layout-thumb--quote i:nth-child(3) { width: 7rem; height: 8px; }
.layout-thumb--quote i:nth-child(4) { width: 3rem; height: 5px; background: var(--gold); }
.layout-thumb--quote i:nth-child(n + 5) { display: none; }

.layout-thumb--sponsors { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; align-items: center; }
.layout-thumb--sponsors i { height: 50%; margin: 0 6px; border-radius: 999px; }

.layout-thumb--form { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 2fr 1fr; padding-inline: 2.5rem; }
.layout-thumb--form i { background: #fff; border: 1px solid var(--hairline-solid); }
.layout-thumb--form i:nth-child(3) { grid-column: 1 / -1; }
.layout-thumb--form i:nth-child(4) { grid-column: 1 / -1; }
.layout-thumb--form i:nth-child(5) { width: 40%; background: var(--gold); border: 0; }
.layout-thumb--form i:nth-child(6) { display: none; }

/* The five built-in sections. */
.layout-thumb--hero { grid-template-columns: 3fr 2fr; grid-template-rows: 1fr 1fr 1fr; }
.layout-thumb--hero i:nth-child(1) { grid-area: 1 / 1 / 4 / 3; background: var(--navy); opacity: 0.5; }
.layout-thumb--hero i:nth-child(2) { grid-area: 2 / 1; align-self: end; height: 10px; background: #fff; z-index: 1; }
.layout-thumb--hero i:nth-child(3) { grid-area: 3 / 1; align-self: start; width: 40%; height: 12px; background: var(--gold); z-index: 1; }
.layout-thumb--hero i:nth-child(n + 4) { display: none; }

.layout-thumb--clubs { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }
.layout-thumb--clubs i { background: #fff; border: 1px solid var(--hairline-solid); border-top: 4px solid var(--navy); }

.layout-thumb--news { grid-template-columns: 1fr 4fr; grid-template-rows: repeat(3, 1fr); align-items: center; }
.layout-thumb--news i:nth-child(odd) { height: 100%; background: var(--gold); }
.layout-thumb--news i:nth-child(even) { height: 8px; }

.layout-thumb--feature { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); align-items: center; }
.layout-thumb--feature i:nth-child(1) { grid-area: 1 / 2 / 4 / 3; align-self: stretch; background: var(--navy); opacity: 0.4; }
.layout-thumb--feature i:nth-child(2) { width: 40%; height: 8px; background: var(--gold); }
.layout-thumb--feature i:nth-child(3) { height: 10px; background: var(--navy); }
.layout-thumb--feature i:nth-child(4) { height: 6px; }
.layout-thumb--feature i:nth-child(n + 5) { display: none; }

.layout-thumb--contact { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); }
.layout-thumb--contact i:nth-child(1) { grid-row: 1 / 5; background: var(--navy); opacity: 0.4; }
.layout-thumb--contact i:nth-child(n + 2) { background: #fff; border: 1px solid var(--hairline-solid); }
.layout-thumb--contact i:nth-child(5) { width: 40%; background: var(--gold); border: 0; }
.layout-thumb--contact i:nth-child(6) { display: none; }

/* A built-in already on the page cannot be added again. */
.layout-card--taken button {
  cursor: not-allowed;
  background: transparent;
  border-style: dashed;
}

.layout-card--taken button:hover {
  border-color: var(--hairline-solid);
  box-shadow: none;
}

.layout-card--taken :is(.layout-thumb, .layout-card__name, .layout-card__desc) {
  opacity: 0.45;
}

.layout-card__taken {
  align-self: flex-start;
  margin-top: auto;
  padding: 2px var(--space-2);
  font-size: var(--step--1);
  color: var(--navy);
  background: var(--cream-deep);
  border-radius: 999px;
}

/* The mini thumbnail is the full sketch scaled down, so the fixed sizes in
   the sketches keep their proportions. It fills a 6rem x 3.5rem box. */
.layout-thumb--mini {
  width: 16rem;
  height: 9.333rem;
  margin: 0;
  transform: scale(0.375);
  transform-origin: top left;
}

.section-type {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.section-type__thumb {
  flex: none;
  width: 6rem;
  height: 3.5rem;
  overflow: hidden;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
}

.section-type__label {
  margin: 0;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-type__desc {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.section-item__type {
  color: var(--navy);
}

.item-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  counter-reset: item;
}

.item-row {
  display: grid;
  grid-template-columns: 2rem repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3) var(--space-4);
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-radius: var(--radius);
  counter-increment: item;
}

.item-row::before {
  content: counter(item);
  padding-top: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--gold);
}

.item-row .field { margin: 0; }

.item-row > .field__error { grid-column: 2 / -1; }

.item-row.field--invalid { border-color: var(--danger); }

@media (max-width: 60rem) {
  .split,
  .venues,
  .text-section__inner,
  .cta__inner--image {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 48rem) {
  .section-item {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .section-item__preview {
    display: none;
  }

  .section-item__actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 48rem) {
  .grid--2,
  .form__row {
    grid-template-columns: 1fr;
  }

  .contact-band__facts {
    flex-direction: column;
    align-items: center;
  }
}
/* --- 18. Admin dashboard layout ------------------------------------------- */

.is-admin.has-sidebar { background: #f4f1ea; }

.is-admin.has-sidebar .site-header { position: sticky; }
.is-admin.has-sidebar .site-header__inner { min-height: 3.5rem; }
.is-admin.has-sidebar .site-header .wordmark { font-size: var(--step-1); }
.admin-header__actions { margin-left: auto; gap: var(--space-4); }

.admin-shell {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  min-height: calc(100vh - 3.5rem);
}

.admin-sidebar {
  background: #fff;
  border-right: 1px solid var(--hairline-solid);
  padding: var(--space-5) var(--space-3);
}

.admin-nav {
  position: sticky;
  top: calc(3.5rem + var(--space-5));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.admin-nav__group { display: flex; flex-direction: column; gap: 2px; }

.admin-nav__title {
  margin: 0 0 var(--space-1);
  padding-inline: var(--space-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-muted);
}

.admin-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  color: var(--ink-strong);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.admin-nav__link .icon { width: 1.25rem; height: 1.25rem; flex: none; color: var(--ink-muted); }

.admin-nav__link:hover,
.admin-nav__link:focus-visible { background: var(--cream-deep); text-decoration: none; }

.admin-nav__link[aria-current="page"] { background: var(--navy); color: #fff; }
.admin-nav__link[aria-current="page"] .icon { color: var(--gold-bright); }

.admin-content { min-width: 0; padding: var(--space-6) var(--space-5) var(--space-8); }
.admin-content .shell { max-width: 72rem; padding-inline: 0; }
.admin-content .shell--narrow { max-width: 48rem; }
.admin-content .section { padding-block: 0; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.page-head__title { margin: 0; font-size: var(--step-4); }
.page-head__intro { margin: var(--space-1) 0 0; color: var(--ink-muted); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.15s, transform 0.15s;
}

.kpi:hover,
.kpi:focus-visible { box-shadow: 0 6px 18px rgba(29, 59, 95, 0.1); transform: translateY(-1px); text-decoration: none; }

.kpi__label { font-size: 0.8125rem; font-weight: 600; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--ink-muted); }
.kpi__number { font-family: var(--font-display); font-size: var(--step-5); line-height: 1.1; color: var(--navy); }
.kpi__meta { font-size: 0.875rem; color: var(--ink-muted); }
.kpi--alert { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--space-4);
  align-items: start;
}

.panel {
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-radius: 10px;
  padding: var(--space-5);
}

.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.panel__title { margin: 0; font-size: var(--step-2); }
.panel__list { list-style: none; margin: 0; padding: 0; }

.panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--hairline-solid);
}

.panel__row > div { display: flex; flex-direction: column; min-width: 0; }
.panel__row-title { font-weight: 600; color: var(--ink-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--space-3); }

.quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--hairline-solid);
  border-radius: 8px;
  color: var(--ink-strong);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

.quick .icon { width: 1.5rem; height: 1.5rem; color: var(--navy); }
.quick:hover,
.quick:focus-visible { background: var(--cream-deep); border-color: var(--gold); text-decoration: none; }

.is-admin.has-sidebar .table { background: #fff; border: 1px solid var(--hairline-solid); border-radius: 10px; overflow: hidden; }
.is-admin.has-sidebar .table th { background: var(--cream); }
.is-admin.has-sidebar .card { border-radius: 10px; }

@media (max-width: 60rem) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: 0; border-bottom: 1px solid var(--hairline-solid); padding: var(--space-2) var(--space-3); }
  .admin-nav { position: static; flex-direction: row; gap: var(--space-2); overflow-x: auto; }
  .admin-nav__group { flex-direction: row; gap: var(--space-1); }
  .admin-nav__title { display: none; }
  .admin-nav__link { white-space: nowrap; }
  .dash-grid { grid-template-columns: 1fr; }
  .admin-header__actions a:not(.btn) { display: none; }
}

/* --- 19. Admin: clubs, pages list and page editor ------------------------- */

.club-list { display: flex; flex-direction: column; gap: var(--space-5); }

.club-card {
  gap: 0;
  background: #fff;
  border: 1px solid var(--hairline-solid);
  border-left: 4px solid var(--navy);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(29, 59, 95, 0.05);
  overflow: hidden;
}

.club-card:focus-within { border-left-color: var(--gold); box-shadow: 0 6px 18px rgba(29, 59, 95, 0.1); }

.club-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--cream);
  border-bottom: 1px solid var(--hairline-solid);
}

.club-card__num {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
}

.club-card__num .icon { width: 1.15rem; height: 1.15rem; }
.club-card__name { margin: 0; flex: 1; font-size: var(--step-2); }
.club-card__body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); }
.club-card__foot { display: flex; justify-content: flex-end; padding: var(--space-3) var(--space-5); border-top: 1px solid var(--hairline-solid); background: var(--cream); }

/* Pages list */
.is-admin.has-sidebar .section-list { margin-top: 0; }

.is-admin.has-sidebar .section-item {
  border-radius: 10px;
  padding: var(--space-4);
  transition: box-shadow 0.15s;
}

.is-admin.has-sidebar .section-item:hover { box-shadow: 0 6px 18px rgba(29, 59, 95, 0.1); }
.is-admin.has-sidebar .section-item__preview { border-radius: 6px; }
.is-admin.has-sidebar .section-item__title { font-size: var(--step-1); }

/* Page editor */
.shell--editor { max-width: 56rem !important; }
.crumbs { margin: 0 0 var(--space-4); font-size: 0.9375rem; }
.editor-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-5); }
.editor-head .section-type__thumb { width: 7rem; height: 4rem; border-radius: 8px; }

.is-admin.has-sidebar .admin-card {
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(29, 59, 95, 0.05);
  padding: 0 var(--space-5) var(--space-5);
}

.is-admin.has-sidebar fieldset.admin-card { gap: var(--space-5); }

.is-admin.has-sidebar .admin-card__legend {
  float: left;
  width: calc(100% + 2 * var(--space-5));
  margin: 0 calc(-1 * var(--space-5)) var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: var(--cream);
  border-bottom: 1px solid var(--hairline-solid);
  border-radius: 10px 10px 0 0;
  font-size: var(--step-1);
}

.is-admin.has-sidebar .admin-card__legend + * { clear: both; }

.is-admin.has-sidebar .field > label,
.is-admin.has-sidebar .field__label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9375rem;
}

.is-admin.has-sidebar .field input[type="text"],
.is-admin.has-sidebar .field input[type="email"],
.is-admin.has-sidebar .field input[type="tel"],
.is-admin.has-sidebar .field input[type="date"],
.is-admin.has-sidebar .field input[type="password"],
.is-admin.has-sidebar .field input[type="datetime-local"],
.is-admin.has-sidebar .field select,
.is-admin.has-sidebar .field textarea {
  border-radius: 8px;
  padding: 0.65rem var(--space-3);
}

.is-admin.has-sidebar .field input[type="datetime-local"] {
  width: 100%;
  font: inherit;
  border: 1px solid var(--hairline-solid);
  background: #fff;
}

.is-admin.has-sidebar .field input:focus,
.is-admin.has-sidebar .field textarea:focus,
.is-admin.has-sidebar .field select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.is-admin.has-sidebar .choice { border-radius: 999px; padding: var(--space-2) var(--space-4); }
.is-admin.has-sidebar .choice--image { border-radius: 10px; padding: var(--space-2); }
.is-admin.has-sidebar .choice:has(input:checked) { background: #fbf3e3; }
.is-admin.has-sidebar .choice input[type="radio"] { accent-color: var(--navy); }
.is-admin.has-sidebar .choice--image input { position: absolute; opacity: 0; }
.is-admin.has-sidebar .choice--image { position: relative; }
.is-admin.has-sidebar .item-row { border-radius: 10px; background: var(--cream); }
.is-admin.has-sidebar .notice { border-radius: 8px; }

.form__actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin: 0 calc(-1 * var(--space-5));
  padding: var(--space-3) var(--space-5);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--hairline-solid);
}

.danger-zone { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px dashed var(--hairline-solid); }

@media (max-width: 48rem) {
  .form__row { grid-template-columns: 1fr; }
  .editor-head { flex-direction: column; align-items: flex-start; }
}

/* --- 20. Admin: visual image picker --------------------------------------- */

.image-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: var(--space-3);
  max-height: 24rem;
  overflow-y: auto;
  padding: var(--space-1);
}

.image-tile { position: relative; display: flex; flex-direction: column; gap: var(--space-1); cursor: pointer; min-width: 0; }
.image-tile input { position: absolute; opacity: 0; pointer-events: none; }

.image-tile__frame {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 2px solid var(--hairline-solid);
  border-radius: 10px;
  background: var(--cream-deep);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.image-tile__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-tile__blank { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-muted); }
.image-tile__blank .icon { width: 2rem; height: 2rem; }
.image-tile__name { font-size: 0.8125rem; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.image-tile:hover .image-tile__frame { border-color: var(--gold-bright); }
.image-tile:has(input:checked) .image-tile__frame { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.image-tile:has(input:checked) .image-tile__name { color: var(--navy); font-weight: 600; }
.image-tile:has(input:focus-visible) .image-tile__frame { outline: var(--focus); outline-offset: 2px; }

.image-tile:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.item-row__image { grid-column: 2 / -1; }
.item-row .image-picker__grid { grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); max-height: 12rem; }
