:root {
  color-scheme: dark;
  --bg: #1a1d23;
  --bg-elevated: #23262e;
  --bg-card: #2a2e38;
  --bg-card-hover: #323744;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --accent: #4a9eff;
  --accent-rgb: 74, 158, 255;
  --accent-hover: #6eb3ff;
  --border: #3c4048;
  --border-strong: #52565e;
  --mark-bg: rgba(250, 200, 50, 0.35);
  --success: #34a853;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
  --content-max-width: 1280px;
  /* Footer ::before fade sits above the footer and overlaps the bottom of the scroll area */
  --footer-fade-height: 32px;

  /* Elevation / shadow scale */
  --shadow-e1: 0 1px 3px rgba(0,0,0,0.18);
  --shadow-e2: 0 2px 8px rgba(0,0,0,0.22), 0 1px 2px rgba(0,0,0,0.14);
  --shadow-e3: 0 8px 28px rgba(0,0,0,0.3), 0 2px 6px rgba(0,0,0,0.18);

  /* Border-width scale */
  --bw-thin: 1px;
  --bw-medium: 1.5px;
  --bw-thick: 2px;

  /* Radius scale */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

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

  /* Typography scale */
  --text-xs: 0.72rem;
  --text-sm: 0.82rem;
  --text-base: 0.95rem;
  --text-md: 1.05rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.75rem;

  --toc-highlight-1: rgba(230, 190, 60, 0.45);
  --toc-highlight-2: rgba(230, 190, 60, 0.5);
  --toc-highlight-3: rgba(230, 190, 60, 0.35);
  --toc-highlight-4: rgba(230, 190, 60, 0.12);
  --toc-highlight-5: rgba(230, 190, 60, 0.2);

  --chip-active-bg: var(--accent);
  --chip-active-hover: var(--accent-hover);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #eef5ff;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --border: #d2d2d7;
  --border-strong: #b8b8bd;
  --accent: #0066cc;
  --accent-rgb: 0, 102, 204;
  --accent-hover: #004499;
  --mark-bg: rgba(250, 200, 50, 0.35);
  --success: #1e7e34;
  --shadow-e1: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-e2: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-e3: 0 8px 28px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  --toc-highlight-1: rgba(100, 160, 220, 0.5);
  --toc-highlight-2: rgba(100, 160, 220, 0.55);
  --toc-highlight-3: rgba(100, 160, 220, 0.4);
  --toc-highlight-4: rgba(100, 160, 220, 0.15);
  --toc-highlight-5: rgba(100, 160, 220, 0.25);
  --chip-active-bg: var(--accent);
  --chip-active-hover: var(--accent-hover);
}

* {
  box-sizing: border-box;
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 29, 35, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .header {
  background: rgba(245, 245, 247, 0.95);
}

.header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.logo {
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

@media (hover: hover) and (pointer: fine) {
  .logo:hover {
    color: var(--accent);
  }
}

.search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

body.pq-route .header-inner .search-wrap {
  visibility: hidden;
  pointer-events: none;
  min-width: 0;
}

body.pq-route .header-inner .search-wrap > * {
  display: none;
}

body.pq-route .nav-btn-pq {
  display: none !important;
}

body.pq-route .header-inner .logo {
  order: -1;
}

.search-wrap .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.65rem 2.75rem 0.65rem 2.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.search-clear {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.search-clear:hover {
  color: var(--text);
  background: var(--border);
}

.search-clear.hidden {
  display: none !important;
}

#search-input::-webkit-search-cancel-button,
#search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

#search-input::placeholder {
  color: var(--text-muted);
}

#search-input:focus {
  border-color: var(--accent);
}

/* Language toggle */
.lang-toggle,
.theme-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: opacity 0.1s;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 36px;
  padding: 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  background: var(--bg-elevated);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--bg-elevated);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

@media (hover: hover) and (pointer: fine) {
  .lang-btn:hover,
  .theme-btn:hover {
    color: var(--text);
    background: var(--border);
  }
}

.lang-btn[aria-pressed="true"],
.theme-btn[aria-pressed="true"] {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.2);
}

/* Main */
.main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  /* Clear footer gradient + small gap so last cards aren’t visually eaten at scroll end */
  padding-bottom: calc(2rem + var(--footer-fade-height) + var(--space-2));
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Active filters summary bar */
.active-filters-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
  border: var(--bw-medium) solid var(--accent);
  border-left-width: 4px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text);
  box-shadow: var(--shadow-e1);
}

.active-filters-bar .af-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  min-width: min(100%, 320px);
}

.active-filters-bar.hidden {
  display: none !important;
}

.active-filters-bar .af-label {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.active-filters-bar .af-note {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
}

.active-filters-bar .af-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  background: var(--bg-elevated);
  border: var(--bw-thin) solid var(--border-strong);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text);
  white-space: nowrap;
}

.active-filters-bar .af-clear {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  font-size: var(--text-xs);
  font-family: inherit;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: var(--bw-thin) solid var(--accent);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.active-filters-bar .af-clear:hover {
  color: var(--text);
  border-color: var(--accent-hover);
  background: var(--bg-card-hover);
}

/* Search results */
.search-results {
  margin-bottom: 2rem;
}

.search-results h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.search-results-total {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: -0.35rem 0 0.85rem 0;
  line-height: 1.45;
}

.search-sort-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.search-sort-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-right: 0.15rem;
}
.search-sort-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  background: var(--bg);
  border: var(--bw-thin) solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
  user-select: none;
  min-height: 30px;
}
.search-sort-btn:hover:not(.active) {
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-e1);
  transform: translateY(-1px);
}
.search-sort-btn.active {
  background: var(--chip-active-bg, var(--accent));
  border-color: var(--chip-active-bg, var(--accent));
  color: #fff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

.search-results-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.5rem;
  margin: 0.75rem 0 0.35rem;
  border-top: 1px dashed var(--border);
}

