/* ==========================================================================
   Princhet Infotech — Core stylesheet
   1. Tokens & themes      7. Editor's Selection reel
   2. Base & utilities     8. Index & category grid
   3. Preloader            9. Cards & photographic frames
   4. Ambient layers       10. Ledger & floating preview
   5. Header               11. Manifesto, stats, footer
   6. Hero & marquee       12. Cursor, toggle, ripple, responsive, motion
   ========================================================================== */

/* 0. Fonts (self-hosted variable fonts: Fraunces & Manrope, SIL Open Font License) */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 1. Tokens & themes ------------------------------------------------------ */
:root {
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1600px;
  --header-h: 76px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --cinema-ink: #f5f5f7;

  /* Onyx Dark Cinematic (default) */
  --bg: #0a0a0a;
  --bg-soft: #141414;
  --fg: #f5f5f7;
  --muted: #a3a3a8;
  --accent: #d4af37;
  --accent-ink: #0a0a0a;
  --line: rgba(245, 245, 247, 0.13);
  --line-strong: rgba(245, 245, 247, 0.38);
  --grain: 0.085;
  --img-filter: grayscale(0.32) contrast(1.08) brightness(0.86);
  --img-filter-hover: grayscale(0) contrast(1.04) brightness(1);
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  --atmos:
    radial-gradient(70% 55% at 88% -8%, rgba(212, 175, 55, 0.14), transparent 65%),
    radial-gradient(60% 55% at -12% 108%, rgba(78, 62, 140, 0.17), transparent 65%),
    radial-gradient(45% 40% at 50% 45%, rgba(255, 255, 255, 0.025), transparent 70%);
  color-scheme: dark;
}

[data-theme="light"] {
  /* Avant-Garde Light Editorial */
  --bg: #f9f8f3;
  --bg-soft: #ebe8de;
  --fg: #111111;
  --muted: #4b4b4b;
  --accent: #c80a0a;
  --accent-ink: #f9f8f3;
  --line: rgba(17, 17, 17, 0.16);
  --line-strong: #111111;
  --grain: 0;
  --img-filter: saturate(0.9) contrast(1.03);
  --img-filter-hover: saturate(1.05) contrast(1.05);
  --shadow: 0 18px 40px -26px rgba(17, 17, 17, 0.45);
  --atmos: repeating-linear-gradient(90deg, rgba(17, 17, 17, 0.045) 0 1px, transparent 1px calc(100% / 6));
  color-scheme: light;
}

/* 2. Base & utilities ----------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* No z-index here on purpose: fixed children (preloader, ledger preview) must stack against the root. */
main,
.site-footer {
  position: relative;
  overflow-x: clip;
}
main:focus { outline: none; }

/* Lenis smooth scrolling */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 500;
  padding: 0.75rem 1.1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.4s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.eyebrow--light { color: rgba(245, 245, 247, 0.75); }

/* Split-text scaffolding (built by main.js) */
.split-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.08em 0.14em 0.02em;
  margin: 0 -0.08em -0.14em -0.02em;
}
.split-word,
.split-char {
  display: inline-block;
  will-change: transform, opacity;
}
.scrub-word { will-change: opacity; }

/* Hide split headings until main.js has prepared them (they reveal as they scroll into view).
   Failsafe reveals after 3.2s. */
.js [data-split] {
  visibility: hidden;
  animation: failsafe-reveal 0s linear 3.2s forwards;
}
.js.no-motion [data-split],
.js [data-split].is-split { visibility: visible; }

@keyframes failsafe-reveal { to { visibility: visible; } }

/* Intro: the first screen animates in with CSS from the very first paint, without waiting for
   JavaScript. Text starts barely transparent rather than invisible, so the browser counts it as
   painted at once (fast Largest Contentful Paint). Replays automatically after soft navigation. */
@keyframes intro-rise { from { opacity: 0.08; transform: translate3d(0, 28px, 0); } }
@keyframes intro-drop { from { opacity: 0; transform: translate3d(0, -110%, 0); } }
@keyframes intro-zoom { from { transform: scale(1.14); } }
@keyframes intro-pop { from { opacity: 0; transform: scale(0.5); } }
[data-header] > * { animation: intro-drop 0.9s var(--ease-out) 0.05s backwards; }
[data-header] > :nth-child(2) { animation-delay: 0.12s; }
[data-header] > :nth-child(3) { animation-delay: 0.19s; }
.hero__media-inner,
.cat-hero__media,
.post-hero__media { animation: intro-zoom 2.4s var(--ease-out) backwards; }
.hero__title,
.cat-hero__title,
.post-hero__title,
.static-page__title,
.not-found__title,
.cat-hero__num,
.not-found__code { animation: intro-rise 1.3s var(--ease-out) 0.1s backwards; }
[data-intro]:not([data-header]) { animation: intro-rise 1.1s var(--ease-out) 0.3s backwards; }
.static-page .prose,
.not-found .prose { animation: intro-rise 1.2s var(--ease-out) 0.4s backwards; }
.theme-toggle { animation: intro-pop 0.9s var(--ease-out) 0.6s backwards; }

