/* Tan theme — the old DECAY site's terminal aesthetic. Strictly three
   colours: black, forest green, and tan. No white, cream, or grey. Cards
   and panels sit on the tan page and are set apart by black borders and a
   slightly deeper tan wash. All text and boxes are black; green appears
   only on the blog post divider (hr). Anything on a dark (inverted)
   surface is tan. */
:root {
  --bg: #d2b48c;          /* tan page background */
  --surface: #d2b48c;     /* cards — same tan, separated by black borders */
  --surface-alt: #c2a06e; /* deeper tan wash for panels / inset areas */
  --ink: #111;            /* all text and borders — black */
  --muted: #111;          /* secondary text — also black */
  --accent: #336633;      /* forest green — blog post divider (hr) only */
  --on-ink: #d2b48c;      /* tan text on a black surface */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: #111;
  font-family: 'Archivo', Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: 'Space Mono', monospace;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

/* The calendar page. Seven columns need more measure than the site's
   usual narrow column gives them. */
.page-wide {
  max-width: 880px;
}

/* The admin panel. Its tables are seven columns wide and its nav carries
   a link per section, neither of which fits the public site's measure. */
.page-admin {
  max-width: 960px;
}

/* Intro splash */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.intro.is-hidden {
  opacity: 0;
}

.intro-frame {
  width: 150px;
  height: 150px;
  overflow: hidden;
}

.intro-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 20px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px;
  background: var(--bg);
  border-bottom: 3px solid #111;
}

.site-header img {
  height: 22px;
  width: auto;
}

/* The nav wraps rather than running past the header edge — it gained
   enough items that it no longer fits on one line on a phone. */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  row-gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-nav a {
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 3px 7px;
}

/* Hero */

.hero {
  padding: 48px 20px;
  text-align: center;
  border-bottom: 2px solid #111;
}

.hero-box {
  border: 3px solid #111;
  padding: 28px 20px;
  max-width: 360px;
  margin: 0 auto;
}

.hero-box img {
  width: 100%;
  height: auto;
}

.hero-tagline {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 24px 0 0;
}

/* About */

.about {
  padding: 56px 20px;
  border-bottom: 2px solid #111;
}

.about-statement {
  font-weight: 900;
  font-size: 26px;
  line-height: 1.3;
  text-transform: uppercase;
  margin: 0;
}

.about-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 18px 0 0;
}

/* Section label */

.section-label {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Events */

.events {
  padding: 44px 20px;
  border-bottom: 2px solid #111;
  background: var(--surface-alt);
}

/* Month heading on the /events listing, repeated down the page. */
.event-month {
  display: block;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 32px;
  padding-bottom: 6px;
  border-bottom: 2px solid #111;
}

.event-month:first-child {
  margin-top: 0;
}

.event-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 2px solid #111;
  background: var(--surface);
  transition: background 0.15s ease, color 0.15s ease;
}

.event-item:hover {
  background: #111;
  color: var(--on-ink);
}

.event-title {
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
}

.event-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  text-transform: uppercase;
}

.event-item:hover .event-meta {
  color: var(--on-ink);
}

.event-date {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.btn-outline {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  color: var(--ink);
  padding: 14px;
  background: var(--surface);
}

.subscribe-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 12px 0 0;
  text-align: center;
}

.subscribe-note span {
  border: 1px solid var(--muted);
  padding: 1px 4px;
}

/* Event detail */

.event-detail {
  padding: 44px 20px;
  border-bottom: 2px solid #111;
}

.event-back {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.event-detail-title {
  font-weight: 900;
  font-size: 28px;
  line-height: 1.2;
  text-transform: uppercase;
  margin: 8px 0 0;
}

.event-detail-when {
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 0;
}

.event-detail-where {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

.event-flyer {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 24px 0;
  border: 2px solid #111;
}

.event-detail-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 16px 0 0;
  white-space: pre-line;
}

.event-volunteers {
  margin-top: 32px;
  padding: 16px;
  border: 2px solid #111;
  background: var(--surface-alt);
}

.volunteer-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
}

.volunteer-list li {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid #111;
  background: var(--surface);
  padding: 6px 10px;
}

.volunteer-note {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 0;
}

/* Calendar grid */

/* Below a certain width a day cell can't hold a legible event, so the
   grid keeps a floor and scrolls sideways inside this wrapper rather than
   forcing the whole page to scroll. On anything wider than a phone it
   fits and this never engages. */
