/* ==========================================================================
   BLINDOGRAPHY — CENTRAL DESIGN SYSTEM
   ==========================================================================
   Single source of truth for design tokens (colors, spacing, radius,
   shadows, type, motion) and shared component styles (header, nav, footer,
   buttons, links, cards, forms, comments, pagination, tags, alerts,
   accessibility menu, skip link, focus states, tables, widgets, archive/
   single/error/auth pages).

   Theme switching integrates with the EXISTING Accessibility Menu system
   (accessibilityMenu.php): it toggles an `accessibility-theme-light` /
   `accessibility-theme-dark` class on <html> (only — never <body>, that was
   dead duplication), or leaves neither present when the saved preference is
   "system" and prefers-color-scheme should apply via the @media fallback
   below. This file does not invent a new switching mechanism — it only
   supplies the tokens those classes (and the media-query fallback) resolve
   to. A small inline bootstrap script in header.php's <head> (before any
   CSS paints) resolves and applies the same class from the same
   'blindographyAccessibility' storage on first load, to avoid a flash of
   the wrong theme while waiting for accessibilityMenu.php's script (loaded
   near the end of <body>) to run.

   Load order: this file must be enqueued FIRST (see
   inc/template-parts/header/asset-versioning.php) so every other
   stylesheet and inline <style> block in the theme can reference these
   custom properties.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS — LIGHT THEME (default)
   -------------------------------------------------------------------------- */
:root {
  /* Brand — twilight navy/purple identity. #0a1128 is the existing header
     color; kept exactly so the header/nav/footer/card-accents don't shift. */
  --color-brand-950: #05070f;
  --color-brand-900: #0a1128;
  --color-brand-800: #131b3a;
  --color-brand-700: #1d2750;
  --color-brand-600: #2c3868;
  --color-brand-500: #454f8a;
  --color-brand-contrast: #ffffff; /* text placed on brand-900/800 surfaces */

  /* Accent — the purple/indigo half of the twilight gradient, used for
     card accents, hover glows, badges, decorative gradients. */
  --color-accent-start: #667eea;
  --color-accent-end: #764ba2;
  --color-accent: #7266d1;

  /* Primary — interactive color for buttons, links, form focus.
     Same family as the brand navy so the whole site reads as one system. */
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-active: #372da6;
  --color-primary-contrast: #ffffff;

  /* Status colors */
  --color-success: #157a3d;
  --color-success-bg: #eafaf0;
  --color-success-border: #16a34a;
  --color-danger: #c81e1e;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #ef4444;
  --color-warning: #9a4a00;
  --color-warning-bg: #fff7ed;
  --color-warning-border: #f97316;
  --color-info: var(--color-primary);
  --color-info-bg: #eef1ff;
  --color-info-border: var(--color-primary);

  /* Surfaces & text */
  --surface-page: #f5f6fb;
  --surface-card: #ffffff;
  --surface-raised: #ffffff;
  --surface-sunken: #eef0f7;
  --surface-overlay: rgba(10, 17, 40, 0.55);

  --text-primary: #191f36;
  --text-secondary: #4b5170;
  --text-muted: #5a6180;
  --text-on-brand: #ffffff;
  --text-on-brand-muted: rgba(255, 255, 255, 0.75);

  /* Softened slightly from the original #e1e4ef so cards/panels read as a
     lighter, more elegant separation from --surface-page rather than a hard
     line, while staying clearly visible against the page background. */
  --border-color: #e9ebf4;
  --border-strong: #8a90b8;
  /* Neutral fill for disabled controls — deliberately NOT required to hit
     3:1 (WCAG 1.4.11 exempts inactive/disabled components), so it stays
     muted/gray rather than reusing --border-strong's brand-tinted value. */
  --surface-disabled: #d7dae6;

  /* Links */
  --color-link: var(--color-primary);
  --color-link-hover: var(--color-primary-hover);
  --color-link-visited: var(--color-accent-end);

  /* Focus ring — chosen at ~4.3:1 against BOTH white page surfaces and the
     brand-navy header/footer (which stay dark navy in light theme too), so
     one ring color clears WCAG 2.4.11's 3:1 non-text minimum everywhere. */
  --focus-ring-color: #5b70e0;
  --focus-ring-shadow: 0 0 0 4px rgba(91, 112, 224, 0.32);
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;

  /* Spacing scale (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(10, 17, 40, 0.07);
  --shadow-md: 0 4px 16px rgba(10, 17, 40, 0.10);
  --shadow-lg: 0 12px 32px rgba(10, 17, 40, 0.16);
  --shadow-brand: 0 8px 24px rgba(5, 7, 15, 0.35);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --leading-tight: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 220ms ease;
  --transition-slow: 400ms ease;

  /* Stacking */
  --z-header: 1000;
  --z-dropdown: 1000;
  --z-overlay: 9999;
  --z-modal: 10000;
  --z-toast: 10001;
}