.search-results-more-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

.search-results-more-btn {
  display: inline-block;
  padding: 0.5rem 1.35rem;
  border: none;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-e1);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.search-results-more-btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.search-results-more-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.search-results-more-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.search-result-card {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: var(--bw-thin) solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  min-width: 0;
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .search-result-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-e1);
    transform: translateY(-1px);
  }
}

.search-result-card .title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.search-result-card .snippet,
.search-result-card .search-result-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.35rem;
}

.search-result-card .snippet {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-card .snippet mark {
  background: var(--mark-bg);
  color: var(--text-primary);
  padding: 0.05em 0.15em;
  border-radius: 2px;
}

/* Filter emisija */
.emisija-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--space-5);
  padding: 0.7rem 0.85rem;
  background: var(--bg-elevated);
  border: var(--bw-thick) solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-e2);
}

.emisija-filter-wrap.hidden {
  display: none !important;
}


.filter-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-title::before,
.filter-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.filter-rows-inner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: fit-content;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.filter-row-date .emisija-filter-select,
.filter-row-date .emisija-filter-reset {
  flex: 1 1 auto;
}

/* Speaker filter chips */
.speaker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.speaker-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  background: var(--bg);
  border: var(--bw-thin) solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
  white-space: nowrap;
  user-select: none;
  min-height: 30px;
}

.speaker-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-e1);
  transform: translateY(-1px);
}

.speaker-chip[aria-pressed="true"] {
  background: var(--chip-active-bg, var(--accent));
  border-color: var(--chip-active-bg, var(--accent));
  color: #fff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

.speaker-chip[aria-pressed="true"]:hover {
  background: var(--chip-active-hover, var(--accent-hover));
  border-color: var(--chip-active-hover, var(--accent-hover));
}

.speaker-chip:disabled,
.speaker-chip[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.speaker-chip-guest {
  font-size: 0.78rem;
  padding: 0.22rem 0.5rem;
}
.speaker-chip-count {
  opacity: 0.55;
  font-size: 0.85em;
}


.speaker-guests-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  min-height: 30px;
}

.speaker-guests-toggle:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.speaker-guests-toggle:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.speaker-guests-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.speaker-guests-toggle svg {
  transition: transform 0.2s;
}

.speaker-guests-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.4rem 0 0.2rem 0.7rem;
  border-left: var(--bw-thick) solid var(--accent);
  box-sizing: border-box;
}


.speaker-guests-panel.hidden {
  display: none !important;
}

.speaker-rare-wrap {
  flex-basis: 100%;
  margin-top: 0.15rem;
}

.speaker-rare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 500;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  min-height: 24px;
}

.speaker-rare-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.speaker-rare-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.speaker-rare-toggle svg {
  transition: transform 0.2s;
}

.speaker-rare-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.35rem 0 0.1rem 0.5rem;
  margin-top: 0.25rem;
  border-left: 2px solid var(--border);
}

.speaker-rare-panel.hidden {
  display: none !important;
}

.speaker-filter-note {
  font-size: 0.75rem;
  color: var(--accent);
  font-style: italic;
  padding: 0.1rem 0 0 0;
}

.speaker-filter-note.hidden {
  display: none !important;
}

.emisija-filter-select {
  padding: 0.32rem 0.6rem;
  min-height: 34px;
  font-size: 0.82rem;
  font-family: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  min-width: 90px;
}

.emisija-filter-sep {
  color: var(--text-muted);
  font-size: 0.82rem;
  opacity: 0.5;
}

.emisija-filter-select:hover {
  border-color: var(--accent);
}

.emisija-filter-select:focus {
  border-color: var(--accent);
}

.emisija-filter-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.emisija-filter-reset {
  padding: 0.32rem 0.6rem;
  min-height: 34px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: var(--bw-thin) dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-left: 0.2rem;
  transition: color 0.15s, border-color 0.15s;
}

.emisija-filter-reset:hover {
  color: var(--text);
  border-color: var(--border-strong);
  border-style: solid;
}

.emisija-filter-reset:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Lista emisija */
.emisija-list {
  display: grid;
  gap: var(--space-3);
}

.emisija-card {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: var(--bw-thin) solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  min-width: 0;
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .emisija-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-e1);
    transform: translateY(-1px);
  }
}

.emisija-card:active {
  transform: translateY(0);
  box-shadow: none;
}

