/* =================================================================
   oharra.org — design v3 (enriched ornaments)
   IA: 3-column wireframe (left sidebar / center / right sidebar)
   Mood: римско-египетские мистерии · храм при свечах · манускрипт
   Type: Cormorant Garamond (display) + Spectral (body) + Inter (meta)
   ================================================================= */

:root {
  /* Day — пергамент, утренний свет */
  --bg:           #F5EDD8;
  --surface:      #EBDFC2;
  --surface-2:    #F0E4C5;
  --text:         #2A1F12;
  --text-muted:   #5A4A35;
  --text-soft:    #3F3220;
  --accent-gold:  #B8860B;
  --accent-warm:  #9E5A3A;
  --divider:      #D4C5A0;
  --divider-soft: #E0D4B0;

  --serif-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --serif-body:    'Spectral', 'EB Garamond', Georgia, serif;
  --sans-meta:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 2px;
  --radius:    4px;
}

[data-theme="night"] {
  --bg:           #0F0A05;
  --surface:      #1A140A;
  --surface-2:    #211B10;
  --text:         #F2E5C7;
  --text-muted:   #C9B87A;
  --text-soft:    #DDC98A;
  --accent-gold:  #D4A537;
  --accent-warm:  #B86F47;
  --divider:      #3A2F1C;
  --divider-soft: #2A2415;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.6s ease, color 0.6s ease;
}

a { color: var(--accent-gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-warm); }

img { max-width: 100%; display: block; }

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

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--accent-gold);
  color: var(--bg);
  padding: 8px 14px;
  font-family: var(--sans-meta);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 200;
}
.skip-link:focus { top: 8px; }

/* Subtle papyrus glow + faint meander texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(184, 134, 11, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 82% 78%, rgba(158, 90, 58, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 110%, rgba(184, 134, 11, 0.025) 0%, transparent 60%);
}
[data-theme="night"] body::before {
  background-image:
    radial-gradient(circle at 18% 22%, rgba(212, 165, 55, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 82% 78%, rgba(184, 111, 71, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% -10%, rgba(212, 165, 55, 0.04) 0%, transparent 60%);
}

main, header, footer, .layout { position: relative; z-index: 1; }

/* ═════════ HEADER ═════════════════════════════════════════════ */
.site-header {
  border-bottom: 1px solid var(--divider);
  padding: 18px 0 16px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
/* Roman-Egyptian meander hairline below header */
.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background-image:
    linear-gradient(to right, transparent 0, transparent 50%, var(--accent-gold) 50%, var(--accent-gold) calc(50% + 1px), transparent calc(50% + 1px));
  background-size: 24px 2px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.35;
  pointer-events: none;
}
.site-header__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 20px;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand__mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-size: 24px;
  font-weight: 500;
  font-style: italic;
  color: var(--accent-gold);
  position: relative;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(184, 134, 11, 0.08), transparent 70%);
}
.brand__mark::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  opacity: 0.4;
}
.brand__mark::after {
  /* tiny crosshair / sun-disc inside the "O" */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), var(--accent-gold) calc(50% - 0.5px), var(--accent-gold) calc(50% + 0.5px), transparent calc(50% + 0.5px)) no-repeat,
    linear-gradient(to bottom, transparent calc(50% - 0.5px), var(--accent-gold) calc(50% - 0.5px), var(--accent-gold) calc(50% + 0.5px), transparent calc(50% + 0.5px)) no-repeat;
  background-size: 100% 1px, 1px 100%;
  background-position: center;
  opacity: 0.18;
  pointer-events: none;
}

/* User-uploaded logo: it IS the wordmark — drop circle + sibling text.
   Stack vertically: logo on top, tagline below (caption-style). */