.calendar-scroll {
  margin-top: 18px;
  overflow-x: auto;
}

.calendar {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--surface);
}

.calendar th {
  border: 2px solid #111;
  padding: 8px 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  background: #111;
  color: var(--on-ink);
}

.cal-day {
  border: 2px solid #111;
  vertical-align: top;
  height: 96px;
  width: 14.28%;
  padding: 4px;
}

.cal-day.is-outside {
  background: var(--surface-alt);
}

.cal-day.is-today {
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 3px #111;
}

.cal-date {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.cal-day.is-today .cal-date {
  color: #111;
}

.cal-event {
  display: block;
  border: 1px solid #111;
  background: var(--surface-alt);
  padding: 3px 4px;
  margin-bottom: 3px;
  font-size: 10px;
  line-height: 1.3;
}

.cal-event:hover {
  background: #111;
  color: var(--on-ink);
}

.cal-event-time {
  display: block;
  font-size: 9px;
  color: var(--muted);
}

.cal-event:hover .cal-event-time {
  color: var(--on-ink);
}

.cal-event-title {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Prose pages (about, support, policies) */

.prose-list {
  margin: 18px 0 0;
}

.prose-list dt {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  margin-top: 16px;
}

.prose-list dd {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.prose-bullets {
  margin: 18px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.prose-bullets li {
  margin-bottom: 8px;
}

.plain-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.9;
}

.pull-quote {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 4px solid #111;
  background: var(--surface-alt);
  font-size: 14px;
  line-height: 1.6;
  font-style: italic;
  color: var(--ink);
}

.postal {
  font-size: 13px;
  line-height: 1.7;
  font-style: normal;
  margin-top: 12px;
  border: 2px solid #111;
  padding: 12px 14px;
  background: var(--surface);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.partner-grid img {
  width: 100%;
  height: auto;
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links a {
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 3px 7px;
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.gallery-item {
  margin: 0;
  border: 2px solid #111;
  background: var(--surface);
}

/* Photos arrive in whatever shape a phone took them, so each is cropped
   to a square tile — a mixed-aspect grid reads as a mess. The full-size
   original is a click away, uncropped. */
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery-caption {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  padding: 6px 8px;
  border-top: 2px solid #111;
}

/* Pager */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  border: 2px solid #111;
  padding: 12px 14px;
  background: var(--surface);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pager-link {
  white-space: nowrap;
}

/* Kept in the layout rather than hidden, so the row doesn't shift when
   an end of the list is reached. */
.pager-link.is-disabled {
  color: var(--muted);
}

.pager-status {
  color: var(--muted);
  text-align: center;
}

.admin-table .nowrap,
.nowrap {
  white-space: nowrap;
}

/* Merch */

.merch {
  padding: 44px 20px;
  border-bottom: 2px solid #111;
}

.merch-intro {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 20px;
}

.merch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}

.merch-item {
  display: block;
  text-align: center;
}

.merch-photo {
  position: relative;
  border: 2px solid #111;
  aspect-ratio: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 8px;
}

/* A product photo fills the square frame, so the padding that centres
   placeholder text has to go. */
.merch-photo:has(img) {
  padding: 0;
}

.merch-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.merch-variants {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 4px;
}

.merch-name {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  margin-top: 8px;
}

.merch-price {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Media */

.media {
  padding: 44px 20px;
  border-bottom: 2px solid #111;
}

.media-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.media-video {
  border: 2px solid #111;
}

.media-video-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 12px;
}

/* The embedded player fills the 16:9 frame. */
.media-video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.media-video-caption {
  padding: 12px 14px;
  font-size: 11px;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

.media-video-caption span:last-child {
  color: var(--muted);
}

.media-audio {
  border: 2px solid #111;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.media-audio-art {
  width: 48px;
  height: 48px;
  border: 2px solid #111;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.media-audio-title {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}

.media-audio-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

/* Contact */

.contact {
  padding: 44px 20px 30px;
  text-align: center;
}

.contact-heading {
  font-weight: 900;
  font-size: 19px;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 12px 0 20px;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signup-input {
  border: 2px solid #111;
  background: none;
  padding: 16px 14px;
  font-size: 14px;
  color: #111;
  text-align: center;
  width: 100%;
}

.signup-submit {
  border: 2px solid #111;
  background: none;
  color: #111;
  padding: 16px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.signup-submit:hover {
  background: #111;
  color: var(--on-ink);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.social-links a {
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 3px 7px;
}

/* Footer */

.site-footer {
  border-top: 2px solid #111;
  padding: 22px 20px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.site-footer img {
  height: 18px;
  width: auto;
  margin-bottom: 6px;
}

.site-footer span {
  font-size: 10px;
  color: var(--muted);
}

.site-footer .copyright {
  color: var(--muted);
  margin-top: 8px;
}

/* Admin */

.admin-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* The admin nav carries a link per section plus the signed-in name and a
   log-out button. That's more than fits on one line at every width, so it
   wraps instead of overflowing the header. */
.admin-header {
  flex-wrap: wrap;
  gap: 12px;
}

.admin-nav {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 8px;
  /* The nav takes the space left over and lines up to the right, so the
     row reads logo-then-nav however many items it holds. */
  justify-content: flex-end;
  flex: 1;
}

/* Nav links sit on the text baseline; without this they stretch to the
   height of the log-out button beside them. */
.admin-nav > a,
.admin-nav > span,
.admin-nav > form {
  align-self: center;
}


.admin-heading {
  font-weight: 900;
  font-size: 20px;
  text-transform: uppercase;
  margin: 32px 0 16px;
}

.admin-heading:first-child {
  margin-top: 0;
}

.admin-back {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
}

.admin-sub {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 12px;
}

.admin-tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--muted);
  padding: 1px 5px;
  margin-left: 8px;
  color: var(--muted);
}

.admin-flyer-preview {
  display: block;
  max-width: 260px;
  height: auto;
  border: 2px solid #111;
  margin-bottom: 16px;
}

.admin-fieldset {
  border: 1px solid #111;
  padding: 12px;
  margin: 4px 0;
}

.admin-fieldset legend {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 6px;
}

.admin-next {
  border: 2px solid #111;
  background: var(--surface-alt);
  padding: 16px;
  margin-bottom: 8px;
}

.admin-next-title {
  display: block;
  font-weight: 900;
  font-size: 18px;
  text-transform: uppercase;
  margin-top: 8px;
}

.admin-next-when {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.admin-whoami {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-form select {
  border: 2px solid #111;
  padding: 8px;
  font: inherit;
  font-size: 13px;
  background: var(--surface);
}

.admin-caption-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.admin-caption-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #111;
  padding: 6px;
  font: inherit;
  font-size: 12px;
}

/* Scoped to .admin-form label so it outweighs that rule's flex-direction:
   column — otherwise the checkbox stacks above its text and centres instead
   of sitting left of it. */
.admin-check,
.admin-form label.admin-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  border: 1px solid #111;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: var(--surface-alt);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  margin-bottom: 32px;
}

.admin-form label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-form label.inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.admin-form input,
.admin-form textarea {
  border: 2px solid #111;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: #111;
}

.admin-form input[type="checkbox"] {
  width: auto;
}

.admin-form textarea {
  min-height: 140px;
  resize: vertical;
}

.admin-btn {
  border: 2px solid #111;
  background: none;
  color: #111;
  padding: 8px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
}

.admin-btn:hover {
  background: #111;
  color: var(--on-ink);
}

/* A log-out button sized to sit among the nav's text links rather than
   tower over them. Defined after .admin-btn so it wins the cascade. */
.admin-btn-small {
  padding: 4px 10px;
  font-size: 11px;
}

.admin-btn-danger {
  border-color: #a00;
  color: #a00;
}

.admin-btn-danger:hover {
  background: #a00;
  color: var(--on-ink);
}

.admin-flash {
  padding: 10px 14px;
  border: 2px solid #111;
  margin-bottom: 16px;
  font-size: 13px;
}

.admin-flash-error {
  border-color: #a00;
  color: #a00;
}

.admin-login-wrap {
  max-width: 320px;
  margin: 80px auto;
  padding: 0 20px;
}

/* Reports ------------------------------------------------------------- */

/* A heading with an action button parked on the right of the same line. */
.admin-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

/* Quarter jump links, wrapping onto a second row on narrow screens. */
.report-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

.report-period {
  border: 2px solid #111;
  padding: 4px 10px;
  font-size: 12px;
  text-decoration: none;
  color: #111;
}

.report-period:hover {
  background: #111;
  color: var(--on-ink);
}

/* The quarter currently shown reads as pressed, not clickable. */
.report-period.is-current {
  background: #111;
  color: var(--on-ink);
}

.report-range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.report-range label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.report-range input {
  border: 2px solid #111;
  padding: 6px 8px;
  font-family: 'Space Mono', monospace;
}

/* One past event on the entry screen: heading line, then two inline
   forms that wrap their fields on narrow screens. */
.report-entry {
  border: 2px solid #111;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.report-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.report-entry-type {
  font-size: 11px;
  opacity: 0.7;
}

.report-entry-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.report-entry-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
}

.report-entry-form input {
  border: 2px solid #111;
  padding: 5px 7px;
  font-family: 'Space Mono', monospace;
  width: 90px;
}

/* Notes take whatever room is left on the line. */
.report-entry-form .report-entry-notes {
  flex: 1 1 200px;
}

.report-entry-form .report-entry-notes input {
  width: 100%;
}

.report-entry-donations {
  align-self: center;
  font-size: 12px;
}

/* Board & staff profiles on the About page ---------------------------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

/* Three across is the desktop layout; drop to two then one as the column
   narrows so the portraits never get squeezed. */
@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-card {
  border: 2px solid #111;
  display: flex;
  flex-direction: column;
}

.team-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid #111;
}

/* When there's no portrait yet, show the person's initials rather than a
   broken image or an empty box. */
.team-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: var(--on-ink);
  font-size: 40px;
  letter-spacing: 0.05em;
}

.team-body {
  padding: 12px 14px 16px;
}

.team-name {
  font-weight: 700;
  font-size: 17px;
  margin: 0;
}

.team-pronouns {
  font-weight: 400;
  font-size: 12px;
  opacity: 0.65;
  margin-left: 6px;
}

.team-role {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 2px 0 8px;
  opacity: 0.8;
}

.team-bio {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.team-bio:last-child {
  margin-bottom: 0;
}

/* Groups & programs --------------------------------------------------- */

.group-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.group-card {
  border: 2px solid #111;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: #111;
}

.group-card:hover {
  background: #111;
  color: var(--on-ink);
}

.group-card-name {
  font-weight: 900;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.group-card-summary {
  font-size: 14px;
  line-height: 1.5;
}

.group-card-more {
  font-size: 12px;
  margin-top: auto;
}

/* Detail page */
.group-hero {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
  border: 2px solid #111;
  margin-bottom: 16px;
}

.group-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

.group-pill {
  border: 2px solid #111;
  padding: 3px 10px;
  font-size: 12px;
}

.group-section {
  margin-top: 20px;
}

.group-section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}

.group-bullets {
  margin: 0;
  padding-left: 20px;
}

.group-bullets li {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 4px;
}

/* Shop additions: description, sold-out badge --------------------------- */

.merch-desc {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 6px;
}

/* A sold-out card doesn't link anywhere, so dim it and drop the pointer. */
.merch-item.is-soldout {
  opacity: 0.72;
  cursor: default;
}

.merch-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #111;
  color: var(--on-ink);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
}

/* A group's own upcoming schedule, set off from the sections below it. */
.group-schedule {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #111;
}

/* A group's tagged photos, set off like its schedule. */
.group-photos {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #111;
}

/* The admin photo tag dropdown sits between caption and save. */
.admin-caption-form select {
  border: 2px solid #111;
  padding: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
}

/* Booking form honeypot: off-screen, so people never see it but bots fill it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Booking request queue -------------------------------------------------- */

.booking-card {
  border: 2px solid #111;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.booking-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.booking-head strong {
  font-size: 16px;
}

.booking-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #111;
  color: var(--on-ink);
  padding: 2px 6px;
}

.booking-badge-muted {
  background: var(--muted);
}

.booking-when {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

.booking-fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 12px;
  font-size: 13px;
  margin: 0 0 10px;
}

.booking-fields dt {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.booking-fields dd {
  margin: 0;
}

.booking-desc {
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
  margin: 0 0 12px;
}

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

/* Admin media: compact edit form under each video thumbnail. */
.admin-media-form {
  gap: 6px;
}

.admin-media-form label {
  font-size: 11px;
}

/* Blog post body: rendered Markdown ------------------------------------ */
/* Posts are authored in Markdown, so a post body carries real structure —
   headings, lists, quotes, code — rather than the flat paragraphs the
   event/about pages use. */
.post-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 20px 0 0;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body p {
  margin: 0 0 16px;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: "Archivo", sans-serif;
  color: #111;
  line-height: 1.2;
  margin: 28px 0 10px;
}

.post-body h2 { font-size: 22px; }
.post-body h3 { font-size: 18px; }
.post-body h4 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; }

.post-body a {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 0 4px;
  /* Keep the box intact when a link wraps across lines. */
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.post-body ul,
.post-body ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.post-body li {
  margin-bottom: 6px;
}

.post-body blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 4px solid #111;
  background: var(--surface-alt);
  font-style: italic;
}

.post-body blockquote p:last-child {
  margin-bottom: 0;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border: 2px solid #111;
}

.post-body hr {
  border: none;
  border-top: 2px solid var(--accent);
  margin: 28px 0;
}

.post-body code {
  font-family: "Space Mono", monospace;
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 1px 5px;
  border: 1px solid var(--ink);
}

.post-body pre {
  background: #111;
  color: var(--surface-alt);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 16px;
}

.post-body pre code {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}

.post-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 16px;
  font-size: 14px;
}

.post-body th,
.post-body td {
  border: 2px solid #111;
  padding: 6px 10px;
  text-align: left;
}

/* Internal meetings calendar (admin) ---------------------------------- */
/* Meetings come from the read-only Nextcloud feed, so their cells aren't
   links — drop the events grid's hover-invert, which would imply a click,
   and mark them with an accent stripe instead. */
.cal-meeting {
  cursor: default;
  border-left: 3px solid #111;
}

.cal-meeting:hover {
  background: var(--surface-alt);
  color: inherit;
}

.cal-meeting:hover .cal-event-time {
  color: var(--muted);
}

.admin-subheading {
  font-family: "Archivo", sans-serif;
  font-size: 18px;
  margin: 28px 0 10px;
}

.meeting-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.meeting-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 12px 0;
  border-top: 2px solid #111;
}

.meeting-row:last-child {
  border-bottom: 2px solid #111;
}

.meeting-when {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

.meeting-date {
  font-weight: 700;
  color: #111;
}

.meeting-time {
  color: var(--muted);
}

.meeting-body {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meeting-title {
  font-weight: 700;
}

.meeting-loc {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meeting-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-line;
}

/* Markdown editor toolbar (admin blog) -------------------------------- */
.md-editor {
  display: flex;
  flex-direction: column;
}

.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 2px solid #111;
  border-bottom: none;
  background: var(--surface-alt);
}

.md-btn {
  border: 1px solid #111;
  background: var(--surface);
  color: #111;
  min-width: 30px;
  padding: 4px 8px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.md-btn:hover {
  background: #111;
  color: var(--on-ink);
}

/* The textarea butts directly against the toolbar, so they read as one
   control; the toolbar owns the top border. */
.md-editor textarea {
  margin: 0;
}

/* Blog post image strip (admin edit page) ----------------------------- */
.post-image-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 20px;
}

.post-image {
  margin: 0;
  border: 2px solid #111;
  width: 160px;
  display: flex;
  flex-direction: column;
}

.post-image img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid #111;
}

.post-image figcaption {
  display: flex;
  gap: 6px;
  padding: 6px;
  justify-content: space-between;
}

/* Blog embeds (YouTube / Bandcamp) ------------------------------------ */
.embed {
  margin: 20px 0;
  border: 2px solid #111;
}

/* Responsive 16:9 video that keeps its ratio at any width. */
.embed-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
}

.embed-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Bandcamp's player is a fixed-height strip; let it span the column. */
.embed-audio {
  display: block;
  width: 100%;
  height: 120px;
}

/* Photo gallery lightbox ---------------------------------------------- */
.gallery-item a { cursor: zoom-in; }

body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
}

/* Win over the [hidden] UA display:none while the flex layout is set. */
.lightbox[hidden] { display: none; }

.lightbox-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border: 2px solid var(--on-ink);
  background: #111;
}

.lightbox-caption {
  color: var(--on-ink);
  font-size: 12px;
  text-align: center;
  max-width: 80vw;
}

.lightbox-caption[hidden] { display: none; }

.lightbox-close,
.lightbox-nav {
  border: 2px solid var(--on-ink);
  background: rgba(0, 0, 0, 0.4);
  color: var(--on-ink);
  cursor: pointer;
  line-height: 1;
  font-family: 'Space Mono', monospace;
}

.lightbox-nav {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  font-size: 28px;
}

.lightbox-nav[hidden] { display: none; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 24px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--surface);
  color: #111;
}

@media (max-width: 640px) {
  .lightbox-nav { width: 38px; height: 38px; font-size: 22px; }
}
