/* =====================  THE JOURNAL (public blog) + public content pages  =====================
   Warm paper with a fine grain over everything (type included), heavy serif headlines, a calm reading column.
   Loaded only on pages whose <body> has the class "jr".                                                      */

body.jr {
  --jr-paper: #f4f2ec;
  --jr-ink: #1a1a1a;
  --jr-body: #1a1a1a;
  /* Inter for text, captions and labels; Source Serif 4 (the closest free match to the licensed headline face Tiempos) for headlines */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --font-mono: "Inter", ui-sans-serif, system-ui, sans-serif;
  background: var(--jr-paper);
  color: var(--jr-body);
  font-family: var(--font-sans);
}
/* the site header and footer keep the brand fonts */
body.jr .h-top, body.jr .h-foot { --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif; --font-display: "Newsreader", Georgia, serif; --font-mono: "JetBrains Mono", ui-monospace, monospace; }

/* grain: one fixed, non-interactive layer over the whole page so the paper AND the letters look printed */
body.jr::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: .34;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .09  0 0 0 0 .09  0 0 0 0 .17  0 0 0 .42 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
@media (prefers-reduced-data: reduce), print { body.jr::after { display: none; } }

body.jr .h-top { border-bottom-color: rgba(23, 23, 47, .12); }
body.jr .h-foot { border-top-color: rgba(23, 23, 47, .12); }

.jr-wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.jr-kicker { font: 600 12px/1.2 var(--font-sans); text-transform: uppercase; letter-spacing: .12em; color: var(--coral-600); }