/* 3. Preloader ------------------------------------------------------------ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  will-change: transform;
}
.js .loader {
  display: grid;
  animation: loader-failsafe 0.6s ease 5s forwards;
}
.js.loader-running .loader { animation: none; }
.js.loader-seen .loader,
.js.no-motion .loader { display: none; }

@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }

.loader__frames {
  position: relative;
  width: clamp(150px, 17vw, 250px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-soft);
  will-change: transform, clip-path;
}
.loader__frames img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  will-change: transform, opacity;
}
.loader__frames img:first-child { opacity: 1; }

.loader__brand {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-style: italic;
  font-weight: 300;
}
.loader__brand em { color: var(--accent); }
.loader__tag {
  position: absolute;
  left: var(--gutter);
  bottom: var(--gutter);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.loader__count {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) - 0.12em);
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 15vw, 15rem);
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.loader__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* 4. Ambient layers ------------------------------------------------------- */
.atmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--atmos);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--grain);
}
.grain::before {
  content: "";
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain-shift 0.9s steps(5) infinite;
  will-change: transform;
}
[data-theme="light"] .grain { display: none; }

@keyframes grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-6%, 4%, 0); }
  40%  { transform: translate3d(5%, -7%, 0); }
  60%  { transform: translate3d(-3%, 8%, 0); }
  80%  { transform: translate3d(7%, 3%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.progress__bar {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* 5. Header — a solid bar in the theme colour, so the full-colour logo is never blended or inverted */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
  padding-inline: var(--gutter);
  color: var(--fg);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  will-change: transform;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  will-change: transform;
}
/* Dark lettering on the light theme, silver lettering on the dark theme. */
.brand__logo { display: block; width: auto; height: 52px; }
[data-theme="light"] .brand__logo--dark,
:root:not([data-theme="light"]) .brand__logo--light { display: none; }

.nav {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.5rem);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav a {
  position: relative;
  display: inline-block;
  padding-block: 0.35rem;
  will-change: transform;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.6s var(--ease-out);
}
.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

.site-header__issue {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}

.site-header__crumb {
  margin-right: auto;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-header__crumb a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-left: 1.1rem;
  border-left: 1px solid currentColor;
  will-change: transform;
}
.site-header__num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

/* 6. Hero & marquee ------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--cinema-ink);
  background: #050505;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero__media-inner {
  position: absolute;
  inset: -4%;
  will-change: transform;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
  transform: scale(1.15);
  filter: brightness(0.8) saturate(1.08);
  will-change: transform;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.6) 0%, rgba(5, 5, 5, 0.05) 30%, rgba(5, 5, 5, 0.1) 55%, rgba(5, 5, 5, 0.88) 100%),
    radial-gradient(80% 60% at 70% 40%, transparent 40%, rgba(5, 5, 5, 0.45) 100%);
}
.hero__curtains {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  pointer-events: none;
}
.hero__curtain {
  flex: 1 1 0;
  height: 100%;
  background: var(--bg);
  transform: scaleY(0);
  transform-origin: 50% 0%;
  will-change: transform;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
  width: 100%;
  max-width: var(--max);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: calc(var(--header-h) + 3vh) var(--gutter) clamp(2rem, 5vh, 3.5rem);
}

.hero__kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(245, 245, 247, 0.22);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.78);
}
.hero__kicker span:first-child { color: var(--accent); }

.hero__title {
  align-self: end;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 12.4vw, 13rem);
  font-weight: 300;
  font-variation-settings: "opsz" 144;
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.35);
  will-change: transform, opacity;
}
.hero__title em {
  color: var(--accent);
  font-weight: 300;
}

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.hero__lede {
  max-width: 44ch;
  color: rgba(245, 245, 247, 0.8);
}

.hero__badge {
  position: relative;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: clamp(96px, 9vw, 128px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  will-change: transform;
}
.hero__badge-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--cinema-ink);
  font-family: var(--font-sans);
  font-size: 9.6px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  animation: badge-spin 16s linear infinite;
  will-change: transform;
}
.hero__badge-arrow {
  font-size: 1.4rem;
  color: var(--accent);
  animation: badge-bob 2.2s var(--ease-in-out) infinite;
}
@keyframes badge-spin { to { transform: rotate(360deg); } }
@keyframes badge-bob { 50% { transform: translateY(6px); } }

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: clamp(1rem, 2.4vw, 2rem);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee__group {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 7rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.marquee__group i {
  display: inline-block;
  margin-inline: 0.35em;
  font-size: 0.45em;
  font-style: normal;
  color: var(--accent);
  vertical-align: middle;
}

/* 7. Editor's Selection reel --------------------------------------------- */
.reel {
  position: relative;
  padding-top: clamp(4rem, 8vw, 6rem);
}
.reel__pin {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2rem, 4vh, 3.5rem);
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 1rem) 2.5rem;
  overflow: hidden;
}
.reel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-inline: var(--gutter);
}
.reel__head > div { display: grid; gap: 1.25rem; }
.reel__title {
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 5.4rem);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.04em;
}
.reel__title em { color: var(--accent); }
.reel__hint {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.reel__hint span { display: inline-block; color: var(--accent); animation: hint-nudge 1.8s var(--ease-in-out) infinite; }
@keyframes hint-nudge { 50% { transform: translateX(8px); } }

.reel__track {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.5rem, 3vw, 3.5rem);
  width: max-content;
  padding-inline: var(--gutter);
  will-change: transform;
}
.reel__item {
  position: relative;
  display: grid;
  flex-shrink: 0;
  gap: 1.1rem;
  width: clamp(280px, 40vw, 640px);
  will-change: transform, opacity;
}
.reel__item:nth-child(even) {
  width: clamp(220px, 26vw, 420px);
  margin-top: clamp(2rem, 8vh, 6rem);
}
.reel__frame--land { aspect-ratio: 4 / 3; }
.reel__frame--port { aspect-ratio: 4 / 5; }
.reel__frame { max-height: 52vh; }
.reel__item:nth-child(even) .reel__frame { max-height: 46vh; }

