/* ============================================
   JOURNAL (blog) — index and article templates
   Sits on base.css + site.css. Colours come from the theme tokens
   in base.css, so light and dark both work with no extra rules.
   ============================================ */

.j-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--on-surface-3);
}
.j-kicker b { font-weight: 500; color: var(--accent-text); }

/* ---------- Index ---------- */
.j-head { padding: 160px 0 64px; }
.j-head .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 64px; align-items: end; }
.j-head h1 { margin: 24px 0 0; max-width: 11ch; }
.j-head p { font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 300; line-height: 1.7; color: var(--on-surface-2); max-width: 46ch; }


.j-feature { padding: 64px 0 0; }
.j-feature a { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: end; }
.j-feature .im { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.j-feature .im img { width: 100%; height: 100%; object-fit: cover; transition: transform 1200ms var(--ease-out); }
.j-feature a:hover .im img { transform: scale(1.03); }
.j-feature .no { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 64px; line-height: 1; color: var(--on-surface-3); display: block; margin-bottom: 24px; }
.j-feature h2 { font-size: clamp(36px, 3.6vw, 56px); line-height: 1.02; margin: 16px 0 24px; max-width: 16ch; text-wrap: balance; }
.j-feature p { font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 300; line-height: 1.7; color: var(--on-surface-2); max-width: 44ch; margin: 0 0 32px; }

.j-read {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-surface-1);
  border-bottom: 1px solid var(--accent-text); padding-bottom: 4px;
}

.j-pair { padding: 96px 0 0; }
.j-pair .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.j-card .im { overflow: hidden; background: var(--surface-3); }
.j-card .im img { width: 100%; height: 100%; object-fit: cover; transition: transform 1200ms var(--ease-out); }
.j-card:hover .im img { transform: scale(1.03); }
.j-pair .j-card:first-child .im { aspect-ratio: 4 / 5; }
.j-pair .j-card:last-child .im { aspect-ratio: 3 / 2; }
.j-pair .j-card:last-child { margin-top: 160px; }
.j-card .j-kicker { display: block; margin-top: 24px; }
.j-card h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(28px, 2.4vw, 38px); line-height: 1.08; margin: 12px 0 12px; max-width: 20ch; text-wrap: balance; color: var(--on-surface-1); }
.j-card p { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 300; line-height: 1.65; color: var(--on-surface-2); max-width: 46ch; margin: 0; }

.j-list { padding: 128px 0 var(--section-y); }
.j-list .label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.j-list ol { list-style: none; margin: 0; padding: 0; }
.j-list li a {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) 240px 32px; gap: 32px; align-items: baseline;
  padding: 32px 0; border-top: 1px solid var(--border);
}
.j-list li:last-child a { border-bottom: 1px solid var(--border); }
.j-list .no { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 48px; line-height: 1; color: var(--on-surface-3); }
.j-list .t { font-family: 'Instrument Serif', serif; font-size: clamp(26px, 2.2vw, 34px); line-height: 1.1; color: var(--on-surface-1); text-wrap: balance; }
.j-list .ar { font-family: 'Instrument Serif', serif; font-size: 32px; color: var(--on-surface-1); transition: transform 400ms var(--ease-out); }
.j-list li a:hover .t { font-style: italic; }
.j-list li a:hover .ar { transform: translateX(8px); }

[hidden] { display: none !important; }

.j-close { background: var(--surface-2); border-top: 1px solid var(--border); padding: var(--section-y) 0; }
.j-close .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.j-close h2 { font-size: clamp(40px, 4.6vw, 72px); line-height: 1; max-width: 14ch; text-wrap: balance; }
.j-close p { font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 300; line-height: 1.7; color: var(--on-surface-2); max-width: 44ch; margin: 20px 0 0; }
.j-btn {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--black); background: var(--lime);
  padding: 18px 24px; transition: transform 200ms var(--ease-out);
}
.j-btn:hover { transform: translateY(-2px); }

/* ---------- Article ---------- */
.post-head { padding: 160px 0 56px; }
.post-crumbs { display: flex; gap: 12px; align-items: center; }
.post-crumbs a:hover { color: var(--on-surface-1); }
.post-head h1 { font-size: clamp(44px, 5.2vw, 84px); line-height: 0.98; max-width: 17ch; margin: 28px 0 32px; text-wrap: balance; }
.post-stand { font-family: 'Inter', sans-serif; font-size: clamp(18px, 1.4vw, 21px); font-weight: 300; line-height: 1.65; color: var(--on-surface-2); max-width: 58ch; margin: 0; }
.post-by { display: flex; align-items: center; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.post-by img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; object-position: 50% 30%; }
.post-by .who { font-family: 'Inter', sans-serif; font-size: 15px; line-height: 1.4; color: var(--on-surface-1); }
.post-by .who span { display: block; color: var(--on-surface-3); font-size: 13px; font-weight: 300; }
.post-by .facts { margin-left: auto; display: flex; gap: 24px; }