.emisija-card .title {
  font-weight: 600;
  font-size: var(--text-md);
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

.emisija-card .tags-snippet {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.emisija-card .tags-snippet-label {
  font-style: italic;
}

.emisija-card .tags-toggle {
  display: none;
  margin-left: 0.35rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.emisija-card .tags-toggle:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
}

.emisija-card .tags-row-wrap {
  display: block;
}

.emisija-card .tags-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

/* Manji ekrani: collapsible tagovi */
@media (max-width: 900px) {
  .emisija-card .tags-toggle {
    display: inline-flex;
    align-items: center;
  }

  .emisija-card .tags-row-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
  }

  .emisija-card .tags-snippet.expanded .tags-row-wrap {
    max-height: 1500px;
    overflow: visible;
  }

  .emisija-card .tags-snippet:not(.expanded) .tags-row {
    margin-top: 0;
  }

  .emisija-card .tags-snippet.expanded .tags-row {
    margin-top: 0.5rem;
  }
}

/* Veliki ekrani: tagovi uvijek vidljivi, toggle skriven */
@media (min-width: 901px) {
  .emisija-card .tags-row-wrap {
    max-height: none !important;
  }
}

.emisija-card .tag,
.emisija-card .tag.tag-info {
  font-size: 0.8rem;
  padding: 0.25rem 0.55rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
}

.emisija-card .tag-overflow {
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  background: transparent;
  border: var(--bw-thin) dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: default;
  pointer-events: none;
  font-weight: 500;
}

.emisija-card .tag-overflow:empty {
  display: none;
}

.emisija-card .tag-hidden {
  display: none;
}

.emisija-card .tags-snippet.expanded .tag-hidden {
  display: inline-flex;
}

.emisija-card .tags-snippet.expanded .tag-overflow {
  display: none;
}

/* Prikaz emisije */
.emisija-view {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.back-link {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--accent);
}

.emisija-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.emisija-speakers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.speaker-chip-detail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
}

.speaker-chip-detail .speaker-initial {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.69rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  background: var(--bg-elevated);
  border-radius: 4px;
  color: var(--text-muted);
}

.tag:hover {
  background: var(--border);
  color: var(--text);
  cursor: pointer;
}

.youtube-embed {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
}

.youtube-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.youtube-embed-top {
  margin-bottom: 1rem;
}

.youtube-footnote {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.youtube-footnote a {
  color: var(--accent);
  text-decoration: none;
}

.youtube-footnote a:hover {
  text-decoration: underline;
}

.youtube-unavailable-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.youtube-unavailable-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
}

.youtube-unavailable-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #fff;
}

.youtube-unavailable-msg {
  font-size: 1rem;
  opacity: 0.9;
}

.youtube-unavailable-cta {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  background: rgba(255, 0, 0, 0.85);
  border-radius: 6px;
  transition: background 0.2s;
}

.youtube-unavailable-link:hover .youtube-unavailable-cta {
  background: rgba(255, 0, 0, 1);
}

/* Layout emisije s TOC sidebarom */
.emisija-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 1rem;
}

.toc-sidebar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  min-width: 0;
}

.toc-sidebar.hidden {
  display: none !important;
}

.toc-sidebar.hidden + .emisija-content {
  grid-column: 1 / -1;
}

.toc-title {
  font-size: clamp(0.75rem, 0.71rem + 0.15vw, 0.86rem);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  gap: 0;
}

.toc-link {
  font-size: clamp(0.88rem, 0.82rem + 0.25vw, 1.02rem);
  color: var(--text-muted);
  text-decoration: none;
  flex: 1;
  min-width: 0;
  transition: color 0.2s;
  line-height: 1.4;
}

.toc-link:hover {
  color: var(--text);
}

.toc-level-2 {
  font-weight: 500;
  color: var(--text);
}

.toc-level-3 {
  font-size: clamp(0.82rem, 0.77rem + 0.22vw, 0.95rem);
}

.toc-item {
  display: flex;
  align-items: baseline;
  padding-left: 0.75rem;
  position: relative;
  gap: 0.4rem;
  border-left: 2px solid rgba(var(--accent-rgb), 0.15);
  transition: border-color 0.2s, background 0.2s;
}

.toc-item:hover {
  border-left-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.toc-item.toc-active {
  border-left: 3px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.toc-item.toc-active .toc-link {
  color: var(--text);
  font-weight: 600;
}

.toc-item.toc-item-level-3 {
  padding-left: 1.4rem;
}

.toc-timestamp {
  font-size: clamp(0.75rem, 0.71rem + 0.17vw, 0.86rem);
  color: var(--text-muted);
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.toc-timestamp:hover {
  color: var(--accent);
}

/* Markdown body – veličina teksta prilagođena rezoluciji (clamp) */
.markdown-body {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.markdown-body h2 {
  font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.6rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 5.5rem;
}

.markdown-body h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  scroll-margin-top: 5.5rem;
}

.heading-timestamp {
  font-weight: normal;
  font-size: 0.85em;
}

.heading-timestamp-link {
  color: var(--accent);
  text-decoration: none;
  margin-left: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  white-space: nowrap;
}

.heading-timestamp-link:hover {
  color: var(--accent);
}

.heading-timestamp-link.ts-playing {
  color: var(--accent);
}

.heading-timestamp-feedback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.96em;
  height: 0.96em;
  flex: 0 0 0.96em;
  color: var(--accent);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.78);
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s ease, visibility 0s linear 0.26s;
}

.heading-timestamp-link.ts-playing .heading-timestamp-feedback {
  visibility: visible;
  transition-delay: 0s;
  opacity: 1;
  transform: scale(1);
}

.heading-timestamp-link.ts-fading .heading-timestamp-feedback {
  visibility: visible;
  transition-delay: 0s;
  opacity: 0;
  transform: scale(0.9);
}

.heading-timestamp-feedback-icon {
  width: 100%;
  height: 100%;
  display: block;
}

/* Highlight kad se iz sadržaja skoči na odlomak – 2 žuta efekta, duže trajanje */
.toc-highlight {
  animation: tocHighlight 5s ease-out;
  padding: 0.2rem 0.5rem;
  margin: -0.2rem -0.5rem;
  border-radius: var(--radius);
}

@keyframes tocHighlight {
  0% {
    background: var(--toc-highlight-1);
    box-shadow: 0 0 0 3px var(--toc-highlight-2);
  }
  40% {
    background: var(--toc-highlight-3);
    box-shadow: 0 0 0 2px var(--toc-highlight-3);
  }
  75% {
    background: var(--toc-highlight-4);
    box-shadow: 0 0 0 1px var(--toc-highlight-5);
  }
  100% {
    background: transparent;
    box-shadow: none;
  }
}

.markdown-body h2:first-child,
.markdown-body h2:nth-child(2) {
  margin-top: 0;
  border-bottom: none;
}

.markdown-body p {
  margin: 0.75rem 0;
}

.markdown-body ul, .markdown-body ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.markdown-body li {
  margin: 0.35rem 0;
}

.markdown-body ul li::marker {
  color: var(--accent);
}

.markdown-body mark {
  background: none;
  color: inherit;
  padding: 0;
}

.markdown-body .seo-topics {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.markdown-body strong {
  font-weight: 600;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-elevated);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.markdown-body pre {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0;
}

.markdown-body pre code {
  background: none;
  padding: 0;
}

.markdown-body blockquote {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(var(--accent-rgb), 0.03);
  color: var(--text-muted);
}

/* Timestamp links */
.timestamp-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}

.timestamp-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}


