/* Rich Rose Blog. Colors and fonts match richardjrose.com. */
/* Fonts are self-hosted: faster, and no Google tracking of your readers. */
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(/fonts/playfair.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 600; font-display: swap; src: url(/fonts/playfair-italic.woff2) format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/roboto.woff2) format('woff2'); }
:root {
  --bg: #f5f2eb;
  --surface: #fffdf8;
  --surface-2: #ede8dc;
  --ink: #222a2c;
  --ink-2: #3a4346;
  --muted: #5c6260;
  --line: #d8d4ca;
  --gold: #a17b36;
  --gold-ink: #7d5c22;
  --gold-soft: #e1c48e;
  --gold-wash: #f3e7cf;
  --on-gold: #fffdf8;
  --yt: #c4302b;
  --shadow: 0 1px 2px rgba(34, 42, 44, .06), 0 8px 24px rgba(34, 42, 44, .08);
  --shadow-lg: 0 2px 4px rgba(34, 42, 44, .06), 0 18px 48px rgba(34, 42, 44, .14);
  --radius: 18px;
  --radius-sm: 10px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --fs: 1.125rem;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14191a; --surface: #1c2325; --surface-2: #242d30; --ink: #f1ede4; --ink-2: #d9d4c9;
    --muted: #a8aca8; --line: #323c3f; --gold: #d4ad66; --gold-ink: #e1c48e; --gold-soft: #8a6a32;
    --gold-wash: #2a2519; --on-gold: #14191a; --yt: #ff5a4f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 18px 48px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14191a; --surface: #1c2325; --surface-2: #242d30; --ink: #f1ede4; --ink-2: #d9d4c9;
  --muted: #a8aca8; --line: #323c3f; --gold: #d4ad66; --gold-ink: #e1c48e; --gold-soft: #8a6a32;
  --gold-wash: #2a2519; --on-gold: #14191a; --yt: #ff5a4f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 18px 48px rgba(0,0,0,.4);
  color-scheme: dark;
}
:root[data-text="lg"] { --fs: 1.25rem; }
:root[data-text="xl"] { --fs: 1.4rem; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs)/1.65 var(--sans); overflow-x: hidden; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-wide { width: min(1040px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.kicker { font: 700 .8rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.lede { font-size: 1.15em; color: var(--ink-2); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* progress bar */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); transform-origin: 0 50%; transform: scaleX(0); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bar { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand b { display: block; font: 700 1.3rem/1 var(--serif); }
.brand small { display: block; font: 500 .68rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.rose { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(161, 123, 54, .25)); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--gold-wash); }
.tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.icon-btn:hover { border-color: var(--gold); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-btn { display: none; gap: 4px; align-content: center; }
.menu-btn span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; display: block; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 500 1rem/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-gold { background: var(--gold); color: var(--on-gold); box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 35%, transparent); }
.btn-gold:hover { color: var(--on-gold); background: var(--gold-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--ink); }
.btn-ghost svg { fill: var(--yt); }
.btn-yt { background: var(--ink); color: var(--bg); min-height: 42px; padding: 0 16px; }
.btn-yt:hover { color: var(--bg); }
.btn-yt svg { fill: var(--yt); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: .9rem; }
.btn-sm svg { width: 16px; height: 16px; }
.share .btn-sm svg { fill: none; stroke: currentColor; stroke-width: 1.8; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
.hero h1::after { content: ''; display: block; width: 72px; height: 3px; background: var(--gold); margin-top: 22px; border-radius: 3px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.stats { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 28px; }
.stats b { display: block; font: 700 1.9rem/1 var(--serif); color: var(--gold-ink); }
.stats span { font-size: .85rem; color: var(--muted); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 26px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold-soft); }
.card[hidden] { display: none; }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.dur { position: absolute; right: 10px; bottom: 10px; background: rgba(20, 25, 26, .85); color: #fff; font: 500 .78rem/1 var(--sans); padding: 5px 7px; border-radius: 6px; }
.play-badge { position: absolute; left: 50%; top: 50%; width: 58px; transform: translate(-50%, -50%) scale(.85); opacity: 0; transition: .2s ease; }
.card:hover .play-badge { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.pb { fill: var(--yt); } .pt { fill: #fff; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.28rem; margin: 10px 0 8px; }
.card-body p { color: var(--muted); font-size: .95rem; line-height: 1.55; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin-top: auto; font-size: .82rem; color: var(--muted); }
.chip { align-self: flex-start; font: 700 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); background: var(--gold-wash); padding: 6px 9px; border-radius: 999px; }
.card-big { box-shadow: var(--shadow-lg); }
.card-big .card-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.card-big .play-badge { opacity: 1; transform: translate(-50%, -50%) scale(1); width: 72px; }

/* library */
.library { padding: 40px 0 20px; }
.lib-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.lib-head h2 { margin: 0; }
.search { position: relative; flex: 0 1 420px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; min-height: 52px; padding: 0 18px 0 46px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; }
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 20%, transparent); }
.search.big { max-width: 520px; margin: 24px auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); padding: 9px 15px; border-radius: 999px; cursor: pointer; font-size: .92rem; font-weight: 500; min-height: 42px; }
.chip-btn span { color: var(--muted); font-weight: 400; margin-left: 2px; }
.chip-btn:hover { border-color: var(--gold); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-btn[aria-pressed="true"] span { color: var(--gold-soft); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* about strip */
.about-strip { display: flex; gap: 32px; align-items: center; margin: 56px auto; padding: clamp(24px, 4vw, 44px); background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); }
.about-strip img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; object-position: top; border: 4px solid var(--gold-wash); flex: none; }
.about-strip p:last-child { margin: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.link-arrow { font-weight: 500; text-decoration: none; }
.link-arrow::after { content: ' →'; }

/* newsletter */
.newsletter { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; margin: 56px 0; padding: clamp(26px, 4vw, 48px); border-radius: calc(var(--radius) + 6px); background: linear-gradient(135deg, #222a2c, #2f3a3d); color: #f5f2eb; position: relative; overflow: hidden; }
.newsletter::before { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 173, 102, .35), transparent 70%); }
.newsletter h2 { color: #fff; }
.newsletter p { color: #d8d4ca; margin: 0; }
.nl-form { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: relative; }
.nl-form input { min-height: 52px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; padding: 0 16px; font: inherit; font-size: 1rem; }
.nl-form input::placeholder { color: #b9b6ae; }
.nl-form input:focus { outline: none; border-color: #d4ad66; background: rgba(255, 255, 255, .12); }
.nl-form .btn, .nl-form .cf-turnstile, .nl-status { grid-column: 1 / -1; }
.nl-form .btn-gold { background: #d4ad66; color: #14191a; }
.nl-status { font-size: .95rem; min-height: 1.4em; color: #e1c48e !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* post */
.post-head { padding: clamp(32px, 6vw, 64px) 0 28px; text-align: center; }
.crumbs { display: flex; gap: 8px; justify-content: center; font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--gold-ink); text-decoration: none; font-weight: 500; }
.page-head .crumbs { justify-content: flex-start; }
.post-head h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.dek { font-size: 1.2em; color: var(--ink-2); max-width: 60ch; margin: 0 auto 22px; }
.byline { display: inline-flex; align-items: center; gap: 12px; font-size: .92rem; color: var(--muted); margin: 0; text-align: left; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold-wash); flex: none; }
.byline a { color: var(--ink); font-weight: 500; text-decoration: none; }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-btn { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #000; }
.player-btn img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s; }
.player-btn:hover img { opacity: 1; }
.play-big { position: absolute; left: 50%; top: 50%; width: clamp(68px, 9vw, 96px); transform: translate(-50%, -50%); filter: drop-shadow(0 6px 18px rgba(0,0,0,.4)); transition: transform .2s; }
.player-btn:hover .play-big { transform: translate(-50%, -50%) scale(1.08); }
.player-note { font-size: .85rem; color: var(--muted); text-align: center; margin: 12px 0 0; }

.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 5vw, 72px); padding: 48px 0 24px; align-items: start; }
.post-main { max-width: 720px; min-width: 0; }
.side-sticky { position: sticky; top: 96px; display: grid; gap: 22px; }
.mini-h { font: 700 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.chapters, .toc, .side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.chapters ol, .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ts-row { width: 100%; display: flex; gap: 12px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .93rem; line-height: 1.35; }
.ts-row span { font: 500 .82rem/1.6 var(--sans); color: var(--gold-ink); min-width: 38px; font-variant-numeric: tabular-nums; }
.ts-row:hover, .ts-row.is-on { background: var(--gold-wash); }
.toc a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: .93rem; line-height: 1.35; border-left: 2px solid transparent; }
.toc a:hover { background: var(--surface-2); }
.toc a.is-on { border-left-color: var(--gold); color: var(--ink); font-weight: 500; }
.side-card { text-align: center; }
.side-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; margin: 0 auto 10px; }
.side-card p { font-size: .9rem; color: var(--muted); }
.side-card b { color: var(--ink); }

.takeaways { background: var(--gold-wash); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: 24px 28px 14px; margin-bottom: 36px; }
.takeaways h2 { font-size: 1.35rem; margin-bottom: 12px; }
.takeaways ul { margin: 0; padding-left: 1.1em; }
.takeaways li { margin-bottom: 10px; }
.takeaways li::marker { color: var(--gold); }

.prose { font-size: 1.06em; line-height: 1.75; }
.prose h2 { margin: 1.8em 0 .55em; font-size: clamp(1.5rem, 3vw, 1.95rem); }
.prose h3 { margin: 1.5em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--gold); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--gold); font: italic 600 1.3em/1.45 var(--serif); color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose strong { color: var(--ink); }
.ts { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--gold-soft); background: var(--gold-wash); color: var(--gold-ink); font: 500 .8em/1 var(--sans); padding: 4px 8px; border-radius: 999px; cursor: pointer; vertical-align: 2px; font-variant-numeric: tabular-nums; }
.ts:hover { background: var(--gold); color: var(--on-gold); }

.faq { margin: 44px 0 0; }
.faq details, .transcript { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; }
.faq summary, .transcript summary { cursor: pointer; padding: 16px 20px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker, .transcript summary::-webkit-details-marker { display: none; }
.faq summary::after, .transcript summary::after { content: '+'; color: var(--gold); font-size: 1.4em; line-height: .8; }
.faq details[open] summary::after, .transcript[open] summary::after { content: '–'; }
.faq details p { padding: 0 20px 16px; margin: 0; color: var(--ink-2); }
.transcript { margin-top: 28px; }
.transcript div { padding: 0 20px 12px; max-height: 480px; overflow: auto; font-size: .95rem; color: var(--ink-2); }

.talk { margin: 44px 0 24px; padding: 28px; border-radius: var(--radius); border: 1px dashed var(--gold-soft); background: var(--surface); }
.talk h2 { font-size: 1.45rem; }
.talk-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.share { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: .82rem; color: var(--muted); background: var(--surface-2); padding: 5px 10px; border-radius: 999px; }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 24px 0; border-top: 1px solid var(--line); }
.prevnext a { display: block; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); font: 600 1.05rem/1.35 var(--serif); }
.prevnext a:hover { border-color: var(--gold); }
.prevnext small { display: block; font: 700 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.prevnext .next { text-align: right; }
.related { padding: 32px 0 0; }

/* topics + pages */
.page-head { padding: clamp(36px, 6vw, 72px) 0 28px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 22px; padding-bottom: 56px; }
.topic { display: flex; gap: 18px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: .2s; }
.topic:hover { transform: translateY(-3px); border-color: var(--gold-soft); color: var(--ink); }
.topic img { width: 120px; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; flex: none; }
.topic b { display: block; font: 700 1.3rem/1.2 var(--serif); }
.topic small { display: block; color: var(--gold-ink); font-weight: 500; margin: 2px 0 6px; }
.topic em { display: block; font-style: normal; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.about { text-align: left; }
.about-photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; object-position: top; border: 6px solid var(--gold-wash); margin-bottom: 26px; box-shadow: var(--shadow); }

/* footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--surface); }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 28px; }
.foot-about p { color: var(--muted); font-size: .92rem; margin-top: 16px; max-width: 46ch; }
.foot-main a { font-weight: 500; }
.foot-col h3 { font: 700 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--ink-2); text-decoration: none; padding: 5px 0; font-size: .95rem; }
.foot-col a:hover { color: var(--gold-ink); }
.legal { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: .8rem; color: var(--muted); }
.legal p { margin: 0 0 6px; max-width: 110ch; }
.legal a { color: var(--muted); }

/* responsive */
@media (max-width: 1020px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-main { max-width: none; }
  .post-side { order: -1; }
  .side-sticky { position: static; }
  .toc, .side-card { display: none; }
  .chapters ol { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-height: 236px; overflow-y: auto; overscroll-behavior: contain; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .newsletter { grid-template-columns: 1fr; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 12px var(--gutter) 18px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; }
  .menu-btn { display: grid; }
  .btn-yt span { display: none; }
  .btn-yt { width: 42px; padding: 0; }
}
@media (max-width: 560px) {
  .bar { gap: 10px; min-height: 64px; }
  .brand small { display: none; }
  .brand b { font-size: 1.15rem; }
  .icon-btn, .btn-yt { width: 40px; height: 40px; min-height: 40px; }
  .about-strip { flex-direction: column; text-align: center; }
  .about-strip p:last-child { justify-content: center; }
  .nl-form { grid-template-columns: 1fr; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext .next { text-align: left; }
  .foot { grid-template-columns: 1fr; }
  .stats { gap: 20px; }
  .topic img { width: 96px; }
  .lib-head .search { flex-basis: 100%; }
}
@media print {
  .site-header, .site-footer, .newsletter, .player, .post-side, .share, .talk, .related, .prevnext, .progress { display: none !important; }
  body { background: #fff; color: #000; }
}

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: .95rem; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 90; box-shadow: var(--shadow-lg); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- premium layer ---------- */
/* Smooth page-to-page transitions (the video thumbnail glides into the player). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
.player-btn img { view-transition-name: hero-media; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

::selection { background: var(--gold-soft); color: var(--ink); }
.hero { position: relative; }
.hero::before { content: ''; position: absolute; inset: -40px -20vw auto auto; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gold) 16%, transparent), transparent 65%); pointer-events: none; z-index: -1; }
.hero h1 em { font-style: italic; color: var(--gold-ink); }

/* Start here */
.start { padding: 8px 0 24px; }
.start-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.start-head h2 { margin: 0; }
.start-head p { margin: 0; color: var(--muted); }
.start-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.start-list a { counter-increment: s; position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: start; height: 100%; padding: 22px 22px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.start-list a::before { content: counter(s, decimal-leading-zero); grid-row: span 2; font: italic 600 2.4rem/1 var(--serif); color: var(--gold); }
.start-list a:hover { border-color: var(--gold-soft); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.start-list b { font: 700 1.12rem/1.3 var(--serif); }
.start-list small { color: var(--muted); font-size: .86rem; }

/* show more */
.grid:not(.show-all) .card[data-more] { display: none; }
.more-wrap { display: flex; justify-content: center; margin: 30px 0 0; }
.more-wrap[hidden] { display: none; }
.kbd { font: 500 .75rem/1 var(--sans); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; color: var(--muted); background: var(--surface); position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search input:focus ~ .kbd, .search input:not(:placeholder-shown) ~ .kbd { display: none; }
@media (hover: none) { .kbd { display: none; } }

/* gentle reveal as cards scroll into view (pure CSS, only where supported) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .grid .card, .start-list li, .about-strip, .newsletter { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* post typography */
.prose > p:first-of-type::first-letter { float: left; font: 700 3.6em/.82 var(--serif); color: var(--gold); margin: .08em .1em 0 0; }
.prose h2 { position: relative; scroll-margin-top: 96px; }
.prose h2::before { content: ''; display: block; width: 36px; height: 2px; background: var(--gold); margin-bottom: 14px; border-radius: 2px; }
.anchor { position: absolute; left: -1.1em; bottom: .1em; border: 0; background: none; color: var(--gold); opacity: 0; cursor: pointer; font: 600 .8em/1 var(--sans); padding: 4px; transition: opacity .15s; }
.prose h2:hover .anchor, .anchor:focus-visible { opacity: 1; }
@media (max-width: 860px) { .anchor { display: none; } }
.prose a { text-decoration-color: var(--gold-soft); text-decoration-thickness: 2px; }
.prose a:hover { text-decoration-color: var(--gold); }

/* author box */
.author-box { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: center; margin: 36px 0 28px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.author-box img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--gold-wash); }
.author-box h2 { font-size: 1.3rem; margin: 0 0 6px; }
.author-box p { margin: 0 0 10px; color: var(--ink-2); font-size: .97rem; }
.author-box .links { display: flex; gap: 18px; flex-wrap: wrap; margin: 0; }
@media (max-width: 560px) { .author-box { grid-template-columns: 1fr; text-align: center; } .author-box img { margin: 0 auto; } .author-box .links { justify-content: center; } }

/* back to top */
.to-top { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); cursor: pointer; display: grid; place-items: center; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease; z-index: 40; }
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--gold); }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* archive */
.archive { padding-bottom: 40px; }
.archive h2 { font-size: 1.5rem; margin: 40px 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.arch-list { list-style: none; margin: 0; padding: 0; }
.arch-list a { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center; padding: 12px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); color: var(--ink); text-decoration: none; border-radius: 8px; }
.arch-list a:hover { background: var(--surface); }
.arch-list img { width: 92px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.arch-list b { font: 600 1.08rem/1.35 var(--serif); display: block; }
.arch-list small { color: var(--muted); font-size: .84rem; }
.arch-list time { color: var(--muted); font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .arch-list a { grid-template-columns: 72px 1fr; } .arch-list img { width: 72px; } .arch-list time { display: none; } }

@media (max-width: 860px) { .start-list { grid-template-columns: 1fr; } }