/* --------------------------------------------------------------------------
   2. TOKENS — DARK THEME
   Two ways in: (a) system preference, before the Accessibility Menu JS has
   run or when the user selected "system"; (b) explicit class set by the
   Accessibility Menu ("Tema: Tamna"). Keep both blocks in sync.
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-brand-950: #030509;
    --color-brand-900: #0a1128;
    --color-brand-800: #0f1630;
    --color-brand-700: #161d42;
    --color-brand-500: #5762a6;

    --color-accent-start: #7c8ff0;
    --color-accent-end: #9c7fd0;
    --color-accent: #a996e0;

    --color-primary: #8b85f0;
    --color-primary-hover: #a5a0f5;
    --color-primary-active: #6f68e0;
    --color-primary-contrast: #0a0e1f;

    --color-success: #4ade80;
    --color-success-bg: #0f2a1c;
    --color-success-border: #22c55e;
    --color-danger: #f87171;
    --color-danger-bg: #341418;
    --color-danger-border: #ef4444;
    --color-warning: #fbbf24;
    --color-warning-bg: #332107;
    --color-warning-border: #f59e0b;
    --color-info: var(--color-primary);
    --color-info-bg: #1a1f3d;
    --color-info-border: var(--color-primary);

    --surface-page: #0a0e1f;
    --surface-card: #121834;
    --surface-raised: #182050;
    --surface-sunken: #080c1a;
    --surface-overlay: rgba(2, 4, 12, 0.7);

    --text-primary: #eef0fb;
    --text-secondary: #b9bfe0;
    --text-muted: #8790b8;
    --text-on-brand: #ffffff;
    --text-on-brand-muted: rgba(255, 255, 255, 0.75);

    /* Softened from #262e58 to match the lighter light-theme border — see
       :root's --border-color comment. */
    --border-color: #20284d;
    --border-strong: #6672ad;
    --surface-disabled: #2b3260;

    --color-link: var(--color-primary);
    --color-link-hover: var(--color-primary-hover);
    --color-link-visited: var(--color-accent-end);

    --focus-ring-color: #b7b2ff;
    --focus-ring-shadow: 0 0 0 4px rgba(139, 133, 240, 0.35);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.6);
    --shadow-brand: 0 10px 28px rgba(0, 0, 0, 0.6);
  }
}

html.accessibility-theme-dark {
  --color-brand-950: #030509;
  --color-brand-900: #0a1128;
  --color-brand-800: #0f1630;
  --color-brand-700: #161d42;
  --color-brand-500: #5762a6;

  --color-accent-start: #7c8ff0;
  --color-accent-end: #9c7fd0;
  --color-accent: #a996e0;

  --color-primary: #8b85f0;
  --color-primary-hover: #a5a0f5;
  --color-primary-active: #6f68e0;
  --color-primary-contrast: #0a0e1f;

  --color-success: #4ade80;
  --color-success-bg: #0f2a1c;
  --color-success-border: #22c55e;
  --color-danger: #f87171;
  --color-danger-bg: #341418;
  --color-danger-border: #ef4444;
  --color-warning: #fbbf24;
  --color-warning-bg: #332107;
  --color-warning-border: #f59e0b;
  --color-info: var(--color-primary);
  --color-info-bg: #1a1f3d;
  --color-info-border: var(--color-primary);

  --surface-page: #0a0e1f;
  --surface-card: #121834;
  --surface-raised: #182050;
  --surface-sunken: #080c1a;
  --surface-overlay: rgba(2, 4, 12, 0.7);

  --text-primary: #eef0fb;
  --text-secondary: #b9bfe0;
  --text-muted: #8790b8;
  --text-on-brand: #ffffff;
  --text-on-brand-muted: rgba(255, 255, 255, 0.75);

  --border-color: #20284d;
  --border-strong: #6672ad;
  --surface-disabled: #2b3260;

  --color-link: var(--color-primary);
  --color-link-hover: var(--color-primary-hover);
  --color-link-visited: var(--color-accent-end);

  --focus-ring-color: #b7b2ff;
  --focus-ring-shadow: 0 0 0 4px rgba(139, 133, 240, 0.35);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.6);
  --shadow-brand: 0 10px 28px rgba(0, 0, 0, 0.6);
}

