:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --line: #d9e2ec;
  --accent: #16697a;
  --accent-soft: #e7f4f6;
  --upcoming: #287d4f;
  --upcoming-soft: #e9f6ef;
  --calendar-link: rgb(65 105 225 / 82%);
  --calendar-link-hover: rgb(65 105 225 / 95%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.site-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr) minmax(120px, 240px);
  align-items: center;
  gap: 20px;
}

.site-logo {
  width: 190px;
  max-width: 100%;
  height: auto;
}

.site-title {
  justify-self: center;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 16px;
  justify-self: end;
}

.page {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.desktop-circuit-decoration {
  display: none;
}

.intro,
.page-header,
.panel,
.event-detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.intro {
  position: relative;
  display: block;
  margin-bottom: 20px;
  overflow: hidden;
}

.page-header {
  position: relative;
  overflow: hidden;
}

.intro-heading,
.intro-copy,
.page-header h1,
.archive-subtitle {
  position: relative;
  z-index: 1;
}

.intro h1,
.page-header h1 {
  color: #4169e1;
}

.archive-subtitle {
  margin-top: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

.event-speaker {
  margin-top: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

.archive-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.archive-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.legend-swatch.is-upcoming {
  border-color: #a9d8bd;
  background: var(--upcoming-soft);
}

.legend-swatch.is-past {
  border-color: var(--line);
  background: var(--panel);
}

.archive-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(140px, 180px) minmax(120px, 160px) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.archive-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.archive-filters input,
.archive-filters select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.archive-filters input:focus,
.archive-filters select:focus {
  outline: 2px solid #c8d4f8;
  outline-offset: 1px;
}

.archive-empty {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

.intro-copy {
  max-width: 720px;
  margin-top: 16px;
}

.calendar-link-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid #c8d4f8;
  border-radius: 8px;
  color: #26345f;
  background: #eef3ff;
}

.calendar-link-note p {
  margin: 0;
}

.calendar-link-note a {
  color: inherit;
  text-decoration: underline;
}

.calendar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 999px;
  color: #fff;
  background: #4169e1;
  font-size: 0.75rem;
  font-weight: 700;
}

.panel,
.archive-year {
  margin-top: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 10px;
  color: #4169e1;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.15;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 4px;
}

.featured-event time,
.next-meeting time,
.event-row time {
  color: var(--muted);
  font-weight: 700;
}

.archive-year .event-row time {
  color: #4169e1;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.calendar-actions {
  display: flex;
  gap: 8px;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

.calendar-strip {
  display: grid;
  gap: 10px;
}

.calendar-strip-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.calendar-strip-item.is-today {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.calendar-strip-date {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 64px;
  border-radius: 6px;
  color: var(--text);
  background: var(--accent-soft);
}

.calendar-strip-weekday {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-strip-day {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.calendar-strip-events {
  display: grid;
  gap: 8px;
  align-content: center;
}

.calendar-empty {
  margin: 0;
  color: var(--muted);
}

.calendar-event {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.25;
}

a.calendar-event {
  color: #fff;
  background: var(--calendar-link);
}

a.calendar-event:hover {
  background: var(--calendar-link-hover);
}

.calendar-event.is-static {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.calendar-event strong {
  display: block;
  font-weight: 700;
}

.event-title-static {
  color: var(--text);
}

.next-meetings {
  display: grid;
  gap: 14px;
}

.next-meeting {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.next-meeting:first-child {
  padding-top: 0;
  border-top: 0;
}

.next-meeting h3 {
  margin-bottom: 4px;
}

.next-meeting p {
  margin-bottom: 4px;
}

.event-list {
  display: grid;
  gap: 12px;
}

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

.event-row {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.event-media {
  display: grid;
  align-content: start;
  gap: 8px;
}

.event-thumbnail {
  align-self: start;
  width: 100%;
  max-width: 150px;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f1f4f8;
}

.event-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.event-detail > .event-thumbnail {
  max-width: 320px;
  margin-top: 24px;
}

.event-row.is-upcoming {
  border-color: #a9d8bd;
  background: var(--upcoming-soft);
}

.event-row.is-upcoming a,
.event-row.is-upcoming .event-title-static {
  color: var(--upcoming);
}

.event-row[hidden],
.archive-year[hidden],
.archive-empty[hidden] {
  display: none;
}

.event-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
}

.event-meta dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.event-meta dd {
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.tag-button {
  appearance: none;
  margin: 0;
  min-height: auto;
  border: 0;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}

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

.tag-button.is-active {
  color: #fff;
  background: #4169e1;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
}

.content-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.file-list {
  padding-left: 20px;
}

.prose {
  max-width: 720px;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.obsidian-callout {
  --callout-color: 65, 105, 225;
  margin: 1rem 0;
  padding: 0;
  border: 1px solid rgba(var(--callout-color), 0.35);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(var(--callout-color), 0.1);
}

.obsidian-highlight-red {
  --callout-color: 179, 0, 0;
}

.obsidian-highlight-green {
  --callout-color: 19, 130, 7;
}

.obsidian-highlight-turquoise {
  --callout-color: 40, 154, 164;
}

.obsidian-highlight-purple {
  --callout-color: 120, 81, 169;
}

.obsidian-highlight-blue {
  --callout-color: 65, 105, 225;
}

.obsidian-callout-title {
  padding: 0.35rem 1rem;
  color: #fff;
  background: rgba(var(--callout-color), 0.7);
  font-size: 1rem;
  font-weight: 700;
}

.obsidian-callout-content {
  padding: 1rem;
}

.obsidian-callout-content > :first-child {
  margin-top: 0;
}

.obsidian-callout-content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .site-nav,
  .intro,
  .calendar-header,
  .archive-filters,
  .next-meeting,
  .event-row,
  .event-meta {
    grid-template-columns: 1fr;
  }

  .next-meeting .event-thumbnail,
  .event-row .event-thumbnail {
    max-width: 180px;
  }

  .site-nav,
  .calendar-header {
    align-items: center;
  }

  .site-nav {
    justify-items: center;
    text-align: center;
  }

  .site-logo {
    width: 180px;
    max-width: 80vw;
  }

  .event-media {
    justify-items: center;
  }

  .event-thumbnail {
    margin-right: auto;
    margin-left: auto;
  }

  .archive-year .event-list {
    grid-template-columns: 1fr;
  }

  .calendar-strip-item {
    grid-template-columns: 1fr;
  }
}

.calendar-panel {
  overflow-x: auto;
}

@media (min-width: 1120px) {
  .desktop-circuit-decoration {
    display: block;
    position: absolute;
    z-index: 0;
    top: 12px;
    right: 12px;
    width: 254px;
    height: auto;
    opacity: 0.5;
    pointer-events: none;
  }

  .archive-decoration {
    opacity: 0.5;
  }
}
