/* clubmc.world — events and library.
   The frame is material, the data is not: the same rule as the rest of the
   site. Mobile first (375px), and every page here prints as a list. */

/* ---------------------------------------------------------------- shared */

.page-title {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.sub-title {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 2.2rem 0 .6rem;
}
.counter-row { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.2rem 0; }
.notes { max-width: 74ch; color: var(--cream-dim); padding-left: 1.1rem; }
.notes li { margin-bottom: .5rem; }
.notes strong { color: var(--cream); }

/* the note that says what the page is, and what it is not */
.notice {
  border: 1px solid var(--gold-lo);
  border-left: 3px solid var(--gold);
  background: var(--ink-2);
  padding: 1rem 1.1rem;
  margin: 1.4rem 0;
}
.notice p { max-width: 78ch; }
.notice p + p { margin-top: .7rem; }

/* ---------------------------------------------------------------- filters */

.filters { margin: 1.2rem 0; }
.filters-actions { display: flex; gap: .5rem; align-items: flex-end; }

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

.event-table td { vertical-align: top; }
.event-table .is-past { opacity: .62; }
.event-date { white-space: nowrap; }
.event-date-main {
  display: block;
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: .8rem;
  line-height: 1.5;
}
.event-tag {
  display: inline-block;
  margin-top: .3rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream-dim);
  border: 1px solid var(--ink-4);
  border-radius: 2px;
  padding: .1rem .35rem;
}
.event-title {
  display: block;
  color: var(--cream);
  font-weight: 600;
  line-height: 1.45;
}
.event-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--cream-dim);
  line-height: 1.5;
  margin-top: .15rem;
}
.event-source {
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.event-cancelled {
  display: inline-block;
  margin-top: .3rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--alert);
}

/* on a phone the table becomes a list of cards */
@media (max-width: 700px) {
  .event-table, .event-table tbody, .event-table tr, .event-table td { display: block; width: 100%; }
  .event-table thead { display: none; }
  .event-table tr {
    border-bottom: 1px solid var(--ink-4);
    padding: .8rem .2rem;
  }
  .event-table td { border: 0; padding: .25rem 0; }
  .event-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: .58rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--gold-lo);
    margin-bottom: .1rem;
  }
  .event-date { white-space: normal; }
}

/* ---------------------------------------------------------------- library */

.lib-note {
  border: 1px dashed var(--ink-4);
  padding: .9rem 1rem;
  margin: 1.2rem 0;
  color: var(--cream-dim);
  font-size: .9rem;
  max-width: 78ch;
}
.lib-note strong { color: var(--cream); }

.lib-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
  margin: 1.4rem 0;
}
@media (min-width: 720px) {
  .lib-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .lib-grid { grid-template-columns: repeat(3, 1fr); }
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  background: var(--ink-2);
  border: 1px solid var(--ink-4);
  border-radius: var(--radius);
  padding: 1rem;
}
.book-head { display: flex; gap: .9rem; align-items: flex-start; }

/* the cover is typographic: no image exists for these books, and a made-up
   cover would be a picture of a book that does not exist */
.book-cover {
  flex: 0 0 88px;
  width: 88px;
  min-height: 124px;
  border: 1px solid var(--gold-lo);
  background:
    linear-gradient(160deg, rgba(212, 175, 55, .10) 0%, rgba(10, 10, 10, 0) 55%),
    var(--ink-3);
  border-radius: 2px;
  padding: .55rem .5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .4rem;
  position: relative;
  overflow: hidden;
}
.book-cover::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #8B6914, #D4AF37, #F5F0E6, #D4AF37, #8B6914);
  opacity: .8;
}
.book-cover-title {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: .66rem;
  line-height: 1.25;
  letter-spacing: .04em;
  text-transform: uppercase;
  word-break: break-word;
  hyphens: auto;
}
.book-cover-author {
  font-family: var(--font-mono);
  font-size: .54rem;
  color: var(--cream-dim);
  line-height: 1.3;
  word-break: break-word;
}
.book-cover-rule { height: 1px; background: var(--rule); }

.book-body { flex: 1 1 auto; min-width: 0; }
.book-title {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: .2rem;
  word-break: break-word;
}
.book-meta {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--cream-dim);
  line-height: 1.6;
}
.book-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  border: 1px solid var(--gold-lo);
  border-radius: 2px;
  padding: .1rem .4rem;
  vertical-align: middle;
}
.book-blurb {
  color: var(--cream-dim);
  font-size: .88rem;
  line-height: 1.6;
  margin: .5rem 0 0;
}
.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .6rem;
}
.book-tag {
  font-family: var(--font-mono);
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cream-dim);
  border: 1px solid var(--ink-4);
  border-radius: 2px;
  padding: .1rem .35rem;
}
.book-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .8rem;
  padding-top: .7rem;
  border-top: 1px solid var(--ink-4);
}
.book-link-kind {
  font-family: var(--font-mono);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--cream-dim);
}
.book-isbn {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--gold-lo);
  letter-spacing: .04em;
}

.disclosure {
  border: 1px solid var(--rule);
  background: var(--ink-2);
  padding: 1rem 1.1rem;
  margin: 2rem 0 1rem;
  max-width: 78ch;
  font-size: .86rem;
  color: var(--cream-dim);
}
.disclosure strong { color: var(--cream); }

/* ---------------------------------------------------------------- print */

@media print {
  .filters, .filters-actions, .book-actions, .btn, .counter-row, .skip-link { display: none !important; }
  .lib-grid { display: block !important; }
  .book-card {
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff !important;
    border-color: #000 !important;
    color: #000 !important;
    margin-bottom: .8rem;
    padding: .5rem 0;
    display: block;
  }
  .book-head { display: block; }
  .book-cover {
    display: none !important;   /* the list must read as a list */
  }
  .book-title { color: #000 !important; font-size: 11pt; }
  .book-meta, .book-blurb, .book-tag, .book-link-kind { color: #333 !important; }
  .book-blurb { margin: .2rem 0; }
  .book-tags { display: none; }
  .book-badge { color: #000 !important; border-color: #000 !important; }
  .notice { background: #fff !important; border-color: #000 !important; }
  .page-title, .sub-title { color: #000 !important; }
  .event-table td { border-bottom: .5pt solid #999; }
  .event-title, .event-date-main, .event-tag, .event-sub { color: #000 !important; }
}