/* Explicit light selection wins even when the OS prefers dark. */
html.accessibility-theme-light {
  --color-brand-950: #05070f;
  --color-brand-900: #0a1128;
  --color-brand-800: #131b3a;
  --color-brand-700: #1d2750;
  --color-brand-500: #454f8a;

  --color-accent-start: #667eea;
  --color-accent-end: #764ba2;
  --color-accent: #7266d1;

  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-active: #372da6;
  --color-primary-contrast: #ffffff;

  --color-success: #157a3d;
  --color-success-bg: #eafaf0;
  --color-success-border: #16a34a;
  --color-danger: #c81e1e;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #ef4444;
  --color-warning: #9a4a00;
  --color-warning-bg: #fff7ed;
  --color-warning-border: #f97316;
  --color-info: var(--color-primary);
  --color-info-bg: #eef1ff;
  --color-info-border: var(--color-primary);

  --surface-page: #f5f6fb;
  --surface-card: #ffffff;
  --surface-raised: #ffffff;
  --surface-sunken: #eef0f7;
  --surface-overlay: rgba(10, 17, 40, 0.55);

  --text-primary: #191f36;
  --text-secondary: #4b5170;
  --text-muted: #5a6180;
  --text-on-brand: #ffffff;
  --text-on-brand-muted: rgba(255, 255, 255, 0.75);

  --border-color: #e9ebf4;
  --border-strong: #8a90b8;
  --surface-disabled: #d7dae6;

  --color-link: var(--color-primary);
  --color-link-hover: var(--color-primary-hover);
  --color-link-visited: var(--color-accent-end);

  --focus-ring-color: #5b70e0;
  --focus-ring-shadow: 0 0 0 4px rgba(91, 112, 224, 0.32);

  --shadow-sm: 0 1px 2px rgba(10, 17, 40, 0.07);
  --shadow-md: 0 4px 16px rgba(10, 17, 40, 0.10);
  --shadow-lg: 0 12px 32px rgba(10, 17, 40, 0.16);
  --shadow-brand: 0 8px 24px rgba(5, 7, 15, 0.35);
}

/* --------------------------------------------------------------------------
   3. MOTION — respects prefers-reduced-motion site-wide (not only inside
   the accessibility widget). The Accessibility Menu's own "reduce motion"
   checkbox layers .accessibility-reduce-motion on top of this.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   4. BASE / RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--leading-normal);
  margin: 0;
  padding: 0 var(--space-4);
  background: var(--surface-page);
  color: var(--text-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-top: 0;
}
h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

p { color: var(--text-primary); }

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-5) 0;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:visited { color: var(--color-link-visited); }
a:hover { color: var(--color-link-hover); text-decoration: underline; }
a:active { color: var(--color-primary-active); }

header, nav, main, footer, aside, section {
  margin-bottom: var(--space-5);
}

nav { list-style-type: none; }
nav a { margin-right: var(--space-4); }

/* --------------------------------------------------------------------------
   5. FOCUS STYLES — very visible, consistent everywhere, keyboard-only
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.menu-card:focus-visible,
.avatar-toggle:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  box-shadow: var(--focus-ring-shadow);
  border-radius: var(--radius-sm);
}

/* Fallback for browsers without :focus-visible support */
@supports not selector(:focus-visible) {
  a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
    box-shadow: var(--focus-ring-shadow);
  }
}

/* --------------------------------------------------------------------------
   6. SCREEN-READER-ONLY UTILITY (single source; aliases both class names
   already used across the theme so no markup had to change)
   -------------------------------------------------------------------------- */
.screen-reader-text,
.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;
}
.screen-reader-text.focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* --------------------------------------------------------------------------
   7. SKIP LINK
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -3rem;
  left: var(--space-2);
  background: var(--color-brand-900);
  color: var(--text-on-brand);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  z-index: var(--z-modal);
  transition: top var(--transition-base);
}
.skip-link:focus {
  top: var(--space-2);
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}
.accessibility-skip-link-visible .skip-link {
  top: var(--space-2) !important;
  position: relative !important;
}

/* --------------------------------------------------------------------------
   8. LAYOUT HELPERS
   -------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
.form-narrow {
  max-width: 640px;
  margin: 0 auto;
}
.site-main {
  padding-top: var(--space-5);
  padding-bottom: var(--space-7);
}

/* Full-bleed section "bands" for content-heavy pages (currently used on
   the homepage). A page built from stacked <section>s that all share the
   same --surface-page background and the same .container width reads as
   one continuous box no matter how the content inside is spaced — the
   background never changes, so the eye never registers a boundary. Bands
   fix that by extending each section's background edge-to-edge (no new
   colors: --surface-raised/--surface-sunken are tones already in the
   palette, deliberately subtle since they were designed for card-vs-page
   contrast; the boundary itself is carried mainly by --border-strong —
   also an existing token — rather than the barely-there --border-color,
   since a full-bleed edge needs a crisper line than a card's shadow-backed
   one does) while an inner .container keeps the actual content at reading
   width. Plain sections (no modifier) still get the shared vertical
   rhythm, so spacing alone marks a boundary even without a color change. */
