/* Footer with the thermal runner (footer-heat.js). Full-bleed block: brand blue in light mode, near-black in dark mode. Exactly one screen tall, with room for the
   sticky header on top (--fh-header, measured in footer-heat.js), so the last screen is all footer.
   Order: title, scroll km + this week's run, the runner's stage, contact row, meta row. */
.site-footer.fh{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;min-height:100svh;box-sizing:border-box;margin:clamp(120px,18vh,200px) 0 0;border:0;padding:calc(var(--fh-header,96px) + clamp(8px,2vh,24px)) var(--home-gutter) 28px;background:var(--footer-bg);
  --color-content:#fff;--home-muted:rgba(255,255,255,.72);--color-content-muted:rgba(255,255,255,.72);--fh-link-hover:rgba(255,255,255,.72);color:var(--color-content)}
:root[data-theme="dark"] .site-footer.fh{background:var(--footer-bg);--color-content:#f2f2f2;--home-muted:#9a9a9a;--color-content-muted:#9a9a9a;--fh-link-hover:var(--scribble)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .site-footer.fh{background:var(--footer-bg);--color-content:#f2f2f2;--home-muted:#9a9a9a;--color-content-muted:#9a9a9a;--fh-link-hover:var(--scribble)}}
/* Header over the footer (footer-heat.js): no frost, white text and logo, white scribbles. */
.site-header{transition:color .3s ease}
.site-header::before,.site-header::after{transition:opacity .3s ease}
.site-header.is-over-footer{color:#fff;--scribble:#fff}
.site-header.is-over-footer::before,.site-header.is-over-footer::after{opacity:0}
.site-header.is-over-footer .site-logo img{--header-logo-filter:invert(1) brightness(1.1)}
/* Case studies: the footer follows the "Next" link closely */
.case-pager+.site-footer.fh{margin-top:clamp(40px,6vh,64px)}
.fh__canvas{position:absolute;inset:0;width:100%;height:100%;z-index:-1;display:block}
.fh__km{margin:16px 0 0} /* type comes from the site-wide .km-line (Inter, numbers in IBM Plex Mono) */
.fh__stage{flex:1 1 auto;min-height:clamp(220px,32vh,360px);margin:clamp(8px,2vh,20px) 0} /* fills what the screen has left */
.fh__title{margin:0;font:400 clamp(52px,8.5vw,136px)/1 var(--font-display);letter-spacing:-.015em;color:var(--color-content)}
.fh__links{display:flex;flex-wrap:wrap;align-items:baseline;gap:12px clamp(28px,4vw,56px);margin:0;font:400 clamp(20px,2vw,28px)/1.2 var(--font-ui);letter-spacing:-.01em}
.fh__links a,.fh__email{color:var(--color-content);text-decoration:none;background:none;border:0;padding:0;font:inherit;cursor:pointer;transition:color .2s ease}
.fh__links a:hover,.fh__links a:focus-visible,.fh__email:hover,.fh__email:focus-visible{color:var(--fh-link-hover)}
.fh__meta{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px 24px;margin:clamp(28px,5vh,56px) 0 0;font:12px/1.4 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--home-muted)}
.fh__meta>*{margin:0;display:inline-flex;align-items:center;gap:8px}
.fh__meta time{font:inherit;margin:0 0 0 .5em;color:inherit}
.fh .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Phone: status and Taipei time share a line, the credit sits on its own line below */
@media(max-width:720px){.fh__links{flex-direction:column;align-items:flex-start;gap:10px}.fh__meta{display:grid;grid-template-columns:auto auto;justify-content:start;gap:10px 24px}.fh__meta>p:last-child{grid-column:1/-1}}
