/* ============================================================================
 * theme.css — the "slides" theme. Layered on top of site.css (linked last in
 * base.html). Vocabulary lifted from the pdf-to-production deck:
 *
 *   - EB Garamond everywhere, set large, on plain white
 *   - everything in the chrome is lowercase
 *   - headings sit on a flat pale-yellow block
 *   - the big title is brown; emphasis / links are red; asides are grey
 *   - lists use a hanging dash
 * ============================================================================ */

:root {
  --paper:        #ffffff;
  --ink:          #111111;
  --ink-soft:     #666666;
  --ink-faint:    #8c8c8c;
  --rule:         #e4e0d6;
  --accent:       #c00000;   /* the deck's red */
  --accent-hover: #8f0000;
  --brown:        #783f04;   /* the deck's title brown */
  --highlight:    #ffe599;   /* the deck's heading block */
  --highlight-soft: #fff5d1;

  --font-sans:    'EB Garamond', 'Garamond', Georgia, serif;
  --font-serif:   'EB Garamond', 'Garamond', Georgia, serif;

  /* Charts: white ground, red accent. Chart type stays as-is (10px Garamond
     is unreadable). */
  --viz-paper:     #ffffff;
  --viz-accent:    #c00000;
  --viz-bar-hover: #c00000;
}

body {
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: 0;
  font-variant-ligatures: common-ligatures;
}

::selection { background: var(--highlight); }

/* The heading block ------------------------------------------------------ */

.article h2,
.series-tag,
.series-block-title,
.updates-block-title,
.garden-block-title,
.garden-index-title,
.references-title,
.series-nav-label,
.subscribe-label,
.note-eyebrow {
  display: inline-block;
  background: var(--highlight);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0;
  padding: 0.02em 0.55em 0.08em;
  line-height: 1.25;
}

.garden-block-title a,
.note-eyebrow a { color: inherit; }
.garden-block-title a:hover,
.note-eyebrow a:hover { color: var(--accent); text-decoration: none; }

/* Masthead + footer ------------------------------------------------------ */

.masthead { border-bottom: none; padding-top: 28px; }

.masthead-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--brown);
  text-transform: lowercase;
}

.masthead-nav {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0;
}

.masthead-social a { color: var(--ink-soft); }

footer.site-footer {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0;
  color: var(--ink-soft);
}

/* Article ---------------------------------------------------------------- */

.article { max-width: 760px; }

.headline {
  font-weight: 400;
  font-size: clamp(44px, 6.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--brown);
  text-transform: lowercase;
  margin-bottom: 20px;
}

.series-tag { font-size: 22px; margin-bottom: 18px; }

.standfirst {
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.byline {
  font-size: 18px;
  letter-spacing: 0;
  border-bottom: none;
  text-transform: lowercase;
  margin-bottom: 44px;
}
.byline strong { font-weight: 400; color: var(--ink-soft); }
.byline-meta {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.article h2 {
  font-size: 32px;
  margin: 56px 0 20px;
}

.article h3 {
  font-size: 23px;
  font-weight: 700;
  text-transform: lowercase;
  margin: 40px 0 10px;
}

.article h4 {
  font-size: 20px;
  font-weight: 400;
  color: var(--accent);
  text-transform: lowercase;
  margin: 32px 0 8px;
}

.article p strong,
.article td strong { font-weight: 700; }

.article a:not(.btn):not(.tag-pill) { color: var(--accent); }

/* Hanging-dash lists, as on the slides. */
.article ul:not(.note-tags):not(.reference-list) {
  list-style: none;
  padding-left: 1.6em;
}
.article ul:not(.note-tags):not(.reference-list) > li { position: relative; }
.article ul:not(.note-tags):not(.reference-list) > li::before {
  content: '-';
  position: absolute;
  left: -1.3em;
}
.article li { margin: 0.2em 0; }

/* Flat marker block rather than the underline-style gradient. */
.article mark {
  background: var(--highlight);
  padding: 0 0.2em;
}

.article blockquote:not(.pullquote) {
  margin: 28px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--highlight);
  color: var(--ink-soft);
}

.article figcaption {
  font-size: 17px;
  letter-spacing: 0;
  color: var(--ink-soft);
}

/* Code — mono stays, shrunk to sit with the larger serif. */
.article code { font-size: 0.74em; background: #f5f3ee; }
.article pre,
.article .codehilite,
.article .codehilite pre { font-size: 13.5px; }
.article .codehilite { background: #faf9f6; }

/* Tables — header row takes the yellow band (cf. the eval-grid slide). */
.article table { font-size: 18px; }
.article thead th {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--ink);
  background: var(--highlight-soft);
  border-bottom: none;
  padding: 6px 18px 6px 10px;
}
.article tbody td { padding-left: 10px; }

/* Asides ----------------------------------------------------------------- */

.margin-note {
  font-size: 17px;
  letter-spacing: 0;
  border-left-color: var(--highlight) !important;
}
.margin-note > summary { font-family: var(--font-serif); font-size: 16px; letter-spacing: 0; text-transform: lowercase; }

.pullquote {
  font-size: 22px;
  letter-spacing: 0;
  color: var(--accent);
  border-left: none;
  padding-left: 0;
}
.pullquote::before { content: none; }

.callout { border-left-width: 0; border-radius: 0; padding: 16px 20px; }
.callout-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
}
.callout-note,
.callout-info { --callout-color: var(--brown); --callout-tint: var(--highlight-soft); }

.citation { font-family: var(--font-serif); font-size: 0.8em; letter-spacing: 0; }
.references-title { font-size: 20px; }
.reference { font-size: 17px; }
.reference::before { font-family: var(--font-serif); font-size: 16px; }
.reference .ref-title { font-weight: 700; }
.reference:target { background: var(--highlight-soft); }

.figure-eyebrow,
.figure-source { font-family: var(--font-serif); font-size: 16px; letter-spacing: 0; text-transform: lowercase; }
.figure-title { font-size: 24px; font-weight: 700; letter-spacing: 0; text-transform: lowercase; }
.figure-subtitle { font-size: 18px; letter-spacing: 0; }

/* Paper card + buttons ---------------------------------------------------- */

.paper-card { background: var(--highlight-soft); border: none; border-radius: 0; }
.paper-card-label {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
  background: var(--highlight);
  color: var(--ink);
  top: -13px;
}
.paper-card-title { font-size: 22px; font-weight: 700; letter-spacing: 0; }
.paper-card-meta { font-size: 17px; letter-spacing: 0; }

.btn { font-size: 17px; letter-spacing: 0; border-radius: 0; text-transform: lowercase; padding: 6px 14px 8px; }
.btn-paper,
.btn-paper:hover { background: var(--ink); border-color: var(--ink); }
.btn-paper-annotated,
.btn-paper-annotated:hover { background: var(--brown); border-color: var(--brown); }
.btn-meta { font-size: 11px; }

/* Home page -------------------------------------------------------------- */

.series-block-header,
.updates-block-header,
.garden-block-header {
  border-bottom: none;
  align-items: center;
}

.series-block-title,
.updates-block-title,
.garden-block-title { font-size: 26px; }

.series-block-meta,
.updates-block-meta,
.garden-block-meta,
.garden-block-more,
.post-list-meta,
.note-list-meta,
.note-updated,
.updates-list-date,
.updates-list-kind {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0;
  color: var(--ink-soft);
  text-transform: lowercase;
}

details.series-block--collapsible > summary:hover .series-block-title,
.updates-block-header:hover .updates-block-title { color: var(--accent); }

.updates-list-item { padding: 2px 0; gap: 0 14px; }
.updates-list-kind { font-size: 16px; font-weight: 400; }
.updates-list-kind--post { color: var(--accent); }
.updates-list-kind--note { color: var(--brown); }
.updates-list-title { font-size: 19px; letter-spacing: 0; text-transform: lowercase; }

.post-list-item { border-bottom: none; padding: 14px 0; }
.post-list-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
}
.post-list-standfirst { font-size: 19px; }

