/* BrateBrate — responsive design */

:root {
  --radius: 8px;
  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --container: min(1120px, 92vw);
  /* boje: themes.css */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, var(--gradient-1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, var(--gradient-2) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { width: var(--container); margin-inline: auto; }

.site-header .container {
  width: min(98vw, var(--container));
  max-width: 98vw;
}

a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }

/* Header + slider */
.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* Brate density slider */
.brate-slider-bar {
  background: rgba(26, 24, 20, 0.96);
  border-bottom: 1px solid var(--border);
  padding: 0.2rem 0;
}

.brate-slider-bar .brate-slider-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  width: 100%;
  min-height: 1.5rem;
}

.brate-slider-bar .brate-slider-label {
  font-size: 0.82rem;
  line-height: 1;
}

.brate-slider-bar .brate-slider {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  width: auto;
  height: 4px;
  margin: 0;
}

.brate-slider-bar .brate-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
}

.brate-slider-bar .brate-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
}

.brate-slider-bar .brate-slider-value {
  font-size: 0.9rem;
  line-height: 1;
  min-width: 1.6rem;
}

.brate-slider-wrap {
  width: 100%;
}

.brate-slider-label--toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  line-height: 1;
}

.brate-slider-label--toggle:hover,
.brate-slider-label--toggle[aria-expanded="true"] {
  color: var(--link-hover);
}

.brate-slider-extra {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  padding-top: 0.2rem;
  line-height: 1;
  position: relative;
  z-index: 2;
}

.brate-slider-extra[hidden] {
  display: none !important;
}

.brate-slider-word {
  flex: 1 1 auto;
  min-width: 3rem;
  max-width: 7.5rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.72rem;
  position: relative;
  z-index: 1;
}

.brate-slider-check {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-muted);
  font-family: system-ui, sans-serif;
  user-select: none;
}

.brate-slider-comma {
  font-size: 0.82rem;
  line-height: 1;
  color: var(--text);
}

.brate-slider-check input {
  margin: 0;
  width: 0.75rem;
  height: 0.75rem;
  accent-color: var(--accent);
}

.brate-slider-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.brate-slider-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
}

.brate-slider-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: system-ui, sans-serif;
  white-space: nowrap;
}

.brate-slider {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 320px;
  height: 6px;
  appearance: none;
  background: var(--bg-elevated);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.brate-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--brate));
  border: 2px solid var(--text);
  box-shadow: 0 0 10px var(--slider-glow);
  cursor: grab;
}

.brate-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--brate));
  border: 2px solid var(--text);
  cursor: grab;
}

.brate-slider-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--brate);
  min-width: 2.2rem;
  text-align: center;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.7rem clamp(0.85rem, 2.5vw, 1.4rem) 0.8rem;
  gap: 1rem;
  flex-wrap: nowrap;
  min-width: 0;
  position: relative;
}

.logo {
  display: block;
  text-decoration: none;
  flex: 0 0 auto;
  min-width: 0;
  line-height: 1;
  align-self: flex-start;
  padding-top: 0.08rem;
  padding-left: 0.1rem;
}

.logo .brand-logo {
  justify-self: start;
}

.logo-br { color: var(--accent); }
.logo-text { color: var(--text-muted); font-size: 0.85em; }

.logo-custom {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--accent);
  font-family: var(--font-display), "Segoe UI", system-ui, sans-serif;
}

.logo-neut {
  display: block;
  color: var(--accent);
  letter-spacing: 0.06em;
}

/* Brand mark — dinamički tekst / reč.com */
.brand-logo {
  display: inline-grid;
  grid-template-columns: 1fr;
  justify-items: stretch;
  align-content: center;
  text-align: center;
  line-height: 1;
  user-select: none;
  width: max-content;
  max-width: 100%;
}

.brand-logo.is-fitted {
  width: auto;
  max-width: 100%;
}

.brand-logo__top,
.brand-logo__bottom {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  -webkit-text-stroke: 0.35px currentColor;
  paint-order: stroke fill;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: clip;
}