/* Load counter – lijevi rub sadržaja */
.load-counter {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  left: max(1.5rem, calc(50vw - 640px + 1.5rem));
  right: auto;
  z-index: 90;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.load-counter.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Go-up – desni rub sadržaja (--content-max-width), poravnato s karticama.
   Extra 1rem compensates for the .main overflow-y scrollbar on the right. */
.go-up {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  right: max(1.5rem, calc(50vw - 640px + 2.5rem));
  z-index: 90;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, opacity 0.2s, visibility 0.2s;
}

.go-up:hover {
  transform: translateY(-2px);
  color: var(--accent);
}

.go-up.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Infinite scroll loading spinner */
.emisija-list-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem 0;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: spinnerPulse 1.2s ease-in-out infinite;
}

.spinner-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.spinner-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes spinnerPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* Skeleton loading cards */
.skeleton-container {
  display: grid;
  gap: 0.75rem;
}

.skeleton-card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skeleton-line {
  background: var(--bg-elevated);
  border-radius: 4px;
  height: 1rem;
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-line-short {
  width: 30%;
  height: 0.75rem;
}

.skeleton-line-long {
  width: 80%;
  height: 1.1rem;
}

.skeleton-line-medium {
  width: 50%;
  height: 0.85rem;
}

.skeleton-line-tags {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.skeleton-tag {
  width: 60px;
  height: 1.4rem;
  border-radius: 4px;
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state.hidden {
  display: none !important;
}

/* Footer */
.footer {
  position: relative;
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: var(--footer-fade-height);
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.footer-links-group {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a,
.footer-link-btn {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-link-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  cursor: pointer;
}

.footer-links a:hover,
.footer-link-btn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.footer-sep {
  color: var(--border);
  user-select: none;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-meta-sep {
  color: var(--border);
  user-select: none;
  font-size: 0.78rem;
  opacity: 0.7;
}

.footer-visits,
.footer-updated {
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--text-muted) 70%, transparent);
}

.kofi-inline {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

span.kofi-inline a,
span.kofi-inline a.kofi-button,
span.kofi-inline span,
span.kofi-inline span.kofitext,
span.kofi-inline div,
span.kofi-inline div.btn-container {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  line-height: 1 !important;
  display: inline !important;
  font-size: 0 !important;
  height: auto !important;
  width: auto !important;
}

span.kofi-inline .kofiimg,
span.kofi-inline img {
  height: 13px !important;
  width: auto !important;
  display: inline-block !important;
  vertical-align: middle;
  border: none !important;
  animation: kofi-wiggle 3s infinite;
}

@keyframes kofi-wiggle {
  0%   { transform: rotate(0) scale(1); }
  60%  { transform: rotate(0) scale(1); }
  75%  { transform: rotate(0) scale(1.12); }
  80%  { transform: rotate(0) scale(1.1); }
  84%  { transform: rotate(-10deg) scale(1.1); }
  88%  { transform: rotate(10deg) scale(1.1); }
  92%  { transform: rotate(-10deg) scale(1.1); }
  96%  { transform: rotate(10deg) scale(1.1); }
  100% { transform: rotate(0) scale(1); }
}

.footer-ico {
  display: none;
  line-height: 1;
}

.footer-ico svg {
  vertical-align: -2px;
}

.kofi-mobile-link {
  display: none !important;
}

/* Contact form */
.kontakt-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 1.5rem 0;
}

.kontakt-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.kontakt-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kontakt-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.kontakt-field input,
.kontakt-field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s;
}

.kontakt-field input:focus,
.kontakt-field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.kontakt-field textarea {
  resize: vertical;
  min-height: 120px;
}

.kontakt-submit {
  align-self: flex-start;
  padding: 0.7rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.kontakt-submit:hover:not(:disabled) {
  background: var(--accent-hover);
}

.kontakt-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.kontakt-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.kontakt-status {
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  line-height: 1.5;
}

.kontakt-success {
  background: rgba(52, 168, 83, 0.12);
  color: var(--success);
  border: 1px solid var(--success);
}

.kontakt-error {
  background: rgba(234, 67, 53, 0.12);
  color: #ea4335;
  border: 1px solid #ea4335;
}

@media (max-width: 640px) {
  .kontakt-desc {
    font-size: 0.95rem;
  }

  .kontakt-field input,
  .kontakt-field textarea {
    font-size: 0.9rem;
    padding: 0.55rem 0.7rem;
  }

  .kontakt-submit {
    width: 100%;
    text-align: center;
  }
}

/* About page */
.about-section {
  margin-bottom: 1.5rem;
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
}

.about-section p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 0.5rem 0;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.about-section a {
  color: var(--accent);
  text-decoration: none;
}

.about-section a:hover {
  text-decoration: underline;
}

.about-section ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.about-section li {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.35rem;
}

/* Tablet: manje paddinga, TOC uži da ostane više prostora za tekst */
@media (max-width: 1024px) {
  .main {
    padding: 1.75rem 1.25rem;
    padding-bottom: calc(1.75rem + var(--footer-fade-height) + var(--space-2));
  }

  .emisija-layout {
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: 2rem;
  }
}

/* Tablet uski / mobilni široki: Sadržaj iznad teksta, jedan stupac */
@media (max-width: 900px) {
  .emisija-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .toc-sidebar {
    position: static;
    order: -1;
    max-width: 100%;
  }

  .go-up {
    right: 2.5rem;
  }

  .load-counter {
    left: 1.5rem;
  }
}

/* Mobilni */
@media (max-width: 640px) {
  .header {
    position: relative;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "logo  nav  lang  theme"
      "search search search search";
    align-items: center;
    gap: 0.5rem 0.35rem;
    padding: 0.6rem 0.75rem;
    overflow: hidden;
  }

  .header-inner .logo {
    grid-area: logo;
    align-self: center;
    font-size: 1.1rem;
  }

  .header-inner .theme-toggle {
    grid-area: theme;
  }

  .lang-toggle,
  .theme-toggle {
    position: relative;
    cursor: pointer;
  }

  .lang-toggle::before,
  .theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--border);
    transition: transform 0.25s ease;
    pointer-events: none;
  }

  .lang-toggle[data-active="right"]::before,
  .theme-toggle[data-active="right"]::before {
    transform: translateX(100%);
  }

  .lang-toggle:active,
  .theme-toggle:active {
    opacity: 0.75;
  }

  .lang-btn,
  .theme-btn {
    position: relative;
    z-index: 1;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
  }

  .lang-btn:hover,
  .lang-btn:active,
  .lang-btn:focus,
  .theme-btn:hover,
  .theme-btn:active,
  .theme-btn:focus {
    background: transparent;
    outline: none;
  }

  .lang-btn[aria-pressed="true"],
  .theme-btn[aria-pressed="true"] {
    color: var(--accent);
    background: transparent;
  }

  .theme-btn {
    width: 36px;
    height: 36px;
  }

  .theme-btn svg {
    width: 16px;
    height: 16px;
  }

  .lang-btn {
    width: 36px;
    min-width: 0;
    height: 36px;
    font-size: 0.72rem;
    padding: 0;
  }

  .header-inner .nav-btn {
    min-height: 38px;
    min-width: 38px;
    padding: 0.3rem;
    font-size: 0.75rem;
    gap: 0;
    justify-content: center;
    background: transparent;
  }

  .header-inner .nav-btn-pq {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }

  .header-inner .nav-btn span {
    display: none;
  }

  .header-inner .nav-btn svg {
    width: 18px;
    height: 18px;
  }

  .header-inner .lang-toggle {
    grid-area: lang;
  }

  .header-nav {
    grid-area: nav;
    display: flex;
    gap: 0.2rem;
    justify-self: end;
  }

  .header-inner .search-wrap {
    grid-area: search;
    min-width: 0;
  }

  .search-wrap {
    max-width: none;
  }

  #search-input {
    min-height: 38px;
    font-size: 0.85rem;
    padding: 0.35rem 2.5rem 0.35rem 2.2rem;
  }

  .emisija-filter-wrap {
    padding: 0.5rem 0.6rem;
    gap: 0.35rem;
    align-items: center;
  }

  .filter-title {
    font-size: 0.68rem;
  }

  .emisija-filter-select {
    min-height: 32px;
    min-width: 0;
    font-size: 0.78rem;
    padding: 0.25rem 0.4rem;
  }

  .emisija-filter-reset {
    min-height: 32px;
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
  }

  .filter-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .speaker-chip {
    font-size: 0.74rem;
    padding: 0.25rem 0.5rem;
    min-height: 32px;
  }

  .speaker-guests-toggle {
    font-size: 0.72rem;
    min-height: 32px;
    padding: 0.25rem 0.5rem;
  }

  .speaker-rare-toggle {
    font-size: 0.68rem;
    min-height: 26px;
    padding: 0.18rem 0.45rem;
  }

  .speaker-rare-panel {
    gap: 0.2rem;
    padding: 0.25rem 0 0.1rem 0.4rem;
  }

  .main {
    padding: 0.75rem 0.6rem;
    padding-bottom: calc(0.75rem + 70px);
  }

  .emisija-header h1 {
    font-size: 1.4rem;
  }

  .emisija-layout {
    gap: 1.25rem;
  }

  .toc-sidebar {
    padding: 0.85rem 1rem;
  }

  .footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    padding: 0.4rem 0.75rem;
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.72rem;
    gap: 0.15rem;
    background: var(--bg);
    transform: translateY(calc(var(--footer-slide, 0) * 100%));
    will-change: transform;
  }

  .footer.footer-no-click {
    pointer-events: none;
  }

  .footer-links-group {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .footer-links {
    flex-wrap: nowrap;
    gap: 0.3rem;
    font-size: 0.72rem;
  }

  .footer-sep {
    display: none;
  }

  .footer-ico {
    display: inline-flex;
    align-items: center;
  }

  .footer-text {
    display: none;
  }

  .footer-link-btn,
  .footer-links a {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem;
    min-width: 34px;
    min-height: 34px;
    justify-content: center;
  }

  .kofi-inline {
    display: none !important;
  }

  .kofi-mobile-link {
    display: inline-flex !important;
    color: var(--accent);
    text-decoration: none;
  }

  .kofi-mobile-link:hover {
    color: var(--accent-hover);
  }

  .footer-meta {
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .footer-meta-label {
    display: none;
  }

  .footer-visits,
  .footer-updated,
  .footer-meta-sep {
    font-size: 0.68rem;
  }

  .footer-visits,
  .footer-updated {
    position: relative;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: help;
  }

  .footer-visits[data-tip]::after,
  .footer-updated[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 400;
    line-height: 1.35;
    white-space: nowrap;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 100;
  }

  .footer-visits[data-tip]:hover::after,
  .footer-updated[data-tip]:hover::after {
    visibility: visible;
    transition-delay: 0s;
  }

  .about-section p {
    font-size: 0.95rem;
  }

  body.pq-route .header-inner {
    grid-template-rows: auto;
    grid-template-areas: "logo nav lang theme";
  }

  body.pq-route .header-inner .search-wrap {
    display: none !important;
  }

  .load-counter:not(.hidden),
  .go-up:not(.hidden) {
    opacity: var(--footer-slide, 0);
    transition: none;
  }
}

/* Mali mobilni */
@media (max-width: 480px) {
  .header-inner {
    padding: 0.5rem 0.6rem;
  }

  .main {
    padding: 0.6rem 0.5rem;
    padding-bottom: calc(0.6rem + 70px);
  }

  .emisija-header h1 {
    font-size: 1.25rem;
  }

  .go-up {
    position: fixed;
    bottom: 1rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
  }

  .go-up svg {
    width: 18px;
    height: 18px;
  }

  .load-counter {
    position: fixed;
    bottom: 1rem;
    right: auto;
    left: 0.75rem;
    height: 36px;
    font-size: 0.72rem;
    padding: 0 0.55rem;
    line-height: 36px;
    border-radius: 18px;
  }

}

/* Široki ekrani: malo više zraka */
@media (min-width: 1400px) {
  :root {
    --content-max-width: 1360px;
  }

  .go-up {
    right: max(1.5rem, calc(50vw - 680px + 2.5rem));
  }

  .load-counter {
    left: max(1.5rem, calc(50vw - 680px + 1.5rem));
  }
}

/* Nav buttons */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: var(--bw-thin) solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

@media (hover: hover) and (pointer: fine) {
  .nav-btn:hover {
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-e1);
    transform: translateY(-1px);
  }
}

.nav-btn-skripte {
  border-width: var(--bw-thick);
  border-color: var(--border-strong);
}

.nav-btn-pq {
  background: var(--accent);
  color: #fff;
  border: var(--bw-thick) solid var(--accent);
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .nav-btn-pq:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: var(--shadow-e2);
  }
}

