/* Paper, ink and depth. Only the v2 shell opts into these tokens and layouts. */
:where(:root[data-layout="layers"]) {
  --st-paper: oklch(0.975 0.012 85);
  --st-surface: oklch(0.99 0.008 85);
  --st-ink: oklch(0.23 0.015 55);
  --st-muted: oklch(0.50 0.015 60);
  --st-line: oklch(0.88 0.012 80);
  --st-accent: oklch(0.56 0.13 38);
  --st-depth-ink: oklch(0.08 0.005 60);
  --st-shadow-near: color-mix(in srgb, var(--st-depth-ink) 9%, transparent);
  --st-shadow-far: color-mix(in srgb, var(--st-depth-ink) 5%, transparent);
  --st-ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --st-gutter: clamp(1.25rem, 5.55vw, 6rem);
  --st-v2-width: 80rem;
  --st-title-face: var(--st-title-serif);
  --st-shade: oklch(0.19 0.012 60);
  color-scheme: light;
  scroll-padding-top: 7rem;
}
:root[data-layout="layers"][data-public-theme="dark"] { color-scheme: dark; }
.st-v2 { --st-shade: oklch(0.19 0.012 60); --st-photo-bg: var(--st-shade); --st-credit-bg: color-mix(in srgb, var(--st-shade) 86%, transparent); background-color: var(--st-paper); background-image: radial-gradient(circle at 23% 37%, color-mix(in srgb, var(--st-ink) 1%, transparent) .4px, transparent .6px); background-size: 5px 7px; color: var(--st-ink); }
.st-v2 :focus-visible { outline: 2px solid var(--st-focus); outline-offset: 5px; }
.st-v2 ::selection { color: var(--st-paper); background: var(--st-accent); }
.st-v2 a { text-underline-offset: .25em; }
.st-v2 button { font: inherit; color: inherit; }
.st-v2 .st-arrow { display: inline-block; vertical-align: middle; }
.st-v2 .st-wrap { width: min(calc(100% - var(--st-gutter) * 2), var(--st-v2-width)); }
.st-v2 .st-header {
  position: fixed;
  inset: 1.25rem var(--st-gutter) auto;
  width: auto;
  height: 4rem;
  z-index: 30;
  border: 0;
  color: var(--st-ink);
  background: transparent;
  transform-origin: center top;
  transition: transform 220ms var(--st-ease);
}
.st-v2 .st-header::before {
  content: "";
  position: absolute;
  inset: 0 -1rem;
  z-index: -1;
  border: .5px solid color-mix(in srgb, var(--st-line) 70%, transparent);
  border-radius: .6rem;
  background: color-mix(in srgb, var(--st-paper) 96%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 5px var(--st-shadow-near), 0 12px 32px var(--st-shadow-far);
  opacity: 0;
  transition: opacity 220ms var(--st-ease);
}
.st-v2 .st-header.is-scrolled { transform: translateY(-.5rem); }
.st-v2 .st-header.is-scrolled::before { opacity: 1; }
.st-v2:not([data-page="home"]) .st-header { position: sticky; inset: 1rem auto auto; margin: 1rem var(--st-gutter); }
.st-v2:not([data-page="home"]) .st-header::before { opacity: 1; }
/* A quiet paper strip keeps navigation legible over every selected hero visual. */
.st-v2[data-page="home"] .st-header:not(.is-scrolled)::before { opacity:1; background:color-mix(in srgb,var(--st-paper) 96%,transparent); border-color:transparent; box-shadow:none; backdrop-filter:none; transition:none; }
.st-v2 .st-header-inner { width: 100%; height: 100%; max-width: var(--st-v2-width); gap: 2rem; padding: 0; }
.st-v2 .st-wordmark { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; font-size: 1.5rem; letter-spacing: -.035em; }
.st-v2 .st-nav { gap: 2rem; }
.st-v2 .st-nav a { font-size: .875rem; font-weight: 450; }
.st-v2 .st-nav a[aria-current] { color: var(--st-accent); }
.st-v2 .st-header-end { gap: 1.25rem; }
.st-v2 .st-account { font-size: .875rem; }
.st-v2 .st-nav a::after { background: currentColor; }
.st-v2 .st-header a, .st-v2 .st-text-link { transition: none; }
.st-v2[data-wordmark="sans"] .st-wordmark,
.st-v2[data-wordmark="sans"] .st-hero-title,
.st-v2[data-wordmark="sans"] .st-footer-brand { font-family: var(--st-sans); }
.st-v2[data-heading="sans"] :is(.st-featured-title, .st-latest-title, .st-v2-heading, .st-book-title) { font-family: var(--st-sans); }

/* One full-height scene. All text and links are server-rendered. */
.st-hero-v2 { position: relative; min-height: 48rem; height: 100svh; overflow: clip; isolation: isolate; }
.st-hero-v2 .st-visual { position: absolute; inset: 0; z-index: -2; }
.st-hero-v2:has([data-kind="scene"][data-builtin="strata"]) .st-visual,
.st-hero-v2:has([data-kind="scene"][data-builtin="pages"]) .st-visual { left: 30%; top: 15%; }
.st-hero-copy-v2 { position: relative; z-index: 2; padding: max(9rem, 23vh) var(--st-gutter) 0; pointer-events: none; }
.st-hero-title { margin: 0; max-width: 100%; font-family: var(--st-serif); font-size: clamp(5rem, 16vw, 15rem); font-weight: 400; line-height: .98; letter-spacing: -.055em; overflow-wrap: anywhere; text-wrap: balance; }
.st-hero-title[data-long="true"] { font-size: clamp(2rem, calc(140vw / var(--name-length)), 7rem); max-width: 14ch; line-height: 1.15; }
.st-hero-title span { display: inline-block; white-space: pre; animation: st-letter-in 850ms var(--st-ease) both; animation-delay: calc(var(--i) * 45ms); }
.st-hero-tagline { margin: 2rem 0 0; max-width: 30em; color: var(--st-muted); font-size: 1.0625rem; line-height: 1.875rem; white-space: pre-line; }
.st-hero-bottom { position: absolute; inset: auto var(--st-gutter) 2.5rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.st-scroll-v2 { display: inline-flex; align-items: center; gap: .85rem; padding: .5rem 0; font-size: .8125rem; }
.st-scroll-v2 svg { width: 1.25rem; height: 1.25rem; transition: transform 200ms var(--st-ease); }
.st-scroll-v2:hover svg { transform: translateY(4px); }
.st-hero-bottom .st-credit { position: relative; inset: auto; }
.st-hero-v2--photo { color: var(--st-on-photo); background: var(--st-photo-bg); }
.st-hero-v2--photo::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--st-shade) 82%, transparent), color-mix(in srgb, var(--st-shade) 64%, transparent)); }
.st-hero-v2--photo .st-hero-tagline { color: var(--st-on-photo); }
.st-v2[data-align="right"] .st-hero-v2--photo::after { background: linear-gradient(270deg, color-mix(in srgb, var(--st-shade) 82%, transparent), color-mix(in srgb, var(--st-shade) 64%, transparent)); }
.st-v2[data-align="center"] .st-hero-v2--photo::after { background: color-mix(in srgb, var(--st-shade) 72%, transparent); }
.st-hero-v2:not(.st-hero-v2--photo) .st-hero-tagline { width: fit-content; padding: .25em .5em; background: var(--st-paper); border-radius: 2px; }
.st-v2:has(.st-hero-v2--photo) .st-header:not(.is-scrolled) { color: var(--st-on-photo); }
.st-v2:has(.st-hero-v2--photo) .st-header:not(.is-scrolled) .st-nav a[aria-current] { color: inherit; }
.st-v2[data-align="center"] .st-hero-copy-v2 { text-align: center; }
.st-v2[data-align="center"] .st-hero-tagline { margin-inline: auto; }
.st-v2[data-align="right"] .st-hero-copy-v2 { text-align: right; }
.st-v2[data-align="right"] .st-hero-tagline { margin-left: auto; }
@keyframes st-letter-in { from { opacity: .85; transform: translateY(.10em); filter: blur(1px); } to { opacity: 1; transform: none; filter: none; } }