.section-band {
  padding: var(--space-8) 0;
}
.section-band--raised {
  background: var(--surface-raised);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
.section-band--sunken {
  background: var(--surface-sunken);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
@media (max-width: 768px) {
  .section-band { padding: var(--space-6) 0; }
}
/* Smaller sibling of .section-band for lightweight closing/nudge sections
   that shouldn't read as a full "chapter" of the page (homepage closing
   CTA). Reuses the same spacing scale, just a smaller pairing. */
.section-band--compact {
  padding: var(--space-6) 0;
}
@media (max-width: 768px) {
  .section-band--compact { padding: var(--space-5) 0; }
}

/* Homepage hero intro paragraph: constrains line length for readability
   (a long paragraph at full 1200px container width is hard to read) without
   centering the hero — centered-hero-plus-buttons is the generic landing
   page pattern this site is deliberately avoiding. Reuses --font-size-md,
   already defined; no new size introduced. */
.hero-lead {
  max-width: 65ch;
  font-size: var(--font-size-md);
  margin-top: var(--space-3);
}

/* Homepage closing CTA: the one deliberately centered, narrow block on the
   page — short enough that centering reads as a calm closing note rather
   than a landing-page banner. */
.closing-cta {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto;
}
/* .episode-actions is left-aligned by default (correct for the hero); this
   is the one spot it needs to sit centered under centered text. */
.closing-cta .episode-actions {
  justify-content: center;
}

/* Cards inside the "O Blindographyju" region reuse the generic .card look;
   headings are h3 (nested under that region's own h2) so size already
   matches --font-size-lg by default — only the spacing needs a tweak. */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.why-grid h3 {
  margin-bottom: var(--space-3);
}

/* --------------------------------------------------------------------------
   9. BUTTONS — one look everywhere
   -------------------------------------------------------------------------- */
button,
a.button-link,
.button,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.5rem;
  min-height: 44px; /* comfortable tap target */
  font-size: var(--font-size-base);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

button:hover, a.button-link:hover, .button:hover,
input[type="submit"]:hover:not(:disabled), input[type="button"]:hover:not(:disabled) {
  background: var(--color-primary-hover);
}
button:active, a.button-link:active, .button:active {
  background: var(--color-primary-active);
  transform: translateY(1px);
}
button:disabled, .button:disabled, input[type="submit"]:disabled {
  background: var(--surface-disabled);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.button-secondary,
button.button-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.button-secondary:hover, button.button-secondary:hover {
  background: var(--color-info-bg);
  color: var(--color-primary);
}

.button-small, button.button-small {
  padding: 0.5rem 1rem;
  min-height: 36px;
  font-size: var(--font-size-sm);
}

.button-primary { /* alias used by podcast templates */
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

/* Shared loading-spinner utility (previously duplicated with slightly
   different names/values in home.php's inline <style> and
   ajax-logout-spinner.php). */
.spinner, .spinner-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #fff;
  animation: blindography-spin 1s ease-in-out infinite;
  margin-right: var(--space-2);
  vertical-align: middle;
}
@keyframes blindography-spin { to { transform: rotate(360deg); } }

.logout-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  z-index: var(--z-modal);
}
.logout-spinner-icon {
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-top-color: var(--color-brand-900);
  animation: blindography-spin 0.6s linear infinite;
  margin-right: var(--space-2);
}

/* --------------------------------------------------------------------------
   10. FORMS — shared by comments, search, contact & login (removes the
   duplicated .form-group / .field-error rules that used to live in
   comments.php, search.php and page-kontakt.php separately)
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-5);
  display: flex;
  flex-direction: column;
}
.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}
.form-group input,
.form-group textarea,
.form-group select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  font-family: inherit;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--surface-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring-shadow);
}
.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"],
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--color-danger-border);
  background-color: var(--color-danger-bg);
}
.field-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  display: block;
  margin-top: var(--space-2);
  min-height: 1.2em;
  font-weight: 600;
}
.field-error:empty { display: none; }
.field-description {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   11. ALERTS / STATUS MESSAGES (success, error, warning, info)
   Color is always paired with a left border + bold text, never color alone.
   -------------------------------------------------------------------------- */
.alert,
.success-message,
.error-message,
.rate-limit-error,
.rate-limit-screen-box {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--border-strong);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}
.alert-success, .success-message {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-left-color: var(--color-success-border);
}
.alert-danger, .error-message, .rate-limit-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-left-color: var(--color-danger-border);
}
.alert-warning, .rate-limit-screen-box {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border-left-color: var(--color-warning-border);
  text-align: center;
}
.alert-info { background: var(--color-info-bg); color: var(--color-info); border-left-color: var(--color-info-border); }
.rate-limit-screen-title { font-size: var(--font-size-md); font-weight: 700; margin: 0 0 var(--space-2) 0; }
.rate-limit-screen-countdown { margin: 0; }

/* --------------------------------------------------------------------------
   12. CARDS — one shared visual language for every "card" in the theme
   -------------------------------------------------------------------------- */
.card,
.post-item,
.post-card,
.featured-post,
.podcast-card,
.novost-item {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
}

.post-item:hover,
.post-card:hover,
.featured-post:hover,
.podcast-card:hover,
.novost-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

#posts-list article.post-item,
.post-item {
  margin-bottom: var(--space-5);
}
.post-item hr,
#posts-list hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-5) 0;
  /* hr between cards is now redundant with card spacing/borders but is
     preserved for markup that still emits it (home.php, category.php) */
  display: none;
}