.nav-btn-pq[aria-current="page"] {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.2);
}

/* Help modal */
.help-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-modal.hidden {
  display: none !important;
}

.help-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.help-modal-content {
  position: relative;
  width: 92%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.help-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 4.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.help-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 0;
  text-align: center;
}

.help-modal-back {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.help-modal-back:hover {
  color: var(--text);
  background: var(--border);
}

.help-modal-back svg {
  display: block;
}

.help-modal-close {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.help-modal-content:focus {
  outline: none;
}

.help-modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.help-modal-close:hover {
  color: var(--text);
  background: var(--border);
}

.help-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.help-section {
  margin-bottom: 1.25rem;
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.35rem 0;
}

.help-section p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 0.35rem 0;
}

.help-section p:last-child {
  margin-bottom: 0;
}

.help-section em {
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .help-modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    margin: 0;
  }

  .help-modal {
    align-items: stretch;
  }

  .help-modal-header {
    padding: 0.7rem 3.35rem;
  }

  .help-modal-body {
    padding: 0.85rem;
  }
}

/* Changelog modal */
.changelog-modal-content {
  max-width: 660px;
}

.changelog-modal-body h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin: 1.25rem 0 0.4rem 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.changelog-modal-body h2:first-child {
  margin-top: 0;
}

