/*
Theme Name: AmadeusFit
Theme URI: https://amadeusfit.pl
Author: Riomega
Description: Aggressive fitness journal — gym black, electric red, condensed sans display (Anton). Longform debunking, vanilla JS, auto-TOC, RankMath compatible.
Version: 2.0.0
License: GPL-2.0-or-later
Text Domain: amadeusfit
*/

/* =========================================================================
   1. FONTY
   ========================================================================= */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/anton/anton-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: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/anton/anton-latinext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter/inter-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter/inter-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono/jetbrainsmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono/jetbrainsmono-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20AB, U+2C60-2C7F;
}

/* =========================================================================
   2. DESIGN TOKENS — gym black / electric red
   ========================================================================= */
:root {
  /* paleta */
  --c-bone:        #F5F5F5;
  --c-bone-dim:    #E8E8E8;
  --c-bone-deep:   #D4D4D4;
  --c-paper:       #FFFFFF;
  --c-ink:         #0A0A0A;
  --c-ink-soft:    #404040;
  --c-stone:       #737373;
  --c-stone-light: #A3A3A3;
  --c-trail:       #DC2626;    /* electric red — gym warning */
  --c-trail-deep:  #991B1B;
  --c-line:        #D4D4D4;

  /* fonty */
  --f-display: 'Anton', 'Bebas Neue', 'Arial Narrow', sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  /* skala typograficzna — agresywniejsza, więcej kontrastu */
  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1.0625rem;
  --t-md:   1.25rem;
  --t-lg:   1.625rem;
  --t-xl:   2.25rem;
  --t-2xl:  3.25rem;
  --t-3xl:  4.5rem;
  --t-4xl:  clamp(3rem, 7vw + 0.5rem, 6.5rem);

  --measure: 64ch;
  --container: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;
  --s-8: 8rem;

  --aside-w: 240px;
  --aside-gap: 4rem;
}

@font-face {
  font-family: 'Anton Fallback';
  src: local('Impact'), local('Arial Black'), local('Arial');
  ascent-override: 95%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 100%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  ascent-override: 95%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 105%;
}

/* =========================================================================
   3. RESET + BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern','liga','calt','ss01';
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a {
  color: var(--c-ink);
  text-decoration: underline;
  text-decoration-color: var(--c-trail);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
a:hover { color: var(--c-trail); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
hr {
  border: 0;
  height: 4px;
  margin: var(--s-5) 0;
  background: var(--c-ink);
}
::selection { background: var(--c-trail); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-ink); color: var(--c-paper);
  padding: var(--s-2); z-index: 999;
}
.skip-link:focus { left: var(--s-2); top: var(--s-2); }

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

/* =========================================================================
   4. HEADER + NAV
   ========================================================================= */
.site-header {
  border-bottom: 4px solid var(--c-ink);
  background: var(--c-paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding-block: var(--s-3);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-display);
  font-size: 1.875rem;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--c-ink);
}
.site-brand strong {
  font-weight: 400;
  font-style: normal;
  color: var(--c-ink);
}
.site-brand em {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-trail);
  font-weight: 600;
  padding-left: 0.7rem;
  border-left: 2px solid var(--c-ink);
}
.site-brand img,
.site-brand svg { max-height: 52px; width: auto; display: block; }
.site-brand--logo { display: inline-flex; align-items: center; line-height: 0; justify-self: start; }
.site-brand--logo .custom-logo-link { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.site-brand--logo .custom-logo { max-height: 52px; width: auto; height: auto; display: block; }
.site-nav {
  justify-self: center;
}
.site-nav ul {
  display: flex;
  gap: var(--s-3);
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--f-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-nav a {
  text-decoration: none;
  color: var(--c-ink);
  position: relative;
  padding: 0.4rem 0.2rem;
  font-weight: 400;
  transition: color .15s ease;
}
.site-nav a:hover,
.site-nav .current-menu-item a {
  color: var(--c-trail);
}
.site-nav .current-menu-item a::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -4px;
  height: 3px;
  background: var(--c-trail);
}
.site-nav-toggle {
  display: none;
  font-family: var(--f-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--c-ink);
}
.header-meta {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink);
  font-weight: 600;
  text-align: right;
}

