/* Blog hub and posts. Paper base, plum call to action, dark footer from the site.
   Motion: position-only filter on the hub (js/blog-hub.js). Posts are CSS only (M-010, M-011). */

/* Newsreader metrics (upem 2000, ascender 1470, descender 530) matched to Liberation Serif
   so the hub H1 does not move the board when the webfont swaps. */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Liberation Serif"), local("Georgia"), local("Times New Roman");
  size-adjust: 101.12%;
  ascent-override: 72.68%;
  descent-override: 26.21%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Fallback";
  src: local("Liberation Sans"), local("Arial"), local("Helvetica Neue");
  size-adjust: 105.23%;
  ascent-override: 95.5%;
  descent-override: 28.03%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Newsreader Display";
  src: url("/assets/fonts/Newsreader-Display.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: "Newsreader Display Fallback";
  src: local("Liberation Serif"), local("Times New Roman"), local("Georgia");
  size-adjust: 107.1%;
  ascent-override: 68.6%;
  descent-override: 24.75%;
  line-gap-override: 0%;
}
.blog-hero h1 {
  font-family: "Newsreader", "Newsreader Display Fallback", Georgia, serif;
}
.post-banner-title h1 {
  font-family: "Newsreader Display", "Newsreader Display Fallback", Georgia, serif;
}
body.blog-page {
  --serif: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --sans: "Geist", "Geist Fallback", system-ui, sans-serif;
}

.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

body.blog-page{padding-top:var(--nav-h);background:var(--paper)}