.changelog-modal-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.changelog-modal-body ul {
  margin: 0 0 0.25rem 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.changelog-modal-body li {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 0.2rem;
}

.cl-list {
  display: flex;
  flex-direction: column;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.cl-item {
  border-bottom: 1px solid var(--border);
}

.cl-item:last-of-type {
  border-bottom: none;
}

.cl-item-extra.hidden {
  display: none;
}

.cl-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.4rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.cl-toggle:hover {
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.cl-date {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  line-height: 1.4;
}

.cl-meta {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0.15rem 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.cl-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.cl-toggle[aria-expanded="true"] .cl-chevron {
  transform: rotate(180deg);
}

.cl-detail {
  padding: 0.25rem 0.3rem 0.75rem 1rem;
  border-left: 2px solid var(--accent);
  margin-left: 0.4rem;
}

.cl-detail.hidden {
  display: none;
}

.cl-detail ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.cl-detail li {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 0.15rem;
}

.changelog-show-more-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.changelog-show-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  border-style: solid;
}

.footer-updated.clickable {
  cursor: pointer;
}

/* Skripte listing */
.skripte-list {
  animation: fadeIn 0.3s ease;
}

.skripte-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.skripte-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Gallery: 3 top + 2 centered bottom */
.skripte-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.skripta-tile {
  flex: 0 1 calc(33.333% - 1rem);
  min-width: 220px;
  max-width: 360px;
  text-align: center;
}

.skripta-tile-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.skripta-tile-link:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.skripta-tile-link img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.skripta-tile-info {
  padding: 0.75rem 0.25rem 0;
}

.skripta-tile-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.skripta-tile-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .skripta-tile {
    flex: 0 1 calc(50% - 0.75rem);
  }
}

@media (max-width: 640px) {
  .skripte-gallery {
    gap: 0.75rem;
  }

  .skripta-tile {
    flex: 0 1 calc(50% - 0.375rem);
    min-width: 0;
    max-width: 160px;
  }

  .skripta-tile-link img {
    aspect-ratio: 1 / 1;
  }

  .skripta-tile-info {
    padding: 0.5rem 0.15rem 0;
  }

  .skripta-tile-title {
    font-size: 0.88rem;
  }

  .skripta-tile-desc {
    font-size: 0.78rem;
  }
}

@media (max-width: 400px) {
  .skripta-tile {
    flex: 0 1 100%;
    max-width: 220px;
  }
}

/* Smanjena animacija */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .main {
    scroll-behavior: auto;
  }

  .toc-highlight {
    animation-duration: 5s !important;
    transition-duration: 0.2s !important;
  }

  .faq-spotlight-timer-bar {
    animation-duration: 15s !important;
    animation-iteration-count: 1 !important;
  }

  .faq-spotlight-q {
    transition-duration: 0.3s !important;
  }

  .loading-dots::before {
    content: '...' !important;
    animation: none !important;
  }
}

/* Print */
@media print {
  body {
    background: #fff;
    color: #000;
    overflow: visible;
    height: auto;
  }

  #app { min-height: 0; }

  .header, .footer, .go-up, .load-counter, .theme-toggle,
  .emisija-filter-wrap, .active-filters-bar, .youtube-embed,
  .search-wrap, .help-modal { display: none !important; }

  .main {
    overflow: visible;
    max-width: 100%;
    padding: 0;
  }

  .emisija-layout { display: block; }

  .toc-sidebar {
    break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
  }

  .markdown-body h2, .markdown-body h3 { break-after: avoid; }
  .markdown-body { font-size: 11pt; }

  .emisija-card {
    break-inside: avoid;
    border: 1px solid #ccc;
  }
}

/* ─── Detailed Stats Modal ─── */

.stats-modal-content {
  max-width: 720px;
}

.stats-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
}