.brand--has-logo {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.brand__mark--logo {
  width: auto;
  height: auto;
  max-width: 100%;
  border: none;
  background: transparent;
  border-radius: 0;
  font-size: 0;
  overflow: visible;
  display: block;
}
.brand__mark--logo::before,
.brand__mark--logo::after { display: none; }
.brand__mark--logo img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.brand--has-logo .brand__tagline {
  font-family: var(--sans-meta);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-family: var(--serif-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--text);
  line-height: 1;
}
.brand__name em { font-style: italic; color: var(--accent-gold); }
.brand__tagline {
  font-family: var(--sans-meta);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 5px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 9px 16px;
  font-family: var(--serif-body);
  font-size: 14px;
  color: var(--text-muted);
  cursor: text;
  transition: border-color 0.2s;
  max-width: 460px;
  width: 100%;
}
.search-field:hover,
.search-field:focus-within { border-color: var(--accent-gold); }
.search-field__icon { color: var(--accent-gold); font-size: 14px; font-style: normal; }
.search-field__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font: inherit;
  font-style: italic;
}
.search-field__input::placeholder { color: var(--text-muted); font-style: italic; }
.search-field kbd {
  margin-left: auto;
  font-family: var(--sans-meta);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid var(--divider);
  border-radius: 3px;
  padding: 2px 6px;
  background: var(--bg);
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 6px;
  z-index: 60;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  display: none;
}
.search-results.is-open { display: block; }
.search-result {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}
.search-result:hover,
.search-result.is-active { background: rgba(184,134,11,0.10); }
.search-result__title {
  font-family: var(--serif-display);
  font-size: 16px;
  color: var(--text);
}
.search-result__meta {
  font-family: var(--sans-meta);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.search-results__empty {
  padding: 14px;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
}

.lang-pill {
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 100px;
  font-family: var(--sans-meta);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lang-pill__chev {
  font-size: 8px;
  color: var(--accent-gold);
  margin-top: 1px;
}
.lang-pill:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

/* Lang switcher dropdown (header) — details/summary, no JS */
.lang-switcher {
  position: relative;
  display: inline-block;
}
.lang-switcher > summary.lang-pill {
  list-style: none;
  user-select: none;
}
.lang-switcher > summary.lang-pill::-webkit-details-marker { display: none; }
.lang-switcher[open] > summary .lang-pill__chev { transform: rotate(180deg); }
.lang-popup {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 96px;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 6px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.lang-popup a {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  border-radius: 8px;
  transition: background 0.15s;
}
.lang-popup a:hover { background: rgba(184,134,11,0.10); color: var(--accent-gold); }
.lang-popup a[aria-current="true"] { color: var(--accent-gold); }

.cta-subscribe {
  font-family: var(--serif-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.03em;
  background: var(--accent-gold);
  color: var(--bg);
  padding: 10px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-gold);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
}
.cta-subscribe::before { content: '✦'; font-size: 13px; }
.cta-subscribe:hover {
  background: transparent;
  color: var(--accent-gold);
  box-shadow: 0 0 0 1px var(--accent-gold) inset;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s, transform 0.4s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent-gold); color: var(--accent-gold); transform: rotate(20deg); }

/* ═════════ 3-COLUMN LAYOUT ════════════════════════════════════ */
.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 36px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  font-family: var(--serif-body);
  font-size: 15px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--divider) transparent;
  padding-right: 4px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--divider); border-radius: 2px; }

/* ═════════ LEFT SIDEBAR ═══════════════════════════════════════ */
.sidebar-section { margin-bottom: 28px; }
.sidebar-heading {
  font-family: var(--serif-display);
  font-variant: small-caps;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-heading::before {
  content: '';
  width: 6px;
  height: 6px;
  border: 1px solid var(--accent-gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  opacity: 0.7;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-list li { margin: 0; }
.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--text);
  font-family: var(--serif-display);
  font-size: 17px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
  border-left: 2px solid transparent;
}
.sidebar-list a:hover {
  background: var(--surface);
  color: var(--accent-gold);
  padding-left: 12px;
}
.sidebar-list a.is-active {
  background: var(--surface);
  color: var(--accent-gold);
  border-left: 2px solid var(--accent-gold);
  padding-left: 10px;
  font-style: italic;
}
.sidebar-list .icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  opacity: 0.85;
  color: var(--accent-gold);
}
.sidebar-list .pill-soon {
  margin-left: auto;
  font-family: var(--sans-meta);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid var(--divider);
}

/* Author plate (small decorative card under nav) */
.author-plate {
  margin-top: 18px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-top: 2px solid var(--accent-gold);
  border-radius: var(--radius);
  position: relative;
}
.author-plate::before, .author-plate::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent-gold);
  top: -2px;
}
.author-plate::before { left: -2px; border-right: 0; border-bottom: 0; }
.author-plate::after { right: -2px; border-left: 0; border-bottom: 0; }
.author-plate__row { display: flex; align-items: center; gap: 10px; }
.author-plate__seal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-style: italic;
  color: var(--accent-gold);
  font-size: 18px;
  flex-shrink: 0;
  background: var(--surface-2);
}
.author-plate__name {
  font-family: var(--serif-display);
  font-size: 15px;
  color: var(--text);
  line-height: 1.15;
}
.author-plate__role {
  font-family: var(--sans-meta);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}