.reel__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1.1rem;
  align-items: baseline;
}
.reel__num {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.4vw, 3.4rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
}
.reel__cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.reel__name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 0.9rem + 0.9vw, 1.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.reel__link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.8s var(--ease-out);
}
.reel__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.reel__item:hover .reel__link { background-size: 100% 1px; }

.reel__progress {
  position: relative;
  height: 1px;
  margin-inline: var(--gutter);
  background: var(--line);
}
.reel__progress span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* 8. Index & asymmetric category grid ------------------------------------- */
.index {
  position: relative;
  padding-top: clamp(5rem, 12vw, 11rem);
}

.index__head {
  display: grid;
  gap: 1.75rem;
  max-width: 1200px;
  padding-bottom: clamp(3rem, 8vw, 7rem);
}
.index__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 7.4rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.index__title em { color: var(--accent); }
.index__note {
  max-width: 52ch;
  color: var(--muted);
}

.cat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem) var(--gutter);
  padding-block: clamp(3.5rem, 9vw, 9rem);
  border-top: 1px solid var(--line);
}
[data-theme="light"] .cat { border-top-color: var(--fg); }

.cat__head {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  align-self: start;
}
.cat__num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6rem);
  font-style: italic;
  font-weight: 300;
  line-height: 0.9;
  color: var(--accent);
}
.cat__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3.6rem);
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.03em;
}
.cat__desc {
  max-width: 44ch;
  color: var(--muted);
}
.cat__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.8s var(--ease-out); }
.cat__title a:hover { background-size: 100% 1px; }
.cat__more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  will-change: transform;
}
.cat__more i { font-style: normal; transition: transform 0.6s var(--ease-out); }
.cat__more:hover i { transform: translateX(6px); }

.cat__subs {
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.cat__subs li { border-bottom: 1px solid var(--line); }
.cat__subs a {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  transition: color 0.4s var(--ease-out), padding 0.6s var(--ease-out);
}
.cat__subs a::after {
  content: "↗";
  color: var(--accent);
  transition: transform 0.6s var(--ease-out);
}
.cat__subs a:hover,
.cat__subs a:focus-visible {
  color: var(--accent);
  padding-left: 0.6rem;
}
.cat__subs a:hover::after { transform: rotate(45deg); }

.cat__posts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 4rem) var(--gutter);
  align-items: start;
}

@media (min-width: 700px) {
  .cat__posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--offset { margin-top: clamp(3rem, 9vw, 6rem); }
}

@media (min-width: 1101px) {
  .cat { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .cat__head {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

  /* L1 — head left, tall lead + offset companion */
  .cat--l1 .cat__head { grid-column: 1 / span 4; }
  .cat--l1 .cat__posts { grid-column: 6 / -1; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cat--l1 .card:nth-child(1) { grid-column: span 4; }
  .cat--l1 .card:nth-child(2) { grid-column: span 3; }

  /* L2 — head right, offset narrow + broad portrait */
  .cat--l2 .cat__head { grid-column: 9 / -1; grid-row: 1; }
  .cat--l2 .cat__posts { grid-column: 1 / span 7; grid-row: 1; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cat--l2 .card:nth-child(1) { grid-column: span 3; }
  .cat--l2 .card:nth-child(2) { grid-column: span 4; }

  /* L3 — narrow head, cinematic lead + deep-offset tall */
  .cat--l3 .cat__head { grid-column: 1 / span 3; }
  .cat--l3 .cat__posts { grid-column: 5 / -1; grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .cat--l3 .card:nth-child(1) { grid-column: span 5; }
  .cat--l3 .card:nth-child(2) { grid-column: span 3; margin-top: clamp(8rem, 16vw, 16rem); }

  /* L4 — head right narrow, compact lead + wide offset */
  .cat--l4 .cat__head { grid-column: 10 / -1; grid-row: 1; }
  .cat--l4 .cat__posts { grid-column: 1 / span 8; grid-row: 1; grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .cat--l4 .card:nth-child(1) { grid-column: span 3; }
  .cat--l4 .card:nth-child(2) { grid-column: span 5; }

  .card--offset { margin-top: clamp(6rem, 11vw, 12rem); }
}

/* 9. Cards & photographic frames ------------------------------------------ */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  will-change: transform, opacity;
}

.frame {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-soft);
  isolation: isolate;
  contain: paint;
}
.frame--portrait { aspect-ratio: 4 / 5; }
.frame--tall     { aspect-ratio: 3 / 4; }
.frame--square   { aspect-ratio: 1 / 1; }
.frame--wide     { aspect-ratio: 4 / 3; }
.frame--cinema   { aspect-ratio: 16 / 10; }

/* Cinematic vignette + light-leak sheen on every plate */
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  transition: background-position 1.4s var(--ease-out);
}
.card:hover .frame::before,
.reel__item:hover .frame::before { background-position: 0 0, 150% 0; }

[data-theme="light"] .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid var(--fg);
  pointer-events: none;
}

/* Image is taller than its frame so the parallax drift never exposes an edge. */
.frame__media {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  transform: scale(1.15);
  transform-origin: 50% 50%;
  filter: var(--img-filter);
  transition: filter 0.9s var(--ease-out);
  will-change: transform;
}
.reel .frame__media {
  top: -6%;
  left: -10%;
  width: 120%;
  height: 112%;
}
.card:hover .frame__media,
.reel__item:hover .frame__media { filter: var(--img-filter-hover); }

.card__frame { clip-path: inset(0% 0% 0% 0%); }
.card__frame.is-revealed { transition: clip-path 1s var(--ease-out); }
.card:hover .card__frame.is-revealed { clip-path: inset(3% 3% 3% 3%); }

.card__body {
  display: grid;
  gap: 0.85rem;
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__sub { color: var(--accent); }

.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1rem + 1.05vw, 2.05rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.card__link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.8s var(--ease-out);
}
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card:hover .card__link,
.card__link:focus-visible { background-size: 100% 1px; }
.card__link:focus-visible,
.reel__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible),
.reel__item:has(.reel__link:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}

.card__excerpt {
  max-width: 48ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.card__more i {
  display: inline-block;
  font-style: normal;
  color: var(--accent);
  transition: transform 0.6s var(--ease-out);
  will-change: transform;
}
.card:hover .card__more i { transform: translateX(8px); }

/* 10. Ledger & floating preview ------------------------------------------- */
.ledger {
  padding-block: clamp(5rem, 12vw, 10rem);
  border-top: 1px solid var(--line);
}
.ledger__head { display: grid; gap: 1.5rem; }
.ledger__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 7.4rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.ledger__title em { color: var(--accent); }

.ledger__list {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line-strong);
}
.ledger__row a {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  padding-block: clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  transition: opacity 0.5s var(--ease-out), padding 0.7s var(--ease-out), color 0.4s var(--ease-out);
}
.ledger__num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
}
.ledger__name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 0.9rem + 1.7vw, 2.7rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.ledger__cat,
.ledger__time {
  grid-column: 2;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.ledger__time { display: none; }
.ledger__list:hover .ledger__row a { opacity: 0.3; }
.ledger__list .ledger__row a:hover,
.ledger__list .ledger__row a:focus-visible {
  opacity: 1;
  padding-left: clamp(0.5rem, 2vw, 2rem);
}

@media (min-width: 900px) {
  .ledger__row a { grid-template-columns: 4rem minmax(0, 1fr) 11rem 5rem; }
  .ledger__cat,
  .ledger__time { grid-column: auto; display: block; text-align: right; }
}

.preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  width: clamp(220px, 21vw, 330px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  background: var(--bg-soft);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.75);
  will-change: transform, opacity;
}
html:not(.has-cursor) .preview { display: none; }
.preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.25);
  transition: opacity 0.45s var(--ease-out), transform 1s var(--ease-out);
  will-change: transform, opacity;
}
.preview img.is-active { opacity: 1; transform: scale(1); }