/* Featured: the cover gives a paper sheet its depth, not an extra badge or caption. */
.st-v2-section { margin-top: clamp(5rem, 10vw, 10rem); container-type: inline-size; }
.st-v2-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.st-v2-heading { margin: 0; font-family: var(--st-sans); font-size: .9375rem; line-height: 1.5rem; font-weight: 600; letter-spacing: .02em; color: var(--st-muted); }
.st-v2-section-head > a { font-size: .875rem; white-space: nowrap; }
.st-featured-stack { display: grid; gap: 4rem; padding-bottom: 2rem; }
.st-featured { position: sticky; top: calc(6.5rem + var(--card) * .75rem); background: var(--st-surface); border: .5px solid var(--st-line); box-shadow: 0 3px 8px var(--st-shadow-near), 0 24px 64px var(--st-shadow-far); border-radius: .5rem; overflow: clip; }
.st-featured > a { display: grid; grid-template-columns: 1fr 1.2fr; min-height: 27rem; color: var(--st-ink); text-decoration: none; }
.st-featured-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 4.5vw, 4rem); }
.st-featured-title { font-family: var(--st-title-face); font-size: 1.375rem; line-height: 2rem; letter-spacing: 0; font-weight: 600; text-wrap: balance; margin: 0; }
.st-featured-excerpt { margin-top: 1.5rem; color: var(--st-muted); line-height: 1.875rem; font-size: 1.0625rem; }
.st-featured-meta { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; font-size: .8125rem; color: var(--st-muted); font-variant-numeric: tabular-nums; }
.st-featured-meta svg { margin-left: auto; width: 1.5rem; height: 1.5rem; transition: transform 200ms var(--st-ease); }
.st-featured:hover .st-featured-meta svg { transform: translate(3px, -3px); }
.st-featured-art { position: relative; min-width: 0; overflow: clip; background: var(--st-paper); }
.st-featured-art img { width: 100%; height: 100%; object-fit: cover; }
.st-generated-cover { display: block; width: 100%; height: 100%; color: var(--st-accent); }
.st-generated-cover .st-cover-ground { fill: var(--st-paper); }