@media (max-width: 880px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }
  .site-nav {
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
    border-top: 2px solid var(--c-ink);
    padding-top: var(--s-3);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: var(--s-2); }
  .site-nav-toggle { display: inline-block; }
  .header-meta { display: none; }
}

/* =========================================================================
   5. HERO ARTICLE (single)
   ========================================================================= */
.hero {
  position: relative;
  margin-bottom: var(--s-6);
}
.hero__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c-bone-deep);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 50%, rgba(10,10,10,0.7) 100%);
  pointer-events: none;
}
.hero__caption {
  position: absolute;
  bottom: var(--s-4);
  left: 0;
  right: 0;
  color: var(--c-bone);
  padding-inline: var(--gutter);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero__caption span { opacity: 0.85; }

.article-head {
  margin-top: calc(-1 * var(--s-6));
  position: relative;
  z-index: 2;
}
.article-head__inner {
  background: var(--c-paper);
  max-width: 920px;
  margin: 0 auto;
  padding: var(--s-5) var(--s-5) 0;
  border-top: 8px solid var(--c-trail);
}
.article-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-display);
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-trail);
  margin-bottom: var(--s-3);
  font-weight: 400;
}
.article-kicker::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 4px;
  background: var(--c-trail);
}
.article-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--t-4xl);
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--c-ink);
  text-wrap: balance;
  text-transform: uppercase;
}
.article-title em {
  font-style: normal;
  color: var(--c-trail);
}
.article-lede {
  font-family: var(--f-body);
  font-style: normal;
  font-weight: 400;
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--c-ink-soft);
  max-width: 60ch;
  margin-top: var(--s-3);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-line);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-stone);
  font-weight: 500;
}
.article-meta b {
  font-weight: 700;
  color: var(--c-ink);
  margin-left: 0.4rem;
}

/* =========================================================================
   6. SINGLE LAYOUT (3 kolumny)
   ========================================================================= */
.single-grid {
  display: grid;
  gap: var(--s-5);
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-5) var(--gutter) var(--s-7);
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .single-grid {
    grid-template-columns: var(--aside-w) minmax(0, 1fr) var(--aside-w);
    gap: var(--aside-gap);
    align-items: start;
  }
}

/* =========================================================================
   7. TABLE OF CONTENTS
   ========================================================================= */
.toc {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.toc__label {
  display: block;
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--c-ink);
  margin-bottom: var(--s-2);
  padding-bottom: var(--s-1);
  border-bottom: 3px solid var(--c-trail);
}
.toc__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  counter-reset: tocchapter;
}
.toc__list li.lvl-2 { counter-increment: tocchapter; }
.toc__list a {
  display: block;
  position: relative;
  padding: 0.3rem 0 0.3rem 2.4rem;
  text-decoration: none;
  color: var(--c-ink-soft);
  border-left: 3px solid transparent;
  font-weight: 500;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.toc__list li.lvl-2 > a::before {
  content: counter(tocchapter, decimal-leading-zero);
  position: absolute;
  left: 0.6rem;
  top: 0.3rem;
  font-weight: 700;
  color: var(--c-stone-light);
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}
.toc__list li.lvl-3 a {
  padding-left: 3.4rem;
  font-size: 0.78rem;
  color: var(--c-stone);
}
.toc__list a:hover { color: var(--c-ink); }
.toc__list a.is-active {
  color: var(--c-ink);
  border-left-color: var(--c-trail);
  background: linear-gradient(to right, rgba(220,38,38,0.08), transparent 60%);
}
.toc__list a.is-active::before { color: var(--c-trail); }

@media (min-width: 1024px) {
  .toc--desktop {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 0.5rem;
  }
  .toc--desktop::-webkit-scrollbar { width: 4px; }
  .toc--desktop::-webkit-scrollbar-thumb { background: var(--c-bone-deep); }
  .toc--mobile { display: none; }
}
@media (max-width: 1023px) {
  .toc--desktop { display: none; }
  .toc--mobile {
    margin-bottom: var(--s-4);
    border: 2px solid var(--c-ink);
    background: var(--c-bone);
    padding: var(--s-2) var(--s-3);
  }
  .toc--mobile summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--f-display);
    font-size: 1rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-ink);
    font-weight: 400;
  }
  .toc--mobile summary::-webkit-details-marker { display: none; }
  .toc--mobile summary::after {
    content: '+';
    font-family: var(--f-display);
    font-size: 1.4rem;
    color: var(--c-trail);
    transition: transform .25s ease;
    font-weight: 400;
  }
  .toc--mobile[open] summary::after { content: '−'; }
  .toc--mobile .toc__list { margin-top: var(--s-2); }
  .toc--mobile .toc__label { display: none; }
}