/* 11. Manifesto, stats & footer ------------------------------------------- */
.manifesto {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(8rem, 18vw, 16rem);
  color: var(--cinema-ink);
  background: #050505;
}
.manifesto__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.manifesto__bg img {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  max-width: none;
  object-fit: cover;
  filter: brightness(0.62) saturate(1.1);
  will-change: transform;
}
.manifesto__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(5, 5, 5, 0.25) 22%, rgba(5, 5, 5, 0.35) 78%, var(--bg) 100%);
}
.manifesto__inner { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.manifesto__text {
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.1rem + 4.2vw, 5.6rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.manifesto__text em { color: var(--accent); }

.stats-wrap { padding-bottom: clamp(4rem, 9vw, 8rem); }
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--gutter);
}
.stats__item {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-strong);
}
.stats dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats dd {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.site-footer {
  padding-top: clamp(5rem, 11vw, 10rem);
  border-top: 1px solid var(--line);
}
[data-theme="light"] .site-footer { border-top-color: var(--fg); }

.footer__grid {
  display: grid;
  gap: 4rem var(--gutter);
}
@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 7fr 4fr; }
  .footer__nav { grid-column: 2; }
}

.subscribe {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}
.subscribe__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 6rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.subscribe__title em { color: var(--accent); }
.subscribe__lede {
  max-width: 46ch;
  color: var(--muted);
}

.subscribe__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  max-width: 640px;
  margin-top: 1rem;
}
.subscribe__form input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-size: 1.1rem;
  transition: border-color 0.4s var(--ease-out);
}
.subscribe__form input::placeholder { color: var(--muted); opacity: 0.8; }
.subscribe__form input:focus { outline: none; border-bottom-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 2rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  will-change: transform;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.btn span { display: inline-block; will-change: transform; }
.btn:hover { background: transparent; color: var(--accent); }

.footer__nav { display: grid; gap: 1.25rem; align-content: start; }
.footer__nav ul { border-top: 1px solid var(--line); }
.footer__nav li { border-bottom: 1px solid var(--line); }
.footer__nav a {
  display: block;
  padding-block: 0.7rem;
  font-size: 0.92rem;
  transition: color 0.4s var(--ease-out), transform 0.6s var(--ease-out);
}
.footer__nav a:hover,
.footer__nav a:focus-visible { color: var(--accent); transform: translateX(0.5rem); }

.footer__word {
  padding: clamp(3rem, 8vw, 7rem) var(--gutter) 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 21vw, 25rem);
  font-weight: 300;
  font-style: italic;
  line-height: 0.82;
  letter-spacing: -0.06em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  user-select: none;
}
[data-theme="light"] .footer__word {
  color: var(--fg);
  -webkit-text-stroke: 0;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem calc(2rem + 72px);
  font-size: 0.78rem;
  color: var(--muted);
}
.footer__base a { display: inline-block; will-change: transform; }
.footer__base p a { text-decoration: underline; text-underline-offset: 3px; }
.footer__base a:hover { color: var(--accent); }

/* 12. Cursor, toggle, ripple, responsive & motion ------------------------- */
.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}
html:not(.has-cursor) .cursor-ring,
html:not(.has-cursor) .cursor-dot { display: none; }

