/* ============================================================
   EDITORIAL THEME
   Flat surfaces, hairline rules, strong typography. No blur/glass
   (cheap to paint on low-end phones). Every colour comes from the
   theme variables printed by SiteHelper::themeCssVars(), so the
   light AND dark palettes produced by `site:regen` both work.
   Layout variants are read from <body data-home|data-card|data-head|data-art>.
   ============================================================ */

:root {
  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --gap: calc(1.5rem * var(--space-scale, 1));
  --r: var(--radius-base, 8px);
  --r-sm: calc(var(--radius-base, 8px) * 0.55);
  --bg: var(--dark-bg);
  --surface: var(--card-bg);
  --line: var(--border-color);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --accent: var(--primary);
  --head-h: 64px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px -12px rgba(0, 0, 0, 0.35);
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 1rem); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-heading); line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
p, ul, ol, figure, blockquote, address { margin: 0; }
address { font-style: normal; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.site-main { flex: 1 0 auto; padding-bottom: calc(var(--gap) * 2); }
.site-main:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: 0.6rem 1rem; border-radius: var(--r-sm);
  background: var(--accent); color: #fff; font-weight: 700;
}
.skip:focus { top: 0.75rem; }

.ph-art { width: 100%; height: 100%; }

/* ─── Masthead ─── */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-footer-bg);
  color: var(--header-footer-text);
  border-bottom: 1px solid var(--hairline);
}
.masthead::before {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}
.masthead__bar { position: relative; display: flex; align-items: center; gap: 1rem; min-height: var(--head-h); }

.brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.brand__mark {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; font: 800 0.95rem/1 var(--font-heading); letter-spacing: 0.02em;
}
.brand__words { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font: 800 1.15rem/1.1 var(--font-heading); letter-spacing: -0.02em; }
.brand__tag {
  font-size: 0.74rem; color: var(--header-footer-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42ch;
}

.menu { margin-left: auto; }
.menu__list { display: flex; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.menu__link {
  display: block; padding: 0.5rem 0.85rem; border-radius: var(--r-sm);
  font-size: 0.92rem; font-weight: 600; color: var(--header-footer-text-muted);
  transition: color 0.15s, background-color 0.15s;
}
.menu__link:hover { color: var(--header-footer-text); background: var(--hover-overlay); }
.menu__link[aria-current="page"] { color: var(--header-footer-text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.menu-btn {
  display: none; margin-left: auto; width: 44px; height: 44px; padding: 0;
  place-items: center; border: 1px solid var(--hairline); border-radius: var(--r-sm);
  background: transparent; color: var(--header-footer-text); cursor: pointer;
}
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-btn__bars { position: relative; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -6px; }
.menu-btn__bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* data-head variants (desktop) */
@media (min-width: 769px) {
  [data-head="center"] .masthead__bar { flex-direction: column; justify-content: center; gap: 0.35rem; padding-block: 0.75rem; }
  [data-head="center"] .brand { flex-direction: column; text-align: center; gap: 0.4rem; }
  [data-head="center"] .menu { margin: 0; }
  [data-head="split"] .menu { margin-inline: auto; }
  [data-head="split"] .masthead__bar::after { content: ""; flex: 0 1 180px; }
}

/* ─── Shared bits ─── */
.kicker {
  display: inline-block; margin-bottom: 0.55rem;
  font: 700 0.72rem/1 var(--font-body); letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent);
}
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; font-size: 0.86rem; color: var(--muted); }
.byline__author { font-weight: 700; color: var(--ink); }

.block-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: var(--gap); padding-bottom: 0.6rem; border-bottom: 1px solid var(--line);
}
.block-title { position: relative; padding-left: 0.85rem; font-size: 1.25rem; font-weight: 800; }
.block-title::before {
  content: ""; position: absolute; left: 0; top: 0.15em; bottom: 0.15em; width: 4px;
  border-radius: 2px; background: var(--accent);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.65rem 1.4rem; border: 0; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; font: 700 0.98rem/1 var(--font-body); cursor: pointer;
  transition: filter 0.15s;
}
.btn:hover { filter: brightness(1.1); }

.panel { padding: 1.1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.panel__title {
  margin-bottom: 0.75rem; color: var(--accent);
  font: 800 0.78rem/1.2 var(--font-heading); letter-spacing: 0.1em; text-transform: uppercase;
}

.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }

/* ─── Home: intro ─── */
.intro { padding-block: clamp(1.5rem, 4vw, 2.5rem) 1.25rem; margin-bottom: var(--gap); border-bottom: 1px solid var(--line); }
.intro__title { max-width: 30ch; font-size: clamp(1.55rem, 3.4vw, 2.4rem); font-weight: 800; }
.intro__desc { max-width: 68ch; margin-top: 0.6rem; color: var(--muted); }

/* ─── Home: lead story + trending rail ─── */
.lead {
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: calc(var(--gap) * 1.25); margin-bottom: calc(var(--gap) * 1.75);
}
.lead-story {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.lead-story__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
.lead-story__media img, .lead-story__media svg { width: 100%; height: 100%; object-fit: cover; }
.lead-story__text { padding: calc(1.25rem * var(--space-scale, 1)) calc(1.35rem * var(--space-scale, 1)) 1.4rem; }
.lead-story__title { font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.18; }
.lead-story__title a::after { content: ""; position: absolute; inset: 0; }
.lead-story:hover .lead-story__title a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.lead-story__excerpt {
  margin-top: 0.65rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lead-story .byline { margin-top: 0.85rem; }

.rail { align-self: start; padding-top: 0.9rem; border-top: 3px solid var(--accent); }
.rail__title { margin-bottom: 0.25rem; font: 800 0.8rem/1 var(--font-heading); letter-spacing: 0.1em; text-transform: uppercase; }
.rail__list { margin: 0; padding: 0; list-style: none; counter-reset: rail; }
.rail__item {
  counter-increment: rail; display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 0.75rem; row-gap: 0.2rem;
  padding-block: 0.95rem; border-bottom: 1px solid var(--line);
}
.rail__item::before {
  content: counter(rail, decimal-leading-zero); grid-row: span 2;
  font: 800 1.55rem/1 var(--font-heading); color: var(--accent);
}
.rail__link { font-weight: 700; line-height: 1.35; }
.rail__link:hover { color: var(--accent); }
.rail__item time { font-size: 0.8rem; color: var(--muted); }

/* ─── Story cards ─── */
.feed-list {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: var(--gap); margin: 0; padding: 0; list-style: none;
}
.feed-list > li { display: flex; min-width: 0; }
.feed-list--auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.entry {
  position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.entry:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.entry__media { flex: none; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); }
.entry__media img, .entry__media svg { width: 100%; height: 100%; object-fit: cover; }
.entry__text { display: flex; flex: 1; flex-direction: column; gap: 0.45rem; padding: calc(1rem * var(--space-scale, 1)); }
.entry__title {
  font-size: 1.04rem; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.entry__title a::after { content: ""; position: absolute; inset: 0; }
.entry:hover .entry__title a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.entry__excerpt {
  font-size: 0.9rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.entry__date { margin-top: auto; padding-top: 0.25rem; font-size: 0.8rem; color: var(--muted); }

/* data-card="overlay": title over the image */
[data-card="overlay"] .entry { min-height: 260px; justify-content: flex-end; border: 0; }
[data-card="overlay"] .entry__media { position: absolute; inset: 0; aspect-ratio: auto; }
[data-card="overlay"] .entry__text {
  position: relative; flex: none; padding-top: 3.5rem; color: #fff;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.62) 38%, rgba(0, 0, 0, 0.9));
}
[data-card="overlay"] .entry__excerpt { display: none; }
[data-card="overlay"] .entry__date { color: rgba(255, 255, 255, 0.82); }

/* data-card="side": thumbnail beside the text (also on phones) */
[data-card="side"] .entry { flex-direction: row; }
/* image fills the card height set by the text, instead of its own intrinsic ratio */
[data-card="side"] .entry__media { position: relative; width: 38%; max-width: 220px; aspect-ratio: auto; min-height: 112px; }
[data-card="side"] .entry__media img, [data-card="side"] .entry__media svg { position: absolute; inset: 0; }

/* data-card="minimal": text-first list row, small square thumb on the right */
[data-card="minimal"] .entry {
  flex-direction: row-reverse; align-items: flex-start; gap: 0.9rem; padding-block: 0.9rem;
  background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
}
[data-card="minimal"] .entry:hover { box-shadow: none; }
[data-card="minimal"] .feed-list { row-gap: 0; }
[data-card="minimal"] .entry__media { width: 92px; aspect-ratio: 1; border-radius: var(--r-sm); }
[data-card="minimal"] .entry__text { padding: 0; }

/* data-home variants (desktop) */
@media (min-width: 1025px) {
  /* horizontal cards get cramped beyond two columns */
  [data-card="side"] .feed-list, [data-card="minimal"] .feed-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: calc(var(--gap) * 1.5); }

  [data-home="list"] .feed-list { grid-template-columns: 1fr; }
  [data-home="list"]:not([data-card="minimal"]) .entry { flex-direction: row; }
  [data-home="list"]:not([data-card="minimal"]):not([data-card="overlay"]) .entry__media { width: 300px; max-width: none; aspect-ratio: 16 / 10; }
  [data-home="list"][data-card="overlay"] .entry { min-height: 320px; }

  [data-home="magazine"] .feed { --cols: 3; }
  [data-home="magazine"] .feed .feed-list { grid-auto-flow: dense; }
  [data-home="magazine"] .feed .feed-list > li:first-child { grid-column: span 2; grid-row: span 2; }
  [data-home="magazine"] .feed .feed-list > li:first-child .entry__title { font-size: 1.45rem; }

  [data-home="compact"]:not([data-card="side"]):not([data-card="minimal"]) .feed .feed-list { grid-template-columns: repeat(calc(var(--cols, 3) + 1), minmax(0, 1fr)); gap: calc(0.85rem * var(--space-scale, 1)); }
  [data-home="compact"] .feed .entry__title { font-size: 0.93rem; }
  [data-home="compact"] .feed .entry__excerpt { display: none; }
}

/* ─── Pager ─── */
.pager { margin-top: calc(var(--gap) * 2); }
.pager__list { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.pager__link, .pager__current {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 44px; height: 44px; padding: 0 0.85rem; border-radius: var(--r-sm);
  border: 1px solid var(--line); font-size: 0.92rem; font-weight: 600;
}
.pager__link:hover { border-color: var(--accent); color: var(--accent); }
.pager__current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager__gap { padding-inline: 0.2rem; color: var(--muted); }

/* ─── Breadcrumbs ─── */
.crumbs { padding-block: 1rem 0.75rem; font-size: 0.85rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; min-width: 0; }
.crumbs li { display: flex; min-width: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; opacity: 0.55; }
.crumbs--narrow { max-width: 760px; margin-inline: auto; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); max-width: 56ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Story (article) ─── */
.story-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--gap) * 1.5); }
[data-art="full"] .story, [data-art="full-toc"] .story, .story--solo { width: 100%; max-width: 760px; margin-inline: auto; }

.story__head { padding-bottom: 1.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.story__title { font-size: clamp(1.7rem, 4.2vw, 2.7rem); font-weight: 800; line-height: 1.14; }
.story__head .byline { margin-top: 0.85rem; }
.story__cover { margin-bottom: 1.75rem; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r); background: var(--surface); }
.story__cover img { width: 100%; height: 100%; object-fit: cover; }

.ad-slot { display: flex; justify-content: center; margin-bottom: 1.5rem; overflow: hidden; }
.ad-slot--320x50 { min-height: 50px; }
.ad-slot--300x250 { min-height: 250px; }

.story__foot { display: grid; gap: 1.1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.chip { padding: 0.3rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.82rem; color: var(--muted); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.share__label { margin-right: 0.3rem; font-size: 0.9rem; font-weight: 700; }
.share__link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0.4rem 0.95rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font-size: 0.85rem; font-weight: 600;
}
.share__link:hover { border-color: var(--accent); color: var(--accent); }

/* data-art sidebars (desktop only; on smaller screens the aside follows the article) */
@media (min-width: 1025px) {
  [data-art="sidebar-right"] .story-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  [data-art="sidebar-left"] .story-layout { grid-template-columns: 320px minmax(0, 1fr); }
  [data-art="sidebar-left"] .story-aside { order: -1; }
  .story-aside__sticky { position: sticky; top: calc(var(--head-h) + 1.25rem); }
}
.story-aside__sticky { display: flex; flex-direction: column; gap: 1.25rem; }

.toc__list { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc__list li { counter-increment: toc; }
.toc__list a {
  display: grid; grid-template-columns: 1.6rem 1fr; padding-block: 0.32rem;
  font-size: 0.9rem; line-height: 1.4; color: var(--muted);
}
.toc__list a::before { content: counter(toc) "."; font-weight: 700; color: var(--accent); }
.toc__list a:hover { color: var(--ink); }
.toc--inline { margin-bottom: 1.75rem; }
.toc--inline > summary { margin-bottom: 0; cursor: pointer; list-style: none; }
.toc--inline > summary::-webkit-details-marker { display: none; }
.toc--inline > summary::after { content: " +"; }
.toc--inline[open] > summary { margin-bottom: 0.6rem; }
.toc--inline[open] > summary::after { content: " \2212"; }

.mini-list { margin: 0; padding: 0; list-style: none; }
.mini { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 0.75rem; align-items: center; padding-block: 0.65rem; }
.mini + .mini { border-top: 1px solid var(--line); }
.mini__thumb { aspect-ratio: 1; overflow: hidden; border-radius: var(--r-sm); background: var(--line); }
.mini__thumb img, .mini__thumb svg { width: 100%; height: 100%; object-fit: cover; }
.mini__title {
  font-size: 0.9rem; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mini__title::after { content: ""; position: absolute; inset: 0; }
.mini:hover .mini__title { color: var(--accent); }

.more { margin-top: calc(var(--gap) * 2.5); }

/* ─── Long-form content ─── */
.prose { font-size: clamp(1.02rem, 0.97rem + 0.25vw, 1.12rem); line-height: 1.8; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; padding-bottom: 0.35rem; border-bottom: 1px solid var(--line); font-size: 1.5rem; }
.prose h3 { margin-top: 1.6em; font-size: 1.22rem; }
.prose h4 { margin-top: 1.4em; font-size: 1.05rem; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { padding: 0.2rem 0 0.2rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 0.95em; }
.prose th, .prose td { padding: 0.5rem 0.75rem; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface); }
.prose img { border-radius: var(--r-sm); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }

.content-figure img { width: 100%; aspect-ratio: 7 / 4; object-fit: cover; border-radius: var(--r); background: var(--surface); }
.content-figure figcaption, .media-block figcaption, .gallery figcaption {
  margin-top: 0.5rem; font-size: 0.85rem; line-height: 1.45; color: var(--muted); text-align: center;
}
.content-cta {
  margin-block: 2em; padding: 1.5rem 1.25rem; text-align: center;
  background: var(--surface); border: 1px dashed var(--accent); border-radius: var(--r);
}
.content-cta__title { margin-bottom: 1rem; font: 800 1.2rem/1.3 var(--font-heading); }

/* ─── Media: click-to-load YouTube player ─── */
.media-block { margin-block: 2rem; }
.player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r); background: #000; }
.player__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player__btn { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.player__bg { fill: #212121; fill-opacity: 0.85; transition: fill 0.15s, fill-opacity 0.15s; }
.player:hover .player__bg, .player__btn:focus-visible .player__bg { fill: #f00; fill-opacity: 1; }
.player__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.gallery { margin-top: 2.5rem; }
.gallery .block-title { margin-bottom: 1rem; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.85rem; margin: 0; padding: 0; list-style: none; }
.gallery__grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); background: var(--surface); }

.agc-notes { margin-block: 1.5rem 2.5rem; }
.agc-notes > p + p { margin-top: 1.1em; }
.vid-related .block-title { margin-bottom: 1rem; font-size: 1.2rem; border: 0; padding-bottom: 0; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.vid-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none !important; color: var(--ink) !important; }
.vid-card:hover { border-color: var(--accent); }
.vid-card__thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.vid-card__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.vid-card__title {
  padding: 0.75rem 0.85rem; font-size: 0.9rem; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ─── Documents (about / contact / privacy) ─── */
.doc__head { padding-bottom: 1.25rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.doc__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.doc__lede { margin-top: 0.75rem; font-size: 1.08rem; color: var(--muted); }
.doc .prose > h2:first-child { margin-top: 0; }
.contact-card {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; padding: 1.25rem 1.35rem;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r);
}
.contact-card__icon { flex: none; color: var(--accent); }
.contact-card__label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-card__value { display: block; font-size: 1.1rem; font-weight: 700; word-break: break-all; }

/* ─── 404 ─── */
.notfound { padding-block: clamp(3rem, 10vw, 6rem); text-align: center; }
.notfound__code {
  font: 900 clamp(4.5rem, 18vw, 8rem)/1 var(--font-heading); letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound__title { margin-top: 0.75rem; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.notfound__desc { max-width: 46ch; margin: 0.75rem auto 2rem; color: var(--muted); }

/* ─── Colophon (footer) ─── */
.colophon {
  margin-top: auto; background: var(--header-footer-bg); color: var(--header-footer-text-muted);
  border-top: 1px solid var(--hairline); font-size: 0.92rem;
}
.colophon__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding-block: 2.5rem 2rem; }
.colophon__brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; font: 800 1.05rem/1.2 var(--font-heading); color: var(--header-footer-text); }
.colophon__brand .brand__mark { width: 34px; height: 34px; font-size: 0.82rem; }
.colophon__about p:last-child { max-width: 52ch; }
.colophon__title { margin-bottom: 0.75rem; font: 800 0.76rem/1.2 var(--font-heading); letter-spacing: 0.1em; text-transform: uppercase; color: var(--header-footer-text); }
.colophon ul { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.colophon li a { display: inline-block; padding-block: 0.3rem; }
.colophon a:hover { color: var(--header-footer-text); text-decoration: underline; }
.colophon__base { padding-block: 1rem; border-top: 1px solid var(--hairline); font-size: 0.82rem; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .lead { grid-template-columns: 1fr; }
  .feed-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-card="side"] .feed-list, [data-card="minimal"] .feed-list { grid-template-columns: 1fr; }
  .colophon__grid { grid-template-columns: 1fr 1fr; }
  .colophon__about { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --head-h: 58px; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__name { font-size: 1.05rem; }
  .menu-btn { display: grid; }
  .menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: var(--header-footer-bg); border-bottom: 1px solid var(--hairline); box-shadow: var(--shadow);
  }
  .menu[data-open] { display: block; }
  .menu__list { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .menu__link { padding: 0.85rem 0.25rem; font-size: 1rem; border-bottom: 1px solid var(--hairline); border-radius: 0; }
  .menu__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 0.75rem; }

  .feed-list { grid-template-columns: 1fr; }
  [data-home="compact"]:not([data-card="side"]):not([data-card="minimal"]) .feed .feed-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  [data-home="compact"]:not([data-card="side"]):not([data-card="minimal"]) .feed .entry__excerpt { display: none; }
  [data-home="compact"] .feed .entry__title { font-size: 0.92rem; }
  [data-card="overlay"] .entry { min-height: 220px; }
  [data-card="side"] .entry__media { width: 120px; min-height: 96px; }
  [data-card="side"] .entry__excerpt { -webkit-line-clamp: 2; line-clamp: 2; }

  .pager__link--step { padding-inline: 0.7rem; }
  .colophon__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .crumbs [aria-current] { max-width: 70vw; }
}

@media (max-width: 420px) {
  .brand__tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