.post-hero figure { margin: 0; }
.post-hero .im { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
.post-hero .im img { width: 100%; height: 100%; object-fit: cover; }
.post-hero figcaption, .prose figcaption { margin-top: 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-surface-3); }

.post-body { padding: 96px 0 var(--section-y); }
.post-body .wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 80px; align-items: start; }
.post-toc { position: sticky; top: 96px; }
.post-toc ol { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: toc; }
.post-toc li { counter-increment: toc; border-top: 1px solid var(--border); }
.post-toc a { display: grid; grid-template-columns: 28px 1fr; padding: 12px 0; font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.45; color: var(--on-surface-2); transition: color 200ms var(--ease-out); }
.post-toc a::before { content: counter(toc, decimal-leading-zero); font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; color: var(--on-surface-3); padding-top: 3px; }
.post-toc a:hover, .post-toc a.is-current { color: var(--on-surface-1); }
.post-toc .svc { display: block; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); }
.post-toc .svc a { display: block; padding: 8px 0 0; font-family: 'Instrument Serif', serif; font-size: 22px; color: var(--on-surface-1); }
.post-toc .svc a::before { content: none; }

/* Reading column */
.prose { max-width: 760px; }
.prose p, .prose li { max-width: 66ch; }
.prose .answer p, .prose td p { max-width: none; }
.prose > * + * { margin-top: 24px; }
.prose p, .prose li { font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 300; line-height: 1.75; color: var(--on-surface-2); }
.prose strong { font-weight: 500; color: var(--on-surface-1); }
.prose a { color: var(--on-surface-1); border-bottom: 1px solid var(--accent-text); transition: color 200ms var(--ease-out); }
.prose a:hover { color: var(--accent-text); }
.prose h2 { font-size: clamp(32px, 3vw, 46px); line-height: 1.05; margin-top: 80px; scroll-margin-top: 96px; text-wrap: balance; color: var(--on-surface-1); }
.prose h3 { font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 500; line-height: 1.35; margin-top: 48px; color: var(--on-surface-1); }
.prose ul, .prose ol { padding-left: 0; list-style: none; }
.prose ul li, .prose ol li { position: relative; padding-left: 32px; }
.prose ul li + li, .prose ol li + li { margin-top: 12px; }
.prose ul li::before { content: "+"; position: absolute; left: 4px; top: 1px; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--on-surface-3); }
.prose ol { counter-reset: n; }
.prose ol li { counter-increment: n; }
.prose ol li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 5px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; color: var(--accent-text); }

/* The short answer: the first thing a reader (or an AI answer engine) meets */
.answer { border-top: 1px solid var(--on-surface-1); border-bottom: 1px solid var(--border); padding: 24px 0 32px; }
.answer .j-kicker { color: var(--accent-text); }
.answer p { font-family: 'Instrument Serif', serif; font-size: clamp(24px, 2vw, 30px); line-height: 1.3; color: var(--on-surface-1); margin-top: 12px; }

.prose table { width: 100%; border-collapse: collapse; margin-top: 32px; }
.prose caption { caption-side: top; text-align: left; padding-bottom: 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-surface-3); }
.prose th { text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-surface-3); padding: 12px 16px 12px 0; border-bottom: 1px solid var(--on-surface-1); vertical-align: bottom; }
.prose td { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 300; line-height: 1.55; color: var(--on-surface-2); padding: 16px 16px 16px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose td:first-child { color: var(--on-surface-1); font-weight: 400; }
.table-scroll { overflow-x: auto; }

.note { background: var(--surface-3); padding: 24px 28px; }
.note .j-kicker { display: block; margin-bottom: 8px; }
.note p { font-size: 16px; }

.pull { margin: 64px 0; }
.pull p { font-family: 'Instrument Serif', serif; font-style: italic; font-size: clamp(30px, 2.8vw, 42px); line-height: 1.15; color: var(--on-surface-1); max-width: 22ch; }
/* Pull quotes are hand-set: each span is one phrase and starts a new line.
   On narrow screens a long phrase wraps within itself, balanced. */
.prose .pull p { font-size: clamp(28px, 2.6vw, 38px); max-width: none; }
.prose .pull p span { display: block; text-wrap: balance; }

.from-work { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 48px; }
.prose .from-work { border-bottom: 1px solid var(--border); }
.prose a.from-work { border-bottom-color: var(--border); }
.from-work .im { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-3); }
.from-work .im img { width: 100%; height: 100%; object-fit: cover; }
.from-work .t { display: block; font-family: 'Instrument Serif', serif; font-size: 26px; line-height: 1.1; color: var(--on-surface-1); margin-top: 6px; }
.from-work .d { display: block; font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 300; line-height: 1.55; color: var(--on-surface-2); margin-top: 6px; }