.has-cursor,
.has-cursor * { cursor: none !important; }
.has-cursor input { cursor: text !important; }

.cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cursor-ring {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}
.cursor-ring__circle {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
  will-change: transform;
}
.cursor-ring__label {
  position: relative;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out);
  will-change: transform, opacity;
}

/* Interactive: solid disc that inverts whatever sits beneath it */
.cursor-ring.is-link { mix-blend-mode: difference; }
.cursor-ring.is-link .cursor-ring__circle { background: #fff; border-color: transparent; }

/* Article card: filled accent disc with a "Read" label */
.cursor-ring.is-card .cursor-ring__circle { background: var(--accent); border-color: var(--accent); }
.cursor-ring.is-card .cursor-ring__label { opacity: 1; transform: scale(1); }

.cursor-ring.is-text .cursor-ring__circle { border-color: var(--accent); }

/* Floating theme toggle */
.theme-toggle {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 120;
  display: inline-flex;
  align-items: center;
  height: 58px;
  padding: 0 1.25rem 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--fg);
  cursor: pointer;
  will-change: transform, opacity;
  transition: border-color 0.4s var(--ease-out);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle__inner {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  will-change: transform;
}
.theme-toggle__icon { display: block; color: var(--accent); overflow: visible; }
.theme-toggle__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tt-bite { transition: transform 0.9s var(--ease-out); }
.tt-core { transform-origin: 12px 12px; transition: transform 0.9s var(--ease-out); }
.tt-rays {
  transform-origin: 12px 12px;
  opacity: 0;
  transform: rotate(-60deg) scale(0.5);
  transition: opacity 0.6s var(--ease-out), transform 0.9s var(--ease-out);
}
[data-theme="light"] .tt-bite { transform: translate(10px, -10px); }
[data-theme="light"] .tt-core { transform: scale(0.62); }
[data-theme="light"] .tt-rays { opacity: 1; transform: rotate(0) scale(1); }

/* Theme ripple — fallback canvas */
.theme-canvas {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
  will-change: opacity;
}

/* Theme ripple — View Transitions path. GSAP tweens --ripple-r frame-by-frame;
   the hold animation keeps the transition alive for the tween's duration. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  clip-path: circle(var(--ripple-r, 0px) at var(--ripple-x, 50%) var(--ripple-y, 50%));
  animation: ripple-hold var(--ripple-dur, 1.15s) linear both;
}
@keyframes ripple-hold {
  from { opacity: 1; }
  to   { opacity: 1; }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 820px) {
  .site-header__issue,
  .nav__opt { display: none; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .hero__badge { align-self: flex-start; width: 92px; }

  /* Reel becomes a native swipeable strip */
  .reel__pin { min-height: 0; padding-top: 0; }
  .reel__track {
    width: auto;
    max-width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
  }
  .reel__track::-webkit-scrollbar { display: none; }
  .reel__item { width: 78vw; scroll-snap-align: start; }
  .reel__item:nth-child(even) { width: 64vw; margin-top: 2.5rem; }
  .reel__frame,
  .reel__item:nth-child(even) .reel__frame { max-height: none; }
  .reel__progress,
  .reel__hint { display: none; }
}

@media (max-width: 480px) {
  :root { --header-h: 64px; }
  .brand__logo { height: 42px; }
  .theme-toggle { height: 52px; padding: 0 1rem 0 0.85rem; }
  .theme-toggle__label { display: none; }
  .theme-toggle__inner { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .loader { display: none !important; }
  .frame__media,
  .hero__img { transform: none; }
  .grain::before { animation: none; }
}


/* ==========================================================================
   13. Multi-page system: route transitions, skeletons, category & article
       layouts, legal footer, ad slots. (Appended for the category build.)
   ========================================================================== */

:root {
  --sk-base: rgba(255, 255, 255, 0.055);
  --sk-shine: rgba(255, 255, 255, 0.09);
}
[data-theme="light"] {
  --sk-base: rgba(17, 17, 17, 0.06);
  --sk-shine: rgba(255, 255, 255, 0.75);
}

/* Route progress bar ------------------------------------------------------ */
.route-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 320;
  height: 2px;
  pointer-events: none;
}
.route-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  will-change: transform, opacity;
}
html.is-navigating,
html.is-navigating * { cursor: progress; }
html.has-cursor.is-navigating,
html.has-cursor.is-navigating * { cursor: none !important; }

/* Skeleton placeholder layer --------------------------------------------- */
.skeleton-layer {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}
.skeleton-layer.is-visible { display: block; }

.sk {
  position: relative;
  overflow: hidden;
  background: var(--sk-base);
}
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--sk-shine) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: sk-shimmer 1.35s var(--ease-in-out) infinite;
  will-change: transform;
}
@keyframes sk-shimmer { to { transform: translateX(100%); } }

.sk-hero { height: 62vh; height: 62svh; }
.sk-wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding: 2.5rem var(--gutter);
}
.sk-wrap--top { padding-top: calc(var(--header-h) + 8vh); }
.sk-kicker { width: 180px; height: 0.7rem; }
.sk-title { height: clamp(2.4rem, 6vw, 5.6rem); margin-top: 1.2rem; }
.sk-title + .sk-title { width: 62%; }
.sk-line { height: 0.95rem; margin-top: 1rem; }
.sk-line:nth-child(3n) { width: 84%; }
.sk-line:nth-child(4n) { width: 68%; }
.sk-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gutter);
  margin-top: 3rem;
}
.sk-card { aspect-ratio: 4 / 5; }
.sk-card:nth-child(2) { margin-top: 5rem; aspect-ratio: 1; }
.sk-prose { max-width: 720px; }
@media (min-width: 900px) {
  .sk-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sk-prose { margin-left: 25%; }
}