/* Grids that host cards */
.featured-posts-grid,
.novosti-grid,
.episodes-grid,
.latest-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-4);
}
/* Featured Articles specifically gets extra breathing room below its
   heading (see .featured-posts > h2 margin-bottom above); novosti/episodes
   grids keep the tighter default. */
.featured-posts-grid {
  margin-top: var(--space-6);
}

/* Featured posts section: the "floating card" look (its own background/
   border/shadow) has been replaced by the .section-band--raised wrapper
   applied to this same <section> in featured.php — a full-bleed tonal
   band reads as a distinct page zone far more clearly than a rounded box
   nested inside the page container. Only heading spacing lives here now. */
.featured-posts > h2 {
  margin-bottom: var(--space-3);
}
.featured-post {
  position: relative;
  overflow: hidden;
}
.featured-post::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-start) 0%, var(--color-accent-end) 100%);
}
.featured-post h3 { margin: 0 0 var(--space-3) 0; font-size: var(--font-size-md); }
.featured-post h3 a,
.post-card h3 a {
  color: var(--text-primary);
}
.featured-post h3 a:hover,
.post-card h3 a:hover {
  color: var(--color-primary);
  text-decoration: none;
}
.post-card h3 { margin: 0 0 var(--space-2) 0; }
.post-card .featured-date { margin-bottom: 0; }
.featured-date {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3);
  font-style: italic;
}
.featured-image { margin: var(--space-3) 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.featured-image img { width: 100%; height: 200px; object-fit: cover; transition: transform var(--transition-slow); }
.featured-post:hover .featured-image img { transform: scale(1.04); }
.featured-excerpt { color: var(--text-secondary); font-size: var(--font-size-sm); }

/* Podcast / novost specific bits that reuse the shared .card look */
.podcast-card.featured { border-color: var(--color-accent-start); }
.episode-title, .entry-title { margin-top: 0; }
.episode-meta, .entry-meta, .novost-meta {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3);
}
.novost-excerpt, .episode-description, .episode-excerpt, .podcast-description, .podcast-full-description {
  color: var(--text-secondary);
}

/* Skeleton loading state (home.php / author.php AJAX loading) */
.skeleton {
  animation: skeleton-loading 1s linear infinite alternate;
  border-radius: var(--radius-sm);
  background-color: var(--surface-sunken);
  color: transparent;
  user-select: none;
  pointer-events: none;
}
.skeleton-item { opacity: 0.7; }
@keyframes skeleton-loading { 0% { opacity: 0.7; } 100% { opacity: 0.35; } }

/* --------------------------------------------------------------------------
   13. TAGS / CATEGORIES / BADGES
   -------------------------------------------------------------------------- */
.tag, .category-badge, .kategorije a {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-info-bg);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-decoration: none;
}
.tag:hover, .category-badge:hover, .kategorije a:hover {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   14. COMMENTS
   -------------------------------------------------------------------------- */
.single-comment {
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4) 0;
  text-align: left;
}
.single-comment h4 { font-size: var(--font-size-base); margin: 0 0 var(--space-2) 0; }
.comment-time { color: var(--text-muted); font-size: var(--font-size-sm); }
.comment-text { margin-top: var(--space-2); word-wrap: break-word; white-space: normal; width: 100%; }
#comment-sorting { margin: var(--space-3) auto; text-align: left; max-width: 800px; }
#comment-sorting label { font-weight: 700; }
#sort-comments { margin-left: var(--space-2); padding: var(--space-2); }
#respond { max-width: 600px; margin: 0 auto var(--space-5) auto; }
#comments-list { max-width: 800px; margin: 0 auto; }

/* Required-field marker: color is a supplementary visual cue only — the
   inputs themselves carry the `required` attribute, which is what screen
   readers actually announce. */
.required-mark { color: var(--color-danger); }
.live-message { font-weight: 700; margin-bottom: var(--space-3); }
.submit-info-message { margin-top: var(--space-3); }

/* --------------------------------------------------------------------------
   15. PAGINATION (WordPress core the_posts_pagination() markup)
   -------------------------------------------------------------------------- */
.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin: var(--space-6) 0;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}
.page-numbers:hover { background: var(--color-info-bg); color: var(--color-primary); text-decoration: none; }
.page-numbers.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-contrast);
}
.page-numbers.dots { background: transparent; border: none; }

/* --------------------------------------------------------------------------
   16. TABLES
   -------------------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-5) 0;
  overflow-x: auto;
  display: block;
}
table thead { background: var(--surface-sunken); }
table th, table td {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  text-align: left;
}
table th { color: var(--text-primary); font-weight: 700; }

/* --------------------------------------------------------------------------
   17. WIDGETS (generic safety net for WP default widget markup)
   -------------------------------------------------------------------------- */