/* FAQ at the foot of an article reuses the site FAQ accordion */
.post-faq { margin-top: 96px; }
.post-faq h2 { margin-top: 0; }
.post-faq .packages-faq { margin-top: 24px; }
.post-faq .packages-faq details p { font-size: 16px; }

.post-author { margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--on-surface-1); display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; }
.post-author img { width: 96px; height: 96px; object-fit: cover; object-position: 50% 30%; }
.post-author .t { font-family: 'Instrument Serif', serif; font-size: 28px; line-height: 1.1; color: var(--on-surface-1); margin-top: 4px; }
.post-author p { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 300; line-height: 1.65; color: var(--on-surface-2); margin-top: 8px; max-width: 60ch; }

.post-next { padding: 0 0 var(--section-y); }
.post-next .wrap { border-top: 1px solid var(--border); padding-top: 32px; }
.post-next .label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.post-next .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.post-next .j-card .im { aspect-ratio: 3 / 2; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .j-head .wrap, .j-feature a, .j-pair .wrap, .j-close .wrap { grid-template-columns: 1fr; gap: 32px; }
  .j-head { padding-top: 128px; }
  .j-pair .j-card:last-child { margin-top: 0; }
  .j-list li a { grid-template-columns: 64px minmax(0, 1fr) 24px; gap: 16px; }
  .j-list li a .j-kicker { grid-column: 2; grid-row: 2; }
  .j-list .no { font-size: 36px; }
  .post-head { padding-top: 128px; }
  .post-body .wrap { grid-template-columns: 1fr; gap: 40px; }
  .post-toc { position: static; }
  .post-next .grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 640px) {
  .post-by .facts { margin-left: 0; width: 100%; }
  .prose p, .prose li { font-size: 17px; }
  .from-work { grid-template-columns: 1fr; }
  .j-list li a { grid-template-columns: 48px minmax(0, 1fr); }
  .j-list .ar { display: none; }
  .post-author { grid-template-columns: 64px minmax(0, 1fr); }
  .post-author img { width: 64px; height: 64px; }
}

/* Draft placeholders: anything Sophie still has to supply or confirm */
.prose mark { background: var(--lime); color: var(--black); padding: 0 4px; }

/* No single word left alone on the last line of a paragraph */
.j-head p, .j-feature p, .j-card p, .j-close p, .post-stand, .prose p, .prose li, .post-author p { text-wrap: pretty; }

/* Phones and tablets: the contents list would push the short answer off screen */
@media (max-width: 1024px) {
  .post-toc > .j-kicker, .post-toc ol { display: none; }
  .post-toc .svc { margin-top: 0; padding-top: 0; border-top: 0; }
}

/* Image strip inside an article */
.prose .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.prose .gallery figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-3); }
.prose .gallery img { width: 100%; height: 100%; object-fit: cover; }
.prose p.gallery-cap { margin-top: 12px; max-width: none; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; line-height: 1.5; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-surface-3); }
@media (max-width: 640px) { .prose .gallery { gap: 8px; } }

/* --- Free guide block at the end of an article --- */
.prose .guide-cta { border-top: 2px solid var(--on-surface-1); border-bottom: 1px solid var(--border); padding: 40px 0; margin: 64px 0 0; }
.prose .guide-cta p.guide-cta-k { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; line-height: 1.4; color: var(--accent-text); margin: 0 0 12px; }
.prose .guide-cta h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.02; margin: 0 0 16px; text-wrap: balance; }
.prose .guide-cta p { max-width: 52ch; }
.prose .guide-cta a.guide-cta-btn { display: inline-block; margin-top: 16px; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; line-height: 1; padding: 20px 24px; background: var(--on-surface-1); color: var(--surface-1); border-bottom: 0; text-decoration: none; transition: transform 200ms var(--ease-out); }
.prose .guide-cta a.guide-cta-btn:hover { color: var(--surface-1); transform: translateY(-2px); }
