/* The journal (/blog and /blog/<slug>): reading pages on the paper of the privacy page.
   Loaded after site.css, whose tokens, nav, credit and footer it reuses. The one ornament is the
   topstitch: a dashed rule in the thread colour, the stitching on the home page's denim letters. */

.journal-page { background: var(--paper); color: var(--ink); }
.journal { max-width: calc(72rem + 2 * var(--gutter)); margin: 0 auto; padding: calc(var(--nav-h) + clamp(1.6rem, 6vh, 4rem)) var(--gutter) 1rem; }
.j-article-page .journal { max-width: calc(44rem + 2 * var(--gutter)); }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.55em; font: 600 0.76rem/1.4 var(--face); font-stretch: 112%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--thread); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.crumbs span[aria-hidden] { opacity: 0.45; }
.crumbs [aria-current] { color: var(--ink); }

.kicker { font: 600 0.76rem/1.35 var(--face); font-stretch: 112%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }

/* topstitch rule */
.art-head::after, .sale-note::before {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  /* whole stitches only: "round" fits a whole number of 12 px stitch + 8 px gap repeats */
  background: linear-gradient(90deg, var(--thread) 0 60%, transparent 60%) 0 0 / 20px 2px repeat-x;
  background-repeat: round no-repeat;
}

/* ------------------------------------------------------------------ article */
.art-head { position: relative; margin-top: clamp(1.4rem, 4.5vh, 2.6rem); padding-bottom: 2.1rem; }
.art-head::after { bottom: 0; }
.art-head h1 { margin-top: 0.75rem; font: 760 clamp(2.25rem, 1.4rem + 4vw, 4.1rem)/1.02 var(--face); font-stretch: 104%; letter-spacing: -0.03em; text-wrap: balance; }
.standfirst { margin-top: 1.1rem; font: 400 clamp(1.15rem, 1rem + 0.55vw, 1.42rem)/1.45 var(--face); color: var(--ink-2); text-wrap: pretty; }
.byline { margin-top: 1.3rem; font-size: 0.84rem; font-stretch: 112%; letter-spacing: 0.04em; color: var(--ink-2); }

.art-body { margin-top: 2.3rem; font-size: clamp(1.0625rem, 1rem + 0.22vw, 1.1875rem); line-height: 1.7; }
.art-body p, .art-body li { color: var(--ink-2); text-wrap: pretty; }
.art-body p + p { margin-top: 1.05em; }
.art-body h2 { margin: 2.5em 0 0.65em; font: 720 clamp(1.45rem, 1.2rem + 1vw, 1.9rem)/1.12 var(--face); font-stretch: 104%; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
.art-body h3 { margin: 1.9em 0 0.45em; font: 700 1.1em/1.25 var(--face); font-stretch: 104%; color: var(--ink); }
.art-body ul, .art-body ol { margin: 0.9em 0 1.15em; padding-left: 1.3em; }
.art-body ul { list-style: disc; }
.art-body ol { list-style: decimal; }
.art-body li { margin: 0.5em 0; padding-left: 0.25em; }
.art-body li::marker { color: var(--thread); }
.art-body ol li::marker { color: var(--ink-2); font-weight: 700; font-stretch: 112%; }
.art-body strong { color: var(--ink); font-weight: 650; }
.art-body a, .sale-note a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--thread); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.art-body a:hover, .sale-note a:hover { text-decoration-color: var(--ink); }

/* ------------------------------------------------------------------ cards: related and index */
.more { margin-top: clamp(3.5rem, 9vh, 5.5rem); }
.more h2 { font: 720 1.4rem/1.1 var(--face); font-stretch: 104%; letter-spacing: -0.01em; }
.more .j-cards { grid-template-columns: 1fr; }
.j-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin-top: 1.2rem; }
.j-card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.25rem 1.35rem 1.4rem; border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 4%, transparent); box-shadow: inset 0 0 0 1px var(--line-dark);
  transition: background-color 0.2s;
}
.j-card:hover { background: color-mix(in srgb, var(--ink) 7.5%, transparent); }
.j-card h3 { margin: 0.55rem 0 0; font: 720 1.2rem/1.2 var(--face); font-stretch: 104%; letter-spacing: -0.01em; text-wrap: balance; }
.j-card h3 a { color: var(--ink); text-decoration: none; }
/* the whole card is the link's target */
.j-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.j-card h3 a:focus-visible { outline: none; }
.j-card:has(a:focus-visible) { outline: 2px solid var(--thread); outline-offset: 3px; }
.j-card p:not(.kicker) { margin-top: 0.6rem; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }

.sale-note { position: relative; margin-top: clamp(3rem, 8vh, 4.5rem); padding-top: 1.4rem; font-size: 0.95rem; color: var(--ink-2); }
.sale-note::before { top: 0; }
.sale-note a { margin-left: 0.35em; font-weight: 700; font-stretch: 112%; white-space: nowrap; }
.sale-note a::after { content: " →"; }

/* ------------------------------------------------------------------ index */
.j-head { max-width: 46rem; padding-bottom: 0; }
.j-head::after { display: none; }
.j-head h1 { font-size: clamp(3rem, 1.6rem + 6.5vw, 6.2rem); line-height: 0.95; }
.j-hero { margin: clamp(2rem, 5vh, 3rem) 0 0; }
.j-hero img { width: 100%; height: auto; border-radius: 8px; background: var(--tungsten); }
.j-group {
  display: grid; grid-template-columns: 13rem 1fr; gap: 1rem 2rem;
  margin-top: clamp(3rem, 7vh, 4.5rem); padding-top: 1.4rem; border-top: 1px solid var(--line-dark);
}
.j-group > h2 { font: 720 clamp(1.5rem, 1.25rem + 0.9vw, 2rem)/1.1 var(--face); font-stretch: 104%; letter-spacing: -0.015em; }
.j-group .j-cards { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }

.journal-page .foot { max-width: calc(72rem + 2 * var(--gutter)); margin-top: clamp(3rem, 8vh, 5rem); justify-content: flex-start; gap: 0.6rem 1.8rem; }
.j-article-page .foot { max-width: calc(44rem + 2 * var(--gutter)); }
.journal-page .foot p { margin-right: auto; }

@media (max-width: 860px) {
  .j-group { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .j-card { padding: 1.1rem 1.15rem 1.25rem; }
  .journal-page .foot p { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .j-card { transition: none; }
}