.author-plate__quote {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.45;
  padding-top: 10px;
  border-top: 1px dashed var(--divider);
}

/* ═════════ RIGHT SIDEBAR — Свежее + Рубрики ═══════════════════ */
.fresh-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fresh-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background 0.2s, padding-left 0.2s;
  cursor: pointer;
  position: relative;
  border-left: 1px solid transparent;
}
.fresh-item:hover {
  background: var(--surface);
  border-left-color: var(--accent-gold);
  padding-left: 14px;
}
.fresh-item__num {
  position: absolute;
  right: 10px;
  top: 10px;
  font-family: var(--serif-display);
  font-size: 11px;
  font-style: italic;
  color: var(--accent-gold);
  opacity: 0.65;
  letter-spacing: 0.05em;
}
.fresh-item__meta {
  font-family: var(--sans-meta);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.fresh-item__meta .dot {
  width: 3px;
  height: 3px;
  background: var(--accent-gold);
  border-radius: 50%;
}
.fresh-item__title {
  font-family: var(--serif-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}

.rubric-group {
  font-family: var(--serif-display);
  font-variant: small-caps;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--accent-gold);
  margin: 18px 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--divider);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rubric-group::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent-gold);
  transform: rotate(45deg);
  opacity: 0.75;
}
.rubric-group:first-of-type { margin-top: 0; }
.rubric-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-family: var(--serif-body);
  font-size: 14px;
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.rubric-cat:hover { background: var(--surface); color: var(--accent-gold); }
.rubric-cat.is-active {
  background: var(--surface);
  color: var(--accent-gold);
  font-style: italic;
}
.rubric-cat .icon {
  font-size: 11px;
  width: 14px;
  text-align: center;
  opacity: 0.7;
  color: var(--accent-gold);
}
.rubric-cat .count {
  margin-left: auto;
  font-family: var(--sans-meta);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ═════════ CENTER MAIN ════════════════════════════════════════ */
.main { min-width: 0; }

/* ═════════ HOME HERO ══════════════════════════════════════════ */
.home-hero {
  text-align: center;
  padding: 24px 0 40px;
  margin-bottom: 36px;
  position: relative;
}
.home-hero::before {
  /* meander hairline above */
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-gold) 30%, var(--accent-gold) 70%, transparent);
  opacity: 0.5;
}
.home-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--divider);
}
.home-hero__chamber {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.home-hero__chamber::before, .home-hero__chamber::after {
  content: '✦';
  font-size: 8px;
  opacity: 0.7;
}
.home-hero__eyebrow {
  font-family: var(--serif-display);
  font-variant: small-caps;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--accent-gold);
  margin-bottom: 14px;
}
.home-hero__title {
  font-family: var(--serif-display);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0 0 20px;
}
.home-hero__title em {
  font-style: italic;
  color: var(--accent-gold);
  position: relative;
}
.home-hero__intro {
  font-family: var(--serif-body);
  font-size: 18px;
  font-style: italic;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Sun-disc + horizon ornament */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px auto 0;
  color: var(--accent-gold);
  max-width: 280px;
}
.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, currentColor);
  opacity: 0.5;
}
.ornament::before { --dir: left; }
.ornament__svg { width: 26px; height: 26px; flex-shrink: 0; }

/* Hero stats strip below ornament */
.home-hero__stats {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.home-hero__stat {
  text-align: center;
  font-family: var(--serif-display);
}
.home-hero__stat-num {
  font-size: 26px;
  font-style: italic;
  color: var(--accent-gold);
  line-height: 1;
}
.home-hero__stat-label {
  font-family: var(--sans-meta);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ═════════ SECTION HEAD ═══════════════════════════════════════ */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}
.section-head__title {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 500;
  font-style: italic;
  margin: 0;
  color: var(--text-soft);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-head__title::before {
  content: '❦';
  color: var(--accent-gold);
  font-size: 14px;
  font-style: normal;
}
.section-head__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--divider), transparent);
}
.section-head__count {
  font-family: var(--sans-meta);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═════════ FEED ═══════════════════════════════════════════════ */
.feed {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.feed__row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

/* Featured card (large) */
.card-featured { position: relative; }
.card-featured::before {
  /* numbered chamber roman numeral — top-left of featured */
  content: 'I';
  position: absolute;
  top: -14px;
  left: -14px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 18px;
  color: var(--accent-gold);
  z-index: 2;
  letter-spacing: 0.05em;
}
.card-featured .card__hero {
  border: 1px solid var(--accent-gold);
  padding: 6px;
  background: var(--surface);
  margin-bottom: 20px;
  position: relative;
  overflow: visible;
}
.card-featured .card__hero::before,
.card-featured .card__hero::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent-gold);
}
.card-featured .card__hero::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.card-featured .card__hero::after  { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }
/* Extra opposite corner ticks */
.card-featured .card__hero > .corner-tr,
.card-featured .card__hero > .corner-bl {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--accent-gold);
  opacity: 0.6;
}
.card-featured .card__hero > .corner-tr { top: -3px; right: -3px; border-left: 0; border-bottom: 0; }
.card-featured .card__hero > .corner-bl { bottom: -3px; left: -3px; border-right: 0; border-top: 0; }