.brand-logo__top {
  color: var(--brand-top, var(--accent));
  letter-spacing: 0.12em;
  font-stretch: expanded;
}

.brand-logo__bottom {
  color: var(--brand-bottom, var(--accent-soft));
  letter-spacing: 0.06em;
}

.brand-logo__rule {
  display: block;
  position: relative;
  width: 100%;
  height: 4px;
  margin: 0.12em 0 0.08em;
}

.brand-logo__rule::before,
.brand-logo__rule::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top-width: 1px;
  border-top-style: solid;
}

.brand-logo__rule::before {
  top: 0;
  border-top-style: dashed;
  border-top-color: color-mix(in srgb, var(--brand-top, var(--accent)) 75%, transparent);
}

.brand-logo__rule::after {
  bottom: 0;
  border-top-style: dotted;
  border-top-color: color-mix(in srgb, var(--brand-bottom, var(--accent-soft)) 80%, transparent);
}

.brand-logo--compact .brand-logo__top {
  letter-spacing: 0.06em !important;
}

.brand-logo--header.brand-logo--compact .brand-logo__top {
  font-size: clamp(0.72rem, 1.7vw, 1.05rem);
}

.brand-logo--header.brand-logo--compact .brand-logo__bottom {
  font-size: clamp(0.62rem, 1.3vw, 0.82rem);
}

.brand-logo--long.is-fitted .brand-logo__top,
.brand-logo--long.is-fitted .brand-logo__bottom {
  letter-spacing: 0.03em;
}

.brand-placeholder .brand-logo {
  position: absolute;
  top: clamp(0.7rem, 2.2vw, 1.05rem);
  right: clamp(0.7rem, 2.2vw, 1.05rem);
  left: auto;
  bottom: auto;
  max-width: min(72%, 11rem);
  text-align: right;
  justify-items: end;
}

.brand-placeholder .brand-logo.is-fitted {
  max-width: min(72%, 11rem);
}

.brand-placeholder .brand-logo--md .brand-logo__top {
  font-size: clamp(1.55rem, 3.4vw, 2.1rem);
}

.brand-placeholder .brand-logo--md .brand-logo__bottom {
  font-size: clamp(1.02rem, 2.3vw, 1.38rem);
}

.brand-placeholder .brand-logo--lg .brand-logo__top {
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
}

.brand-placeholder .brand-logo--lg .brand-logo__bottom {
  font-size: clamp(1.15rem, 2.7vw, 1.62rem);
}

.logo .brand-logo.is-fitted {
  max-width: min(44vw, 13.5rem);
}

.brand-logo--header .brand-logo__top { font-size: clamp(1.15rem, 2.7vw, 1.7rem); }
.brand-logo--header .brand-logo__bottom { font-size: clamp(0.84rem, 1.9vw, 1.12rem); }

.brand-logo--sm .brand-logo__top { font-size: 0.95rem; letter-spacing: 0.1em; }
.brand-logo--sm .brand-logo__bottom { font-size: 0.68rem; }

.brand-logo--md .brand-logo__top { font-size: 1.35rem; letter-spacing: 0.11em; }
.brand-logo--md .brand-logo__bottom { font-size: 0.92rem; }

.brand-logo--lg .brand-logo__top { font-size: clamp(1.6rem, 4vw, 2.35rem); letter-spacing: 0.12em; }
.brand-logo--lg .brand-logo__bottom { font-size: clamp(1rem, 2.4vw, 1.45rem); }

.brand-logo--xl .brand-logo__top { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: 0.13em; }
.brand-logo--xl .brand-logo__bottom { font-size: clamp(1.2rem, 3.5vw, 1.9rem); }

.card-img--placeholder,
.featured-img--placeholder,
.article-figure--placeholder,
.brand-placeholder {
  display: block;
  background:
    linear-gradient(
      145deg,
      var(--bg-elevated) 0%,
      var(--bg-card) 55%,
      var(--brand-placeholder-bg, color-mix(in srgb, var(--accent) 8%, var(--bg-card))) 100%
    );
  position: relative;
  overflow: hidden;
}