/* ---------- index ---------- */
.jr-hero { padding: clamp(48px, 8vw, 112px) 0 clamp(28px, 4vw, 48px); max-width: 1000px; }
.jr-hero h1 { font: 650 clamp(40px, 6.4vw, 84px)/1.04 var(--font-display); letter-spacing: -.022em; color: var(--jr-ink); margin: 20px 0 22px; text-wrap: balance; }
.jr-hero h1 em { font-style: italic; font-weight: 500; color: var(--coral-500); }
.jr-lede { font: 400 clamp(18px, 1.7vw, 21px)/1.6 var(--font-sans); color: #333; max-width: 680px; margin: 0; }

.jr-topics { display: flex; gap: 6px 28px; flex-wrap: wrap; border-bottom: 1px solid rgba(23, 23, 47, .16); margin: 8px 0 8px; }
.jr-topics a { padding: 14px 0 13px; color: var(--ink-500); text-decoration: none; font: 600 14px/1 var(--font-sans); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.jr-topics a span { font: 600 11px var(--font-sans); margin-left: 4px; color: var(--ink-400); }
.jr-topics a:hover { color: var(--jr-ink); }
.jr-topics a.on { color: var(--jr-ink); border-bottom-color: var(--jr-ink); }

.jr-card { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.jr-cover { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 6px; background: var(--paper-200); }
.jr-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.jr-card:hover .jr-cover img { transform: scale(1.035); }
.jr-ph { position: absolute; inset: 0; display: grid; place-items: center; font: 600 clamp(88px, 12vw, 160px)/1 var(--font-display); letter-spacing: -.04em; color: rgba(23, 23, 47, .85); }
.tint-mint { background: var(--mint-300); } .tint-sky { background: var(--sky-300); } .tint-butter { background: var(--butter-300); } .tint-blush { background: var(--blush-300); }
.jr-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font: 600 11.5px/1.3 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
.jr-cat { color: var(--coral-600); text-decoration: none; font-weight: 600; }
.jr-cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.jr-title { font: 650 clamp(22px, 2.2vw, 27px)/1.18 var(--font-display); letter-spacing: -.012em; margin: 10px 0 10px; color: var(--jr-ink); text-wrap: balance; }
.jr-title a { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s var(--ease-out); }
.jr-title a:hover { background-size: 100% 2px; }
.jr-excerpt { font: 400 16px/1.6 var(--font-sans); color: #333; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jr-more { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1 var(--font-sans); color: var(--jr-ink); text-decoration: none; }
.jr-more:hover { color: var(--coral-600); }
.jr-more svg { transition: transform .2s var(--ease-out); } .jr-more:hover svg { transform: translateX(4px); }

.jr-lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: 40px 0 56px; border-bottom: 1px solid rgba(23, 23, 47, .16); margin-bottom: 48px; }
.jr-lead .jr-cover { aspect-ratio: 16 / 10; }
.jr-lead .jr-title { font-size: clamp(32px, 4vw, 50px); line-height: 1.08; letter-spacing: -.018em; }
.jr-lead .jr-excerpt { font-size: clamp(16px, 1.4vw, 18px); -webkit-line-clamp: 5; }
.jr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 36px; margin-bottom: 40px; }
.jr-empty { padding: 72px 0 40px; max-width: 620px; }
.jr-empty h2 { font: 650 clamp(30px, 3.6vw, 44px)/1.1 var(--font-display); letter-spacing: -.018em; margin: 16px 0 12px; color: var(--jr-ink); }
.jr-empty p { font: 400 18px/1.6 var(--font-sans); color: #333; }

/* ---------- the story ---------- */
.jr-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; background: transparent; }
.jr-progress i { display: block; height: 100%; width: 0; background: var(--coral-500); transition: width .08s linear; }

.jr-art-head { padding: clamp(32px, 5vw, 72px) 0 8px; }
.jr-crumbs { display: flex; gap: 10px; align-items: center; font: 600 12px/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 26px; }
.jr-crumbs a { color: var(--ink-500); text-decoration: none; }
.jr-crumbs a:hover { color: var(--coral-600); }
.jr-crumbs span { color: var(--ink-300); }
.jr-art-head h1 { font: 650 clamp(36px, 5.6vw, 76px)/1.06 var(--font-display); letter-spacing: -.022em; color: var(--jr-ink); margin: 0 0 24px; max-width: 1020px; text-wrap: balance; }
.jr-stand { font: 400 clamp(18px, 1.9vw, 22px)/1.55 var(--font-sans); color: #333; max-width: 760px; margin: 0 0 30px; text-wrap: pretty; }
.jr-byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid rgba(23, 23, 47, .16); border-bottom: 1px solid rgba(23, 23, 47, .16); }
.jr-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.jr-byline b { display: block; font: 700 15px/1.2 var(--font-sans); color: var(--jr-ink); }
.jr-byline span { font: 400 13px/1.3 var(--font-sans); color: var(--ink-500); }
.jr-byline-meta { margin-left: auto; display: flex; gap: 6px 18px; flex-wrap: wrap; font: 600 11.5px/1.4 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
.jr-byline-meta span { font: inherit; color: inherit; }
.jr-share { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 0 0; }
.jr-share a, .jr-share button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid rgba(23, 23, 47, .2); background: rgba(255, 255, 255, .5); color: var(--jr-ink); font: 600 13px/1 var(--font-sans); text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.jr-share a:hover, .jr-share button:hover { border-color: var(--jr-ink); background: #fff; color: var(--jr-ink); }

.jr-cover-wide { width: min(1360px, 100% - 2 * var(--gutter)); margin: 36px auto 0; }
.jr-cover-wide img { width: 100%; aspect-ratio: 2 / 1; max-height: 78vh; object-fit: cover; border-radius: 6px; background: var(--paper-200); }
.jr-cover-wide figcaption, .jr-body figcaption { font: 400 13px/1.5 var(--font-sans); color: #6a6a6a; margin-top: 10px; }
.jr-rule { height: 1px; margin-top: 28px; }

.jr-art-grid { display: grid; grid-template-columns: 220px minmax(0, 700px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); padding: clamp(36px, 5vw, 64px) 0; }
.jr-toc { position: sticky; top: 28px; align-self: start; max-height: calc(100vh - 56px); overflow: auto; }
.jr-toc ol { list-style: none; margin: 14px 0 0; padding: 0; border-left: 1px solid rgba(23, 23, 47, .16); }
.jr-toc li a { display: block; padding: 7px 0 7px 14px; margin-left: -1px; border-left: 2px solid transparent; font: 500 14px/1.35 var(--font-sans); color: var(--ink-500); text-decoration: none; }
.jr-toc li a:hover { color: var(--jr-ink); }
.jr-toc li a.on { color: var(--jr-ink); border-left-color: var(--coral-500); font-weight: 600; }

.jr-body { font: 400 clamp(16px, 1.25vw, 17.5px)/1.7 var(--font-sans); font-optical-sizing: auto; color: var(--jr-body); counter-reset: sec; }
.jr-body > :first-child { margin-top: 0; }
.jr-body p { margin: 0 0 1.3em; text-wrap: pretty; }
.jr-body strong { font-weight: 700; color: var(--jr-ink); }
.jr-body a { color: var(--jr-ink); text-decoration: underline; text-decoration-color: var(--coral-500); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color .15s; }
.jr-body a:hover { color: var(--coral-600); }
.jr-body h2 { counter-increment: sec; font: 650 clamp(26px, 2.8vw, 34px)/1.15 var(--font-display); letter-spacing: -.015em; color: var(--jr-ink); margin: 2.1em 0 .6em; scroll-margin-top: 28px; text-wrap: balance; }
.jr-body h2::before { content: counter(sec, decimal-leading-zero); display: block; font: 600 12px/1 var(--font-sans); letter-spacing: .14em; color: var(--coral-600); margin-bottom: 14px; }
.pg-prose h2::before { display: none; }
.jr-body h3 { font: 650 clamp(20px, 2vw, 23px)/1.25 var(--font-display); letter-spacing: -.01em; color: var(--jr-ink); margin: 1.8em 0 .5em; scroll-margin-top: 28px; }
.jr-body h4 { font: 700 19px/1.4 var(--font-sans); letter-spacing: 0; color: var(--jr-ink); margin: 1.6em 0 .4em; }
.jr-body ul, .jr-body ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.jr-body li { margin-bottom: .55em; padding-left: .2em; }
.jr-body li::marker { color: var(--coral-600); }
.jr-body blockquote { margin: 2.2em 0; padding: 4px 0 4px 30px; border-left: 3px solid var(--coral-500); }
.jr-body blockquote p { font: 650 clamp(22px, 2.4vw, 27px)/1.4 var(--font-display); letter-spacing: -.008em; color: var(--jr-ink); margin: 0 0 .5em; }
.jr-body blockquote cite { display: block; font: 400 13px/1.4 var(--font-sans); font-style: normal; color: #555; }
.jr-body hr { border: 0; text-align: center; margin: 2.6em 0; height: 1em; }
.jr-body hr::before { content: "• • •"; letter-spacing: .6em; color: var(--ink-400); font-size: 14px; }
.jr-body code { font: 500 .85em ui-monospace, "JetBrains Mono", Menlo, monospace; background: rgba(23, 23, 47, .07); padding: .12em .4em; border-radius: 4px; }
.jr-body pre { background: var(--ink-900); color: #f3f0e9; padding: 20px 22px; border-radius: 8px; overflow: auto; margin: 0 0 1.6em; font-size: 15px; line-height: 1.6; }
.jr-body pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.jr-body figure { margin: 2.2em 0; }
.jr-body figure.pic img, .jr-body .vid-frame { width: 100%; border-radius: 6px; background: var(--paper-200); }
.jr-body .vid-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.jr-body .vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 1180px) { .jr-body figure.pic { margin-inline: -70px; } }
.callout { margin: 2.2em 0; padding: 22px 26px; border-radius: 10px; font: 400 16px/1.65 var(--font-sans); }
.callout p, .callout li { font: inherit; margin-bottom: .6em; }
.callout-title { font: 700 12px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; color: var(--ink-700); }
.callout-takeaways { background: var(--butter-100); border: 1px solid var(--butter-300); }
.callout-note { background: var(--sky-100); border: 1px solid var(--sky-300); }
.callout ul { padding-left: 1.1em; margin: 0; }

.jr-art-foot { padding-bottom: 8px; }
.jr-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid rgba(23, 23, 47, .2); border-radius: var(--r-ctl); font: 600 12px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--jr-ink); text-decoration: none; }
.jr-chip:hover { border-color: var(--jr-ink); background: #fff; }
.jr-author-card { display: flex; gap: 20px; align-items: center; margin: 32px 0 0; padding: 24px 0; border-top: 1px solid rgba(23, 23, 47, .16); border-bottom: 1px solid rgba(23, 23, 47, .16); max-width: 760px; }
.jr-author-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.jr-author-card b { font: 650 20px/1.2 var(--font-display); color: var(--jr-ink); display: block; margin: 6px 0 4px; }
.jr-author-card p { margin: 0; font: 400 15px/1.5 var(--font-sans); color: var(--ink-700); }
.jr-author-card a { color: var(--jr-ink); text-decoration-color: var(--coral-500); text-underline-offset: 3px; }
.jr-related { padding: 24px 0 24px; }
.jr-related .jr-kicker { margin: 40px 0 26px; }

/* ---------- call to action ---------- */
.jr-cta { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; margin: clamp(56px, 8vw, 96px) 0; padding: clamp(28px, 5vw, 56px); border-radius: 14px; background: var(--ink-900); color: #fff; overflow: hidden; }
.jr-cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 32px 32px; pointer-events: none; }
.jr-cta > * { position: relative; }
.jr-cta .jr-kicker { color: var(--coral-300); }
.jr-cta h2 { font: 650 clamp(28px, 3.2vw, 42px)/1.1 var(--font-display); letter-spacing: -.018em; color: #fff; margin: 14px 0 12px; }
.jr-cta p { color: var(--ink-300); margin: 0; max-width: 560px; font: 400 17px/1.55 var(--font-sans); }
.jr-cta a:not(.btn) { color: #fff; }
.jr-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.jr-cta .btn-ghost { background: transparent; --f: #fff; --b: rgba(255, 255, 255, .35); --h: rgba(255, 255, 255, .08); box-shadow: none; }
.jr-cta .btn-ghost:hover { color: #fff; border-color: #fff; }
.jr-cta-inline { margin-top: 48px; }

/* ---------- about / how it works / FAQ ---------- */
.pg-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 700px); gap: clamp(28px, 5vw, 72px); padding: 16px 0 8px; align-items: start; }
.pg-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; filter: grayscale(.15) contrast(1.02); }
.pg-prose h2 { margin-top: 1.6em; }
.pg-prose > h2:first-child { margin-top: 0; }
.pg-center { max-width: 700px; margin: 0 auto; padding: 24px 0 0; }
.pg-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 8px 0 36px; }
.pg-step { padding: 28px; border-radius: 10px; min-height: 220px; display: flex; flex-direction: column; gap: 10px; }
.pg-step .jr-kicker { color: var(--ink-700); }
.pg-step h2 { font: 650 26px/1.15 var(--font-display); letter-spacing: -.012em; margin: 4px 0 0; color: var(--jr-ink); }
.pg-step p { margin: 0; font: 400 16px/1.55 var(--font-sans); color: var(--ink-700); }
.pg-faq { max-width: 860px; border-top: 1px solid rgba(23, 23, 47, .2); }
.pg-q { border-bottom: 1px solid rgba(23, 23, 47, .2); }
.pg-q summary { list-style: none; cursor: pointer; display: flex; gap: 22px; align-items: baseline; padding: 24px 4px; }
.pg-q summary::-webkit-details-marker { display: none; }
.pg-q .n { font: 600 12px var(--font-sans); color: var(--coral-600); letter-spacing: .1em; flex: none; }
.pg-q .t { font: 650 clamp(20px, 2vw, 24px)/1.3 var(--font-display); letter-spacing: -.01em; color: var(--jr-ink); flex: 1; }
.pg-q summary::after { content: "+"; font: 400 28px/1 var(--font-sans); color: var(--ink-500); transition: transform .2s var(--ease-out); }
.pg-q[open] summary::after { transform: rotate(45deg); }
.pg-q p { margin: -6px 4px 26px 52px; max-width: 680px; font: 400 16.5px/1.7 var(--font-sans); color: #333; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .jr-art-grid { grid-template-columns: minmax(0, 700px); justify-content: center; }
  .jr-art-grid > div:empty { display: none; }
  .jr-toc { display: none; }
  .jr-body blockquote { margin-inline: 0; }
}
@media (max-width: 900px) {
  .jr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jr-lead { grid-template-columns: 1fr; padding-top: 24px; }
  .pg-grid { grid-template-columns: 1fr; }
  .pg-photo { max-width: 280px; }
  .pg-steps { grid-template-columns: 1fr; }
  .jr-cta { grid-template-columns: 1fr; }
  .jr-byline-meta { margin-left: 0; width: 100%; }
}
@media (max-width: 600px) {
  .jr-grid { grid-template-columns: 1fr; gap: 44px; }
  .pg-q p { margin-left: 4px; }
  .jr-author-card { align-items: flex-start; }
  .jr-cta-actions .btn { width: 100%; }
}
@media print { .jr-progress, .jr-share, .jr-cta, .jr-toc, .h-top, .h-foot { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .jr-cover img, .jr-title a, .jr-more svg, .jr-progress i { transition: none; } }

/* width/height attributes on <img> are only there to reserve space; the layout decides the real size */
.jr-cover-wide img, .jr-body figure.pic img, .pg-photo img { height: auto; }
.jr-cover-wide img { aspect-ratio: 2 / 1; }


/* ---------- sources / references under a story ---------- */
.jr-body .sources { margin: 3em 0 0; padding-top: 22px; border-top: 1px solid rgba(26, 26, 26, .2); font: 400 13.5px/1.6 var(--font-sans); color: #555; }
.jr-body .sources .callout-title { color: var(--jr-ink); }
.jr-body .sources ol, .jr-body .sources ul { margin: 0; padding-left: 1.4em; }
.jr-body .sources li { margin-bottom: .5em; }
.jr-body .sources a { color: #333; text-decoration-color: rgba(26, 26, 26, .35); text-decoration-thickness: 1px; }