.card-featured .card__hero img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  filter: sepia(0.4) saturate(0.85) hue-rotate(-8deg) brightness(0.95);
}
[data-theme="night"] .card-featured .card__hero img {
  filter: sepia(0.5) saturate(0.7) hue-rotate(-15deg) brightness(0.6);
}
.card-featured .card__title { font-size: 32px; line-height: 1.16; }
.card-featured .card__excerpt { font-size: 16.5px; }

/* Card (general) */
.card { display: flex; flex-direction: column; position: relative; }
.card__hero {
  border: 1px solid var(--divider);
  padding: 5px;
  background: var(--surface);
  margin-bottom: 14px;
  transition: border-color 0.3s;
  display: block;
  position: relative;
}
.card__hero::before, .card__hero::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent-gold);
  opacity: 0;
  transition: opacity 0.3s;
}
.card__hero::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.card__hero::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.card:hover .card__hero { border-color: var(--accent-gold); }
.card:hover .card__hero::before, .card:hover .card__hero::after { opacity: 1; }
.card__hero img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: sepia(0.4) saturate(0.85) hue-rotate(-8deg) brightness(0.95);
  transition: filter 0.5s;
}
[data-theme="night"] .card__hero img {
  filter: sepia(0.5) saturate(0.7) hue-rotate(-15deg) brightness(0.6);
}
.card:hover .card__hero img { filter: sepia(0.3) saturate(0.95) hue-rotate(-8deg) brightness(1); }
[data-theme="night"] .card:hover .card__hero img { filter: sepia(0.4) saturate(0.85) hue-rotate(-15deg) brightness(0.7); }

.card__meta {
  font-family: var(--sans-meta);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.card__meta .dot {
  width: 3px;
  height: 3px;
  background: var(--accent-gold);
  border-radius: 50%;
}
.pill-cat,
.card__meta .pill-cat {
  font-family: var(--serif-display);
  font-variant: small-caps;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  text-transform: none;
}
.card__title {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.22;
  margin: 0 0 10px;
  color: var(--text);
}
.card__title a { color: inherit; }
.card__title a:hover { color: var(--accent-gold); }
.card__excerpt {
  font-family: var(--serif-body);
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}
.card__readmore {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card__readmore::after { content: '→'; transition: transform 0.2s; }
.card:hover .card__readmore::after { transform: translateX(3px); }

/* ═════════ CATEGORY HERO ══════════════════════════════════════ */
.breadcrumb {
  font-family: var(--sans-meta);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-gold); }
.breadcrumb .sep { color: var(--accent-gold); font-size: 12px; font-style: italic; }
.breadcrumb .current { color: var(--text); }

.cat-hero {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-left: 3px solid var(--accent-gold);
  padding: 32px 36px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.cat-hero::before {
  /* faint sun-disc watermark on right */
  content: '';
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  height: 200px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}
.cat-hero::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: 100px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  opacity: 0.12;
  pointer-events: none;
}
.cat-hero__inner { position: relative; z-index: 1; }
.cat-hero__eyebrow {
  font-family: var(--serif-display);
  font-variant: small-caps;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--accent-gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-hero__eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-gold);
  opacity: 0.6;
}
.cat-hero__title {
  font-family: var(--serif-display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 16px;
}
.cat-hero__title .icon {
  color: var(--accent-gold);
  font-size: 0.7em;
  width: 1.2em;
  height: 1.2em;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}
.cat-hero__intro {
  font-family: var(--serif-body);
  font-size: 16.5px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 640px;
}
.cat-hero__stats {
  font-family: var(--sans-meta);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding-top: 18px;
  border-top: 1px dashed var(--divider);
}
.cat-hero__stats strong {
  color: var(--accent-gold);
  font-weight: 500;
  font-family: var(--serif-display);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
}
.cat-hero__stats .dot { width: 3px; height: 3px; background: var(--accent-gold); border-radius: 50%; }

/* Chips filter */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--divider);
}
.chip {
  font-family: var(--serif-display);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border: 1px solid var(--divider);
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.chip.is-active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg);
}
.chip .count {
  font-family: var(--sans-meta);
  font-size: 11px;
  letter-spacing: 0.05em;
  opacity: 0.75;
}

