/* The study pages, on top of site.css: each series in its colours from the
   app (a soft tint and an accent), a reading column like the devotions, and
   a section's passage that opens to its verses. Built by
   Content/scripts/export_site_studies.py in the Jot & Tittle repo. */

/* Each series' tint and accent, as in the app's SeriesStyle. The accents
   are text colours: 4.6:1 or more on their tints, light and dark. */
.s-who-god-is      { --tint: #f6efdf; --accent: #77561c; }
.s-names-of-god    { --tint: #eef0fa; --accent: #4954a0; }
.s-heart-of-god    { --tint: #fbedee; --accent: #9c3947; }
.s-encounters      { --tint: #fbefe6; --accent: #924819; }
.s-pictures-of-god { --tint: #e9f3f1; --accent: #29665c; }
.s-holy-spirit     { --tint: #eaf3fb; --accent: #2a6090; }
.s-songs           { --tint: #f4eef8; --accent: #744696; }
@media (prefers-color-scheme: dark) {
  .s-who-god-is      { --tint: #2a2318; --accent: #d9b26a; }
  .s-names-of-god    { --tint: #1e2133; --accent: #a9b3f0; }
  .s-heart-of-god    { --tint: #2e1d20; --accent: #f0a3ae; }
  .s-encounters      { --tint: #2e2119; --accent: #f2b184; }
  .s-pictures-of-god { --tint: #18282a; --accent: #8fd3c6; }
  .s-holy-spirit     { --tint: #172430; --accent: #9cc8ee; }
  .s-songs           { --tint: #261c2e; --accent: #c9a8ea; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  .s-who-god-is      { --accent: #624717; }
  .s-names-of-god    { --accent: #3c4583; }
  .s-heart-of-god    { --accent: #7e2e3a; }
  .s-encounters      { --accent: #763a14; }
  .s-pictures-of-god { --accent: #22544b; }
  .s-holy-spirit     { --accent: #224e75; }
  .s-songs           { --accent: #5b3776; }
}

.studies .wrap, .study .wrap { max-width: 720px; }
.studies > .wrap { padding-block: 24px 56px; }
.study article { padding-block: 24px 48px; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.studies .lede { max-width: 46ch; }

/* Every series, as a card on its tint. */
.series-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 16px; }
.series-list .series { display: grid; gap: 6px; padding: 20px 22px; border-radius: 16px; text-decoration: none;
  background: var(--tint); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-left: 4px solid var(--accent); }
.series-list h2 { font-size: 1.55rem; }
.series-list p { color: var(--ink); opacity: 0.85; }
.series-list .count { font-size: 0.88rem; font-weight: 600; color: var(--accent); }
.series-list .series:hover h2 { color: var(--accent); }

/* A series' articles, numbered. */
.studies .eyebrow, .study .eyebrow { color: var(--accent, var(--tittle)); }
.articles { list-style: none; padding: 0; margin: 36px 0 0; }
.articles a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.articles .n { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 50%;
  background: var(--tint); color: var(--accent); font-weight: 700; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.articles .what { display: grid; font-size: 0.88rem; color: var(--muted); }
.articles .what strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--brown); }
.articles a:hover strong { color: var(--accent); }

/* An article. */
.study h1 { font-size: clamp(2.1rem, 5.5vw, 3.2rem); }
.study .meta { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.study .verse { margin-top: 24px; }
.body { margin-top: 30px; font-size: 1.08rem; line-height: 1.7; }
.body > * + * { margin-top: 1.05em; }
.body h2, .body h3, .body h4 { font-family: var(--serif); font-size: 1.45rem; margin-top: 1.8em; }
.body ul, .body ol { padding-left: 1.3em; margin-bottom: 0; }
.body li + li { margin-top: 0.55em; }
.body blockquote { margin-inline: 0; padding-left: 16px; border-left: 3px solid var(--line); color: var(--muted); }
.body strong { color: var(--accent); }
.body .prayer { margin-top: 1.8em; padding: 16px 20px; border-radius: 10px; background: var(--paper); }
.body .prayer strong { color: var(--accent); }
.body a.ref { color: var(--green); text-decoration: none; white-space: nowrap; }
.body a.ref:hover { text-decoration: underline; }

/* The opening letter, large and in the series colour. */
.body .opening::first-letter { font-family: var(--serif); font-weight: 600; font-size: 2.6em;
  line-height: 0.9; color: var(--accent); }

/* A section's passage: a button that opens to the verses. */
.passage { margin-top: 0.4em; }
.passage summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--green) 13%, transparent);
  color: var(--green); font-size: 0.92rem; font-weight: 600; }
.passage summary::-webkit-details-marker { display: none; }
.passage summary::before { content: "▸"; font-size: 0.8em; transition: transform 0.15s; }
.passage[open] summary::before { transform: rotate(90deg); }
.passage .verses { margin-top: 12px; padding: 16px 20px; border-radius: 10px; background: var(--paper);
  font-family: var(--serif); font-size: 1.02rem; line-height: 1.7; }
.passage .verses h3 { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--muted);
  margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.passage .verses h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.passage sup { font-family: var(--sans); font-size: 0.68em; font-weight: 600; color: var(--muted); margin-right: 2px; }
.passage .chapter { margin-top: 12px; font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.passage .chapter a { color: var(--green); }

/* Older and newer articles, and the rest of the series. */
.day-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-block: 0 20px; }
.day-nav a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; font-family: var(--serif); font-weight: 600; color: var(--brown); line-height: 1.3; }
.day-nav a span { font: 600 0.78rem/1.4 var(--sans); color: var(--muted); }
.day-nav a:hover { border-color: var(--accent); }
.day-nav .newer { grid-column: 2; text-align: right; }
.study .all { padding-block: 0 48px; font-size: 0.95rem; }
.study .all a { color: var(--accent); font-weight: 600; }

/* The way to the app. */
.get-app { border-top: 1px solid var(--line); text-align: center; }
.get-app .wrap { padding-block: 56px 64px; display: grid; justify-items: center; gap: 16px; }
.get-app p { max-width: 46ch; color: var(--muted); }
.get-app .badge img { width: 150px; height: 50px; }

@media (max-width: 560px) {
  .day-nav { grid-template-columns: 1fr; }
  .day-nav .newer { grid-column: auto; }
}