/* Image loading shimmer (class added by main.js only) */
.is-loading {
  background-image: linear-gradient(100deg, transparent 30%, var(--sk-shine) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: media-shimmer 1.4s linear infinite;
}
@keyframes media-shimmer {
  from { background-position: 160% 0; }
  to   { background-position: -60% 0; }
}
.is-loading > img,
.is-loading .frame__media { opacity: 0; }
.frame__media,
.cat-hero__img,
.post-hero__img,
.hero__img { transition: filter 0.9s var(--ease-out), opacity 0.9s var(--ease-out); }

/* Shared breadcrumbs ------------------------------------------------------ */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.crumbs li { opacity: 0.82; }
.crumbs li + li::before {
  content: "/";
  margin-inline: 0.75rem;
  opacity: 0.5;
}
.crumbs a { transition: color 0.4s var(--ease-out); }
.crumbs a:hover { color: var(--accent); }

/* Category hero ----------------------------------------------------------- */
.cat-hero,
.post-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--cinema-ink);
  background: #050505;
}
.cat-hero { min-height: 94vh; min-height: 94svh; }
.post-hero { min-height: 90vh; min-height: 90svh; }

.cat-hero__media,
.post-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.cat-hero__img,
.post-hero__img {
  position: absolute;
  top: -8%;
  left: -3%;
  width: 106%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  filter: brightness(0.6) saturate(1.05);
  will-change: transform;
}
.post-hero__img { filter: brightness(0.56) saturate(1.05); }
.cat-hero__shade,
.post-hero__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 78% 30%, var(--cat-glow, transparent), transparent 70%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.6) 0%, rgba(5, 5, 5, 0.08) 38%, rgba(5, 5, 5, 0.9) 100%);
  will-change: opacity;
}
.cat-hero__pattern,
.post-hero__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform, background-position;
}

.cat-hero__inner,
.post-hero__inner {
  position: relative;
  display: grid;
  gap: 1.5rem;
  padding-top: calc(var(--header-h) + 8vh);
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
.cat-hero__num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 11rem);
  font-style: italic;
  font-weight: 300;
  line-height: 0.8;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cat-hero__title {
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 8.4rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.35);
}
.cat-hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 245, 247, 0.22);
}
.cat-hero__intro {
  max-width: 58ch;
  color: rgba(245, 245, 247, 0.84);
}
.cat-hero__stats { display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); }
.cat-hero__stats div { display: flex; flex-direction: column-reverse; gap: 0.3rem; }
.cat-hero__stats dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.7);
}
.cat-hero__stats dd {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Listing ----------------------------------------------------------------- */
.listing { padding-block: clamp(4rem, 9vw, 8rem); }
.listing__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out), border-color 0.4s var(--ease-out), opacity 0.4s;
  will-change: transform;
}
.chip sup { font-size: 0.62rem; color: var(--accent); }
.chip:hover:not(:disabled) { border-color: var(--accent); }
.chip.is-active { background: var(--fg); color: var(--bg); }
.chip.is-active sup { color: inherit; opacity: 0.7; }
.chip:disabled { opacity: 0.35; cursor: not-allowed; }

.listing__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 5rem) var(--gutter);
  align-items: start;
}
.card.is-filtered { display: none; }
.listing__ad { grid-column: 1 / -1; }
.listing__empty,
.listing__none {
  padding: 3rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 300;
  color: var(--muted);
}

@media (min-width: 900px) {
  .listing__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .listing__grid > .card { grid-column: span 6; }
  .listing__grid > .card:nth-child(even) { grid-column: 1 / span 6; }
  .listing__grid > .card:nth-child(odd):not(.card--lead) { grid-column: 8 / span 5; }
  .listing__grid.is-filtering > .card { grid-column: auto / span 6; margin-top: 0; }
  .listing__grid.is-filtering > .card--lead { display: flex; }

  .card--lead {
    grid-column: 1 / -1 !important;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: var(--gutter);
  }
  .card--lead .card__title { font-size: clamp(2rem, 1.2rem + 2vw, 3.4rem); line-height: 1.04; }
  .card--lead .card__excerpt { font-size: 1.05rem; }
}

/* Topics & elsewhere ------------------------------------------------------- */
.topics {
  padding-block: clamp(4rem, 9vw, 8rem);
  border-top: 1px solid var(--line);
}
.topics__title {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 5.6rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.topics__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line-strong);
}
.topic {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.topic__num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
}
.topic__name {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.1rem + 0.9vw, 2rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.topic__desc { color: var(--muted); max-width: 40ch; }
.topic__link {
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
@media (min-width: 900px) {
  .topics__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topic { padding-right: var(--gutter); }
  .topic + .topic { padding-left: var(--gutter); border-left: 1px solid var(--line); }
}

.elsewhere { padding-bottom: clamp(4rem, 9vw, 8rem); }
.elsewhere__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 0 var(--gutter);
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.elsewhere__list a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.45rem);
  transition: color 0.4s var(--ease-out), padding 0.6s var(--ease-out);
}
.elsewhere__list a:hover { color: var(--accent); padding-left: 0.6rem; }
.elsewhere__list .num,
.footer__cats .num {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--accent);
}