.show-more-wrap {
  text-align: center;
  margin-top: 36px;
  padding-top: 32px;
  position: relative;
}
.show-more-wrap::before {
  content: '· · ·';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent-gold);
  letter-spacing: 0.4em;
  font-size: 14px;
}
.btn-outline {
  font-family: var(--serif-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 12px 32px;
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--accent-gold); color: var(--bg); }

/* ═════════ POST PAGE ══════════════════════════════════════════ */
.post-header {
  padding-top: 8px;
  margin-bottom: 28px;
}
.post-header__meta {
  font-family: var(--sans-meta);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.post-header__meta .dot {
  width: 3px;
  height: 3px;
  background: var(--accent-gold);
  border-radius: 50%;
}
.post-header__meta .pill-cat {
  font-family: var(--serif-display);
  font-variant: small-caps;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--accent-gold);
  text-transform: none;
}
.post-header__title {
  font-family: var(--serif-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin: 0 0 24px;
  color: var(--text);
  text-wrap: pretty;
}
.post-header__title em { font-style: italic; color: var(--accent-gold); }
.post-header__lede {
  font-family: var(--serif-body);
  font-size: 19px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 640px;
  margin: 0;
  text-wrap: pretty;
}
.post-header__under {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--divider);
  font-family: var(--sans-meta);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.post-header__under .author-seal {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--accent-gold);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 14px;
  color: var(--accent-gold);
}

.post-hero {
  margin: 0 0 36px;
}
.post-hero__frame {
  border: 1px solid var(--accent-gold);
  padding: 8px;
  background: var(--surface);
  position: relative;
}
.post-hero__frame::before,
.post-hero__frame::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--accent-gold);
}
.post-hero__frame::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.post-hero__frame::after  { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.post-hero__frame > .corner-tr,
.post-hero__frame > .corner-bl {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--accent-gold);
  opacity: 0.7;
}
.post-hero__frame > .corner-tr { top: -4px; right: -4px; border-left: 0; border-bottom: 0; }
.post-hero__frame > .corner-bl { bottom: -4px; left: -4px; border-right: 0; border-top: 0; }

.post-hero img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  filter: sepia(0.4) saturate(0.85) hue-rotate(-8deg) brightness(0.95);
}
[data-theme="night"] .post-hero img {
  filter: sepia(0.5) saturate(0.7) hue-rotate(-15deg) brightness(0.6);
}
.post-hero__caption {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 14px;
  text-align: center;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.post-hero__caption::before, .post-hero__caption::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-gold);
  opacity: 0.5;
}

.post-body {
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
}
.post-body p { margin: 0 0 22px; text-wrap: pretty; }

/* Illuminated drop cap */
.post-body > p:first-of-type::first-letter {
  font-family: var(--serif-display);
  font-size: 5.4em;
  line-height: 0.85;
  float: left;
  margin: 8px 14px 0 -2px;
  color: var(--accent-gold);
  font-weight: 500;
  font-style: italic;
  padding: 4px 10px 0 4px;
  background:
    radial-gradient(circle at 30% 30%, rgba(184, 134, 11, 0.08), transparent 70%);
  border-left: 1px solid var(--accent-gold);
  border-top: 1px solid var(--accent-gold);
  position: relative;
}
[data-theme="night"] .post-body > p:first-of-type::first-letter {
  background: radial-gradient(circle at 30% 30%, rgba(212, 165, 55, 0.12), transparent 70%);
}

.post-body h2 {
  font-family: var(--serif-display);
  font-size: 30px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.2;
  margin: 48px 0 22px;
  color: var(--text);
  text-align: center;
}
.post-body h2::before, .post-body h2::after {
  content: '·';
  margin: 0 14px;
  color: var(--accent-gold);
  font-style: normal;
}
.post-body h3 {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 500;
  margin: 32px 0 14px;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.post-body h3::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--accent-gold);
  flex-shrink: 0;
}
.post-body blockquote {
  border-left: 2px solid var(--accent-gold);
  margin: 32px 0;
  padding: 8px 0 8px 28px;
  font-style: italic;
  color: var(--text-soft);
  font-size: 20px;
  line-height: 1.55;
  font-family: var(--serif-display);
  position: relative;
}
.post-body blockquote::before { content: none; }
.post-body blockquote p { margin: 0; }
.post-body ul, .post-body ol { padding-left: 24px; margin: 0 0 22px; }
.post-body li { margin: 0 0 8px; }
.post-body ul li::marker { color: var(--accent-gold); }
.post-body strong { color: var(--text); font-weight: 500; }
.post-body em { font-style: italic; }

