:root {
  --moss: #1f3a2e;
  --soil: #152a21;
  --bracken: #c8962e;
  --bracken-light: #e2b85a;
  --mist: #eef2ef;
  --paper: #ffffff;
  --ink: #1b2420;
  --slate: #55625c;
  --line: #c9d3ce;
  --error: #a3312a;
  --focus: #2f6fd6;

  --serif: 'Alegreya', Georgia, serif;
  --sans: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;

  --step--1: 0.94rem;
  --step-0: 1.125rem;
  --step-1: 1.4rem;
  --step-2: 1.9rem;
  --step-3: clamp(2.6rem, 7vw, 4.4rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 40rem;
  --wide: 64rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; }
h2 { font-size: var(--step-2); font-weight: 700; color: var(--moss); margin-bottom: 0.6rem; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--moss); text-underline-offset: 0.18em; }
a:hover { color: var(--soil); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--paper); color: var(--ink); padding: 0.5rem 0.8rem; z-index: 10;
}
.skip:focus { top: 0.8rem; }

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  background: var(--moss);
  color: #f3f1ea;
  overflow: hidden;
}
.hero__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) var(--gutter) 1.5rem;
}
.hero__logo { height: 56px; width: auto; margin-bottom: 1.5rem; }
.hero__org {
  font-family: var(--serif);
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--bracken-light);
  margin-bottom: 0;
}
.hero__title {
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.hero__theme {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  color: var(--bracken-light);
  margin: 0.8rem 0 0.6rem;
}
.hero__verses {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.6rem);
  line-height: 1.3;
  color: #f3f1ea;
  margin-bottom: 1.6rem;
}

/* On phones everything stacks; on wide screens the facts sit on the right. */
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero__sponsor { justify-self: start; }
@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) 19rem;
    grid-template-areas: "text facts" "actions facts" "sponsor facts";
    column-gap: 3rem;
    align-items: start;
  }
  .hero__text { grid-area: text; }
  .hero__actions { grid-area: actions; }
  .hero__sponsor { grid-area: sponsor; }
  .facts { grid-area: facts; align-self: center; }
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
  margin: 0 0 1.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(226, 184, 90, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}
