/* ──────────────────────────────────────────────
   blog.css — writing section for juliaholbrough.co.uk
   Inherits every token from ../style.css (:root).
   Editorial print feel: generous measure, rust accents,
   Playfair headings, marginal rules. No new colours.
   ────────────────────────────────────────────── */

/* The nav is fixed and starts in its .scrolled state on these
   pages, so content needs to clear it. */
.article-page main,
.blog-index main{padding-top:clamp(5.5rem,9vw,7rem)}

.skip-link{position:absolute;left:-9999px;top:0;background:var(--ink);color:var(--cream);padding:.75rem 1.25rem;border-radius:0 0 8px 0;z-index:200;font-size:.9rem;font-weight:600}
.skip-link:focus{left:0}

/* ── Breadcrumbs ───────────────────────────── */
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;font-size:.8rem;color:var(--ink-soft);margin-bottom:2.5rem}
.crumbs a{color:var(--ink-muted);border-bottom:1px solid transparent;transition:color .2s,border-color .2s}
.crumbs a:hover{color:var(--rust);border-bottom-color:var(--rust)}
.crumbs span[aria-hidden]{color:rgba(26,17,8,.28)}
.crumbs [aria-current]{color:var(--ink-soft)}

/* ── Article shell ─────────────────────────── */
.post{padding-block:0 clamp(4rem,7vw,6rem)}
.post-wrap{max-width:760px}

.post-head{margin-bottom:3rem}
.post-head .section-label{display:inline-block;margin-bottom:1.1rem}
.post-head h1{font-size:clamp(2.1rem,5vw,3.5rem);line-height:1.06;margin:0 0 1.4rem;letter-spacing:-.025em}
.post-head h1 em{font-style:italic;color:var(--rust)}
.post-standfirst{font-size:1.18rem;font-weight:300;line-height:1.62;color:var(--ink-muted);max-width:56ch;margin:0 0 1.75rem}
.post-byline{font-size:.8rem;font-weight:500;letter-spacing:.04em;color:var(--ink-soft);padding-top:1.25rem;border-top:1px solid var(--hl)}
.post-byline span{color:var(--ink);font-weight:600}

/* ── Body copy ─────────────────────────────── */
.post-body{font-size:1.06rem;line-height:1.78;color:var(--ink)}
.post-body p{margin:0 0 1.5rem;font-weight:300}
.post-body p strong{font-weight:600}
.post-body h2{font-family:var(--serif);font-weight:700;font-size:clamp(1.4rem,2.6vw,1.85rem);line-height:1.22;letter-spacing:-.015em;margin:3rem 0 1.1rem;position:relative}
.post-body h2::before{content:"";position:absolute;left:-1.6rem;top:.62em;width:.8rem;height:1px;background:var(--rust);opacity:0}
@media (min-width:900px){.post-body h2::before{opacity:1}}
.post-body h3{font-family:var(--serif);font-weight:700;font-size:1.2rem;margin:2.1rem 0 .8rem;line-height:1.3}
.post-body a{color:var(--rust);border-bottom:1px solid rgba(196,84,46,.32);transition:border-color .2s,background .2s}
.post-body a:hover{border-bottom-color:var(--rust);background:rgba(196,84,46,.06)}
.post-body em{font-style:italic}

.post-list,.post-body ul,.post-body ol{margin:0 0 1.6rem;padding-left:1.35rem}
.post-body li{margin-bottom:.6rem;font-weight:300;line-height:1.7}
.post-body li::marker{color:var(--rust)}

.post-body blockquote{margin:2rem 0;padding:.2rem 0 .2rem 1.6rem;border-left:2px solid var(--rust);font-family:var(--serif);font-style:italic;font-size:1.12rem;line-height:1.55;color:var(--ink-muted)}
.post-body blockquote cite{display:block;margin-top:.7rem;font-family:var(--sans);font-style:normal;font-size:.8rem;letter-spacing:.04em;color:var(--ink-soft)}

/* ── Callout ───────────────────────────────── */
.callout{background:var(--white);border:1px solid var(--hl2);border-left:3px solid var(--rust);border-radius:10px;padding:1.4rem 1.6rem;margin:2rem 0}
.callout p{margin:0;font-size:.98rem;line-height:1.68}
.callout p+p{margin-top:.8rem}
.callout-label{display:block;font-size:.68rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--rust);margin-bottom:.6rem}