/* =========================================================================
   8. PROZA (single content) — silne, mocne, sport, bez italic/dropcap
   ========================================================================= */
.prose {
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.75;
  color: var(--c-ink);
  max-width: var(--measure);
  margin-inline: auto;
}
.prose > * { margin-block: 1.1em; }
.prose > *:first-child { margin-top: 0; }

.prose p { hyphens: auto; }
.prose p > strong { font-weight: 700; color: var(--c-ink); }
.prose p > em { font-style: normal; font-weight: 600; color: var(--c-ink); border-bottom: 2px solid var(--c-trail); padding-bottom: 1px; }

/* NO DROPCAP — fitness, not editorial */

.prose h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--t-2xl);
  line-height: 0.98;
  letter-spacing: 0;
  margin-top: 2.4em;
  margin-bottom: 0.7em;
  color: var(--c-ink);
  scroll-margin-top: 110px;
  text-wrap: balance;
  text-transform: uppercase;
}
.prose h2::before {
  content: '';
  display: block;
  width: 60px;
  height: 6px;
  margin-bottom: var(--s-2);
  background: var(--c-trail);
}
.prose h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-ink);
  margin-top: 2em;
  margin-bottom: 0.5em;
  scroll-margin-top: 110px;
}
.prose h4 {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: var(--t-md);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-ink);
  margin-top: 1.6em;
}

.prose ul, .prose ol {
  padding-left: 1.4em;
}
.prose ul li { list-style-type: disc; padding-left: 0.4em; }
.prose ul li::marker { color: var(--c-trail); font-weight: 700; }
.prose ol li { padding-left: 0.4em; }
.prose ol li::marker { font-family: var(--f-mono); color: var(--c-trail); font-weight: 700; }

.prose blockquote {
  margin-block: 1.8em;
  padding: var(--s-3) var(--s-4);
  border-left: 6px solid var(--c-trail);
  background: var(--c-bone);
  font-family: var(--f-body);
  font-style: normal;
  font-weight: 500;
  font-size: var(--t-md);
  color: var(--c-ink);
  line-height: 1.55;
}
.prose blockquote cite {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--f-mono);
  font-style: normal;
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-stone);
  font-weight: 600;
}

.prose figure {
  margin-block: 2em;
}
.prose figure img {
  width: 100%;
  height: auto;
  background: var(--c-bone-deep);
}
.prose figure figcaption {
  margin-top: var(--s-2);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--c-stone);
  padding-left: var(--s-3);
  border-left: 3px solid var(--c-trail);
  font-weight: 500;
}

.prose .alignwide,
.prose .alignfull {
  margin-inline: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}
@media (min-width: 1024px) {
  .prose .alignwide {
    margin-inline: calc(-1 * (var(--aside-w) + var(--aside-gap)));
    width: calc(100% + 2 * (var(--aside-w) + var(--aside-gap)));
  }
}

.prose code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background: var(--c-bone);
  padding: 0.15em 0.45em;
  border: 1px solid var(--c-line);
  border-radius: 0;
  font-weight: 600;
}
.prose pre {
  background: var(--c-ink);
  color: var(--c-bone);
  padding: var(--s-3);
  overflow-x: auto;
  font-family: var(--f-mono);
  font-size: 0.92rem;
  border-left: 4px solid var(--c-trail);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-block: 1.8em;
  border-top: 3px solid var(--c-ink);
  border-bottom: 3px solid var(--c-ink);
}
.prose th, .prose td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--c-line);
}
.prose th {
  font-family: var(--f-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-ink);
  border-bottom: 3px solid var(--c-ink);
  font-weight: 400;
}