.facts dt { color: var(--bracken-light); font-size: var(--step--1); font-weight: 700; }
.facts dd { margin: 0; line-height: 1.35; }
@media (min-width: 900px) {
  .facts { grid-template-columns: 1fr; gap: 1rem; margin: 0; padding: 1.3rem 1.5rem; }
  .facts dd { font-size: var(--step-1); font-family: var(--serif); }
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-bottom: 2rem; }
.hero__link { color: #f3f1ea; font-weight: 500; }
.hero__link:hover { color: var(--bracken-light); }
/* The sponsor's logo is navy and green, so it sits on a white panel. */
.hero__sponsor {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  max-width: 100%;
  margin: 0;
  padding: 0.5rem 0.9rem;
  background: var(--paper);
  border-radius: 8px;
  color: var(--slate);
  font-size: var(--step--1);
}
.hero__sponsor img { display: block; height: 40px; width: auto; max-width: 100%; }

.roots {
  display: block;
  width: 100%;
  height: clamp(110px, 18vw, 230px);
  background: var(--soil);
}
.roots__ground { stroke: var(--bracken); stroke-width: 2; opacity: 0.55; }
.roots__lines path {
  fill: none;
  stroke: var(--bracken);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: grow 2.6s cubic-bezier(.3,.6,.2,1) 0.3s forwards;
}
.roots__lines path.thin { stroke-width: 1.6; opacity: 0.75; animation-delay: 1.1s; }
@keyframes grow { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .roots__lines path { animation: none; stroke-dashoffset: 0; }
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 6px;
  font: 700 var(--step-0)/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.button--gold { background: var(--bracken); color: var(--soil); }
.button--gold:hover { background: var(--bracken-light); color: var(--soil); }
.button--gold:disabled { background: #d9cfb8; color: #6b665a; cursor: not-allowed; }
.button--quiet { background: transparent; border-color: var(--moss); color: var(--moss); }
.button--quiet:hover { background: var(--moss); color: var(--paper); }
.button--wide { width: 100%; }

/* ── Sections ───────────────────────────────────────────────────────── */

.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 0;
}
.prose > * { max-width: var(--measure); }
.lede { color: var(--slate); max-width: var(--measure); }
.note {
  max-width: var(--measure);
  border-left: 4px solid var(--bracken);
  padding: 0.2rem 0 0.2rem 0.9rem;
  margin-top: 1rem;
}
.note--strong {
  background: var(--paper);
  border-left-width: 6px;
  border-radius: 0 6px 6px 0;
  padding: 0.8rem 1rem;
  font-weight: 700;
  color: var(--moss);
}
.hint { color: var(--slate); font-size: var(--step--1); margin: 0.2rem 0 0.6rem; }
.optional { color: var(--slate); font-weight: 400; }
.todo { background: #fff3cd; padding: 0 0.25rem; }
.small h2 { font-size: var(--step-1); margin-top: 1.6rem; }
.small h2:first-child { margin-top: 0; }
.terms { padding-left: 1.2rem; }
.terms li { margin-bottom: 0.5rem; }

.verse {
  margin: 1.6rem 0 0;
  padding: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--moss);
}
.verse p { margin: 0 0 0.3rem; }
.verse cite { font-family: var(--sans); font-style: normal; font-size: var(--step--1); color: var(--slate); }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; max-width: var(--wide); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }

/* ── Menu ───────────────────────────────────────────────────────────── */

.menu-teaser { font-weight: 700; color: var(--moss); max-width: var(--measure); }

/* The full menu is folded away in a <details>; its <summary> looks like a button. */
.menu-details summary { list-style: none; }
.menu-details summary::-webkit-details-marker { display: none; }
.menu-details summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.7rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-0.15rem) rotate(45deg);
}
.menu-details[open] summary::after { transform: translateY(0.1rem) rotate(-135deg); }
.menu-details[open] .menu-details__closed,
.menu-details:not([open]) .menu-details__open { display: none; }