/* ── Tables ────────────────────────────────── */
.post-table{width:100%;border-collapse:collapse;margin:2rem 0;font-size:.92rem}
.post-table th,.post-table td{text-align:left;padding:.85rem 1rem;border-bottom:1px solid var(--hl2);vertical-align:top}
.post-table thead th{font-size:.7rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--rust);border-bottom-color:var(--ink)}
.post-table tbody tr:last-child td{border-bottom:none}
.post-table td{font-weight:300;line-height:1.6}
.post-table td:first-child{font-weight:500}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:2rem -1rem;padding:0 1rem}
.table-scroll .post-table{margin:0;min-width:520px}

/* ── In-article CTA ────────────────────────── */
.post-cta{margin:3.5rem 0 0;padding:2.2rem 2rem;background:var(--ink);color:var(--cream);border-radius:14px}
.post-cta-kicker{font-size:.68rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:#E8A487;margin:0 0 .9rem}
.post-cta-line{font-family:var(--serif);font-size:1.3rem;font-weight:700;line-height:1.35;margin:0 0 1.6rem;max-width:38ch}
.post-cta .btn-primary{background:var(--rust);color:#fff}
.post-cta .btn-primary:hover{background:#d96535}

/* ── Related & sources ─────────────────────── */
.post-related,.post-sources{margin-top:3.5rem;padding-top:2rem;border-top:1px solid var(--hl2)}
.post-related h2,.post-sources h2{font-family:var(--serif);font-weight:700;font-size:1.15rem;margin:0 0 1.1rem}
.post-related ul{list-style:none;display:grid;gap:.7rem}
.post-related a{font-size:1rem;font-weight:500;color:var(--ink);border-bottom:1px solid var(--hl2);padding-bottom:.15rem;transition:color .2s,border-color .2s}
.post-related a:hover{color:var(--rust);border-bottom-color:var(--rust)}

.post-sources ol{padding-left:1.2rem;display:grid;gap:.55rem}
.post-sources li{font-size:.86rem;font-weight:300;line-height:1.55;color:var(--ink-muted)}
.post-sources li::marker{color:var(--ink-soft)}
.post-sources a{color:var(--ink-muted);border-bottom:1px solid var(--hl2);word-break:break-word}
.post-sources a:hover{color:var(--rust);border-bottom-color:var(--rust)}

/* ── Blog index ────────────────────────────── */
.blog-hero{padding-block:clamp(1rem,3vw,2rem) clamp(2.5rem,5vw,4rem)}
.blog-hero h1{font-size:clamp(2.4rem,6vw,4.2rem);margin:1.1rem 0 1.4rem;max-width:16ch}
.blog-hero h1 em{font-style:italic;color:var(--rust)}
.blog-hero .section-lede{font-size:1.12rem;max-width:56ch}

.cluster{padding-block:0 clamp(2.5rem,5vw,3.5rem)}
.cluster-head{display:flex;align-items:baseline;gap:1rem;margin-bottom:1.75rem;padding-bottom:.8rem;border-bottom:1px solid var(--hl2)}
.cluster-head h2{font-family:var(--serif);font-weight:700;font-size:1.5rem;letter-spacing:-.01em}
.cluster-head .cluster-note{font-size:.85rem;font-weight:300;color:var(--ink-soft)}

.post-grid{display:grid;gap:1px;grid-template-columns:repeat(2,1fr);background:var(--hl);border:1px solid var(--hl);border-radius:14px;overflow:hidden}
@media (max-width:760px){.post-grid{grid-template-columns:1fr}}
.post-card{background:var(--white);padding:1.9rem 1.7rem;display:flex;flex-direction:column;gap:.7rem;transition:background .25s}
.post-card:hover{background:#FFFDF9}
.post-card-no{font-family:var(--serif);font-style:italic;font-weight:700;font-size:1.6rem;color:rgba(26,17,8,.18);line-height:1}
.post-card h3{font-family:var(--serif);font-weight:700;font-size:1.18rem;line-height:1.3;margin:0}
.post-card h3 a{color:var(--ink);transition:color .2s}
.post-card:hover h3 a{color:var(--rust)}
.post-card p{font-size:.93rem;font-weight:300;line-height:1.65;color:var(--ink-muted);margin:0}
.post-card-more{margin-top:auto;padding-top:.6rem;font-size:.8rem;font-weight:600;letter-spacing:.04em;color:var(--rust);display:inline-flex;align-items:center;gap:.4rem}
.post-card-more .arrow{transition:transform .25s var(--ease);display:inline-block}
.post-card:hover .post-card-more .arrow{transform:translateX(4px)}

.blog-foot-cta{padding-block:clamp(3rem,6vw,4.5rem);text-align:center}
.blog-foot-cta h2{font-family:var(--serif);font-weight:700;font-size:clamp(1.6rem,3.5vw,2.4rem);margin-bottom:1rem}
.blog-foot-cta h2 em{font-style:italic;color:var(--rust)}
.blog-foot-cta p{color:var(--ink-muted);font-weight:300;max-width:46ch;margin:0 auto 2rem}

/* ── Focus & motion ────────────────────────── */
.post-body a:focus-visible,.post-related a:focus-visible,.post-sources a:focus-visible,
.crumbs a:focus-visible,.post-card h3 a:focus-visible{outline:2px solid var(--rust);outline-offset:3px;border-radius:2px}

@media (prefers-reduced-motion:reduce){
  .post-card-more .arrow{transition:none}
  .post-card:hover .post-card-more .arrow{transform:none}
}

@media print{
  .nav,.post-cta,.back-to-top,footer,.crumbs{display:none!important}
  .article-page main{padding-top:0}
  .post-body a{color:var(--ink);border-bottom:none}
  .post-sources a::after{content:" (" attr(href) ")";font-size:.75em;word-break:break-all}
}

/* An odd final card in a cluster spans the full width, so a
   three- or five-item group never leaves a hollow cell. */
.post-grid > .post-card:last-child:nth-child(odd){grid-column:1/-1}
@media (max-width:760px){.post-grid > .post-card:last-child:nth-child(odd){grid-column:auto}}

/* ──────────────────────────────────────────────
   Figures — inline SVG diagrams
   Drawn in the site palette. Paths carry pathLength="1"
   so a single dash rule animates any length of line.
   ────────────────────────────────────────────── */
.post-fig{margin:2.6rem 0;padding:0}
.post-fig svg{display:block;width:100%;height:auto;overflow:visible;background:var(--white);border:1px solid var(--hl2);border-radius:12px}
.post-figcap{margin-top:.85rem;font-size:.82rem;font-weight:300;line-height:1.5;color:var(--ink-soft);max-width:60ch}
.post-figcap b{font-weight:600;color:var(--ink-muted)}

/* Palette classes used inside the SVGs */
.fx-ink{fill:var(--ink)}
.fx-rust{fill:var(--rust)}
.fx-muted{fill:var(--ink-muted)}
.fx-faint{fill:rgba(26,17,8,.32)}
.fx-paper{fill:var(--cream)}
.fx-panel{fill:#FBF6EC}
.s-ink{fill:none;stroke:var(--ink);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.s-rust{fill:none;stroke:var(--rust);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.s-faint{fill:none;stroke:rgba(26,17,8,.22);stroke-width:1.2;stroke-linecap:round}
.s-dash{fill:none;stroke:rgba(26,17,8,.3);stroke-width:1.2;stroke-dasharray:4 5;stroke-linecap:round}

/* Type inside the SVGs */
.fx-label{font-family:var(--sans);font-size:11px;font-weight:600;letter-spacing:.13em;text-transform:uppercase}
.fx-t{font-family:var(--sans);font-size:14px;font-weight:500}
.fx-s{font-family:var(--sans);font-size:12.5px;font-weight:300}
.fx-n{font-family:var(--serif);font-size:26px;font-weight:700;font-style:italic}
.fx-h{font-family:var(--serif);font-size:17px;font-weight:700}

/* Motion, driven by the .reveal/.in observer already in script.js */
.post-fig .fx-draw{stroke-dasharray:1;stroke-dashoffset:1}
.post-fig.in .fx-draw{animation:fxDraw 1.15s var(--ease) forwards;animation-delay:calc(var(--d,0)*1s)}
@keyframes fxDraw{to{stroke-dashoffset:0}}

.post-fig .fx-fade{opacity:0}
.post-fig.in .fx-fade{animation:fxFade .6s var(--ease) forwards;animation-delay:calc(.25s + var(--d,0)*1s)}
@keyframes fxFade{to{opacity:1}}

.post-fig .fx-bar{transform:scaleX(0);transform-origin:left center;transform-box:fill-box}
.post-fig.in .fx-bar{animation:fxBar .9s var(--ease) forwards;animation-delay:calc(.15s + var(--d,0)*1s)}
@keyframes fxBar{to{transform:scaleX(1)}}

.post-fig .fx-rise{transform:scaleY(0);transform-origin:bottom center;transform-box:fill-box}
.post-fig.in .fx-rise{animation:fxBar .8s var(--ease) forwards;animation-delay:calc(.15s + var(--d,0)*1s)}

.post-fig .fx-pop{opacity:0;transform:scale(.82);transform-origin:center;transform-box:fill-box}
.post-fig.in .fx-pop{animation:fxPop .55s cubic-bezier(.34,1.56,.64,1) forwards;animation-delay:calc(.3s + var(--d,0)*1s)}
@keyframes fxPop{to{opacity:1;transform:scale(1)}}

@media (prefers-reduced-motion:reduce){
  .post-fig .fx-draw{stroke-dashoffset:0}
  .post-fig .fx-fade{opacity:1}
  .post-fig .fx-bar,.post-fig .fx-rise{transform:none}
  .post-fig .fx-pop{opacity:1;transform:none}
  .post-fig.in .fx-draw,.post-fig.in .fx-fade,.post-fig.in .fx-bar,
  .post-fig.in .fx-rise,.post-fig.in .fx-pop{animation:none}
}
@media (max-width:560px){
  .fx-label{font-size:12px}.fx-t{font-size:15px}.fx-s{font-size:13.5px}
}
@media print{.post-fig .fx-draw{stroke-dashoffset:0}.post-fig .fx-fade{opacity:1}.post-fig .fx-bar,.post-fig .fx-rise,.post-fig .fx-pop{transform:none;opacity:1}}

/* ── CTA reassurance line (warm-tier articles) ── */
.post-cta-note{margin:1.1rem 0 0;font-size:.83rem;font-weight:300;line-height:1.6;color:rgba(245,239,227,.62);max-width:48ch}

/* ── Author credibility block ── */
.post-author{margin-top:3rem;padding-top:2rem;border-top:1px solid var(--hl2);display:grid;gap:.9rem}
.post-author-label{font-size:.68rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--rust);margin:0}
.post-author-name{font-family:var(--serif);font-weight:700;font-size:1.15rem;margin:0}
.post-author p:not(.post-author-label):not(.post-author-name){font-size:.92rem;font-weight:300;line-height:1.7;color:var(--ink-muted);margin:0;max-width:62ch}
.post-author a{color:var(--rust);border-bottom:1px solid rgba(196,84,46,.32)}
.post-author a:hover{border-bottom-color:var(--rust)}

/* ── Hub triage + footer note ─────────────── */
.blog-triage{margin-top:1.6rem;padding-top:1.4rem;border-top:1px solid var(--hl2);font-size:1rem;font-weight:300;line-height:1.7;color:var(--ink-muted);max-width:62ch}
.blog-triage a{color:var(--rust);font-weight:500;border-bottom:1px solid rgba(196,84,46,.32)}
.blog-triage a:hover{border-bottom-color:var(--rust)}
.blog-foot-note{margin-top:1.5rem;font-size:.85rem;font-weight:300;color:var(--ink-soft);max-width:52ch;margin-left:auto;margin-right:auto}
.blog-foot-note a{color:var(--rust);border-bottom:1px solid rgba(196,84,46,.32)}

/* ──────────────────────────────────────────────
   One-page checklist — built to print onto a
   single A4 sheet and be handed round a table.
   ────────────────────────────────────────────── */
.onepager main{padding-top:clamp(5.5rem,9vw,7rem)}
.op{max-width:820px;margin:0 auto}
.op-sheet{background:var(--white);border:1px solid var(--hl2);border-radius:14px;padding:clamp(1.8rem,4vw,3rem)}
.op-head{border-bottom:2px solid var(--ink);padding-bottom:1.3rem;margin-bottom:2rem}
.op-head h1{font-family:var(--serif);font-weight:900;font-size:clamp(1.7rem,3.6vw,2.5rem);line-height:1.1;letter-spacing:-.02em;margin:.7rem 0 .8rem}
.op-head h1 em{font-style:italic;color:var(--rust)}
.op-sub{font-size:1rem;font-weight:300;line-height:1.6;color:var(--ink-muted);max-width:60ch;margin:0}
.op-q{display:grid;grid-template-columns:auto 1fr auto;gap:1rem 1.2rem;align-items:start;padding:1.15rem 0;border-bottom:1px solid var(--hl)}
.op-q:last-of-type{border-bottom:1px solid var(--hl2)}
.op-n{font-family:var(--serif);font-style:italic;font-weight:700;font-size:1.7rem;line-height:1;color:rgba(26,17,8,.24)}
.op-qt{font-size:1.02rem;font-weight:500;line-height:1.45;margin:0 0 .35rem}
.op-qn{font-size:.88rem;font-weight:300;line-height:1.55;color:var(--ink-muted);margin:0}
.op-box{display:flex;gap:.5rem;align-items:center;padding-top:.15rem}
.op-box span{width:26px;height:26px;border:1.5px solid var(--hl2);border-radius:5px;display:block}
.op-box b{font-size:.6rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-soft)}
.op-score{margin-top:2rem;display:grid;gap:1.1rem}
.op-row{display:grid;grid-template-columns:auto 1fr;gap:1.1rem;align-items:baseline}
.op-tag{font-size:.66rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--rust);white-space:nowrap;padding-top:.2rem}
.op-row p{font-size:.93rem;font-weight:300;line-height:1.65;color:var(--ink-muted);margin:0}
.op-foot{margin-top:2.2rem;padding-top:1.3rem;border-top:1px solid var(--hl2);display:flex;flex-wrap:wrap;gap:.6rem 1.5rem;justify-content:space-between;align-items:baseline}
.op-foot-name{font-family:var(--serif);font-weight:700;font-size:1rem}
.op-foot-meta{font-size:.8rem;font-weight:300;color:var(--ink-soft)}
.op-foot-meta a{color:var(--rust)}
.op-actions{margin-top:2rem;display:flex;flex-wrap:wrap;gap:.8rem;align-items:center}
.op-print{font:inherit;font-size:.9rem;font-weight:600;cursor:pointer;background:transparent;color:var(--ink);border:1px solid var(--hl2);border-radius:8px;padding:.85rem 1.5rem;transition:border-color .2s,background .2s}
.op-print:hover{border-color:var(--ink);background:rgba(26,17,8,.04)}

@media print{
  @page{margin:11mm}
  .nav,.crumbs,.op-actions,.back-to-top,footer,.skip-link{display:none!important}
  .onepager main{padding-top:0}
  .onepager body,body{background:#fff}
  .onepager .op-sheet{border:none;border-radius:0;padding:0}
  .onepager .op{max-width:none}
  .onepager .section-label{font-size:7.5pt;letter-spacing:.12em}
  .onepager .op-head{padding-bottom:.5rem;margin-bottom:.7rem;border-bottom-width:1.5px}
  .onepager .op-head h1{font-size:17pt;margin:.3rem 0 .35rem;line-height:1.08}
  .onepager .op-head h1 em{color:#000}
  .onepager .op-sub{font-size:9pt;line-height:1.4;max-width:none}
  .onepager .op-q{padding:.42rem 0;gap:.5rem .8rem;break-inside:avoid}
  .onepager .op-n{font-size:13pt}
  .onepager .op-qt{font-size:9.5pt;line-height:1.3;margin-bottom:.1rem}
  .onepager .op-qn{font-size:8pt;line-height:1.3}
  .onepager .op-box span{width:17px;height:17px}
  .onepager .op-box b{font-size:6pt}
  .onepager .op-score{margin-top:.7rem;gap:.4rem}
  .onepager .op-row{gap:.7rem;break-inside:avoid}
  .onepager .op-tag{color:#000;font-size:6.5pt;padding-top:.12rem}
  .onepager .op-row p{font-size:8.4pt;line-height:1.38}
  .onepager .op-foot{margin-top:.8rem;padding-top:.5rem}
  .onepager .op-foot-name{font-size:9.5pt}
  .onepager .op-foot-meta{font-size:7.2pt}
}