.prose .data,
.prose .num {
  font-family: var(--f-mono);
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--c-trail);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  background: none;
  color: var(--c-ink);
  font-weight: 600;
  transition: color .15s ease, background-color .15s ease;
}
.prose a:hover {
  background: var(--c-trail);
  color: var(--c-bone);
  text-decoration-color: var(--c-trail);
}

/* =========================================================================
   9. ARCHIWA / HOME
   ========================================================================= */
.intro-band {
  border-bottom: 4px solid var(--c-ink);
  padding-block: var(--s-6) var(--s-5);
  background: var(--c-bone);
  position: relative;
}
.intro-band::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 50%;
  height: 4px;
  background: var(--c-trail);
}
.intro-band__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  align-items: end;
}
@media (min-width: 880px) {
  .intro-band__inner {
    grid-template-columns: 1.4fr 1fr;
  }
}
.intro-band h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--t-3xl);
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--c-ink);
  text-wrap: balance;
  text-transform: uppercase;
}
.intro-band h1 em { font-style: normal; color: var(--c-trail); }
.intro-band p {
  font-family: var(--f-body);
  font-style: normal;
  font-weight: 400;
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--c-ink-soft);
  max-width: 54ch;
}

.posts-feed {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-6) var(--gutter) var(--s-7);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 880px) {
  .posts-feed { grid-template-columns: 2fr 1fr; gap: var(--s-6); }
}

.post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--c-line);
}
@media (min-width: 720px) {
  .post-card { grid-template-columns: 280px 1fr; gap: var(--s-4); }
}
.post-card__media {
  aspect-ratio: 4 / 3;
  background: var(--c-bone-deep);
  overflow: hidden;
  position: relative;
}
.post-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(10,10,10,0.15) 100%);
  pointer-events: none;
  z-index: 1;
}
.post-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
  transition: transform .4s ease;
}
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__kicker {
  font-family: var(--f-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-trail);
  margin-bottom: 0.6rem;
  font-weight: 400;
}
.post-card h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--c-ink);
}
.post-card h2 a {
  text-decoration: none;
  color: var(--c-ink);
  transition: color .15s ease;
}
.post-card:hover h2 a { color: var(--c-trail); }
.post-card__excerpt {
  margin-top: var(--s-2);
  color: var(--c-ink-soft);
  max-width: 62ch;
  line-height: 1.55;
}
.post-card__meta {
  margin-top: var(--s-3);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-stone);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  font-weight: 600;
}

.posts-sidebar {
  font-size: var(--t-sm);
}
.posts-sidebar h3 {
  font-family: var(--f-display);
  font-size: 1.125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink);
  border-bottom: 3px solid var(--c-trail);
  padding-bottom: 0.5rem;
  margin-bottom: var(--s-3);
  font-weight: 400;
}
.posts-sidebar ul { list-style: none; padding: 0; margin: 0 0 var(--s-5); display: flex; flex-direction: column; gap: 0.4rem; }
.posts-sidebar a {
  text-decoration: none;
  color: var(--c-ink);
  font-weight: 500;
  padding: 0.25rem 0;
  display: block;
  border-bottom: 1px solid transparent;
}
.posts-sidebar a:hover { color: var(--c-trail); border-bottom-color: var(--c-trail); }

.pagination {
  max-width: var(--container);
  margin: var(--s-5) auto 0;
  padding: 0 var(--gutter) var(--s-7);
  display: flex;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--f-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pagination .page-numbers {
  padding: 0.7rem 1.1rem;
  border: 2px solid var(--c-ink);
  text-decoration: none;
  color: var(--c-ink);
  font-weight: 400;
  transition: all .15s ease;
}
.pagination .page-numbers:hover { background: var(--c-ink); color: var(--c-bone); }
.pagination .current {
  background: var(--c-trail);
  color: var(--c-bone);
  border-color: var(--c-trail);
}

/* =========================================================================
   10. FOOTER
   ========================================================================= */
.site-footer {
  border-top: 8px solid var(--c-trail);
  background: var(--c-ink);
  color: var(--c-bone);
  margin-top: var(--s-8);
}
.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-6) var(--gutter) var(--s-5);
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .site-footer__inner { grid-template-columns: 1.5fr 1fr 1fr; }
}
.site-footer h4 {
  font-family: var(--f-display);
  font-size: 1.125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-trail);
  margin-bottom: var(--s-2);
  font-weight: 400;
}
.site-footer a { color: var(--c-bone); text-decoration: none; transition: color .15s ease; }
.site-footer a:hover { color: var(--c-trail); }
.site-footer__brand {
  font-family: var(--f-display);
  font-style: normal;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--c-bone);
}
.site-footer__sub {
  font-size: var(--t-sm);
  color: var(--c-stone-light);
  max-width: 38ch;
  margin-top: var(--s-2);
  line-height: 1.55;
}
.site-footer__bottom {
  border-top: 1px solid var(--c-ink-soft);
  padding: var(--s-3) var(--gutter);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-stone-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-weight: 500;
}