.widget {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.widget-title { margin-top: 0; font-size: var(--font-size-md); }

/* --------------------------------------------------------------------------
   18. HEADER / TOP NAVIGATION / MOBILE NAVIGATION
   -------------------------------------------------------------------------- */
.adaptive-header {
  font-family: var(--font-sans);
  background-color: var(--color-brand-900);
  color: var(--text-on-brand);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  transition: transform var(--transition-base), background-color var(--transition-fast);
  box-shadow: var(--shadow-brand);
  padding: 0;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  /* Vertical padding bumped from --space-2 (8px) to --space-3 (12px) — adds
     8px total to the header height, which felt too compressed against the
     rest of the design. */
  padding: var(--space-3) var(--space-5);
  gap: var(--space-5);
  flex-wrap: wrap;
}
.header-logo img {
  max-height: 50px;
  width: auto;
  transition: opacity var(--transition-fast);
}
.logo-light { display: none; }
html.accessibility-theme-light .logo-dark { display: none; }
html.accessibility-theme-light .logo-light { display: block; }

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-3);
}
.nav-menu li { margin: 0; }
.menu-card {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  color: var(--text-on-brand);
  text-decoration: none;
  font-weight: 500;
  min-height: 44px;
  line-height: 1.7;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}
.nav-menu li a:hover .menu-card,
.nav-menu li a:focus .menu-card {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.nav-menu li.current-menu-item .menu-card,
.nav-menu li.current-page-item .menu-card {
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-sm);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-on-brand);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}
@media (max-width: 768px) {
  .header-nav { display: none; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .mobile-nav {
    background-color: var(--color-brand-900);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .mobile-nav ul { flex-direction: column; gap: var(--space-2); }
  .mobile-nav .menu-card { display: block; text-align: center; }
}

/* Backdrop shown behind the open mobile menu (js/adaptive-header.js toggles
   [hidden] on this alongside #mobile-navigation). Sits just below the
   sticky header's z-index so the header/mobile nav stay above the dim
   layer instead of being covered by it. */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--surface-overlay);
  z-index: calc(var(--z-header) - 1);
}

/* Header search */
.custom-search-container { position: relative; max-width: 400px; margin: 0 auto; font-family: var(--font-sans); }
@media (min-width: 768px) {
  .custom-search-container { position: absolute; top: 10px; right: 20px; }
}
@media (max-width: 767px) {
  #custom-search-input { display: none; }
  .custom-search-container.active #custom-search-input { display: inline-block; width: 70%; }
}
.custom-search-container .form-group { margin-bottom: 0; display: inline-block; vertical-align: middle; }
.custom-search-container .form-group label { color: var(--text-on-brand-muted); }
@media (min-width: 768px) {
  .custom-search-container .form-group { margin-bottom: 0; }
  .custom-search-container .form-group label { margin-bottom: var(--space-1); }
}
.custom-search-container input {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-on-brand);
  border-radius: var(--radius-pill);
}
.custom-search-container input::placeholder { color: var(--text-on-brand-muted); }
.custom-search-container input:focus {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
}
.custom-search-container button {
  border-radius: var(--radius-pill);
  margin-left: var(--space-2);
  vertical-align: middle;
}
.custom-search-results {
  margin-top: var(--space-2);
  padding: 0;
  list-style: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: scaleY(0.95);
  transform-origin: top center;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.custom-search-results.show { opacity: 1; transform: scaleY(1); }
.custom-search-results li { padding: var(--space-2); border-bottom: 1px solid var(--border-color); }
.custom-search-results li:last-child { border-bottom: none; }
.custom-search-results a { font-weight: 700; color: var(--text-primary); display: block; }
.custom-search-results a:hover { text-decoration: underline; }
.custom-search-results li span { color: var(--text-muted); font-size: var(--font-size-sm); margin-left: 2px; }
/* NOTE: no `outline: none` here — the background tint alone is only
   ~1.1:1 contrast against the card background (imperceptible for many
   users), so the global [tabindex]:focus-visible ring (section 5) must be
   allowed to render on top of it as the real indicator. */
.custom-search-results li.focused { background: var(--color-info-bg); }
@media (max-width: 767px) {
  .custom-search-results li { padding: var(--space-3); }
  .custom-search-container input { padding: 0.6rem 0.9rem; }
  .custom-search-container button { padding: 0.6rem 1.1rem; margin-left: var(--space-1); }
  .custom-search-container .form-group label { display: none; }
  .custom-search-results a span { margin-left: 2px; margin-top: 0; font-weight: normal; }
}

/* User menu (avatar dropdown) */
.user-profile-dropdown { position: relative; display: inline-block; }
.avatar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  width: 44px;
  height: 44px;
  padding: 0;
  transition: transform var(--transition-fast);
}
.avatar-toggle:hover { transform: scale(1.05); }
.avatar-toggle img { width: 100%; height: auto; border-radius: 50%; display: block; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--surface-card);
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  z-index: var(--z-dropdown);
  margin-top: var(--space-2);
  padding: 0;
  border: 1px solid var(--border-color);
}
.dropdown-menu[hidden] { display: none; }
.user-info { padding: var(--space-4); border-bottom: 1px solid var(--border-color); background: var(--surface-sunken); }
.user-name { font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-1); outline: none; }
.user-email { font-size: var(--font-size-sm); color: var(--text-muted); }
.dropdown-links { padding: var(--space-2) 0; }
.dropdown-link {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: var(--text-primary);
  background: none;
  border: none;
  text-align: left;
  font-size: var(--font-size-sm);
  cursor: pointer;
  min-height: 44px;
}
.dropdown-link:hover { background-color: var(--surface-sunken); }
.logout-link { color: var(--color-danger); border-top: 1px solid var(--border-color); margin-top: var(--space-1); font-weight: 600; }
.logout-link:hover { background-color: var(--color-danger-bg); }
@media (max-width: 768px) {
  .desktop-profile { display: none; }
}