/* Notes: small posts without a forced title.
   Empty h1/lede are hidden so the body becomes the visible content directly. */
.post-header__title:empty,
.post-header__lede:empty {
  display: none;
  margin: 0;
  padding: 0;
}
/* Slightly larger body type for notes — body IS the headline content. */
article[data-fabrika-role="post"] .post-header:has(.post-header__title:empty) + .post-hero + .post-body,
article[data-fabrika-role="post"] .post-header:has(.post-header__title:empty) + .post-body {
  font-size: 1.05em;
  line-height: 1.7;
}

/* Author byline at end of post (after body, before CTA) */
.post-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 0;
  padding: 18px 22px;
  background: var(--surface);
  border-left: 2px solid var(--accent-gold);
  border-radius: 6px;
}
.post-byline__seal {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-size: 22px;
  color: var(--accent-gold);
  text-transform: lowercase;
}
.post-byline__name {
  font-family: var(--serif-display);
  font-size: 16px;
  color: var(--text);
}

/* Subscribe CTA after post */
.post-cta {
  margin: 56px 0 32px;
  background: var(--surface);
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  position: relative;
}
.post-cta::before, .post-cta::after {
  content: '✦';
  position: absolute;
  top: -10px;
  font-size: 14px;
  color: var(--accent-gold);
  background: var(--bg);
  padding: 0 8px;
  line-height: 1;
}
.post-cta::before { left: 24px; }
.post-cta::after { right: 24px; }
.post-cta__title {
  font-family: var(--serif-display);
  font-size: 26px;
  font-weight: 500;
  font-style: italic;
  margin: 0 0 12px;
  color: var(--text);
}
.post-cta__intro {
  font-family: var(--serif-body);
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 auto 22px;
  max-width: 540px;
}

.post-end-ornament {
  margin: 40px auto;
  text-align: center;
  color: var(--accent-gold);
  font-family: var(--serif-display);
  font-size: 22px;
  letter-spacing: 0.5em;
}

.related-block { margin-top: 52px; }

/* ═════════ FOOTER ═════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--divider);
  margin-top: 64px;
  padding: 48px 32px 36px;
  text-align: center;
  position: relative;
}
.site-footer::before {
  /* meander cap above footer */
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 9px;
  background-image:
    linear-gradient(to right, var(--accent-gold) 0, var(--accent-gold) 1px, transparent 1px, transparent 12px, var(--accent-gold) 12px, var(--accent-gold) 13px, transparent 13px);
  background-size: 13px 9px;
  background-repeat: repeat-x;
  opacity: 0.5;
  background: var(--bg);
  border-top: 1px solid var(--accent-gold);
  border-bottom: 1px solid var(--accent-gold);
  height: 9px;
}
.site-footer__seal {
  width: 60px;
  height: 60px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 28px;
  color: var(--accent-gold);
  background: var(--surface);
  position: relative;
}
.site-footer__seal::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  opacity: 0.4;
}
.site-footer__socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.site-footer__socials a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--divider);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.site-footer__socials a:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-2px);
}
.site-footer__motto {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 18px;
  color: var(--text-soft);
  margin: 0 0 22px;
  line-height: 1.45;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.site-footer__motto::before, .site-footer__motto::after {
  content: '·';
  margin: 0 12px;
  color: var(--accent-gold);
  font-style: normal;
}
.site-footer__copyright {
  font-family: var(--sans-meta);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 18px;
  border-top: 1px dashed var(--divider);
  max-width: 480px;
  margin: 0 auto;
}

/* ═════════ SUBSCRIBE MODAL ════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 5, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  backdrop-filter: blur(2px);
}
[data-theme="day"] .modal { background: rgba(42, 31, 18, 0.55); }
.modal:target { display: flex; }

/* Click-outside-to-close: invisible anchor covering the whole overlay,
   sits behind the card. Card has higher z-index so its clicks win. */
.modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: pointer;
}
.modal__card { position: relative; z-index: 1; }