.card-img--placeholder::before,
.featured-img--placeholder::before,
.article-figure--placeholder::before,
.brand-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    var(--brand-placeholder-stripe, color-mix(in srgb, var(--accent-soft) 6%, transparent)) 10px,
    var(--brand-placeholder-stripe, color-mix(in srgb, var(--accent-soft) 6%, transparent)) 20px
  );
  pointer-events: none;
  opacity: 0.65;
}

.card-img--placeholder .brand-logo,
.featured-img--placeholder .brand-logo,
.article-figure--placeholder .brand-logo,
.brand-placeholder .brand-logo {
  z-index: 1;
  filter: drop-shadow(0 2px 12px color-mix(in srgb, var(--brand-top, var(--accent)) 18%, transparent));
}

.article-figure--placeholder {
  min-height: 220px;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

html[data-ui-script="cyrl"] .logo-custom {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem 1rem;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-top: 0.2rem;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: system-ui, sans-serif;
  padding: 0.35rem 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.main-nav a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s;
}

/* Featured */
.featured { margin-bottom: 2.5rem; }

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  overflow: visible;
}

.featured-img {
  min-height: 280px;
  background-size: cover;
  background-position: center;
  border-radius: calc(var(--radius) * 2) 0 0 calc(var(--radius) * 2);
}

.featured-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-body h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0.5rem 0;
  line-height: 1.15;
}

.featured-body h2 a { color: var(--text); }
.featured-body h2 a:hover { color: var(--accent); }

/* Grid */
.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.card-img {
  display: block;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-body { padding: 1.25rem; }

.card-body h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0.4rem 0;
  line-height: 1.2;
}

.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--accent); }

.excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0.5rem 0;
  overflow: visible;
}

.excerpt-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.origin-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  margin-left: 0.2em;
  white-space: nowrap;
  vertical-align: middle;
}

/* Material Symbols Rounded — mapa: preview = pregled, open_in_new = izvor */
.origin-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125em;
  height: 1.125em;
  font-family: "Material Symbols Rounded", sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 1.125em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
  -webkit-font-smoothing: antialiased;
}

.origin-glyph::before {
  font-family: inherit;
  font-weight: inherit;
  font-style: inherit;
  font-variation-settings: inherit;
  line-height: 1;
}

.origin-glyph--preview::before {
  content: "preview";
}

.origin-glyph--external::before {
  content: "open_in_new";
}

.origin-glyph--audio::before {
  content: "music_note";
}

.origin-glyph--skip::before {
  content: "skip_next";
}

.origin-go,
.origin-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--link);
  vertical-align: middle;
  cursor: pointer;
  padding: 0;
  border: none;
  background: none;
  line-height: 1;
  text-decoration: none;
}

.origin-go {
  position: relative;
}

.origin-go:hover,
.origin-go:focus-visible,
.origin-preview:hover,
.origin-preview:focus-visible,
.origin-preview.is-open {
  color: var(--link-hover);
}

.origin-tooltip {
  position: absolute;
  bottom: calc(100% + 0.55rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: max-content;
  min-width: 16rem;
  max-width: min(40rem, 94vw);
  padding: 0.85rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
  line-height: 1.5;
  font-family: system-ui, sans-serif;
  font-weight: 400;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.origin-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--surface);
}

.origin-tooltip-title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--accent-soft);
}