/* --------------------------------------------------------------------------
   19. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  text-align: center;
  margin-top: var(--space-7);
  padding: var(--space-6) 0;
  background: var(--color-brand-900);
  color: var(--text-on-brand);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.site-footer a { color: var(--text-on-brand); }
.site-footer a:hover { color: var(--color-accent-start); }
.social-links { margin: var(--space-5) 0; display: flex; justify-content: center; gap: var(--space-4); }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}
.social-links a:hover { transform: scale(1.1); background: rgba(255, 255, 255, 0.18); }
.social-links img { width: 22px; height: 22px; }

.push-subscribe-btn {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  box-shadow: var(--shadow-sm);
}
.push-subscribe-btn:hover { background: var(--color-primary-hover); }
.push-subscribe-btn.subscribed { background: var(--color-success-border); }
.push-subscribe-btn.subscribed:hover { background: var(--color-success); }

#live-region { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   20. ACCESSIBILITY MENU — visual skin only (tokens feed the existing
   markup/behavior in accessibilityMenu.php; nothing here changes function)
   -------------------------------------------------------------------------- */
.accessibility-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border: none;
  cursor: pointer;
  font-size: 24px;
  z-index: var(--z-overlay);
  box-shadow: var(--shadow-lg);
  transition: background-color var(--transition-base), transform var(--transition-base);
}
.accessibility-toggle:hover,
.accessibility-toggle:focus-visible {
  background: var(--color-primary-hover);
  transform: scale(1.08);
}
.accessibility-toggle::after {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-brand-900);
  color: var(--text-on-brand);
  padding: var(--space-2) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  white-space: nowrap;
  z-index: var(--z-modal);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.accessibility-toggle:hover::after { opacity: 1; }
.accessibility-toggle::before {
  content: "";
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-brand-900) transparent transparent transparent;
  z-index: var(--z-modal);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.accessibility-toggle:hover::before { opacity: 1; }

.accessibility-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  background: var(--surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-modal);
  overflow-y: auto;
}
.accessibility-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5);
  border-bottom: 1px solid var(--border-color);
}
#accessibility-title { margin: 0; font-size: var(--font-size-lg); }
.accessibility-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-primary);
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
}
.accessibility-close:hover, .accessibility-close:focus-visible { color: var(--color-primary); }
.accessibility-content { padding: var(--space-5); }
.accessibility-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}
.accessibility-legend { font-weight: 700; padding: 0 var(--space-2); color: var(--text-primary); }
.accessibility-control { margin: var(--space-4) 0; display: flex; align-items: center; }
.accessibility-control label { margin-right: var(--space-2); flex: 1; }
.accessibility-control select {
  flex: 2;
  padding: var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  color: var(--text-primary);
}
.accessibility-control input[type="checkbox"] {
  margin-right: var(--space-2);
  width: 22px;
  height: 22px;
}
.accessibility-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-5); }
.accessibility-btn {
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-size-base);
  min-height: 44px;
  transition: opacity var(--transition-fast);
}
.accessibility-btn-primary { background: var(--color-primary); color: var(--color-primary-contrast); }
.accessibility-btn-secondary { background: var(--text-muted); color: var(--color-primary-contrast); }
.accessibility-btn:hover, .accessibility-btn:focus-visible { opacity: 0.9; }
.accessibility-status {
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  background: var(--color-info-bg);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}
.accessibility-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--surface-overlay);
  z-index: var(--z-overlay);
}
@media (max-width: 768px) {
  .accessibility-menu { width: 95%; max-height: 90vh; }
  .accessibility-control { flex-direction: column; align-items: flex-start; }
  .accessibility-control label { margin-bottom: var(--space-2); }
  .accessibility-control select { width: 100%; }
  .accessibility-actions { flex-direction: column; }
  .accessibility-btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   20b. ARTICLE / PROSE CONTENT (single.php, single-novost.php,
   single-podcast.php) — the actual long-form article body. Previously had
   zero styling of its own (only inherited the bare body/heading rules).
   -------------------------------------------------------------------------- */
.post-content,
.novost-content,
.podcast-description,
.podcast-full-description {
  max-width: 72ch;
  margin: 0 auto;
  font-size: var(--font-size-base);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
}
.post-content p,
.novost-content p,
.podcast-description p,
.podcast-full-description p {
  margin: 0 0 var(--space-4) 0;
}
.post-content h2, .novost-content h2,
.post-content h3, .novost-content h3 {
  margin-top: var(--space-6);
}
.post-content ul, .post-content ol,
.novost-content ul, .novost-content ol {
  padding-left: var(--space-5);
  margin: 0 0 var(--space-4) 0;
}
.post-content blockquote, .novost-content blockquote {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--color-accent-start);
  background: var(--surface-sunken);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
}
.post-content img, .novost-content img {
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
}
.post-content code, .novost-content code {
  background: var(--surface-sunken);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}
