/* Sol & Fairway — orange sun, coastal sky, a month you can scan on holiday. */

:root {
  --sun: #e36a1e;
  --sun-ink: #9a3412;
  --sky: #e5f4fb;
  --sea: #0c5f78;
  --sea-deep: #08384a;
  --fairway: #1d7a45;
  --paper: #fff8f2;
  --ink: #1c2a33;
  --muted: #4d5d68;
  --line: #f0d8c6;
  --focus: #0c5f78;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 1040px;
}

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

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
}

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

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

.demo {
  margin: 0;
  background: var(--sun);
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-size: 14px;
}

.hero {
  position: relative;
  height: min(68vh, 640px);
  min-height: 420px;
  background: var(--sea-deep);
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(8, 36, 52, 0.62), transparent);
  pointer-events: none;
}

.top {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  color: white;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: white;
}

.brand strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand span { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.86); }

.langs { margin-left: auto; display: flex; gap: 6px; }

.langs button {
  min-width: 40px;
  min-height: 36px;
  border-radius: 999px;
  color: white;
}

.langs button[aria-pressed="true"] {
  background: white;
  color: var(--sea-deep);
  font-weight: 600;
}

.slab {
  width: min(var(--max), calc(100% - 32px));
  margin: -72px auto 0;
  position: relative;
  background: var(--paper);
  padding: 28px 28px 8px;
}

.slab h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0;
}

.slab p.lede {
  margin: 12px 0 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 18px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.filters button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--sea);
  font-weight: 600;
}

.filters button[aria-pressed="true"] {
  background: var(--sun);
  border-color: var(--sun);
  color: white;
}

.days {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 18px 0 8px;
  scroll-snap-type: x proximity;
}

.day {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 52px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: white;
  border: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
}

.day.is-on {
  background: var(--sea);
  border-color: var(--sea);
  color: white;
}

.dots { display: flex; gap: 3px; height: 6px; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }
.dot[data-source="club"] { background: var(--sea); }
.day.is-on .dot { background: white; }

.tools { min-height: 28px; }

.clear-day {
  color: var(--sun-ink);
  font-weight: 600;
  min-height: 32px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feed { padding-bottom: 12px; }

.row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 18px;
  align-items: center;
  padding: 22px 8px;
  border-top: 1px solid var(--line);
}

.row .num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 56px;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--sun);
  font-variant-numeric: tabular-nums;
}

.row[data-source="club"] .num { color: var(--sea); }
.row[data-source="open"] .num { color: #c5b2a4; }

.row h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.row .meta { margin: 4px 0 0; color: var(--muted); }

.src {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sun-ink);
}

.row[data-source="club"] .src { color: var(--sea); }
.row[data-source="open"] h3,
.row[data-source="open"] .src { color: var(--muted); font-weight: 500; }

.empty { color: var(--muted); padding: 12px 0 24px; }

footer.site {
  background: var(--sea-deep);
  color: #d5eef6;
  margin-top: 24px;
  padding: 32px 0 40px;
}

footer.site .inner {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}

footer.site strong {
  font-family: var(--display);
  color: white;
  font-size: 20px;
  letter-spacing: -0.03em;
}

@media (max-width: 700px) {
  .hero { min-height: 320px; height: 52vh; }
  .slab { padding: 22px 16px 4px; margin-top: -48px; }
  .brand span { display: none; }
  .row { grid-template-columns: 64px 1fr; padding-inline: 0; }
  .row .num { font-size: 40px; }
  .row h3 { font-size: 20px; }
  .top { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .days { scroll-behavior: auto; }
}

/* ---- Production additions (real feed) ---- */
.tpl-picker { --pk-bg: #08384a; --pk-fg: #d5eef6; --pk-accent: #e36a1e; --pk-accent-fg: #fff; font-family: var(--sans); }
.tpl-picker .pk-in { width: min(1040px, calc(100% - 24px)); }
.month-head { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.month-head h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -0.03em; }
.count-pill { color: var(--muted); font-weight: 600; }
.month-nav { margin-left: auto; display: flex; gap: 6px; }
.month-nav button {
  min-width: 42px; min-height: 42px; border-radius: 999px; border: 1px solid var(--line); background: white;
  color: var(--sea); font-size: 22px; line-height: 1;
}
.month-nav button:disabled { opacity: 0.35; cursor: default; }
.day { height: 72px; gap: 2px; }
.day .wd { font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.day.is-on .wd { color: rgba(255,255,255,0.8); }
.day:not(.has-events) { opacity: 0.55; }
.dot[data-source="federated"] { background: var(--sun); }
.dot[data-source="club_private"] { background: var(--sea); }
.dot[data-source="society"] { background: var(--fairway); }
.day.is-on .dot { background: white; }
.row[data-source="club_private"] .num, .row[data-source="club_private"] .src { color: var(--sea); }
.row[data-source="society"] .num, .row[data-source="society"] .src { color: var(--fairway); }
.row h3 { font-size: 22px; }
.row h3 a.title:hover { color: var(--sun-ink); }
.row .entry {
  display: inline-block; margin: 6px 0 0 10px; padding: 3px 12px; border-radius: 999px; background: var(--sun); color: white;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.row .entry:hover { background: var(--sun-ink); }
@media (max-width: 700px) { .row h3 { font-size: 18px; } }

/* ---- Template picker (shared, appended at build) ---- */
.tpl-picker {
  background: var(--pk-bg, #111);
  color: var(--pk-fg, #fff);
  font-size: 14px;
  line-height: 1.3;
  position: relative;
  z-index: 5;
}
.tpl-picker .pk-in {
  width: min(1120px, calc(100% - 24px));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  padding: 8px 0;
}
.tpl-picker .pk-label {
  opacity: 0.8;
  margin-right: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tpl-picker a {
  color: inherit;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tpl-picker a:hover { border-color: currentColor; }
.tpl-picker a[aria-current="page"] {
  background: var(--pk-accent, #fff);
  color: var(--pk-accent-fg, #111);
  font-weight: 600;
}
.tpl-picker .pk-sep { opacity: 0.45; }
@media (max-width: 560px) {
  .tpl-picker .pk-label { width: 100%; }
  .tpl-picker .pk-sep { display: none; }
}

/* ---- Shared event-row extras (titles link to source entry pages) ---- */
.row a.title { color: inherit; text-decoration: none; }
.row a.title:hover { text-decoration: underline; }
.noscript-list { padding: 8px 0 24px; }
.noscript-list li { margin: 6px 0; }