.loading-dots {
  display: inline-block;
  min-width: 1.2em;
  text-align: left;
  vertical-align: baseline;
}

.loading-dots::before {
  content: '';
  animation: loadingDots 1.4s steps(4, end) infinite;
}

@keyframes loadingDots {
  0%  { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

.ds-section {
  margin-bottom: 1.5rem;
}

.ds-section:last-child {
  margin-bottom: 0;
}

.ds-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.6rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.ds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.ds-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.ds-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
}

.ds-tip {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.6;
  cursor: help;
  line-height: 1;
}

.ds-card:hover .ds-tip {
  opacity: 1;
}

.ds-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 4px);
  right: -4px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
  min-width: 130px;
  max-width: 200px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 100;
}

.ds-tip:hover::after {
  visibility: visible;
  transition-delay: 0s;
}

.ds-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.ds-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.3;
}

.ds-subsection {
  margin-top: 0.6rem;
  padding: 0.5rem 0 0 0;
  border-top: 1px dashed var(--border);
}

.ds-subsection-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.ds-guest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.ds-guest {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.ds-guest-count {
  font-size: 0.7rem;
  opacity: 0.7;
}

.ds-bar-chart {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.3rem 0.5rem;
  align-items: center;
}

.ds-bar-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.ds-bar-track {
  height: 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.ds-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.ds-bar-value {
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 2.5rem;
  text-align: right;
}

.ds-hotword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ds-hotword {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ds-hotword-rank {
  font-weight: 700;
  color: var(--accent);
}

/* ─── FAQ Spotlight (homepage) ─── */

.faq-spotlight {
  display: flex;
  flex-direction: column;
  height: calc(4 * 1.5 * 0.92rem + 2px + 0.25rem);
  justify-content: center;
  padding: 0 1rem;
  margin-top: calc(-1 * var(--space-3));
  margin-bottom: var(--space-2);
}

.faq-spotlight-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
  padding: 0 1rem;
}

.faq-spotlight-section-label.hidden {
  display: none !important;
}

.faq-spotlight.hidden {
  display: none !important;
}

.faq-spotlight-q-wrap {
  display: flex;
  align-items: center;
  min-height: 0;
}

.faq-spotlight-q {
  display: block;
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, opacity 0.5s ease;
}

@media (hover: hover) and (pointer: fine) {
  .faq-spotlight-q:hover {
    color: var(--accent);
  }
}

.faq-spotlight-q-fade-out {
  opacity: 0;
}

.faq-spotlight-q-fade-in {
  opacity: 1;
}

.faq-spotlight-q-prefix {
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.82rem;
  margin-right: 0.3rem;
}

.faq-spotlight-timer {
  height: 2px;
  margin-top: 0.25rem;
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: 1px;
  overflow: hidden;
}

.faq-spotlight-timer-bar {
  height: 100%;
  width: 100%;
  background: var(--accent);
  border-radius: 1px;
  transform-origin: left;
  opacity: 0.5;
}

@keyframes spotlightTimerShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

.faq-spotlight-close {
  flex-shrink: 0;
  margin-left: 0.5rem;
  background: none;
  border: none;
  padding: 0.25rem;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.3;
}

.faq-spotlight-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .faq-spotlight-close:hover {
    opacity: 0.7;
  }
}

.faq-spotlight-restore {
  display: block;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  padding: 0 1rem;
  margin-bottom: var(--space-4);
}

.faq-spotlight-restore.hidden {
  display: none !important;
}

.faq-spotlight-restore:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .faq-spotlight-restore:hover {
    text-decoration: underline;
  }
}