/* =========================================================================
   11. RELATED / 404
   ========================================================================= */
.related {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--s-7);
}
.related h3 {
  font-family: var(--f-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink);
  border-bottom: 3px solid var(--c-trail);
  padding-bottom: 0.5rem;
  margin-bottom: var(--s-4);
  font-weight: 400;
}
.related__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 720px) { .related__grid { grid-template-columns: repeat(3, 1fr); } }
.related__card a {
  display: block;
  text-decoration: none;
  font-family: var(--f-display);
  font-size: 1.5rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--c-ink);
  font-weight: 400;
}
.related__card a:hover { color: var(--c-trail); }
.related__card .meta {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-trail);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.related__card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: var(--s-2);
  background: var(--c-bone-deep);
}
.related__card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
  transition: transform .4s ease;
}
.related__card:hover img { transform: scale(1.04); }

.error-404 {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: var(--s-7) var(--gutter);
}
.error-404 h1 {
  font-family: var(--f-display);
  font-size: var(--t-4xl);
  line-height: 0.95;
  font-weight: 400;
  text-transform: uppercase;
}
.error-404 h1 em { font-style: normal; color: var(--c-trail); }
.error-404 p {
  margin-top: var(--s-3);
  font-family: var(--f-body);
  font-style: normal;
  font-size: var(--t-md);
  color: var(--c-ink-soft);
}

.search-form {
  display: flex;
  gap: 0;
  border: 2px solid var(--c-ink);
  max-width: 360px;
}
.search-form input[type="search"] {
  flex: 1;
  background: var(--c-paper);
  border: 0;
  padding: 0.7rem 1rem;
  font: inherit;
  font-family: var(--f-body);
  color: var(--c-ink);
  outline: 0;
}
.search-form button {
  font-family: var(--f-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-bone);
  background: var(--c-ink);
  padding: 0 1rem;
  font-weight: 400;
}
.search-form button:hover { background: var(--c-trail); }

/* =========================================================================
   12. RAB AUTHOR BOX — override
   ========================================================================= */
.rab-author-box {
  --rab-accent: var(--c-trail);
  background: var(--c-bone) !important;
  border: 2px solid var(--c-ink) !important;
  border-left: 8px solid var(--c-trail) !important;
  border-radius: 0 !important;
  margin-block: var(--s-5) !important;
  font-family: var(--f-body) !important;
}
.rab-author-box .rab-name {
  font-family: var(--f-display) !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}
.rab-author-box .rab-speciality,
.rab-author-box .rab-credentials {
  font-family: var(--f-mono) !important;
  letter-spacing: 0.04em !important;
  font-weight: 600 !important;
}

/* =========================================================================
   13. PRINT
   ========================================================================= */
@media print {
  .site-header, .site-footer, .toc, .related,
  .rab-author-box .rab-social { display: none !important; }
  body { background: white; color: black; font-size: 11pt; }
  .prose { max-width: 100%; }
  a { color: black; text-decoration: none; }
  .article-title { font-size: 28pt; }
}

/* =========================================================================
   14. REDUCED MOTION
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================================
   15. ENTRY ANIMATIONS
   ========================================================================= */
@keyframes af-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.article-kicker, .article-title, .article-lede, .article-meta {
  animation: af-rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.article-title    { animation-delay: .05s; }
.article-lede     { animation-delay: .12s; }
.article-meta     { animation-delay: .2s; }