/* Latest: time is a rail, titles own the row. */
.st-latest { border-top: .5px solid var(--st-line); }
.st-month { display: grid; grid-template-columns: 9rem 1fr; gap: 2rem; border-bottom: .5px solid var(--st-line); }
.st-month > h3 { margin: 0; padding-top: 2rem; color: var(--st-muted); font-family: var(--st-sans); font-size: .8125rem; font-weight: 450; font-variant-numeric: tabular-nums; }
.st-month ol { list-style: none; margin: 0; padding: 0; }
.st-latest-row + .st-latest-row { border-top: .5px solid var(--st-line); }
.st-latest-row a { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding: 1.7rem 0; text-decoration: none; }
.st-latest-title { margin: 0; font-family: var(--st-title-face); font-size: 1.375rem; font-weight: 600; line-height: 2rem; text-wrap: pretty; }
.st-latest-row time { color: var(--st-muted); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-latest-row a:hover .st-latest-title { color: var(--st-accent); }
.st-hover-cover { position: fixed; z-index: 40; pointer-events: none; width: 18rem; height: 12rem; top: 0; left: 0; opacity: 0; border: .5px solid var(--st-line); border-radius: .25rem; overflow: hidden; background: var(--st-surface); box-shadow: 0 3px 8px var(--st-shadow-near), 0 16px 42px var(--st-shadow-far); transition: opacity 160ms var(--st-ease); }
.st-hover-cover.is-visible { opacity: 1; }
.st-hover-cover img { width: 100%; height: 100%; object-fit: cover; }

.st-topic-band { margin-top: clamp(5rem, 10vw, 10rem); overflow: clip; padding-block: 2rem; border-block: .5px solid var(--st-line); }
.st-topic-track { display: flex; width: max-content; animation: st-marquee 65s linear infinite; }
.st-topic-set { display: flex; gap: 4rem; padding-right: 4rem; align-items: center; }
.st-topic-set a { font-family: var(--st-title-face); font-size: clamp(1.5rem, 4vw, 3rem); font-weight: 600; text-decoration: none; white-space: nowrap; }
.st-topic-track:hover { animation-play-state: paused; }
.st-topic-band:focus-within { overflow-x: auto; }
.st-topic-band:focus-within .st-topic-track { animation: none; }
@keyframes st-marquee { to { transform: translateX(-50%); } }

.st-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.st-book { padding-top: 1.5rem; border-top: 1px solid var(--st-ink); text-decoration: none; }
.st-book-title { font-family: var(--st-title-face); font-size: 1.375rem; font-weight: 600; line-height: 2rem; margin: 0; text-wrap: balance; }
.st-book-meta { display: block; margin-top: 1.5rem; font-size: .8125rem; color: var(--st-muted); line-height: 1.7; }
.st-about-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding-block: 3rem; border-top: .5px solid var(--st-line); }
.st-about-v2 h2 { font-family: var(--st-sans); font-size: .9375rem; font-weight: 600; line-height: 1.5rem; letter-spacing: .02em; color: var(--st-muted); margin: 0; }
.st-about-v2 p { margin: 0 0 1.75rem; font-size: 1.0625rem; line-height: 2rem; color: var(--st-muted); }
.st-footer-v2 { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(5rem, 10vw, 10rem); padding: 3rem var(--st-gutter) 1.5rem; border-top: .5px solid var(--st-line); }
.st-footer-v2 > .st-visual { position: absolute; inset: 0; z-index: -2; opacity: .11; }
.st-footer-actions { display: flex; gap: 2rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.st-footer-actions nav { display: flex; gap: 2rem; font-size: .875rem; }
.st-visitor-controls { display: flex; gap: 1.25rem; }
.st-visitor-controls button { border: 0; background: transparent; padding: .5rem 0; font-size: .8125rem; cursor: pointer; }
.st-visitor-controls button[aria-pressed="true"] { text-decoration: underline; text-decoration-thickness: 1px; }
.st-visitor-controls button:disabled { cursor: default; }
.st-footer-brand { display: block; margin-block: 3rem; font-family: var(--st-serif); font-size: clamp(5rem, 19vw, 18rem); line-height: 1; font-weight: 400; letter-spacing: -.05em; text-decoration: none; overflow-wrap: anywhere; }
.st-footer-brand[data-long="true"] { font-size: clamp(3rem, 8vw, 8rem); }
.st-footer-colophon { display: flex; justify-content: space-between; align-items: end; gap: 2rem; color: var(--st-ink); font-size: .8125rem; }
.st-footer-colophon p { margin: 0; }
.st-footer-colophon .st-credit { position: static; color: inherit; }
.st-footer-colophon .st-credit[open] { background: var(--st-surface); }
.st-v2[data-surface="flat"] :is(.st-featured, .st-header::before) { box-shadow: none; }
.st-v2[data-surface="glass"] .st-featured { background: color-mix(in srgb, var(--st-surface) 82%, transparent); backdrop-filter: blur(16px); }
.st-v2[data-surface="glass"] :is(.st-featured-meta, .st-featured-excerpt) { color: var(--st-ink); }

.st-reveal-ready { opacity: 0; transform: translateY(1.5rem); transition: opacity 700ms var(--st-ease), transform 700ms var(--st-ease); }
.st-reveal-ready.is-visible { opacity: 1; transform: none; }
@supports (animation-timeline: view()) {
  :root[data-scroll-motion~="reveal"] [data-reveal] { animation: st-section-in both var(--st-ease); animation-timeline: view(); animation-range: entry 0% entry 35%; }
  @keyframes st-section-in { from { opacity: .2; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 240ms; }
@starting-style { .st-v2 .st-header::before { opacity: 0; } }

@container (max-width: 42rem) {
  .st-featured > a { grid-template-columns: 1fr; min-height: 0; }
  .st-featured-art { grid-row: 1; aspect-ratio: 1.5; }
  .st-featured-copy { padding: 1.5rem; }
  .st-featured-meta { margin-top: 1.25rem; }
  .st-month { grid-template-columns: 3.75rem 1fr; gap: 1rem; }
  .st-month > h3 { padding-top: 1.55rem; }
  .st-latest-row a { gap: .75rem; padding-block: 1.25rem; }
  .st-books { grid-template-columns: 1fr; gap: 2rem; }
  .st-about-v2 { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 700px) {
  .st-v2 .st-header { inset: .75rem 1.25rem auto; height: 3.5rem; }
  .st-v2 .st-header-inner { gap: 1rem; flex-wrap: nowrap; }
  .st-v2 .st-wordmark { font-size: 1.25rem; max-width: 5em; }
  .st-v2 .st-nav { gap: 1rem; }
  .st-v2 .st-nav a, .st-v2 .st-account { font-size: .8125rem; }
  .st-v2 .st-header-end { gap: .75rem; }
  .st-v2 .st-account-arrow { display: none; }
  .st-hero-v2 { min-height: 42rem; max-height: 60rem; }
  .st-hero-copy-v2 { padding-top: 10rem; }
  .st-hero-title { font-size: clamp(4.5rem, 19vw, 7rem); letter-spacing: -.04em; }
  .st-hero-tagline { margin-top: 1.5rem; max-width: 21em; }
  .st-hero-v2:has([data-kind="scene"][data-builtin]) .st-visual { inset: 36% -25% 0 -25%; }
  .st-hero-bottom { bottom: 1.5rem; }
  .st-v2-section-head { gap: 1rem; margin-bottom: 1.75rem; }
  .st-v2-heading { font-size: .9375rem; }
  .st-featured-title, .st-latest-title, .st-book-title { font-size: 1.25rem; line-height: 1.875rem; }
  .st-featured-stack { gap: 2rem; }
  .st-featured { top: calc(5rem + var(--card) * .4rem); }
  .st-featured-excerpt { font-size: 1.0625rem; line-height: 1.875rem; }
  .st-footer-actions { gap: 1.25rem; }
  .st-footer-actions nav { gap: 1.5rem; }
  .st-footer-brand { margin-block: 2rem; }
  .st-footer-colophon { gap: 1rem; }
  .st-about-v2 { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 359px) {
  .st-v2 .st-header-inner { gap: .5rem; }
  .st-v2 .st-nav { gap: .75rem; }
  .st-v2 .st-header-end { gap: .5rem; }
  .st-v2 .st-wordmark { max-width: 5ch; }
}
:root[data-reduced-motion="true"] .st-v2 *,
:root[data-reduced-motion="true"] .st-v2 *::before,
:root[data-reduced-motion="true"] .st-v2 *::after { animation: none !important; transition: none !important; }
:root[data-reduced-motion="true"] .st-featured { position: relative; top: auto; }
:root[data-reduced-motion="true"] .st-topic-track { transform: none; }
:root[data-reduced-motion="true"] .st-topic-band { overflow-x: auto; }
:root[data-reduced-motion="true"] .st-topic-set[aria-hidden] { display: none; }
:root[data-reduced-motion="true"] :is(.st-header, .st-scroll-v2 svg, .st-featured-meta svg) { transform: none !important; }
:root[data-reduced-motion="true"]::view-transition-old(root), :root[data-reduced-motion="true"]::view-transition-new(root) { animation: none !important; }
:root[data-reduced-motion="true"] .st-reveal-ready { opacity: 1; transform: none; }
:root[data-reduced-motion="true"] .st-hover-cover { display: none; }
@media (prefers-reduced-motion: reduce) {
  .st-v2 *, .st-v2 *::before, .st-v2 *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .st-featured { position: relative; top: auto; }
  .st-topic-band { overflow-x: auto; }
  .st-topic-set[aria-hidden] { display: none; }
  .st-v2 :is(.st-header, .st-scroll-v2 svg, .st-featured-meta svg) { transform: none !important; }
  .st-reveal-ready { opacity: 1; transform: none; }
  .st-hover-cover { display: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
