/* ============================================================
   Digital Liturgies — course site
   Design: an order of service for a class about digital ritual.
   Palette drawn from manuscript pigments: parchment, iron-gall
   ink, and rubric red (the original meaning of "rubric" — the
   red instructional line in a liturgical book).
   ============================================================ */

:root {
  --paper: #ffffff;
  --paper-dim: #f5f5f5;
  --ink: #201d18;
  --rubric: #4a170e;
  --gold: #8c6a2b;
  --line: #b9af96;
  --muted: #5b5546;

  --font-display: "Times New Roman", Times, serif;
  --font-body: "Times New Roman", Times, serif;
  --font-mono: "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

/* ---------------------------------------------------------
   Masthead
   --------------------------------------------------------- */
.masthead {
  padding: 56px 20px 28px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.incipit {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: black;
}

.entry {
  transition: opacity 0.3s ease;
}
.entry.not-current-unit {
  opacity: 0.35;
}

.category-group .filter-btn {
  transition: opacity 0.3s ease;
}
.category-group .filter-btn.not-current-unit {
  opacity: 0.35;
}



.course-title {
  margin: 0 0 26px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 68px);
  letter-spacing: 0.01em;
  display: inline-block;
  transform: scaleY(1.25);
  transform-origin: center top;

}

.course-sub {
  margin: 0;
  font-style: italic;
  font-size: 15px;
  border: 20px dashed #e7f39a;
    padding: 5px;
  border-radius:  20px ;
  opacity: 50%;
}

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */
.wrapper {
  display: flex;
  width: 100%;
  align-items: flex-start;
}

/* ---------------------------------------------------------
   Sidebar — the margin note / table of contents
   --------------------------------------------------------- */
#filter-buttons {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 220px;
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 32px 0 32px 32px;
  border-right: 1px solid var(--line);
}

#filter-buttons .filter-btn.all {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 4px;
  margin-bottom: 26px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.category-group {
  margin-bottom: 32px;
}

.category-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: var(--rubric);
}

.category-group .filter-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 5px;
  border: none;
  font-family: var(--font-body);
  font-size: 16px;
  color: #000;
  cursor: pointer;
  /* background-color is set per-button in script.js, keyed by date */
}

.category-group .filter-btn:hover {
  filter: brightness(0.94);
}

.filter-btn.active {
  background-color: #000 !important;
  color: #fff !important;
  font-weight: 600;
}

.filter-btn.active::before {
  content: "\2020  "; /* dagger mark, echoed on the active filter */
}

/* ---------------------------------------------------------
   Entry list — the order of service itself
   --------------------------------------------------------- */
#entry-list {
  flex-grow: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.entry {
  border-bottom: 1px solid var(--line);
}

.entry.hidden {
  display: none !important;
}

.entry-toggle {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  padding: 34px 0;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.entry-cap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: #000;
  font-family: var(--font-display);
  font-size: 19px;
  /* background-color is set per-entry in script.js, keyed by date */
}

.entry-heading {
  flex-grow: 1;
}

.entry-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  display: inline-block;
  transform: scaleY(1.25);
  transform-origin: left top;
}

.entry-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.entry-mark {
  flex-shrink: 0;
  color: var(--gold);
  font-size: 15px;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.entry-toggle[aria-expanded="true"] .entry-mark {
  transform: rotate(0deg);
}

.entry-body {
  max-height: 0;
  overflow: hidden;
  padding: 0;
  transition: max-height 0.3s ease;
}

.entry-toggle[aria-expanded="true"] + .entry-body {
  max-height: 700px;
  padding-bottom: 8px;
}

.quote {
  max-width: 750px;
  margin: 0 auto 1.5em;
  padding: 1.5em;
  background: var(--paper-dim);
  border: 4px double #000;
  border-radius: 25px;
  /* background-color is overridden per-entry in script.js, keyed by date */
}

.quote p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.65;
}

.quote p:last-child {
  margin-bottom: 0;
}

.rubric {
  color: var(--rubric);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
#footer {
  display: block;
  padding: 16px 24px 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .entry-mark,
  .entry-body {
    transition: none !important;
  }
}

/* ---------------------------------------------------------
   Responsive — sidebar becomes a horizontal strip
   ============================================================ */
@media screen and (max-width: 768px) {
  .wrapper {
    flex-direction: column;
  }

  #filter-buttons {
    position: static;
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
  }

  #filter-buttons .filter-btn.all {
    width: auto;
    flex-shrink: 0;
    margin: 0 20px 0 0;
    padding: 6px 10px;
    border-bottom: none;
    border: 1px solid var(--ink);
  }

  .category-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0 20px 0 0;
  }

  .category-title {
    margin: 0 10px 0 0;
    white-space: nowrap;
  }

  .category-group .filter-btn {
    width: auto;
    white-space: nowrap;
    padding: 4px 8px;
  }

  #entry-list {
    padding: 24px 16px 60px;
  }

  .entry-title {
    font-size: 19px;
    margin-bottom: 8px;
  }

  .quote {
    padding: 1.1em;
    margin-bottom: 1em;
  }
}
