/* Black Timber Apothecary — the Journal.
   Loaded only on /blog/. Every value comes from tokens.css; nothing is hardcoded
   that a token owns. See design.md → "Design values".

   Long-form reading, so the one rule that matters here is measure: body text is
   held near 68 characters. Wider than that and the eye loses the line return,
   which is the difference between an article somebody finishes and one they skim. */

.wrap.narrow {
  max-width: 40rem;
  margin-inline: auto;
  padding-inline: var(--sp-3);
}

.post {
  padding-block: var(--sp-6) var(--sp-7, 96px);
}

.post .eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-1);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--sp-3);
}
.post .eyebrow a { color: var(--muted); }
.post .eyebrow .tag {
  margin-left: var(--sp-2);
  padding: 2px var(--sp-2);
  border: 1px solid var(--amber);
  color: var(--amber);
  letter-spacing: var(--tracking-caps);
}

.post h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, var(--fs-6));
  line-height: var(--lh-tight);
  text-wrap: balance;
  margin: 0 0 var(--sp-4);
}

.post .standfirst {
  font-size: var(--fs-3);
  line-height: var(--lh-body);
  color: var(--muted);
  margin: 0 0 var(--sp-5);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--ink);
}

.post h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-5);
  line-height: var(--lh-tight);
  text-wrap: balance;
  margin: var(--sp-6) 0 var(--sp-3);
}

.post h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-4);
  line-height: var(--lh-tight);
  margin: var(--sp-5) 0 var(--sp-2);
}

.post p {
  font-size: var(--fs-2);
  line-height: var(--lh-body);
  margin: 0 0 var(--sp-4);
}

.post blockquote {
  margin: var(--sp-5) 0;
  padding-left: var(--sp-4);
  border-left: 2px solid var(--amber);
}
.post blockquote p {
  font-size: var(--fs-3);
  font-style: italic;
  color: var(--muted);
  margin: 0;
}

/* The podcast. 16:9 without a wrapper hack, and it must never push the page
   sideways on a phone, which is where most of these get opened. */
.post .video {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin: 0 0 var(--sp-5);
  border: 1px solid var(--ink);
  background: var(--paper-deep);
}
.post .video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.post .backlink {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--ink);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}

/* Index */
.postlist { list-style: none; margin: 0; padding: 0; }
.postlist li {
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--ink);
}
.postlist li:first-child { border-top: 1px solid var(--ink); }
.postlist h2 {
  font-family: var(--font-display);
  font-size: var(--fs-4);
  line-height: var(--lh-tight);
  text-wrap: balance;
  margin: 0 0 var(--sp-2);
}
.postlist h2 a { text-decoration: none; }
.postlist h2 a:hover { text-decoration: underline; }
.postlist p { margin: 0; color: var(--muted); }
.postlist .eyebrow { margin-bottom: var(--sp-2); }

@media (max-width: 720px) {
  .post { padding-block: var(--sp-5); }
}

/* ---------------------------------------------------------------- Journal index
   Two columns on desktop, one on a phone. The rail carries the product, because
   an article that never mentions the tea is a nice essay and nothing else. */

.journal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: var(--sp-6);
  align-items: start;
}
.journal .feed { min-width: 0; }

.tools {
  display: flex;
  gap: var(--sp-2);
  margin: var(--sp-5) 0 var(--sp-2);
}
.tools input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-body);
  font-size: var(--fs-2);
  padding: var(--sp-2) var(--sp-3);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  appearance: none;
}
.tools input[type="search"]::placeholder { color: var(--muted); }
.tools input[type="search"]:focus-visible,
.tools button:focus-visible,
.rail .btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.tools button {
  font-family: var(--font-display);
  font-size: var(--fs-1);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  padding: var(--sp-2) var(--sp-3);
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
}
.tools button:hover { background: var(--ink); color: var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.rail { display: grid; gap: var(--sp-4); }
.rail .card {
  border: 1px solid var(--ink);
  padding: var(--sp-4);
  background: var(--paper-deep);
}
.rail .card.quiet { background: var(--paper); }
.rail .card img { display: block; width: 100%; height: auto; margin-bottom: var(--sp-3); }
.rail .card h3 {
  font-family: var(--font-display);
  font-size: var(--fs-4);
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-2);
}
.rail .card p { font-size: var(--fs-1); line-height: var(--lh-body); margin: 0 0 var(--sp-3); }
.rail .card p:last-child { margin-bottom: 0; }
.rail .btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-1);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  padding: var(--sp-2) var(--sp-4);
  color: var(--paper);
  background: var(--ink);
  text-decoration: none;
}
.rail .btn:hover { background: var(--amber); color: var(--ink); }

@media (max-width: 900px) {
  .journal { grid-template-columns: 1fr; gap: var(--sp-5); }
  .rail { order: 2; }
}

/* Podcast episode card, shown when the video is not up yet. */
.post .cover {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 var(--sp-4);
  border: 1px solid var(--ink);
}
.post .episode {
  font-family: var(--font-display);
  font-size: var(--fs-1);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  line-height: 1.5;
  padding: var(--sp-3) var(--sp-4);
  margin: 0 0 var(--sp-5);
  background: var(--paper-deep);
  border-left: 3px solid var(--amber);
}
.post .episode .pending {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

/* ---------------------------------------------------------------- article hero */
.post .hero {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0 0 var(--sp-4);
  border: 1px solid var(--ink);
}

/* --------------------------------------------------- alternating index cards
   Picture and words swap sides down the page. A reader scanning identical rows
   stops seeing them; a shot that changes side keeps the eye moving. The .flip
   class is re-applied by JS after filtering, so the rhythm survives a search. */
.postlist li {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
}
.postlist li.flip .shot { order: 2; }
.postlist li.flip .say  { order: 1; }

.postlist .shot { display: block; border: 1px solid var(--ink); }
.postlist .shot img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.postlist .say { min-width: 0; }

/* ---------------------------------------------------------------- pager */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-1);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.pager a, .pager .here, .pager .off {
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--ink);
  text-decoration: none;
  line-height: 1;
}
.pager a:hover { background: var(--ink); color: var(--paper); }
.pager .here { background: var(--ink); color: var(--paper); }
.pager .off { border-color: var(--rule, var(--muted)); color: var(--muted); }
.pager .step { margin-inline: var(--sp-1); }

@media (max-width: 640px) {
  .postlist li { grid-template-columns: 1fr; }
  .postlist li.flip .shot,
  .postlist li.flip .say { order: initial; }   /* one column: stacking wins */
  .postlist .shot img { aspect-ratio: 16 / 9; }
}