/* Article ----------------------------------------------------------------- */
.post-hero__title {
  max-width: 21ch;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 1.2rem + 4.4vw, 6.2rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.35);
}
.post-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(245, 245, 247, 0.22);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.82);
}
.post-hero__meta a { text-decoration: underline; text-underline-offset: 3px; }
.post-hero__cat { color: var(--accent); }

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem var(--gutter);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem);
}
.post-toc__inner {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
}
.post-toc__title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-toc__list {
  margin-top: 1rem;
  counter-reset: toc;
}
.post-toc__list a {
  position: relative;
  display: block;
  padding: 0.45rem 0 0.45rem 2rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--muted);
  transition: color 0.4s var(--ease-out);
}
.post-toc__list li { counter-increment: toc; }
.post-toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--accent);
  opacity: 0.6;
}
.post-toc__list a:hover,
.post-toc__list a.is-active { color: var(--fg); }
.post-toc__list a.is-active::before { opacity: 1; }
.post-toc__progress {
  position: relative;
  height: 2px;
  margin-top: 1.2rem;
  background: var(--line);
}
.post-toc__progress span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

@media (min-width: 1101px) {
  .post-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .post-toc { grid-column: 1 / span 3; }
  .post-toc__inner {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    padding: 0;
    border: 0;
  }
  .post-main { grid-column: 4 / span 7; }
}

/* Prose */
.prose {
  font-size: clamp(1.04rem, 0.98rem + 0.28vw, 1.2rem);
  line-height: 1.78;
}
.prose > * + * { margin-top: 1.35em; }
.prose p { max-width: 68ch; }
.prose .lead {
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2.05rem);
  font-weight: 300;
  line-height: 1.36;
  letter-spacing: -0.01em;
}
.prose .lead::first-letter {
  float: left;
  padding: 0.08em 0.12em 0 0;
  font-size: 3.6em;
  font-style: italic;
  line-height: 0.78;
  color: var(--accent);
}
.prose h2 {
  margin-top: 2.6em;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.9rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  scroll-margin-top: calc(var(--header-h) + 24px);
  text-wrap: balance;
}
.prose h3 {
  margin-top: 2em;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.prose h2 + *,
.prose h3 + * { margin-top: 0.8em; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 0.3s;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; }
.prose ul,
.prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.55em; }
.prose li::marker { color: var(--accent); }

.prose .takeaways {
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  font-size: 0.95em;
}
.prose .takeaways__title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.prose .takeaways ul { margin-top: 0.9em; }

.prose .pullquote {
  position: relative;
  margin: 2.4em 0;
  padding: 2rem 0 0;
  border-top: 1px solid var(--line-strong);
}
.prose .pullquote::before {
  content: "“";
  position: absolute;
  top: -0.42em;
  left: 0;
  padding-right: 0.15em;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  background: var(--bg);
}
.prose .pullquote p {
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.2rem + 2vw, 3rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.prose .note {
  padding: 1.2rem 0;
  border-block: 1px solid var(--line);
  font-size: 0.94em;
  color: var(--muted);
}
.prose .note strong { color: var(--accent); }

.prose figure { margin-block: 2.6em; }
.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-soft);
  will-change: clip-path;
}
.prose figcaption {
  margin-top: 0.9rem;
  padding-left: 1rem;
  border-left: 1px solid var(--accent);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}
@media (min-width: 1101px) {
  .prose figure,
  .prose .pullquote { margin-right: -28%; }
}

.table-wrap {
  margin-block: 2.2em;
  overflow-x: auto;
  border-top: 1px solid var(--line-strong);
}
.table-wrap table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}
.table-wrap th {
  padding: 0.95rem 1rem 0.95rem 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
}
.table-wrap td {
  padding: 0.95rem 1rem 0.95rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose #frequently-asked-questions ~ h3 {
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
}

.post-disclaimer {
  margin-top: 3rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}
.post-disclaimer__title {
  margin-bottom: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-end {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-strong);
}
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.post-tags li {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.share__label {
  margin-right: 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.share__btn {
  padding: 0.55rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s;
}
.share__btn:hover { border-color: var(--accent); color: var(--accent); }
.share__btn.is-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.byline-box {
  display: flex;
  gap: 1.2rem;
  padding: 1.5rem;
  background: var(--bg-soft);
}
.byline-box__mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--accent);
}
.byline-box__name { font-family: var(--font-display); font-size: 1.2rem; }
.byline-box__bio { margin-top: 0.3rem; font-size: 0.88rem; color: var(--muted); }
.byline-box__bio a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-block: 1px solid var(--line);
}
.pager__link {
  display: grid;
  gap: 0.6rem;
  padding: 2rem 0;
  transition: color 0.4s var(--ease-out);
}
.pager__link--next { text-align: right; border-top: 1px solid var(--line); }
.pager__link:hover { color: var(--accent); }
.pager__dir {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.pager__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 2rem);
  line-height: 1.15;
}
@media (min-width: 900px) {
  .pager { grid-template-columns: 1fr 1fr; }
  .pager__link--next { border-top: 0; border-left: 1px solid var(--line); padding-left: var(--gutter); }
  .pager__link--prev { padding-right: var(--gutter); }
}

.related { padding-block: clamp(4rem, 9vw, 8rem); }
.related__title {
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.related__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem var(--gutter);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 900px) {
  .related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related__grid .card:nth-child(2) { margin-top: 5rem; }
}

/* Static pages & 404 ----------------------------------------------------- */
.static-page {
  padding-top: calc(var(--header-h) + 10vh);
  padding-bottom: clamp(4rem, 9vw, 8rem);
}
.static-page__head {
  display: grid;
  gap: 1.4rem;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line-strong);
}
.static-page__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 8rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.static-page__updated {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose--page { max-width: 760px; }
.prose--page h2 { margin-top: 2.2em; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.2rem); }

