/* ═══════════════════════════════════════════════════════════════
   Fact-check pieces (/bg/analizi/*). Layered on main.css: every colour
   here is a main.css token except the verdict fills, which are chrome
   (LAW 2: colour lives in chrome, text stays plain).

   Verdict fills carry black ink in both themes. Each fill is measured
   against #000 at >= 6:1, so a badge reads the same on white and on
   near-black windows and needs no per-theme override.
   ═══════════════════════════════════════════════════════════════ */

:root{
  --v-true:#2EA043;     /* ВЯРНО            #000 on it 6.2:1 */
  --v-mostly:#9ACD32;   /* ВЯРНО, НО...     #000 on it 11.2:1 */
  --v-mislead:#F0B429;  /* ПОДВЕЖДАЩО       #000 on it 11.3:1 */
  --v-false:#F85149;    /* НЕВЯРНО          #000 on it 6.3:1 */
  --v-unver:#9A9A9A;    /* НЕПРОВЕРИМО      #000 on it 7.5:1 */
  --v-ink:#000000;
}

body.fc{padding:var(--s4);min-height:100vh;background:var(--bg) var(--pattern);position:relative}
@media(max-width:560px){body.fc{padding:var(--s2)}}
.fc-page{max-width:1080px;margin:0 auto;display:grid;gap:var(--s4);position:relative;z-index:1}

/* The tricolour: full width, not full height, behind the top of the page,
   with a stepped pixel wave. Drawn by tools/fc_art.py. It sits on the
   desktop pattern like the windows do, so it shows in the gutters. */
/* Fixed, so it stays behind the windows while the page scrolls, and twice
   the viewport wide: the band SVG is exactly one wave period end to end, so
   sliding it left by one copy loops seamlessly. Transform only, so the GPU
   moves it and nothing repaints. */
body.fc::before{content:"";position:fixed;left:0;top:64px;width:200%;height:clamp(240px,34vw,440px);
  background:url('/assets/img/fc-flag-band.svg') 0 0/50% 100% repeat-x;pointer-events:none;z-index:0;
  animation:fc-wave 60s linear infinite;will-change:transform}
@keyframes fc-wave{to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){body.fc::before{animation:none}}
html[data-theme="dark"] body.fc::before{opacity:.82}
html,body.fc{overflow-x:clip}

/* The Presidency on Largo, with a flag that waves in two frames. */
.fc-headrow{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--s4)}
.fc-icon{flex:none;width:176px;height:auto;image-rendering:pixelated}
@media(max-width:640px){
  .fc-headrow{flex-direction:column-reverse;align-items:flex-start;gap:var(--s3)}
  .fc-icon{width:132px}
}

/* ── Top strip: back to the site + language note ── */
.fc-top{display:flex;align-items:center;gap:var(--s2);flex-wrap:wrap;background:var(--face);padding:6px}
.fc-top .sp{flex:1}
.fc-top .btn{min-height:40px;padding:0 14px}
.fc-top .lang{font-family:var(--f-chrome);font-size:12px;color:var(--ink-2);text-transform:uppercase;padding:0 8px}

/* ── Hero ── */
.fc-kicker{font-family:var(--f-chrome);text-transform:uppercase;font-size:12px;letter-spacing:1px;color:var(--ink-2)}
/* The headline and the candidates' names are set in the outline mono, not the
   pixel face: Tiny5 carries the Cyrillic on BG pages and its 5px caps made
   "Йотова срещу Гюров" hard to read at headline size. Pixel stays in chrome. */
.fc-title{font-family:var(--f-chrome);font-weight:600;color:var(--ink);font-size:clamp(22px,4.2vw,34px);
  line-height:1.3;letter-spacing:-.3px;margin:var(--s3) 0 var(--s4);max-width:26ch}
.fc-meta{display:flex;flex-wrap:wrap;gap:var(--s2);margin-top:var(--s4)}

/* ── Scoreboard ── */
.fc-score{display:grid;gap:var(--s4);grid-template-columns:1fr 1fr}
@media(max-width:720px){.fc-score{grid-template-columns:1fr}}
.fc-side{background:var(--well);padding:var(--s4);border:1px solid var(--edge);
  box-shadow:inset 1px 1px 0 var(--bev-lo2),inset -1px -1px 0 var(--bev-hi2)}
.fc-side h3{font-family:var(--f-chrome);font-weight:600;font-size:15px;letter-spacing:.6px;color:var(--ink);text-transform:uppercase;
  display:flex;justify-content:space-between;gap:var(--s2);align-items:baseline}