.menu { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.5rem; align-items: start; }
@media (min-width: 620px) { .menu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .menu { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.menu__day {
  background: var(--paper);
  border-top: 6px solid var(--moss);
  border-radius: 8px;
  padding: 1.2rem;
  overflow: hidden;
}
.menu__day h3 { color: var(--moss); margin-bottom: 0.6rem; }
.menu dl { margin: 0; }
.menu__meal { padding: 0.7rem 0; border-top: 1px dashed var(--line); }
.menu__meal:first-child { border-top: 0; padding-top: 0; }
.menu__meal:last-child { padding-bottom: 0; }
.menu dt { font-weight: 700; }
.menu dd { margin: 0.15rem 0 0; font-size: var(--step--1); }
.menu__meal--special,
.menu__meal--special:last-child {
  background: #f7ecd2;
  border-top: 0;
  border-left: 4px solid var(--bracken);
  margin: 0.4rem -1.2rem 0;
  padding: 0.8rem 1.2rem 0.8rem calc(1.2rem - 4px);
}
.menu__meal--special:last-child { margin-bottom: -1.2rem; padding-bottom: 1.2rem; }
.menu__feature { display: block; font-family: var(--serif); font-size: var(--step-0); font-weight: 700; color: var(--soil); }

/* ── Prices ─────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; max-width: 44rem; }
.prices { width: 100%; border-collapse: collapse; background: var(--paper); font-variant-numeric: tabular-nums; }
.prices th, .prices td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.prices thead th { font-family: var(--serif); font-size: var(--step-0); background: var(--moss); color: #f3f1ea; vertical-align: bottom; }
.prices thead th .left { display: block; font-family: var(--sans); font-weight: 400; font-size: var(--step--1); color: #c9d6cf; }
.prices td + td { font-weight: 700; }

/* ── Booking form ───────────────────────────────────────────────────── */

.status {
  max-width: var(--measure);
  background: var(--paper);
  border-left: 4px solid var(--bracken);
  padding: 1rem 1.2rem;
}

.booking {
  display: grid;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (min-width: 900px) {
  .booking { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; }
  .summary { position: sticky; top: 1rem; }
}

.group { border: 0; margin: 0 0 2rem; padding: 0; min-width: 0; }
.group legend {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--moss);
  padding: 0;
  margin-bottom: 0.6rem;
}

.fields { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.field { display: flex; flex-direction: column; }
.field label { font-weight: 700; margin-bottom: 0.3rem; }
.field .hint { margin: 0.3rem 0 0; }

input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid #8d9a94;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  min-height: 48px;
  width: 100%;
}
textarea { resize: vertical; }
input[aria-invalid="true"] { border-color: var(--error); }

.chalets { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.chalet {
  position: relative;
  display: block;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1rem 1rem 3rem;
  cursor: pointer;
}
.chalet input { position: absolute; left: 1rem; top: 1.15rem; width: 1.3rem; height: 1.3rem; min-height: 0; accent-color: var(--moss); }
.chalet strong { display: block; font-family: var(--serif); font-size: var(--step-1); }
.chalet span { display: block; color: var(--slate); font-size: var(--step--1); }
.chalet:has(input:checked) { border-color: var(--moss); box-shadow: inset 0 0 0 1px var(--moss); }
.chalet:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.chalet:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.people { list-style: none; margin: 0 0 1rem; padding: 0; counter-reset: person; }
.person {
  counter-increment: person;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.person__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.6rem; }
.person__head h4 { margin: 0; font-family: var(--serif); font-size: var(--step-0); color: var(--moss); }
.person__head h4::before { content: "Person " counter(person); }
.person__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.person__price.is-empty { font-weight: 400; color: var(--slate); }
.person__sex { border: 0; margin: 0; padding: 0; min-width: 0; }
/* Like the other field labels, not the big section legends around it. */
.group .person__sex legend { padding: 0; margin: 0; font-family: var(--sans); font-size: var(--step-0); color: var(--ink); }
.person__fields { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .person__fields { grid-template-columns: 2fr 1fr; }
  .person__fields .field--wide { grid-column: 1 / -1; }
}
.remove { background: none; border: 0; padding: 0.4rem 0; color: var(--error); font: inherit; font-size: var(--step--1); text-decoration: underline; cursor: pointer; }

.choices { display: flex; gap: 1.5rem; }
.choice { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; cursor: pointer; }
.choice input { width: 1.3rem; height: 1.3rem; min-height: 0; accent-color: var(--moss); flex: none; }
.choice--terms { align-items: flex-start; }
.choice--terms input { margin-top: 0.25rem; }
.availability { margin-top: 0.75rem; }

.summary {
  background: var(--paper);
  border-top: 6px solid var(--moss);
  border-radius: 8px;
  padding: 1.2rem;
}
.summary h3 { color: var(--moss); margin-bottom: 0.8rem; }
.summary__lines { font-variant-numeric: tabular-nums; }
.summary__line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--line); font-size: var(--step--1); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin: 1rem 0; font-size: var(--step-1); font-family: var(--serif); }
.summary__total strong { font-variant-numeric: tabular-nums; }

.errors { color: var(--error); background: #fbeceb; border-radius: 6px; padding: 0.8rem 1rem; margin-bottom: 1rem; font-size: var(--step--1); }
.errors ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }

.warning { color: var(--error); background: #fbeceb; border-left: 4px solid var(--error); border-radius: 0 6px 6px 0; padding: 0.7rem 1rem; margin: 0 0 1rem; font-size: var(--step--1); font-weight: 700; }
.warning:empty { display: none; }

/* ── "Book now" bar (phones) ───────────────────────────────────────── */

/* Hidden until app.js adds .is-visible, and never shown on wide screens. */
.book-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(21, 42, 33, 0.12);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s;
}
.book-bar.is-visible { transform: none; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .book-bar { transition: none; } }
@media (min-width: 900px) { .book-bar { display: none; } }
/* Room at the bottom so the bar never covers the footer. */
@media (max-width: 899px) {
  body.has-book-bar { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
}

/* ── Sponsor & footer ───────────────────────────────────────────────── */

.sponsor {
  margin: clamp(3rem, 7vw, 5rem) 0 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.4rem var(--gutter);
  text-align: center;
}
.sponsor__label { color: var(--slate); margin-bottom: 0.3rem; }
.sponsor__logo { display: block; margin: 0.4rem auto 0; height: clamp(56px, 14vw, 84px); width: auto; max-width: 100%; }

.footer { padding: 2rem var(--gutter) 3rem; text-align: center; color: var(--slate); font-size: var(--step--1); }
.footer p { margin: 0; }

/* ── Simple pages (success, admin) ──────────────────────────────────── */

.page { max-width: var(--measure); margin: 0 auto; padding: clamp(2.5rem, 8vw, 5rem) var(--gutter); }
.page h1 { font-size: var(--step-2); color: var(--moss); margin-bottom: 1rem; }
.ref { font-family: var(--serif); font-size: var(--step-1); font-weight: 700; letter-spacing: 0.06em; }
.admin { max-width: var(--wide); }
.admin table { border-collapse: collapse; background: var(--paper); margin: 1rem 0 2rem; font-variant-numeric: tabular-nums; width: 100%; }
.admin th, .admin td { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; }
.admin thead th { background: var(--moss); color: #f3f1ea; }
.admin .headcount th, .admin .headcount td { padding: 0.5rem 0.6rem; }
.headcount td, .headcount thead th:not(:first-child) { text-align: right; }
.headcount tbody th { font-weight: 500; }
.headcount__total th, .headcount__total td { font-weight: 700; border-top: 2px solid var(--moss); }
.headcount__left th, .headcount__left td { color: var(--moss); font-weight: 700; }
.headcount__both { background: var(--mist); }
.downloads { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
#results { margin-top: 2.5rem; }
.inline-form .field { flex: 1 1 16rem; }

/* Organiser page: bookings list */
.bookings-title { margin-top: 2.5rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem 1.5rem; margin: 1rem 0; }
.filters .field { flex: 1 1 12rem; }
.filters .filters__search { flex: 2 1 16rem; }
.list-count { font-weight: 700; color: var(--moss); margin: 0 0 1rem; }

.booking-cards { display: grid; gap: 1rem; }
.booking-card {
  background: var(--paper);
  border-top: 6px solid var(--moss);
  border-radius: 8px;
  padding: 1.2rem;
  min-width: 0;
}
.booking-card.is-cancelled { border-top-color: var(--slate); opacity: 0.75; }
.booking-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; margin-bottom: 0.8rem; }
.booking-card__head h3 { color: var(--moss); letter-spacing: 0.03em; }
.booking-card__meta { flex-basis: 100%; margin: 0; color: var(--slate); font-size: var(--step--1); }
.status-pill { background: var(--moss); color: #f3f1ea; border-radius: 999px; padding: 0.1rem 0.7rem; font-size: var(--step--1); font-weight: 700; }
.status-pill--cancelled { background: #fbeceb; color: var(--error); }

.booking-card__lead { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin-bottom: 0.7rem; }
.booking-card__lead strong { margin-right: auto; overflow-wrap: anywhere; }
.contact-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 1rem;
  border: 2px solid var(--moss);
  border-radius: 999px;
  color: var(--moss);
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
}
.contact-button:hover { background: var(--moss); color: var(--paper); }

/* One line per person where it fits; wraps neatly on narrow screens. */
.people-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.person-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.person-row__name { font-weight: 700; overflow-wrap: anywhere; }
.person-row__age { color: var(--slate); font-size: var(--step--1); }
.diet { display: inline-block; background: #f7ecd2; color: var(--soil); font-weight: 700; border-radius: 999px; padding: 0.05rem 0.6rem; overflow-wrap: anywhere; }

.booking-card__room { margin: 0.6rem 0 0; font-weight: 700; color: var(--moss); }
.booking-card__more { margin-top: 0.6rem; }
.booking-card__more summary { cursor: pointer; padding: 0.3rem 0; color: var(--moss); font-weight: 700; font-size: var(--step--1); }
.booking-card__details { display: grid; gap: 0.5rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 0.4rem 0 0; }
.booking-card__details dt { color: var(--slate); font-size: var(--step--1); }
.booking-card__details dd { margin: 0; overflow-wrap: anywhere; }