.post-content pre, .novost-content pre {
  background: var(--surface-sunken);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

/* Podcast archive extras not covered by the generic card/button rules */
.latest-episode, .other-episodes, .no-podcasts { margin-top: var(--space-6); }
.no-podcasts-content { color: var(--text-secondary); }
.episode-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }
.episode-audio-player, audio { width: 100%; margin: var(--space-3) 0; }
.dashicons { vertical-align: middle; }
.duration { display: inline-flex; align-items: center; gap: var(--space-1); }

/* single-podcast.php structure (WP-style entry-* BEM classes already in the
   markup, previously with zero styling of their own). */
.entry-header { margin-bottom: var(--space-5); }
.entry-footer { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border-color); }
.post-thumbnail { margin: var(--space-4) 0; border-radius: var(--radius-md); overflow: hidden; }
.podcast-player-section { margin-top: var(--space-6); }
.podcast-download { margin-top: var(--space-3); }

/* the_post_navigation() prev/next episode links (single-podcast.php). Reuses
   .nav-links (already styled for numbered pagination) for the outer layout;
   these rules style the WP-generated .nav-previous/.nav-next wrappers and
   the custom .nav-subtitle/.nav-title spans passed into prev_text/next_text. */
.post-navigation .nav-links {
  justify-content: space-between;
  align-items: stretch;
  text-align: left;
}
.post-navigation .nav-previous,
.post-navigation .nav-next {
  flex: 1 1 45%;
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.post-navigation .nav-next { text-align: right; }
.nav-subtitle {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  font-weight: 500;
}
.nav-title {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   21. ERROR / GENERIC CONTENT PAGES (401/403/404, archives, single, hvala)
   These templates already emit .page-header/.page-title/.page-content or
   plain <main>/<article> markup with no styling at all — this section is
   purely additive, no HTML changes required.
   -------------------------------------------------------------------------- */
.page-header { margin-bottom: var(--space-5); }
.page-title { font-size: var(--font-size-2xl); }
.page-content, .page-description { color: var(--text-secondary); }
.error-401, .error-403, .error-404 {
  max-width: 640px;
  margin: var(--space-6) auto;
  text-align: center;
}
.error-401 a, .error-403 a, .error-404 a { font-weight: 600; }
.section-title { margin-top: var(--space-6); }
.novosti-uvod { color: var(--text-secondary); margin-bottom: var(--space-5); }
.hvala-content { text-align: center; padding-top: var(--space-7); padding-bottom: var(--space-7); }

/* --------------------------------------------------------------------------
   22. LOGIN / REGISTER
   -------------------------------------------------------------------------- */
.simple-login-container,
.register-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--color-brand-900) 0%, var(--color-accent-end) 150%);
  padding: var(--space-5);
}
.simple-login-form,
.register-form-wrapper {
  background: var(--surface-card);
  padding: var(--space-7) var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
}
.simple-login-form h1,
.register-form-wrapper h1 {
  text-align: center;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-xl);
}
.login-description {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  font-size: var(--font-size-sm);
  line-height: var(--leading-relaxed);
}
.register-logo {
  text-align: center;
  margin-bottom: var(--space-6);
}
.register-logo-img {
  max-width: 180px;
  height: auto;
}
.register-logo h1 {
  margin-top: var(--space-4);
}
.register-back-link {
  margin-top: var(--space-6);
}
.show-password, .remember-me {
  display: flex;
  align-items: center;
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  cursor: pointer;
}
.show-password input, .remember-me input { width: auto; margin-right: var(--space-2); }
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-2);
}
.forgot-password { color: var(--color-link); font-size: var(--font-size-sm); }
.submit-container input[type="submit"] { width: 100%; }
.register-link, .back-to-login {
  text-align: center;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-color);
}
#login-messages { margin-top: var(--space-4); }
@media (max-width: 480px) {
  .simple-login-form, .register-form-wrapper { padding: var(--space-5) var(--space-4); margin: var(--space-2); }
  .form-options { flex-direction: column; align-items: flex-start; }
}