.not-found {
  display: grid;
  gap: 1.5rem;
  min-height: 80vh;
  align-content: center;
  padding-top: calc(var(--header-h) + 6vh);
  padding-bottom: 6rem;
}
.not-found__code {
  font-family: var(--font-display);
  font-size: clamp(7rem, 26vw, 22rem);
  font-style: italic;
  font-weight: 300;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
}
.not-found__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.035em;
}
.not-found__title em { color: var(--accent); }

/* Ad slots (rendered only when AdSense IDs are configured) --------------- */
.ad-slot {
  display: grid;
  gap: 0.6rem;
  margin-block: 2.6em;
  padding-block: 1rem;
  border-block: 1px solid var(--line);
  min-height: 300px;
  text-align: center;
  contain: layout;
}
.ad-slot__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }

/* Footer additions -------------------------------------------------------- */
.footer__nav-gap { margin-top: 2.25rem; }
.footer__topics a,
.footer__cats a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.footer__topics sup { color: var(--accent); }
.footer__cats a { justify-content: flex-start; align-items: baseline; }
.site-footer--category .footer__word { font-size: clamp(3.4rem, 12vw, 15rem); }
.subscribe__fine { font-size: 0.75rem; color: var(--muted); }
.subscribe__fine a { text-decoration: underline; text-underline-offset: 3px; }

.footer__legal { padding-top: 2.5rem; }
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}
.legal-nav a { color: var(--muted); transition: color 0.35s var(--ease-out); }
.legal-nav a:hover { color: var(--accent); }

@media (max-width: 820px) {
  .site-header__crumb a { padding-left: 0.8rem; }
  .cat-hero__foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .site-header__crumb { display: none; }
}

/* ==========================================================================
   14. Header menus (grouped categories) & cookie consent banner
   ========================================================================== */

.nav { align-items: center; }
.nav__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.nav__chev { transition: transform 0.4s var(--ease-out); }
.nav__trigger[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

.nav__burger {
  display: none;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0 0.2rem;
  border: 0;
  background: none;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav__burger-lines { display: grid; gap: 5px; width: 20px; }
.nav__burger-lines span { display: block; height: 1.5px; background: currentColor; }

/* Desktop: each group opens as a panel under the header. The panels sit outside the header
   so they can drop down over the page while the header itself hides on scroll. */
.menu {
  position: fixed;
  inset: var(--header-h) 0 auto;
  z-index: 45;
}
.menu__head,
.menu__extra { display: none; }
.menu__group {
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 2rem 0 2.4rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow);
}
.menu__group:not([hidden]) { animation: menu-in 0.35s var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-10px); } }
.menu__inner {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) 1fr;
  gap: 2rem;
}
.menu__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
}
.menu__cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem 2.5rem;
}
.menu__link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  transition: color 0.3s var(--ease-out);
}
.menu__link:hover,
.menu__link:focus-visible { color: var(--accent); }
.menu__num {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.menu__desc {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.menu__subs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}
.menu__subs a {
  display: inline-block;
  min-height: 32px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.2;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.menu__subs a:hover,
.menu__subs a:focus-visible { border-color: var(--accent); color: var(--accent); }
.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(10, 10, 10, 0.28);
}

/* Small screens: one full-screen menu listing every group. */
@media (max-width: 820px) {
  .nav { display: none; }
  .nav__burger { display: inline-flex; }
  .menu {
    inset: 0;
    z-index: 300;
    display: none;
    overflow-y: auto;
    padding-bottom: 3rem;
    background: var(--bg);
    color: var(--fg);
    overscroll-behavior: contain;
  }
  .menu.is-open { display: block; }
  .menu__head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    background: var(--bg);
  }
  .menu__label {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-style: italic;
  }
  .menu__close {
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: none;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .menu.is-open .menu__group[hidden] { display: block; }
  .menu__group {
    max-height: none;
    overflow: visible;
    padding: 1.4rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: none;
    animation: none;
  }
  .menu__inner { grid-template-columns: 1fr; gap: 1.1rem; }
  .menu__title { font-size: 1.2rem; color: var(--muted); }
  .menu__cats { gap: 1.4rem; }
  .menu__desc { display: none; }
  .menu__extra {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    font-weight: 600;
  }
  .menu__extra a { display: inline-block; padding-block: 0.6rem; }
}

/* Article cover credit (front-matter "coverCredit", e.g. AI-generated images) */
.post-hero__credit {
  position: absolute;
  right: var(--gutter);
  bottom: 0.9rem;
  z-index: 2;
  max-width: 60%;
  color: #f5f5f7;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-align: right;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

/* Cookie consent banner */
.consent {
  position: fixed;
  left: clamp(12px, 2.5vw, 28px);
  bottom: clamp(12px, 2.5vw, 28px);
  z-index: 350;
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 1.4rem 1.4rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
  font-size: 0.88rem;
  line-height: 1.55;
}
.consent[hidden] { display: none; }
.consent__title {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
}
.consent__title:focus { outline: none; }
.consent__text a { text-decoration: underline; text-underline-offset: 3px; }
.consent__prefs { margin-top: 1rem; }
.consent__set { display: grid; gap: 0.75rem; margin: 0; padding: 0; border: 0; }
.consent__opt { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.84rem; cursor: pointer; }
.consent__opt input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0.18rem 0 0; accent-color: var(--accent); }
.consent__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.consent__btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.consent__btn--primary { background: var(--fg); color: var(--bg); }
.consent__btn:hover { border-color: var(--accent); }
@media (max-width: 480px) {
  .consent {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 85vh;
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
  }
}
html.menu-open { overflow: hidden; }