.flair {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
  border-radius: 0;
  padding: 0 7px 2px;
}
.flair-new { background: none; color: var(--accent); padding-left: 0; }
.note-list-meta .flair { font-size: 15px; padding: 0; }

/* Field notes ------------------------------------------------------------ */

.note-eyebrow { font-size: 17px; }
.note-title {
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.1;
  color: var(--brown);
  text-transform: lowercase;
}
.note-updated { border-bottom: none; padding-bottom: 0; margin-bottom: 16px; }
.note .note-tags { margin-bottom: 32px; }

.garden-index-title { font-size: 34px; }
.garden-index-blurb { font-size: 20px; border-bottom: none; padding-bottom: 0; }

.note-list-item { border-bottom: none; padding: 10px 0; }
.note-list-title { font-size: 22px; font-weight: 400; letter-spacing: 0; text-transform: lowercase; }
.note-list-summary { font-size: 18px; }

.tag-pill,
.tag-chip {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0;
  border-radius: 0;
  border-color: transparent;
  background: #f4f2ec;
  color: var(--ink-soft);
  padding: 0 8px 2px;
}
.tag-pill:hover,
.tag-chip:hover { background: var(--highlight); color: var(--ink); border-color: transparent; }
.tag-chip.is-active { background: var(--highlight); color: var(--ink); border-color: transparent; }

/* Series nav + subscribe -------------------------------------------------- */

.series-nav { font-size: 19px; border-top: none; }
.series-nav-label,
.subscribe-label { font-size: 20px; }
.series-nav-title { font-size: 20px; font-weight: 700; text-transform: lowercase; }
.series-nav li { text-transform: lowercase; }
.series-nav li::before { font-family: var(--font-serif); font-size: 16px; letter-spacing: 0; }
.series-nav li.is-current strong { font-weight: 700; }

.subscribe { font-size: 18px; border-top: none; }
.subscribe input[type="email"] { font-size: 17px; border-radius: 0; }
.subscribe button {
  font-family: var(--font-serif);
  font-size: 17px;
  border-radius: 0;
  background: var(--ink);
  border-color: var(--ink);
  padding: 5px 14px 7px;
}
.subscribe button:hover { background: var(--accent); border-color: var(--accent); }
.subscribe-status { font-family: var(--font-serif); font-size: 16px; }

/* Quiet: no fill, grey text, only the word "newsletter" takes the marker. */
.subscribe--hero {
  background: none;
  border: none;
  padding: 0;
}
.subscribe--hero::before { content: none; }
.subscribe--hero .subscribe-blurb { font-size: 18px; line-height: 1.35; color: var(--ink-soft); }
.subscribe--hero .subscribe-blurb b { font-weight: 400; color: var(--ink); background: var(--highlight); padding: 0 0.25em; }
.subscribe--hero button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.subscribe--hero button:hover { background: var(--accent-hover); color: #fff; border-color: var(--accent-hover); }

.subscribe-popup { border-radius: 0; }

@media (max-width: 640px) {
  body { font-size: 19px; }
  .article h2 { font-size: 27px; }
  .series-block-title,
  .updates-block-title,
  .garden-block-title { font-size: 23px; }
  .post-list-title { font-size: 25px; }
  .note-title { font-size: 36px; }
}