.origin-tooltip-source {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.origin-tooltip-meta {
  display: block;
  color: var(--text-muted, #aaa);
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.origin-tooltip-url {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--text-muted, #999);
}

.origin-go:hover .origin-tooltip,
.origin-go:focus-visible .origin-tooltip {
  opacity: 1;
  visibility: visible;
}

.origin-preview-panel {
  position: fixed;
  z-index: 2000;
  width: min(440px, calc(100vw - 1.5rem));
  height: min(360px, calc(100vh - 2rem));
  background: #fff;
  border: 2px solid var(--accent, #c41e3a);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.origin-preview-panel.is-visible {
  display: flex;
}

.origin-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: var(--accent, #c41e3a);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
}

.origin-preview-header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.origin-preview-close {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.origin-preview-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.origin-preview-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

.origin-preview-loading {
  position: absolute;
  inset: 2.2rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: #555;
}

.origin-preview-panel:not(.is-loading) .origin-preview-loading {
  display: none;
}

@media (max-width: 480px) {
  .origin-preview-panel {
    width: calc(100vw - 1rem);
    height: min(280px, 45vh);
  }
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: system-ui, sans-serif;
  margin-top: 0.75rem;
}

.meta-lg { font-size: 0.9rem; margin-top: 1rem; }

.badge {
  display: inline-block;
  background: var(--bg-elevated);
  color: var(--accent);
  font-size: 0.75rem;
  font-family: system-ui, sans-serif;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.badge-sm { font-size: 0.7rem; }

.custom-badge {
  background: color-mix(in srgb, var(--brate) 18%, transparent);
  color: var(--brate);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Categories strip */
.categories-strip {
  padding: 3rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s;
}

.pill:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--accent);
}

/* Article page */
.article-page { padding: 2rem 0 4rem; max-width: 720px; }

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0.75rem 0;
}

.article-figure {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.article-body p {
  margin-bottom: 1.25rem;
  font-size: 1.12rem;
}

.article-body p::first-letter {
  font-size: 1.4em;
  font-weight: 600;
  color: var(--accent);
}

.article-footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* Category page */
.category-page { padding: 2rem 0 4rem; }

.index-intro {
  padding: 2rem 0 0;
}

.index-intro .category-header {
  margin-bottom: 2rem;
}

.category-header {
  margin-bottom: 2rem;
}

.category-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin: 0 0 0.25rem;
  line-height: 1.15;
}

.category-header h1 em {
  color: var(--brate);
  font-style: normal;
}

.category-header p { color: var(--text-muted); margin: 0; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  font-family: system-ui, sans-serif;
  color: var(--text-muted);
}

/* Static pages */
.static-page {
  padding: 2rem 0 4rem;
  max-width: 680px;
}

.static-page h1 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
}

.static-page h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: 2rem;
}

.static-page .lead {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.static-page code, pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}

.static-page code { padding: 0.15rem 0.4rem; }

.static-page pre {
  padding: 1rem;
  overflow-x: auto;
}

.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.disclaimer { margin-top: 2rem; color: var(--text-muted); }

.settings-form {
  margin-top: 1.5rem;
}

.settings-field {
  margin-bottom: 1.75rem;
  border: none;
  padding: 0;
}

.settings-field label,
.settings-field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: system-ui, sans-serif;
}

.settings-field input[type="text"] {
  width: 100%;
  max-width: 20rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1rem;
}

.settings-word-list {
  display: block;
  width: 100%;
  max-width: 20rem;
  min-height: 8.5rem;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.45;
  resize: vertical;
}

.settings-word-list::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.settings-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 400;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.settings-check input {
  margin-top: 0.2rem;
}

.settings-hint {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.settings-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-preview p {
  margin: 0.65rem 0;
}

.settings-density .brate-slider-inner {
  margin-top: 0.35rem;
}

.settings-density .brate-slider {
  max-width: none;
  width: 100%;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.theme-option {
  cursor: pointer;
  margin: 0;
}

.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  padding: 0.85rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.theme-option input:checked + .theme-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.theme-option input:focus-visible + .theme-card {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.theme-swatches {
  display: flex;
  gap: 0.35rem;
}

.theme-swatch {
  flex: 1;
  height: 1.75rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.theme-card-body strong {
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
}

.theme-card-body small {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.display-picker .theme-card {
  gap: 0.5rem;
}

.display-badge {
  align-self: flex-start;
}

.script-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.script-option {
  cursor: pointer;
  margin: 0;
}

.script-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.script-card {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-family: system-ui, sans-serif;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.script-option input:checked + .script-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.script-option input:focus-visible + .script-card {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.site-audio {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.site-audio[hidden] {
  display: none !important;
}

.site-audio-toggle,
.site-audio-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-text);
  cursor: pointer;
  flex-shrink: 0;
}

.site-audio-toggle:hover,
.site-audio-next:hover {
  background: var(--accent-dim);
}

.site-audio .origin-glyph {
  width: 1.25em;
  height: 1.25em;
  font-size: 1.25em;
  color: inherit;
}

.btn-primary {
  background: var(--accent);
  color: var(--btn-text);
}

.empty-state {
  text-align: center;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--btn-text);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-family: system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover { background: var(--accent-dim); color: var(--btn-text); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--btn-text);
}

/* Footer */
.site-main { flex: 1; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 3rem;
  background: var(--bg-card);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-brand .brand-logo {
  justify-self: start;
  margin-bottom: 0.35rem;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent);
}

.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin: 0.5rem 0 0; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

.footer-copy p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .brate-slider-hint { display: none; }

  .brate-slider-inner {
    justify-content: space-between;
  }

  .brate-slider {
    flex: 1 1 100%;
    max-width: none;
  }

  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.5rem;
    overflow-x: visible;
  }

  .main-nav.is-open { display: flex; }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.65rem clamp(0.75rem, 3vw, 1.1rem) 0.75rem;
  }

  .logo {
    order: 1;
    padding-top: 0;
    padding-left: 0.05rem;
  }

  .nav-toggle {
    order: 2;
    margin-left: auto;
  }

  .main-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .site-header .container {
    width: var(--container);
  }

  .featured-card { grid-template-columns: 1fr; }

  .featured-img { min-height: 200px; }

  .grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }

  .footer-copy { grid-column: 1 / -1; }
}

/* RSS izvori */
.rss-page .rss-header {
  margin-bottom: 1.5rem;
}

.rss-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
}

.rss-status-main,
.rss-status-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
}