.modal__card {
  background: var(--bg);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius);
  padding: 40px 36px 32px;
  max-width: 560px;
  width: 100%;
  position: relative;
  text-align: center;
}
.modal__card::before, .modal__card::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--accent-gold);
}
.modal__card::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.modal__card::after { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.modal__chamber {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.modal__chamber::before, .modal__chamber::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-gold);
  opacity: 0.5;
}
.modal__title {
  font-family: var(--serif-display);
  font-size: 30px;
  font-weight: 400;
  font-style: italic;
  margin: 0 0 10px;
  color: var(--text);
}
.modal__intro {
  font-family: var(--serif-body);
  font-size: 15.5px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 26px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.modal__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.modal__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  text-align: left;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.modal__option:hover {
  border-color: var(--accent-gold);
  background: var(--surface);
  transform: translateY(-1px);
}
.modal__option-icon {
  font-size: 18px;
  color: var(--accent-gold);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--divider);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}
.modal__option-text {
  display: flex;
  flex-direction: column;
  font-family: var(--serif-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}
.modal__option-text small {
  font-family: var(--sans-meta);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
}
.modal__close {
  font-family: var(--sans-meta);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding-top: 16px;
  border-top: 1px dashed var(--divider);
  display: inline-block;
  width: 100%;
}
.modal__close:hover { color: var(--accent-gold); }

/* ═════════ MOBILE ═════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 200px 1fr; gap: 28px; }
  .sidebar.is-right { display: none; }
}

/* ── Cross-channel widgets (inline in main column) ─────────────────── */
.cross-channel {
  margin: 56px 0 32px;
  padding-top: 8px;
}
.cross-channel .section-head {
  margin-bottom: 22px;
}
.cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

/* Per-channel accent colours (kept in our warm-earthy palette) */
.cc-card--telegram   { --cc-accent: #4a8aa8; --cc-accent-night: #6ba4c2; }
.cc-card--vk         { --cc-accent: #5a7896; --cc-accent-night: #7691b0; }
.cc-card--vk_video   { --cc-accent: #5a7896; --cc-accent-night: #7691b0; }
.cc-card--youtube    { --cc-accent: #b54a3a; --cc-accent-night: #cc6453; }
.cc-card--rutube     { --cc-accent: #8a3a3a; --cc-accent-night: #a85454; }
.cc-card--yandex_zen { --cc-accent: #c47a32; --cc-accent-night: #d99445; }
.cc-card--facebook   { --cc-accent: #4a6a96; --cc-accent-night: #6a87b0; }
.cc-card--instagram  { --cc-accent: #c47b6e; --cc-accent-night: #d99a8c; }
.cc-card--tiktok     { --cc-accent: #6e5a8a; --cc-accent-night: #897ba8; }
.cc-card--email      { --cc-accent: var(--accent-gold); --cc-accent-night: var(--accent-gold); }
.cc-card--rss        { --cc-accent: #c47a32; --cc-accent-night: #d99445; }
[data-theme="night"] .cc-card { --cc-accent: var(--cc-accent-night); }

.cc-card {
  --cc-accent: var(--accent-gold);
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-left: 3px solid var(--cc-accent);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  position: relative;
}
.cc-card:hover {
  border-color: var(--cc-accent);
  background: var(--surface-2);
  transform: translateY(-1px);
  color: var(--text);
}
.cc-card__thumb {
  position: relative;
  flex: 0 0 80px;
  height: 80px;
  border: 1px solid var(--divider);
  background: var(--bg);
}
/* Crop the image to the thumb box but keep the .cc-card__brand badge
   (which sits at bottom:-2px right:-2px) visible — overflow:hidden on
   the thumb would clip the badge's outer ring. */
.cc-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.4) saturate(0.85) hue-rotate(-8deg) brightness(0.95);
}
[data-theme="night"] .cc-card__thumb img {
  filter: sepia(0.5) saturate(0.7) hue-rotate(-15deg) brightness(0.6);
}
.cc-card__thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--cc-accent);
  font-family: var(--serif-display);
  font-size: 28px;
  opacity: 0.5;
}

/* YouTube big play button overlay on the thumb */
.cc-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(181, 74, 58, 0.35) 100%);
  pointer-events: none;
}

.cc-card__brand {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  background: var(--cc-accent);
  border: 1px solid var(--bg);
  box-shadow: 0 0 0 1px var(--cc-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
  line-height: 1;
}
[data-theme="day"] .cc-card--email .cc-card__brand,
[data-theme="day"] .cc-card--rss .cc-card__brand { color: var(--bg); }

.cc-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 4px;
}
.cc-card__channel-label {
  font-family: var(--sans-meta);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cc-accent);
  margin-bottom: 2px;
}
.cc-card__title {
  font-family: var(--serif-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.22;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-card__excerpt {
  font-family: var(--serif-body);
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-card__cta {
  font-family: var(--sans-meta);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cc-accent);
  margin-top: auto;
}

@media (max-width: 800px) {
  .cross-channel { margin: 40px 0 24px; }
  .cc-grid { grid-template-columns: 1fr; gap: 14px; }
  .cc-card { padding: 10px; }
  .cc-card__thumb { flex: 0 0 68px; height: 68px; }
  .cc-card__title { font-size: 16px; }
}

/* ── Burger + mobile drawer (no JS, CSS :target) ───────────────────── */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.burger:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

.mobile-drawer { display: none; }
.mobile-drawer:target {
  display: block;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  overflow-y: auto;
  padding: 70px 20px 32px;
  -webkit-overflow-scrolling: touch;
}
.mobile-drawer__close {
  position: fixed;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--accent-gold);
  background: var(--bg);
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  text-decoration: none;
  z-index: 1;
}
.mobile-drawer__inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.drawer-search {
  max-width: 100%;
  margin-bottom: 4px;
}
.drawer-search .search-field__input { font-size: 16px; }  /* prevent iOS zoom */
.drawer-lang-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--divider);
}
.drawer-lang-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s;
}
.drawer-lang-pill.is-active,
.drawer-lang-pill:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.drawer-subscribe {
  display: block;
  text-align: center;
  padding: 14px 18px;
  border: 1px solid var(--accent-gold);
  border-radius: 999px;
  color: var(--accent-gold);
  text-decoration: none;
  font-family: var(--serif-display);
  font-size: 17px;
  letter-spacing: 0.04em;
  background: rgba(184, 134, 11, 0.04);
  transition: background 0.18s;
}
.drawer-subscribe:hover { background: rgba(184, 134, 11, 0.10); }
.mobile-drawer .sidebar {
  position: static;
  max-height: none;
  padding: 0;
}
.mobile-drawer .sidebar::-webkit-scrollbar { display: none; }

/* Theme toggle removed: theme is auto-by-hour only. Hide if anything legacy renders it. */
.theme-toggle { display: none !important; }

@media (max-width: 1100px) {
  /* Desktop right sidebar already hidden — drawer covers it on mobile */
}

@media (max-width: 800px) {
  .site-header__inner { grid-template-columns: 1fr auto auto auto; gap: 10px; padding: 0 16px; }
  .lang-pill { padding: 7px 10px; font-size: 10px; }
  .cta-subscribe { padding: 9px 14px; font-size: 14px; }
  .cta-subscribe::before { display: none; }
  .burger { display: inline-flex; }
  /* Hide ONLY the header search on mobile — drawer search stays visible */
  .site-header .search-field { display: none; }
  .mobile-drawer .search-field { display: flex !important; }

  .layout { grid-template-columns: 1fr; padding: 20px 16px; gap: 24px; }
  /* Hide both sidebars on mobile — content goes through #menu drawer */
  .layout > .sidebar { display: none; }
  /* …but inside the drawer, sidebars MUST be visible (override the hide above) */
  .mobile-drawer .sidebar { display: block !important; }

  .home-hero { padding: 14px 0 30px; margin-bottom: 28px; }
  .home-hero__stats { gap: 24px; }
  .feed__row-2 { grid-template-columns: 1fr; gap: 28px; }
  .card-featured .card__title { font-size: 26px; }
  .card-featured::before { top: -10px; left: -10px; width: 36px; height: 36px; font-size: 15px; }
  .post-body { font-size: 16.5px; }
  .post-body > p:first-of-type::first-letter { font-size: 4.5em; }
  .modal__options { grid-template-columns: 1fr; }
  .cat-hero { padding: 24px 22px; }
  .brand__tagline { display: none; }
  .brand__name { font-size: 22px; }
  .brand__mark { width: 36px; height: 36px; font-size: 18px; }
  /* Mobile logo: shrink + cap width to fit narrow brand column without clipping */
  .brand--has-logo .brand__mark--logo img { height: 28px; max-width: 150px; }
  .brand--has-logo { gap: 2px; min-width: 0; }
  .site-header__inner { min-width: 0; }
  .site-header__inner > .brand { min-width: 0; overflow: hidden; }
  .post-cta { padding: 28px 22px; }
  .site-footer { padding: 40px 20px 28px; }

  /* Inside drawer: rubrics use full width comfortably */
  .mobile-drawer .rubric-cat { padding: 10px 12px; font-size: 15px; }
  .mobile-drawer .sidebar-list a { padding: 10px 12px; font-size: 17px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}
