/* Трибунал Русе – стилове
   Layout: entry screen -> sticky header -> one of three views (home, all publications, one publication); music pill fixed bottom-right.
   One committed dark look from the posters: night ink and candle gold. */
:root {
  --ink: #0b0e13;
  --night: #121821;
  --panel: #18202b;
  --panel-2: #1d2733;
  --line: #2a3442;
  --gold: #d1ab5c;
  --gold-deep: #9c7a36;
  --paper: #efe8da;
  --muted: #a8a08f;
  --display: "Prata", "PT Serif", Georgia, serif;
  --body: "Golos Text", "Segoe UI", Arial, sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 17px/1.6 var(--body); }
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.3; }
p, ul, ol, figure, blockquote { margin: 0; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

.wrap { max-width: 1120px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.narrow { max-width: 760px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.rule { width: 64px; height: 1px; border: 0; margin: 0; background: var(--gold); }
.head { display: grid; gap: 12px; margin-bottom: 36px; }
.head p { max-width: 62ch; color: var(--muted); }
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.head-row .head { margin: 0; }
.band { padding-block: 72px; border-top: 1px solid var(--line); }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border: 1px solid var(--gold); border-radius: 2px; background: var(--gold); color: var(--ink); font: 600 15px var(--body); text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn:hover { filter: brightness(1.08); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.link { font-size: 14px; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Entry screen */
.entry { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; text-align: center; background: radial-gradient(ellipse at 50% 35%, #3a2c12 0%, #15110a 45%, var(--ink) 75%); transition: opacity .6s ease; }
.entry.out { opacity: 0; pointer-events: none; }
.entry-in { display: grid; justify-items: center; gap: 22px; }
.entry h1 { font-size: clamp(54px, 12vw, 120px); line-height: 1; letter-spacing: .04em; color: var(--gold); text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.entry p { max-width: 30ch; font-size: clamp(17px, 2.2vw, 22px); }
.entry small { font-size: 13px; color: var(--muted); }
.entry .actions { justify-content: center; }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(11, 14, 19, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 14px; }
.brand { font-family: var(--display); font-size: 20px; color: var(--paper); text-decoration: none; }
.brand small { display: block; font: 12px var(--body); letter-spacing: .04em; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.nav a { font-size: 15px; color: var(--paper); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }

/* Hero */
.hero { padding-block: 32px 56px; background: radial-gradient(ellipse at 50% 0%, #2a2213 0%, var(--ink) 65%); }
.hero figure { max-width: 900px; margin-inline: auto; padding: 5px; border: 1px solid var(--gold-deep); background: #000; }
.hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-row { max-width: 900px; margin: 26px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.hero-row p { max-width: 32ch; font-family: var(--display); font-size: clamp(19px, 2.2vw, 24px); }

/* Ombudsman */
.om { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: center; }
.om > figure { border: 1px solid var(--line); }
.om > figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.om-text { display: grid; gap: 18px; min-width: 0; }
.roles { list-style: none; padding: 0; display: grid; gap: 6px; color: var(--muted); }
.roles li::before { content: "—"; margin-right: 10px; color: var(--gold); }
blockquote { padding: 16px 20px; border-left: 2px solid var(--gold); background: var(--night); font-family: var(--display); font-size: 20px; }
.diploma { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; max-width: 520px; padding: 10px; border: 1px solid var(--line); background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.diploma img { width: 64px; height: 86px; object-fit: cover; }
.diploma b { display: block; font-weight: 600; font-size: 15px; }
.diploma span { font-size: 13px; color: var(--muted); }

/* Campaign posters */
.posters { display: flex; flex-wrap: wrap; gap: 24px; }
.posters button { display: grid; width: 280px; max-width: 100%; padding: 0; border: 1px solid var(--line); background: #000; color: var(--paper); font: inherit; text-align: left; cursor: zoom-in; overflow: hidden; }
.posters img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s ease; }
.posters button:hover img { transform: scale(1.03); }
.posters span { padding: 10px 14px; border-top: 1px solid var(--line); background: var(--night); font-size: 14px; color: var(--muted); }

/* Publication cover: the article's own photo, or a typographic cover when it has none */
.cover { position: relative; display: flex; align-items: center; justify-content: center; align-self: start; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--night); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.type { background:
    radial-gradient(circle at 50% 120%, rgba(209, 171, 92, .22), transparent 60%),
    repeating-linear-gradient(135deg, rgba(209, 171, 92, .05) 0 1px, transparent 1px 14px),
    var(--night); }
.cover.type span { padding: 0 20px; font-family: var(--display); font-size: clamp(18px, 2vw, 22px); color: var(--gold); text-align: center; }
.cover.type::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(209, 171, 92, .25); pointer-events: none; }
.cover.type::before { content: attr(data-i); display: none; font: 34px/1 var(--display); color: var(--gold); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.cat { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.badge { padding: 1px 8px; border: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.doc-count::before { content: "▤ "; color: var(--gold); }

/* Home: lead story + list */
.latest { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; }
.lead { display: grid; align-content: start; gap: 16px; color: inherit; text-decoration: none; }
.lead .cover { border: 1px solid var(--line); }
.lead h3 { font-size: clamp(24px, 2.6vw, 30px); }
.lead p { color: var(--muted); }
.lead:hover h3, .item:hover h3, .card:hover h3 { color: var(--gold); }
.list { display: grid; align-content: start; }
.item { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.item:first-child { padding-top: 0; }
.item .cover { aspect-ratio: 4 / 3; }
.item .cover.type span { display: none; }
.item .cover.type::before { display: block; }
.item .cover.type::after { inset: 6px; }
.item-body { display: grid; align-content: start; gap: 6px; min-width: 0; }
.item h3 { font-size: 17px; }

/* All publications */
.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--paper); font: 14px var(--body); cursor: pointer; }
.chips button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold); color: var(--ink); }
.search { width: min(280px, 100%); padding: 9px 14px; border: 1px solid var(--line); background: var(--night); color: var(--paper); font: 15px var(--body); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: var(--panel); color: inherit; text-decoration: none; }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px; }
.card p { font-size: 15px; color: var(--muted); }
.card .meta { margin-top: auto; padding-top: 6px; }
.empty { padding: 40px; border: 1px dashed var(--line); text-align: center; color: var(--muted); }

/* One publication */
.article { padding-block: 40px 80px; }
.back { display: inline-block; margin-bottom: 28px; font-size: 14px; text-decoration: none; }
.article h1 { margin: 12px 0 16px; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; }
#articleBody > .cover { margin-block: 28px; border: 1px solid var(--line); }
.prose { display: grid; gap: 1.1em; font-size: 18px; line-height: 1.75; }
.prose h2 { margin-top: .6em; font-size: 26px; }
.prose ul { padding-left: 1.2em; display: grid; gap: .4em; }
.lede { font-size: 20px; color: var(--paper); }
.docs { margin-top: 36px; padding: 20px; border: 1px solid var(--line); background: var(--panel); }
.docs h2 { margin-bottom: 12px; font-size: 20px; }
.docs ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.docs a { text-decoration: none; }
.docs small { color: var(--muted); }
.more { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }

/* Procedure: a real sequence, so it is numbered */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
.steps li { display: grid; align-content: start; gap: 8px; padding-top: 16px; border-top: 1px solid var(--gold-deep); counter-increment: s; }
.steps li::before { content: counter(s, upper-roman); font: 30px/1 var(--display); color: var(--gold); }
.steps p { font-size: 15px; color: var(--muted); }

/* Contacts */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 720px; }
.contact div { display: grid; gap: 4px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--gold-deep); }
.contact span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact b { font-weight: 500; overflow-wrap: anywhere; }

footer { padding-block: 36px calc(110px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); text-align: center; font-size: 14px; color: var(--muted); }
footer p { margin-bottom: 8px; font-family: var(--display); font-size: 19px; color: var(--gold); }

/* Music */
.music { position: fixed; z-index: 30; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 8px 18px 8px 8px; border: 1px solid var(--gold-deep); border-radius: 999px; background: rgba(18, 24, 33, .95); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.music button { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--gold); color: var(--ink); cursor: pointer; }
.music svg { width: 17px; height: 17px; fill: currentColor; }
.music .t { min-width: 0; font-size: 13px; line-height: 1.3; }
.music .t b { display: block; font-weight: 600; }
.music .t span { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.bars i { width: 3px; height: 4px; background: var(--gold); }
.music.on .bars i { animation: eq 1s ease-in-out infinite; }
.music.on .bars i:nth-child(2) { animation-delay: .2s; }
.music.on .bars i:nth-child(3) { animation-delay: .4s; }
.music.on .bars i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 50% { height: 16px; } }

/* Image viewer */
.viewer { position: fixed; inset: 0; z-index: 60; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 24px; border: 0; background: rgba(0, 0, 0, .92); }
.viewer[open] { display: grid; place-items: center; }
.viewer img { max-height: 86vh; width: auto; border: 1px solid var(--gold-deep); cursor: zoom-out; }
.viewer form { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); }
.viewer button { padding: 8px 14px; border: 1px solid var(--gold); background: none; color: var(--gold); font: inherit; cursor: pointer; }

.proposal { padding-block: 8px; background: var(--gold); color: var(--ink); font-size: 14px; text-align: center; }

@media (max-width: 900px) {
  .latest { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .om { grid-template-columns: 1fr; gap: 28px; }
  .om > figure { max-width: 320px; }
}
@media (max-width: 600px) {
  .grid, .steps, .contact { grid-template-columns: 1fr; }
  .posters button { width: calc(50% - 12px); }
  .item { grid-template-columns: 96px minmax(0, 1fr); }
  .band { padding-block: 52px; }
  .nav { gap: 6px 14px; }
  .nav a { font-size: 14px; }
  .prose { font-size: 17px; }
  .hero-row .actions { width: 100%; }
  .hero-row .btn { flex: 1 1 100%; justify-content: center; }
  .music { padding: 6px; gap: 0; }
  .music .t, .music .bars { display: none; }
}

/* Слайдер със снимките */
.hero .sl { max-width: 1000px; margin-inline: auto; border: 1px solid var(--gold-deep);
  --sl-bg: var(--night); --sl-fg: var(--paper); --sl-muted: var(--muted); --sl-accent: var(--gold); --sl-line: var(--line); --sl-title-font: var(--display); }
.hero .sl figcaption b { font-weight: 400; }
.hero-row { max-width: 1000px; }
/* Баба Яга */
.yaga > figure button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.yaga-text { display: grid; gap: 12px; color: var(--paper); line-height: 1.65; }
.yaga-text b { color: var(--gold); font-weight: 600; }
.contact a { color: var(--paper); text-decoration: none; overflow-wrap: anywhere; font-weight: 500; }
.contact a:hover { color: var(--gold); }
.contact { max-width: 900px; }
@media (max-width: 720px) { .hero .sl-bar { padding-right: 76px; } }
.hero .sl figure { max-width: none; margin: 0; padding: 0; border: 0; background: none; }
/* Снимката на публикацията се вижда цялата, каквато и да е */
#articleBody > .cover { aspect-ratio: auto; }
#articleBody > .cover img { width: auto; max-width: 100%; height: auto; max-height: 80vh; object-fit: contain; margin-inline: auto; display: block; }

/* Видео от YouTube в публикация */
.video { position: relative; aspect-ratio: 16 / 9; margin-block: 8px; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose img { height: auto; }
.prose a { overflow-wrap: anywhere; }