.rss-status-label,
.rss-status-meta {
  color: var(--text-muted);
}

.rss-running-msg {
  color: var(--accent-soft);
}

.rss-error-msg {
  color: #e07070;
}

.rss-running-msg.is-hidden,
.rss-error-msg.is-hidden {
  display: none;
}

.rss-schedule-panel {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.rss-schedule-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.rss-schedule-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.rss-schedule-form label[for="rss-interval"] {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

.rss-schedule-form select {
  min-width: 12rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: system-ui, sans-serif;
}

.rss-auto-check {
  margin: 0;
}

.rss-actions {
  margin-bottom: 1.25rem;
}

.rss-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.rss-table {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
}

.rss-table th,
.rss-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.rss-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rss-table tbody tr:last-child td {
  border-bottom: none;
}

.rss-url {
  max-width: 16rem;
  word-break: break-all;
  font-size: 0.8rem;
}

.rss-url a {
  color: var(--text-muted);
}

.rss-feed-stats {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
}

.feed-stat-new {
  color: var(--accent-soft);
  font-weight: 600;
}

.feed-stat-dup {
  color: var(--text-muted);
}

.feed-stat-err {
  color: #e07070;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.rss-panel {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.rss-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.rss-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.rss-add-form input[type="url"],
.rss-add-form input[type="text"],
.rss-add-form select {
  flex: 1 1 12rem;
  min-width: 10rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: system-ui, sans-serif;
}

.rss-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  white-space: nowrap;
}

.rss-catalog-header h2 {
  margin-bottom: 0.25rem;
}

.rss-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.rss-catalog-search,
.rss-catalog-filter {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: system-ui, sans-serif;
}

.rss-catalog-search {
  flex: 1 1 14rem;
  min-width: 12rem;
}

.rss-catalog-table-wrap {
  max-height: 28rem;
  overflow: auto;
}

.rss-preset-row.is-active-preset {
  opacity: 0.72;
}

.rss-badge-active {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--accent-soft);
  font-size: 0.75rem;
  font-family: system-ui, sans-serif;
}

.rss-empty-row td {
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem;
}