@media (max-width: 640px) {
  .faq-spotlight {
    height: calc(4 * 1.5 * 0.85rem + 2px + 0.25rem + 0.4rem);
    padding: 0 0.6rem;
  }

  .faq-spotlight-q {
    font-size: 0.85rem;
  }

  .faq-spotlight-close {
    opacity: 0.5;
  }

  .faq-spotlight-section-label {
    padding: 0 0.6rem;
  }

  .faq-spotlight-restore {
    padding: 0 0.6rem;
  }
}

/* ─── FAQ Page ─── */

.faq-page {
  animation: fadeIn 0.3s ease;
}

.faq-page.hidden {
  display: none !important;
}

.faq-header {
  margin-bottom: 1.5rem;
}

.faq-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.faq-title-row h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.pq-collapse-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.faq-collapse-all-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: var(--bw-thin) solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.faq-collapse-all-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.pq-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.65rem 0 1.1rem 0;
  line-height: 1.55;
}

.pq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pq-family {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
}

.pq-family-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: rgba(var(--accent-rgb), 0.10);
  border: none;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.pq-family-toggle:hover {
  background: rgba(var(--accent-rgb), 0.15);
}

.pq-family-title-wrap {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 0.28rem;
}

.pq-family-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.pq-family-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.pq-family-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.pq-family-toggle[aria-expanded="true"] .pq-family-chevron {
  transform: rotate(180deg);
}

.pq-family-detail {
  padding: 0 0.7rem 0.65rem 0.7rem;
  background: var(--bg);
}

.pq-family-detail.hidden {
  display: none !important;
}

.pq-family-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.pq-item {
  border-bottom: 1px solid var(--border);
}

.pq-family-items .pq-item:last-of-type {
  border-bottom: none;
}

.pq-item-flat {
  padding: 0.6rem 0.4rem;
}

.pq-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.4rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.pq-toggle:hover {
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: var(--radius-sm);
}

.pq-question {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  line-height: 1.4;
}

.pq-question-wrap {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
}

.pq-meta {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0.15rem 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.pq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.pq-toggle[aria-expanded="true"] .pq-chevron {
  transform: rotate(180deg);
}

.pq-detail {
  padding: 0.25rem 0.3rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 2px solid var(--accent);
  margin-left: 0.4rem;
}

.pq-detail.hidden {
  display: none !important;
}

.pq-ref {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pq-listener-question {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pq-listener-question.pq-lq-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.pq-ref-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  line-height: 1.5;
}

.pq-ref-episode {
  color: var(--text-muted);
  font-weight: 500;
}

.pq-ts-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.pq-ts-link:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.pq-scroll-sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
}

.pq-content .pq-family .pq-family-toggle[aria-expanded="true"] {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 var(--border);
}

.pq-search-row {
  margin-bottom: 0.75rem;
}

.pq-search-wrap {
  position: relative;
  width: 100%;
}

.pq-search-input {
  width: 100%;
  padding: 0.6rem 2.75rem 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}

.pq-search-input::-webkit-search-cancel-button,
.pq-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.pq-search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.pq-search-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0 0;
  line-height: 1.4;
}

.pq-search-hint.hidden {
  display: none;
}

.pq-load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.5rem;
  margin-top: 0.35rem;
  border-top: 1px dashed var(--border);
}

.pq-load-more-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

.faq-page .search-results-total {
  margin: 0 0 0.65rem 0;
}

.pq-search-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.5rem;
  margin-top: 0.35rem;
  margin-bottom: 2rem;
  border-top: 1px dashed var(--border);
}

.pq-load-more-btn,
.pq-search-more-btn {
  display: inline-block;
  width: auto;
  max-width: 100%;
  padding: 0.5rem 1.35rem;
  margin: 0;
  border: none;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-e1);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.pq-load-more-btn:hover,
.pq-search-more-btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.pq-load-more-btn:active:not(:disabled),
.pq-search-more-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.pq-load-more-btn:disabled,
.pq-search-more-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 640px) {
  .pq-list {
    gap: 1rem;
  }

  .pq-family-detail {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .pq-detail {
    margin-left: 0;
    padding-left: 0.5rem;
    padding-right: 0.15rem;
  }

  .pq-search-row {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }

  .stats-modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }

  .ds-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ds-num {
    font-size: 1rem;
  }

  .ds-bar-label {
    font-size: 0.72rem;
  }

  .faq-title-row h1 {
    font-size: 1.4rem;
  }

  .pq-subtitle {
    font-size: 0.82rem;
  }

  .pq-toggle {
    font-size: 0.84rem;
    padding: 0.5rem 0.2rem;
  }

  .pq-family-toggle {
    padding: 0.7rem;
  }

  .pq-family-title {
    font-size: 0.9rem;
  }

  .pq-family-meta {
    font-size: 0.72rem;
  }

  .pq-listener-question {
    font-size: 0.82rem;
  }

  .pq-ref-meta {
    font-size: 0.78rem;
    justify-content: space-between;
  }

  .pq-ref-episode[data-date] {
    font-size: 0;
  }

  .pq-ref-episode[data-date]::before {
    content: "Emisija: " attr(data-date);
    font-size: 0.78rem;
  }

  [lang="en"] .pq-ref-episode[data-date]::before {
    content: "Episode: " attr(data-date);
  }

  .pq-ts-link {
    font-size: 0.75rem;
  }
}
