/* cgohub.com, the CGO + CMO Calendar
   Copy into the build as style.css. Skipping that ships an unstyled site.
   System fonts only. No external assets of any kind. */

:root {
  --ink: #14161a;
  --ink-2: #454d57;
  --ink-3: #6c7681;
  --rule: #dfe3e8;
  --rule-2: #eef1f4;
  --bg: #ffffff;
  --bg-2: #f7f8fa;
  --accent: #8c2f24;
  --accent-soft: #f6ece9;
  --focus: #1a56b8;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 60rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9ecf0;
    --ink-2: #b3bcc6;
    --ink-3: #8b95a1;
    --rule: #2c3238;
    --rule-2: #21262b;
    --bg: #101215;
    --bg-2: #171a1e;
    --accent: #e8877a;
    --accent-soft: #2a1c19;
    --focus: #7aa7ee;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--ink);
  padding: 1.25rem 0 0.9rem;
}
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; }
.wordmark {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--accent); }
.tagline {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin: 0;
  flex: 1 1 14rem;
}
.masthead nav { display: flex; gap: 1rem; font-size: 0.8125rem; }
.masthead nav a { color: var(--ink-2); text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--accent); text-decoration: underline; }

/* ---------- controls ---------- */

.controls {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0;
}
.controls .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.views, .yeartabs { display: flex; gap: 0; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.views button {
  font: inherit;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  padding: 0.3rem 0.7rem;
  border: 0;
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
}
.views button + button { border-left: 1px solid var(--rule); }
.views button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.views .cnt {
  font-size: 0.6875rem;
  opacity: 0.6;
  margin-left: 0.15rem;
  font-variant-numeric: tabular-nums;
}
.views button.is-empty { color: var(--ink-3); }
.views button.is-empty[aria-pressed="true"] { background: var(--ink-3); color: var(--bg); }

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 1 1 auto; }
.filters select {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.28rem 0.4rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  max-width: 11rem;
}
.reset {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
}
.reset:hover { border-color: var(--ink-3); color: var(--ink); }

.resultcount {
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding: 0.5rem 0 0;
}

/* ---------- listing ---------- */

main { padding-bottom: 4rem; }

.month {
  margin: 0;
  border-bottom: 1px solid var(--rule-2);
}
.month > h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
  font-weight: 700;
  margin: 0;
  padding: 1.4rem 0 0.45rem;
  border-bottom: 1px solid var(--rule);
}

.event {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule-2);
}
.month .event:last-child { border-bottom: 0; }

.event .when {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  padding-top: 0.1rem;
  white-space: nowrap;
}

.event .body { min-width: 0; }

.event h3 {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0 0 0.15rem;
  font-weight: 650;
}
.event h3 a { text-decoration: none; }
.event h3 a:hover { text-decoration: underline; }

.event .place {
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin: 0 0 0.35rem;
}

.event .note {
  font-size: 0.875rem;
  color: var(--ink-2);
  margin: 0.35rem 0 0;
  max-width: 46rem;
}

/* ---------- labels ---------- */

.labels { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-3);
  white-space: nowrap;
}
.label.tier-mega, .label.tier-major { color: var(--ink); border-color: var(--ink-3); }
.label.access-invitation, .label.access-application {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- empty state ---------- */

.empty {
  padding: 3rem 0;
  color: var(--ink-3);
  font-size: 0.9375rem;
}
.empty[hidden] { display: none; }

/* ---------- detail page ---------- */

.detail { padding-top: 1.75rem; }
.crumb { font-size: 0.8125rem; color: var(--ink-3); margin: 0 0 1rem; }
.crumb a { color: var(--ink-3); }

.detail h1 {
  font-size: 1.625rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.4rem;
}
.detail .dateline {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--ink);
  margin: 0 0 0.2rem;
  font-variant-numeric: tabular-nums;
}
.detail .placeline { font-size: 0.9375rem; color: var(--ink-2); margin: 0 0 0.9rem; }
.detail .lede { font-size: 1.0625rem; line-height: 1.55; margin: 1.25rem 0; max-width: 40rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 1.75rem; }
.btn {
  font-size: 0.875rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

table.facts {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 0 0 1.5rem;
}
table.facts th, table.facts td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--rule-2);
}
table.facts th {
  font-weight: 600;
  color: var(--ink-3);
  width: 9.5rem;
  font-size: 0.8125rem;
}
table.facts td.unset { color: var(--ink-3); }

.verified {
  font-size: 0.75rem;
  color: var(--ink-3);
  border-top: 1px solid var(--rule-2);
  padding-top: 0.75rem;
  margin: 2rem 0 0;
}

/* ---------- prose pages ---------- */

.prose { padding-top: 1.75rem; max-width: 38rem; }
.prose h1 { font-size: 1.625rem; letter-spacing: -0.015em; margin: 0 0 1rem; }
.prose h2 { font-size: 1.0625rem; margin: 2rem 0 0.5rem; }
.prose p, .prose li { font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.prose li { margin-bottom: 0.35rem; }
.prose strong { color: var(--ink); }

/* ---------- form ---------- */

.form { max-width: 34rem; margin: 1.5rem 0 0; }
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.field .hint { font-weight: 400; color: var(--ink-3); }
.field input, .field textarea, .field select {
  font: inherit;
  font-size: 0.9375rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}
.field textarea { min-height: 5.5rem; resize: vertical; }
.hp { position: absolute; left: -9999px; }
button.submit {
  font: inherit;
  font-size: 0.9375rem;
  padding: 0.55rem 1.1rem;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
}
button.submit:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding: 1.25rem 0 3rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
footer p { margin: 0 0 0.4rem; }
footer a { color: var(--ink-3); }

/* ---------- mobile ---------- */

@media (max-width: 34rem) {
  .event { grid-template-columns: 1fr; gap: 0.25rem; }
  .event .when { padding-top: 0; font-size: 0.75rem; }
  .detail h1 { font-size: 1.375rem; }
  .filters select { flex: 1 1 8rem; max-width: none; }
  .controls { position: static; }
}

@media print {
  .controls, footer, .masthead nav { display: none; }
}

/* ---------- past events ---------- */

.pastwrap { margin-top: 2.5rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.pastwrap[hidden] { display: none; }
.pasttoggle {
  font: inherit;
  font-size: 0.8125rem;
  color: var(--ink-3);
  background: none;
  border: 0;
  padding: 0.2rem 0;
  cursor: pointer;
  text-align: left;
}
.pasttoggle::before { content: "\25B8 "; }
.pasttoggle[aria-expanded="true"]::before { content: "\25BE "; }
.pasttoggle:hover { color: var(--ink); }
.pastlist { margin-top: 0.75rem; }
.pastlist[hidden] { display: none; }
.pastlist .event { opacity: 0.72; }
.pastlist .event .note { display: none; }

/* ---------- series page ---------- */

.seriesitem { border-top: 1px solid var(--rule-2); padding-top: 1.25rem; margin-top: 1.75rem; }
.seriesitem h2 { font-size: 1.125rem; margin: 0 0 0.15rem; }
.seriesitem .place { font-size: 0.8125rem; color: var(--ink-3); margin: 0 0 0.6rem; }
.seriesitem .note { font-size: 1rem; color: var(--ink-2); margin: 0 0 1rem; max-width: 40rem; }
.seriesitem table.facts { max-width: 40rem; }
.seriesitem .actions { margin: 0 0 0.75rem; }