.fc-side h3 small{font-family:var(--f-chrome);font-size:12px;color:var(--ink-2);letter-spacing:0}
.fc-bar{display:flex;height:28px;margin:var(--s3) 0;border:1px solid var(--edge);background:var(--face)}
.fc-bar span{display:block;height:100%;min-width:0}
.fc-bar span+span{border-left:1px solid var(--edge)}
.fc-legend{display:grid;grid-template-columns:auto 1fr auto;gap:6px var(--s2);font-size:13px;align-items:center}
.fc-legend i{width:14px;height:14px;border:1px solid var(--edge);display:block}
.fc-legend b{font-weight:600;color:var(--ink);text-align:right;font-variant-numeric:tabular-nums}
.fc-legend button{all:unset;cursor:pointer;color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.fc-legend button:hover{background:var(--sel);color:var(--sel-ink);text-decoration:none}
.fc-legend button:focus-visible{outline:1px dotted currentColor}

.v-true{background:var(--v-true)}.v-mostly{background:var(--v-mostly)}.v-mislead{background:var(--v-mislead)}
.v-false{background:var(--v-false)}.v-unver{background:var(--v-unver)}

/* ── Verdict stamp: a Win95 label with a double rule, not a rounded chip ── */
.fc-stamp{display:inline-block;font-family:var(--f-chrome);font-weight:600;text-transform:uppercase;
  font-size:11px;letter-spacing:.6px;line-height:1.2;color:var(--v-ink);padding:6px 8px;white-space:nowrap;
  border:1px solid var(--v-ink);outline:1px solid var(--edge);outline-offset:1px}
.fc-stamp.big{font-size:14px;padding:9px 12px}

/* ── Filters ── */
.fc-filters{display:grid;gap:var(--s3)}
.fc-frow{display:flex;flex-wrap:wrap;gap:var(--s2);align-items:center}
.fc-frow .lbl{min-width:96px;font-size:12px;font-family:var(--f-chrome)}
.fc-filters .btn{min-height:40px;padding:0 12px;font-size:12px}
.fc-filters .btn[aria-pressed="true"]{background:var(--sel);color:var(--sel-ink);
  box-shadow:inset 1px 1px 0 var(--bev-lo),inset -1px -1px 0 var(--bev-hi2),inset 2px 2px 0 var(--bev-lo2)}
.fc-filters .btn i{width:10px;height:10px;border:1px solid var(--v-ink);display:inline-block;margin-right:6px}
.fc-search{flex:1;min-width:200px;font-size:16px}
.fc-count{font-family:var(--f-chrome);font-size:12px;text-transform:uppercase;color:var(--ink-2)}

/* ── Claims table ── */
table.fc-claims{min-width:0}
table.fc-claims th.c-ts{width:74px}
table.fc-claims th.c-who{width:92px}
table.fc-claims th.c-v{width:170px}
table.fc-claims tr.fc-row{cursor:pointer}
table.fc-claims tr.fc-row td{font-size:15px}
table.fc-claims tr.fc-row[aria-expanded="true"] td{background:var(--face-2);border-bottom-color:transparent}
table.fc-claims .who{font-family:var(--f-chrome);text-transform:uppercase;font-size:12px;color:var(--ink)}
table.fc-claims .ts{font-family:var(--f-chrome);font-size:12px;font-variant-numeric:tabular-nums}
table.fc-claims .claim{color:var(--ink)}
table.fc-claims .claim .chev{float:right;color:var(--ink-3);font-family:var(--f-chrome);margin-left:var(--s2)}
table.fc-claims tr.detail td{background:var(--face-2);padding:0 11px var(--s4)}
table.fc-claims tr.fc-row:hover td{background:var(--face-2)}

.fc-detail{display:grid;gap:var(--s4);padding-top:var(--s2)}
.fc-quote{background:var(--well);padding:var(--s3) var(--s4);border:1px solid var(--edge);
  font-family:var(--f-prose);font-size:18px;line-height:1.65;color:var(--ink)}
.fc-quote .said{display:flex;gap:var(--s2);align-items:center;flex-wrap:wrap;margin-top:var(--s2);
  font-family:var(--f-chrome);font-size:12px;color:var(--ink-2);text-transform:uppercase}
.fc-why{font-family:var(--f-prose);font-size:18px;line-height:1.75;color:var(--ink);max-width:70ch}
.fc-why p+p{margin-top:.8em}
.fc-h{font-family:var(--f-chrome);text-transform:uppercase;font-size:12px;letter-spacing:.8px;color:var(--ink-2);margin-bottom:var(--s2)}
.fc-src{list-style:none;display:grid;gap:6px;font-size:14px;line-height:1.55}
.fc-src li{display:flex;gap:var(--s2);align-items:baseline}
.fc-src .tag{flex:none}
.fc-src .tag.pri{color:var(--ink)}
.fc-others{display:flex;flex-wrap:wrap;gap:var(--s2);font-size:13px}
.fc-others span{background:var(--face);border:1px solid var(--edge);padding:4px 8px}

/* Phone: the table becomes a stack of cards. Same markup, so the filter
   code never has to know which layout it is driving. */
@media(max-width:720px){
  table.fc-claims thead{display:none}
  table.fc-claims,table.fc-claims tbody{display:block}
  table.fc-claims tr.fc-row{display:grid;grid-template-columns:auto 1fr auto;gap:4px var(--s2);
    padding:var(--s3) 0;border-bottom:1px solid var(--bev-lo2)}
  table.fc-claims tr.fc-row td{display:block;padding:0;border:0;background:transparent !important}
  table.fc-claims tr.fc-row td.claim{grid-column:1/-1;order:3}
  table.fc-claims tr.fc-row td.vd{justify-self:end}
  table.fc-claims tr.fc-row[aria-expanded="true"]{background:var(--face-2)}
  table.fc-claims tr.detail{display:block}
  table.fc-claims tr.detail td{display:block;padding:0 0 var(--s4)}
  table.fc-claims tr.detail[hidden]{display:none}
}

/* ── ДЕБАТ.AVI: the debate as a timeline ──
   Without JS only the lanes show, and every tick is a link to its claim.
   factcheck.js adds .js, which reveals the screen, scrubber and controls. */
.fc-player{display:grid;gap:var(--s3)}
.fc-player:not(.js) .fc-screen,.fc-player:not(.js) .fc-scrub,
.fc-player:not(.js) .fc-ctrl,.fc-player:not(.js) .fc-tally,.fc-player:not(.js) .fc-head{display:none}

.fc-screen{background:#000;color:#fff;border:1px solid var(--edge);padding:var(--s3) var(--s4);min-height:150px;
  display:flex;flex-direction:column;gap:var(--s2);
  box-shadow:inset 1px 1px 0 var(--bev-lo2),inset -1px -1px 0 var(--bev-hi2),inset 2px 2px 0 var(--bev-lo)}
html[data-theme="light"] .fc-screen{background:#000814}
.fc-now-meta{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2) var(--s3);
  font-family:var(--f-chrome);font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:#C6C6C6}
.fc-now-ts{font-variant-numeric:tabular-nums;color:#fff}
.fc-now-who{color:#fff;font-weight:600}
.fc-now-claim{font-family:var(--f-prose);font-size:18px;line-height:1.55;color:#fff;flex:1}
.fc-screen .btn{align-self:flex-start;min-height:40px}
.fc-screen.flash{animation:fc-flash .35s steps(2)}
@keyframes fc-flash{50%{background:#0A2C8C}}

.fc-lanes{position:relative;display:grid;gap:4px;touch-action:pan-y}
.fc-lane{position:relative;height:40px;background:var(--well);border:1px solid var(--edge);
  box-shadow:inset 1px 1px 0 var(--bev-lo2),inset -1px -1px 0 var(--bev-hi2)}
.fc-lane-name{position:absolute;left:6px;top:2px;font-family:var(--f-chrome);font-size:10px;
  text-transform:uppercase;letter-spacing:.6px;color:var(--ink-2);pointer-events:none;z-index:1}
.fc-tick{position:absolute;top:14px;bottom:4px;width:3px;margin-left:-1px;border:0;text-decoration:none;
  outline:1px solid rgba(0,0,0,.55)}
.fc-tick:hover,.fc-tick.on{top:4px;bottom:2px;width:5px;margin-left:-2px;outline:2px solid var(--ink);background-clip:padding-box}
.fc-tick:focus-visible{outline:2px dotted var(--ink)}
.fc-head{position:absolute;top:-4px;bottom:-4px;width:2px;margin-left:-1px;left:0;background:var(--ink);pointer-events:none;z-index:2}
.fc-head::before{content:"";position:absolute;top:0;left:-4px;border:5px solid transparent;border-top-color:var(--ink)}

/* Win95 trackbar: a sunken groove and a raised thumb. The thumb is 44px tall
   on touch screens so the whole debate can be scrubbed with a thumb. */
.fc-scrub{-webkit-appearance:none;appearance:none;width:100%;height:44px;background:transparent;margin:0;cursor:pointer}
.fc-scrub:focus-visible{outline:1px dotted var(--ink);outline-offset:2px}
.fc-scrub::-webkit-slider-runnable-track{height:8px;background:var(--well);border:1px solid var(--edge);
  box-shadow:inset 1px 1px 0 var(--bev-lo)}
.fc-scrub::-moz-range-track{height:8px;background:var(--well);border:1px solid var(--edge)}
.fc-scrub::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:36px;margin-top:-15px;background:var(--face);
  border:1px solid var(--edge);box-shadow:inset 1px 1px 0 var(--bev-hi2),inset -1px -1px 0 var(--bev-lo),
  inset 2px 2px 0 var(--bev-hi),inset -2px -2px 0 var(--bev-lo2)}
.fc-scrub::-moz-range-thumb{width:22px;height:36px;border-radius:0;background:var(--face);border:1px solid var(--edge)}
@media(pointer:coarse){
  .fc-scrub::-webkit-slider-thumb{width:28px;height:44px;margin-top:-19px}
  .fc-scrub::-moz-range-thumb{width:28px;height:44px}
}

.fc-ctrl{display:flex;flex-wrap:wrap;align-items:center;gap:var(--s2)}
.fc-ctrl .btn{min-height:44px;padding:0 16px}
.fc-ctrl #fcPlay{min-width:118px}
.fc-clock{font-family:var(--f-chrome);font-size:13px;font-variant-numeric:tabular-nums;color:var(--ink-2);margin-left:auto}
@media(max-width:420px){
  .fc-ctrl{display:grid;grid-template-columns:1fr 2fr 1fr}
  .fc-clock{grid-column:1/-1;margin:0;text-align:center}
}

.fc-tally{display:grid;gap:6px}
.fc-tl{display:grid;grid-template-columns:72px 1fr 34px;gap:var(--s2);align-items:center;
  font-family:var(--f-chrome);font-size:12px;text-transform:uppercase}
.fc-tl .n{text-align:right;font-variant-numeric:tabular-nums;color:var(--ink)}
.fc-bar.sm{height:14px;margin:0}
.fc-bar.sm span{border:0}

/* ── Talking points ── */
.fc-frames{display:grid;gap:var(--s3);grid-template-columns:1fr 1fr}
@media(max-width:720px){.fc-frames{grid-template-columns:1fr}}
.fc-frame{background:var(--well);border:1px solid var(--edge);padding:var(--s4)}
.fc-frame h4{font-family:var(--f-chrome);text-transform:uppercase;font-size:13px;font-weight:600;color:var(--ink);margin-bottom:var(--s2)}
.fc-frame p{font-family:var(--f-prose);font-size:17px;line-height:1.7}
.fc-frame .ts{font-family:var(--f-chrome);font-size:12px;color:var(--ink-2)}

/* ── Verdict scale key ── */
.fc-scale{display:grid;gap:var(--s2)}
.fc-scale div{display:grid;grid-template-columns:190px 1fr;gap:var(--s3);align-items:start;font-size:14px}
@media(max-width:560px){.fc-scale div{grid-template-columns:1fr}}

/* main.css gives .btn display:inline-flex, which beats the UA's [hidden] rule:
   the player's "evidence" button showed before any claim was selected. */
.fc [hidden]{display:none !important}

/* Phones (checked on a Pixel 7). The top bar fits on one row: the theme button
   drops to its icon and Journal goes, since the back button leads there. Each
   filter group becomes one swipeable row with its label pinned at the left,
   instead of six chips wrapping over three lines. */
.fc-close{margin-top:var(--s2)}
@media(max-width:480px){
  .fc-top .fc-journal{display:none}
  .fc-top #fcTheme .txt{display:none}
  .fc-top #fcTheme{padding:0 14px}
  .fc-top #fcTheme .ico{font-size:20px;line-height:1}
}
@media(max-width:720px){
  .fc-frow:not(.wrap){flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-right:calc(-1 * var(--s4))}
  .fc-frow:not(.wrap)::-webkit-scrollbar{display:none}
  .fc-frow:not(.wrap) .lbl{position:sticky;left:0;z-index:1;background:var(--face);min-width:0;flex:none;
    padding-right:var(--s2);align-self:stretch;display:flex;align-items:center}
  .fc-frow:not(.wrap) .btn{flex:none}
  .fc-frow:not(.wrap)::after{content:"";flex:none;width:var(--s4)}
}

.fc .prose{max-width:68ch}
.fc .prose+.prose{margin-top:1em}
.fc .doc-h{margin-top:var(--s5)}
.fc-hidden{display:none !important}

@media print{
  body.fc{background:#fff;padding:0}
  .fc-top,.fc-filters{display:none}
  table.fc-claims tr.detail[hidden]{display:table-row}
}