/* Menu works with no JS, so post pages can ship without a script. */
.nav-check{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.blog-page .nav-toggle{cursor:pointer}
body:has(.nav-check:checked) .mobile-menu{transform:translateY(0)}
body:has(.nav-check:checked) .nav-toggle span:nth-child(1){transform:translateY(7px) rotate(45deg)}
body:has(.nav-check:checked) .nav-toggle span:nth-child(2){opacity:0}
body:has(.nav-check:checked) .nav-toggle span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
body:has(.nav-check:checked){overflow:hidden}
@media (min-width:861px){.nav-check{display:none}}

.gold-eye{display:inline-flex;align-items:center;gap:12px}
.gold-eye::before{content:"";width:40px;height:1px;background:#896635;flex:none}

.dotsep{width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.7;display:inline-block;flex:none}

/* ---- Hub ---- */
.blog-hero{padding:clamp(2.4rem,5vw,4rem) 0 0.4rem}
.blog-hero h1{font-size:clamp(2.4rem,5vw,4.4rem);line-height:1.02;max-width:14em;margin:14px 0 16px}
.blog-hero .lead{max-width:38rem}

.hub-board{padding-bottom:clamp(3rem,6vw,5rem)}

html.no-js .hub-filters,
html.no-js .hub-status{display:none}

.hub-filter-bar{position:relative}
.hub-filter-bar::after{
  content:"";position:absolute;top:0;right:0;bottom:6px;width:32px;pointer-events:none;
  background:linear-gradient(to right, transparent, var(--paper));
}
.hub-filters{
  display:flex;flex-wrap:nowrap;gap:8px;margin:22px 0 10px;
  overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;
  padding:2px 32px 6px 2px;scroll-padding-inline-end:32px;
}
.hub-filters button{
  flex:0 0 auto;min-height:44px;padding:0 16px;
  font-family:var(--serif);font-weight:500;font-size:16px;letter-spacing:-.01em;
  border:1px solid var(--hairline);border-radius:2px;background:#fff;color:var(--ink);cursor:pointer;
}
.hub-filters button[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.hub-filters button:focus-visible{outline:2px solid var(--teal-700);outline-offset:2px}

.hub-status{margin:0 0 18px;color:var(--ink-40);font-size:13.5px}

.hub-grid{display:grid;grid-template-columns:1fr;gap:18px}
.hub-card-link{display:flex;flex-direction:column;height:100%;color:inherit}
.hub-card{transition:translate .3s cubic-bezier(.2,.7,.2,1),box-shadow .3s cubic-bezier(.2,.7,.2,1)}
.hub-card:not(.is-featured){background:#fff;border:1px solid var(--hairline);border-radius:3px}
.hub-card:focus-within{translate:0 -3px}
.hub-card:not(.is-featured):focus-within{box-shadow:0 8px 22px rgba(31,36,48,.06)}
.hub-card.is-featured{padding-bottom:8px;margin-bottom:6px;border-bottom:1px solid var(--hairline)}
.hub-card-copy{padding:16px 16px 18px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.is-featured .hub-card-copy{padding:16px 0 12px}
.is-featured .hub-card-title{font-size:clamp(1.7rem,3vw,2.55rem);line-height:1.12}
.hub-card .tlink{
  margin-top:8px;text-decoration:none;
  background:linear-gradient(#896635,#896635) 0 100%/0 1px no-repeat;transition:background-size .3s;
}
.hub-card:focus-within .tlink{background-size:100% 1px}

.card-topic{font-family:var(--sans);font-size:12px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--magenta)}
.card-meta{display:flex;align-items:center;gap:8px;color:var(--ink-40);font-size:13.5px}
.hub-card-title{font-size:1.4rem;line-height:1.16}
.card-dek,.dek{color:var(--ink-60);font-size:1rem;line-height:1.55}
.card-dek{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.is-featured .dek{font-size:1.05rem;line-height:1.6}

/* M-013 companion: card hover is CSS only. Image scale stays inside the frame. */
.hub-card-media{position:relative;overflow:hidden;aspect-ratio:5/2;background:var(--paper-3);border-radius:3px}
.hub-card-media img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:85% center;transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.hub-card-title{background:linear-gradient(#896635,#896635) 0 100%/0 1px no-repeat;transition:background-size .3s;width:fit-content;max-width:100%;padding-bottom:3px}
.hub-card:focus-within .hub-card-media img{transform:scale(1.03)}
.hub-card:focus-within .hub-card-title{background-size:100% 1px}

.optin{background:var(--paper-2);border-top:1px solid var(--hairline);padding:clamp(3.2rem,7vw,5.2rem) 0}
.optin h2{font-size:clamp(2rem,4vw,3rem);margin:10px 0 8px}
.optin form{display:flex;flex-direction:column;gap:10px;margin-top:22px}
.optin input{
  font-family:var(--sans);font-size:16px;padding:14px 16px;border:1px solid var(--ink);
  border-radius:2px;background:#fff;color:var(--ink);width:100%;min-height:44px;
}
.optin .btn{white-space:normal;justify-content:center;min-height:44px}
.optin button:disabled,.optin input:disabled{opacity:.72;cursor:not-allowed}
.optin-note{color:var(--ink-40);font-size:13.5px}

/* ---- Post (no motion JS) ---- */
.post-banner{position:relative;background:var(--paper)}
.post-banner-frame{position:relative;width:100%;aspect-ratio:960/640;overflow:hidden;background:#FAF8F4}
.tone-dark .post-banner-frame{background:#0F1B2D}
.post-banner-frame img{
  position:absolute;top:0;right:0;height:100%;width:166.6667%;max-width:none;object-fit:cover;object-position:right center;
}
.post-col{width:min(1200px,100%);margin-left:auto;margin-right:auto;padding-left:22px;padding-right:22px;box-sizing:border-box}
.post-banner-title{position:relative;padding-top:26px}
.post-banner-title h1{font-size:clamp(1.85rem,7.4vw,2.4rem);line-height:1.08;letter-spacing:-.02em;color:var(--ink);margin:0;max-width:820px}
.post-banner-title h1::after{content:".";color:#D6264B}

.post-kicker{padding-top:18px}
.kicker-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;color:var(--ink-40);font-size:14px}
.kicker-row a{
  color:var(--teal-700);font-family:var(--serif);font-weight:500;text-decoration:none;
  background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;
  transition:background-size .3s,color .3s;
}
.kicker-row a:focus-visible{background-size:100% 1px;color:var(--ink)}

.post-layout{margin:18px auto 0}
.toc-label{font-family:var(--sans);font-size:12px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-40);margin-bottom:10px}
.toc-list,.toc-sub{list-style:none}
.toc-list > li > a,.toc-sub a{
  display:block;font-size:14.5px;line-height:1.35;color:var(--ink-60);padding:7px 0 7px 12px;border-left:1px solid var(--hairline);
}
.toc-sub{display:none}
.toc-sub a{font-size:13.5px;padding-left:22px}
.toc a:is(:hover,:focus-visible){color:var(--ink)}

.post-body{margin-top:22px;font-size:1.0625rem;line-height:1.7;color:var(--ink);max-width:820px}
.post-body p,.post-body ul,.post-body ol{max-width:68ch}
.post-body > :first-child{margin-top:0}
.post-body p{margin:0 0 1.15em}
.post-body h2{font-size:clamp(1.65rem,2.4vw,2.15rem);line-height:1.12;margin:2.1em 0 .55em}
.post-body h3{font-size:1.32rem;line-height:1.2;margin:1.6em 0 .4em}
.post-body a:not(.post-figure-link){
  color:var(--teal-700);text-decoration:none;
  background:linear-gradient(currentColor,currentColor) 0 100%/0 1px no-repeat;
  transition:background-size .3s,color .3s;
}
.post-body a:not(.post-figure-link):focus-visible{background-size:100% 1px;color:var(--ink)}
.post-body strong{font-weight:600}
.post-body em{font-family:var(--serif);font-style:italic}
.post-body ul{margin:0 0 1.2em;padding-left:1.2rem}
.post-body li{margin:.4em 0}
.post-body li::marker{color:var(--magenta)}

.post-figure-link{display:block;max-width:820px;margin:1.6rem 0 1.8rem;color:inherit;text-decoration:none;background:none}
.post-figure{margin:0;max-width:820px;transition:translate .3s cubic-bezier(.2,.7,.2,1)}
.post-figure img{display:block;width:100%;max-width:100%;height:auto;border:1px solid var(--hairline);border-radius:3px;background:var(--paper-2);transition:border-color .3s}
.post-figure figcaption{margin-top:10px;font-size:14.5px;line-height:1.5;color:var(--ink-60)}
.post-figure-link:focus-visible{outline:2px solid var(--teal-700);outline-offset:3px}
.post-figure-link:focus-visible .post-figure{translate:0 -2px}
.post-figure-link:focus-visible img{border-color:#896635}

.post-body .sources{margin-top:2.8rem;padding-top:24px;border-top:1px solid #896635}
.post-body .sources-label{
  font-family:var(--sans);font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;
  color:#896635;line-height:1.2;margin:0 0 14px;
}
.post-body .sources ol{margin:0;padding-left:1.25rem;font-family:var(--sans);font-size:15px;line-height:1.6;color:rgba(28,33,44,.8)}
.post-body .sources li{margin:.7rem 0}
.post-body .sources li::marker{color:rgba(28,33,44,.8)}
.post-body .sources a:not(.post-figure-link){
  color:rgba(28,33,44,.8);text-decoration:underline;text-decoration-color:#896635;text-decoration-thickness:1px;
  text-underline-offset:3px;word-break:break-word;background:none;
}
.post-body .sources a:not(.post-figure-link):focus-visible{text-decoration-thickness:2px;color:rgba(28,33,44,.8);background:none}
.source-meta{font-weight:400}

.related{padding:clamp(2.8rem,6vw,4.5rem) 0 .5rem}
.related h2{font-size:clamp(1.8rem,3vw,2.5rem);margin-bottom:1.2rem}

.blog-cta{
  position:relative;background:#2B0E1C;color:#F4E9EE;
  padding:clamp(4rem,8vw,6rem) 0;margin-top:clamp(3rem,6vw,4.5rem);
  border-top:1px solid #896635;border-bottom:1px solid #896635;overflow:hidden;
}
.blog-cta::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(60% 90% at 88% 10%,rgba(143,26,92,.6),transparent 68%);
}
.blog-cta .eyebrow{color:#D8C6CF}
.blog-cta h2{color:#F4E9EE;font-size:clamp(2rem,4.4vw,3.4rem);max-width:16em;margin:12px 0 0}
.blog-cta .cta-copy{color:#D8C6CF;font-size:1.0625rem;line-height:1.6;max-width:36rem;margin:16px 0 26px}
.blog-cta .btn{white-space:normal;text-align:center}

@media (max-width:860px){
  .hub-card-media{aspect-ratio:3/2}
}

@media (min-width:761px){
  .is-featured .hub-card-link{display:grid;grid-template-columns:1.15fr .85fr;gap:36px;align-items:center}
  .is-featured .hub-card-copy{padding:0}
  .optin-inner{display:grid;grid-template-columns:1.15fr .85fr;gap:40px;align-items:end}
  .optin form{margin-top:0}
  .post-banner-frame{aspect-ratio:auto;height:410px}
  .post-banner-frame img{inset:0;left:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center}
  .post-banner-title{padding-top:32px}
  .post-banner-title h1{font-size:clamp(2.4rem,4vw,3.5rem);color:var(--ink)}
  .post-kicker{padding-top:18px}
}

@media (min-width:861px){
  .post-col{padding-left:40px;padding-right:40px}
}

@media (min-width:980px){
  .hub-grid{grid-template-columns:1fr 1fr;gap:26px}
  .hub-card.is-featured{grid-column:1 / -1}
  .post-layout{display:grid;grid-template-columns:210px minmax(0,820px);gap:48px;justify-content:start;align-items:start}
  .hub-filter-bar::after{content:none}
  .hub-filters{padding-inline-end:2px;scroll-padding-inline-end:0}
  .toc{position:sticky;top:calc(var(--nav-h) + 28px);max-height:calc(100vh - var(--nav-h) - 48px);overflow:auto}
  .toc-sub{display:block}
  .post-body{margin-top:0}
}

/* M-010 reading progress. Hidden unless scroll() is supported. Firefox shows no bar. */
.read-progress{position:fixed;top:var(--nav-h);left:0;right:0;height:3px;transform-origin:0 50%;transform:scaleX(0);
  background:linear-gradient(100deg,#17B8A8,#6BC36A,#F2A22D,#D6264B,#8F1A5C);z-index:54;display:none}
body:has(.nav-check:checked) .read-progress{display:none}
@supports (animation-timeline: scroll()){ .read-progress{display:block;animation:rp linear both;animation-timeline:scroll(root)} }
@keyframes rp{to{transform:scaleX(1)}}
@media (prefers-reduced-motion: reduce){.read-progress{display:none}}

/* M-011 figure reveal. The caption does not animate. Unsupported browsers keep the image still. */
@supports (animation-timeline: view()){ @media (prefers-reduced-motion: no-preference){
  .post-figure img{animation:fig-in linear both;animation-timeline:view();animation-range:entry 0% entry 60%} } }
@keyframes fig-in{from{opacity:.001;transform:translateY(16px) scale(.985)}}

/* Hover that would stick after a tap stays on fine pointers. Focus styles stay available everywhere. */
@media (hover:hover) and (pointer:fine){
  .hub-card:hover{translate:0 -3px}
  .hub-card:not(.is-featured):hover{box-shadow:0 8px 22px rgba(31,36,48,.06)}
  .hub-card:hover .hub-card-media img{transform:scale(1.03)}
  .hub-card:hover .tlink,.hub-card:hover .hub-card-title{background-size:100% 1px}
  .hub-filters button:hover{border-color:var(--ink)}
  .post-body a:not(.post-figure-link):not(.sources a):hover,.kicker-row a:hover{background-size:100% 1px;color:var(--ink)}
  .post-body .sources a:not(.post-figure-link):hover{text-decoration-thickness:2px;color:rgba(28,33,44,.8);background:none}
  .post-figure-link:hover .post-figure{translate:0 -2px}
  .post-figure-link:hover img{border-color:#896635}
}

/* Active section. Chrome and Edge 140 and newer. Firefox and Safari keep the static list. */
@supports (scroll-target-group:auto){
  .toc{scroll-target-group:auto}
  .toc a:target-current{color:var(--ink);box-shadow:inset 2px 0 0 #896635}
}

@media (prefers-reduced-motion: reduce){
  .hub-card,.hub-card-media img,.hub-card-title,.hub-card .tlink,.post-body a,.kicker-row a,.post-figure,.post-figure img,.sources a{transition:none}
  .hub-card:is(:hover,:focus-within){translate:none;box-shadow:none}
  .hub-card:is(:hover,:focus-within) .hub-card-media img{transform:none}
  .post-figure-link:is(:hover,:focus-visible) .post-figure{translate:none}
}
