/* Clubhouse Classic — navy, cream, a printed fixture sheet. */

:root {
  --navy: #1b2a4a;
  --cream: #f3eee4;
  --paper: #fbf7f1;
  --brass: #8c7355;
  --ink: #241e16;
  --muted: #5e5346;
  --rule: #ddcfc0;
  --focus: #1b2a4a;
  --serif: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 880px;
}

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

[hidden] { display: none !important; }

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

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 {
  background: var(--navy);
  color: #f3eee4;
  text-align: center;
  margin: 0;
  padding: 8px 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

header.site { padding: 28px 0 8px; }

.bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.brand img {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.brand strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

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

.langs button {
  min-width: 40px;
  min-height: 36px;
  border-bottom: 1px solid transparent;
  font-size: 14px;
}

.langs button[aria-pressed="true"] {
  border-bottom-color: var(--brass);
  font-weight: 600;
}

.plate {
  margin: 18px auto 0;
  padding: 8px;
  background: var(--navy);
  width: min(1040px, calc(100% - 40px));
}

.plate img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center 45%;
}

.intro { text-align: center; padding: 36px 0 8px; }

.intro h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.intro p {
  margin: 12px auto 0;
  max-width: 42ch;
  color: var(--muted);
}

.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 22px 0 8px;
}

.filters button {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--muted);
  min-height: 40px;
  border-bottom: 1px solid transparent;
}

.filters button[aria-pressed="true"] {
  color: var(--navy);
  border-bottom-color: var(--brass);
}

.diary {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  margin: 18px 0 8px;
}

.dow {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 6px 0;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: #f7f1e8;
}

.day {
  min-height: 48px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.day:hover { background: #fff; }

.day.is-on {
  background: var(--navy);
  color: var(--cream);
}

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

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
}

.dot[data-source="club"] { background: var(--brass); }
.day.is-on .dot { background: var(--cream); }

.pad {
  min-height: 48px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.tools {
  display: flex;
  justify-content: center;
  min-height: 36px;
}

.clear-day {
  font-size: 14px;
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 36px;
}

.sheet { padding-bottom: 28px; }

.row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.row .num {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  font-weight: 500;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.row h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.row .meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.src {
  font-family: var(--serif);
  font-style: italic;
  color: var(--brass);
  font-size: 16px;
}

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

.empty {
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  padding: 24px 0 8px;
}

footer.site {
  background: var(--navy);
  color: #e7e0d4;
  padding: 28px 0 36px;
  font-size: 14px;
}

footer.site .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}

footer.site strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  color: white;
}

@media (max-width: 700px) {
  .plate { width: 100%; }
  .plate img { height: 200px; }
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .row { grid-template-columns: 48px 1fr; }
  .row .num { font-size: 28px; }
  .src { grid-column: 2; }
  .brand span { display: none; }
  .day, .pad { min-height: 40px; }
  .day { font-size: 15px; }
}

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

/* ---- Production additions (real feed) ---- */
.tpl-picker { --pk-bg: #1b2a4a; --pk-fg: #e7e0d4; --pk-accent: #f3eee4; --pk-accent-fg: #1b2a4a; font-family: var(--sans); }
.month-head {
  display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 0;
}
.month-head h2 {
  margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; letter-spacing: -0.02em; min-width: 9ch; text-align: center;
}
.month-head button {
  min-width: 40px; min-height: 40px; font-family: var(--serif); font-size: 26px; color: var(--navy);
  border: 1px solid var(--rule); background: var(--paper);
}
.month-head button:disabled { opacity: 0.35; cursor: default; }
.diary .dow { display: block; }
.day.has-events { font-weight: 600; }
.dot[data-source="federated"] { background: var(--navy); }
.dot[data-source="club_private"] { background: var(--brass); }
.dot[data-source="society"] { background: #7a3b3b; }
.day.is-on .dot { background: var(--cream); }
.tools { align-items: center; gap: 18px; }
.count-pill { font-family: var(--serif); font-style: italic; color: var(--muted); }
.row[data-source="society"] .src { color: #7a3b3b; }
.row[data-source="federated"] .src { color: var(--navy); }
.row h3 a.title:hover { color: var(--navy); }
.row .entry {
  display: inline-block; margin-top: 6px; font-family: var(--sans); font-style: normal; font-size: 13px; font-weight: 600;
  color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--brass);
}
.row .entry:hover { color: var(--brass); }
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}

/* ---- 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; }
