/* stehtajmo.si
   Their words (RTV headlines, quoted labels) are set in the serif. Our words are set in the grotesque.
   Spacing scale: 4 8 12 16 24 32 48 72. */

:root {
  color-scheme: light dark;
  --ground: #f4f5f2;
  --surface: #ffffff;
  --ink: #1b1e24;
  --ink-2: #454a53;
  --ink-3: #5b6069;
  --rule: #d6d8d4;
  --rule-strong: #1b1e24;
  --za: #4a3aa7;
  --proti: #e0642f;
  --neutral: #868a8a;
  --track: #e6e8e4;
  --select: #ffe27a;
  --focus: #4a3aa7;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --measure: 58ch;
  --wide: 1040px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #15171b;
    --surface: #1d2026;
    --ink: #eceef1;
    --ink-2: #bcc1c8;
    --ink-3: #9ca2ab;
    --rule: #2e3238;
    --rule-strong: #eceef1;
    --za: #8b7ff0;
    --proti: #dc6431;
    --neutral: #70747b;
    --track: #262a30;
    --select: #5a4b12;
    --focus: #a79ef5;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--neutral) var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  caret-color: var(--za);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-kerning: normal;
}
::selection { background: var(--select); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--surface); padding: var(--s2) var(--s3); z-index: 20; }

/* Frame: masthead */
.mast {
  max-width: var(--wide);
  margin: 0 auto;
  padding: var(--s5) var(--s5) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 22px; flex: none; }
.brand-word { font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1; }
.brand-word span { font-weight: 500; color: var(--ink-3); }
.nav { display: flex; gap: var(--s5); font-size: 16px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Reading column */
main { max-width: var(--wide); margin: 0 auto; padding: var(--s6) var(--s5) var(--s8); }
.prose { max-width: var(--measure); }
h1, h2, h3 { text-wrap: balance; color: var(--ink); }
p, li { text-wrap: pretty; }
h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; margin: var(--s6) 0 var(--s4); max-width: 24ch; }
h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; letter-spacing: -0.015em; font-weight: 750; margin: var(--s8) 0 var(--s3); max-width: 28ch; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 700; margin: var(--s6) 0 var(--s2); }
p { margin: 0 0 var(--s4); }
.dek { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: var(--measure); margin-bottom: var(--s5); }
.lead { font-size: 20px; line-height: 1.45; font-weight: 600; max-width: var(--measure); margin: 0 0 var(--s4); }
.body { max-width: var(--measure); color: var(--ink-2); }
.meta { font-size: 14px; color: var(--ink-3); }
.nw { white-space: nowrap; }
section { scroll-margin-top: var(--s5); }

/* Their words */
.theirs { font-family: var(--serif); font-size: 1.06em; letter-spacing: 0; }

/* Figures and captions: the measurement record */
figure { margin: var(--s5) 0 0; }
figcaption {
  font-size: 14px; color: var(--ink-3); margin-top: var(--s3); max-width: var(--measure);
  padding-top: var(--s2); border-top: 1px solid var(--rule);
}
.legend { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: 15px; color: var(--ink-2); margin: var(--s3) 0 var(--s2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.sw.za, .dot.za { background: var(--za); }
.sw.proti, .dot.proti { background: var(--proti); }
.sw.neutral, .dot.nevtralno, .dot.neopredeljeno, .dot.ni { background: var(--neutral); }

/* The scale */
.scale svg { width: 100%; height: auto; display: block; overflow: visible; }
.scale .beam { stroke: var(--ink); }
.pans { display: flex; justify-content: space-between; gap: var(--s4); margin-top: calc(-1 * var(--s3)); }
.pans > div:last-child { text-align: right; }
.pan-value { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.pan-label { font-size: 15px; color: var(--ink-2); }

/* Paired bars */
.pairs { margin-top: var(--s4); border-top: 1px solid var(--rule-strong); }
.pair { display: grid; grid-template-columns: minmax(170px, 260px) 1fr; gap: var(--s2) var(--s5); padding: var(--s4) 0; border-bottom: 1px solid var(--rule); align-items: center; }
.pair-name { font-size: 16px; line-height: 1.3; font-weight: 600; }
.pair-name .meta { display: block; font-weight: 400; margin-top: 2px; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 1fr 72px; align-items: center; gap: var(--s3); min-height: 24px; }
.bar-track { height: 14px; position: relative; }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-fill.za { background: var(--za); }
.bar-fill.proti { background: var(--proti); }
.bar-fill.ink { background: var(--ink); }
.bar-val { font-size: 15px; text-align: right; }
.ratio { font-size: 14px; color: var(--ink-2); }

/* Robustness: ratio bars from the equality line */
.robust { margin-top: var(--s4); border-top: 1px solid var(--rule-strong); }
.rob { display: grid; grid-template-columns: minmax(170px, 300px) 1fr; gap: var(--s1) var(--s5); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.rob-name { font-size: 16px; line-height: 1.3; }
.rob-name .meta { display: block; }
.rob-track { position: relative; height: 24px; }
.rob-fill { position: absolute; top: 5px; height: 14px; background: var(--proti); border-radius: 0 4px 4px 0; }
.rob-eq { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.rob-val { position: absolute; top: 1px; font-size: 15px; font-weight: 700; white-space: nowrap; }

/* Small multiples */
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s5) var(--s6); margin-top: var(--s5); }
.mult h3 { margin: 0 0 var(--s2); font-size: 16px; }
.mult .bar-track { height: 10px; }
.mult .meta { margin: var(--s2) 0 0; }

/* Timeline */
.strip svg { width: 100%; height: auto; display: block; }
.strip .axis { fill: var(--ink-3); font: 13px var(--sans); }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: var(--s4); }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; }
table.data caption { text-align: left; font-size: 14px; color: var(--ink-3); padding-bottom: var(--s2); }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data thead th { font-weight: 650; color: var(--ink-2); border-bottom: 1px solid var(--rule-strong); }
table.data td.n, table.data th.n { text-align: right; }

/* Parody: fiction left, the real case right */
.parody { margin-top: var(--s4); border-top: 1px solid var(--rule-strong); }
.parody-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s6); padding: var(--s5) 0; border-bottom: 1px solid var(--rule); }
.fake { font-size: 19px; line-height: 1.35; font-weight: 600; }
.real { font-size: 15px; color: var(--ink-2); }
.real .theirs { color: var(--ink); }

/* Article list (Viri) */
.controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin: var(--s5) 0 var(--s3); }
.filters { display: flex; gap: var(--s2); flex-wrap: wrap; }
.filters button {
  font: inherit; font-size: 15px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer;
}
.filters button:hover { border-color: var(--ink-3); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.search { font: inherit; font-size: 15px; min-height: 40px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: min(320px, 100%); }
.search::placeholder { color: var(--ink-3); }
.count { font-size: 14px; color: var(--ink-3); }
.list { border-top: 1px solid var(--rule-strong); }
.row { display: grid; grid-template-columns: 104px 1fr; gap: var(--s1) var(--s5); padding: var(--s4) 0; border-bottom: 1px solid var(--rule); }
.row-date { font-size: 14px; color: var(--ink-3); padding-top: 4px; }
.row-title { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.row-title a { text-decoration: none; }
.row-title a:hover { text-decoration: underline; }
.row-meta { font-size: 14px; color: var(--ink-2); margin-top: var(--s2); display: flex; flex-wrap: wrap; gap: 6px var(--s4); align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.minibar { display: inline-flex; height: 8px; width: 120px; background: var(--track); border-radius: 2px; overflow: hidden; gap: 2px; }
.minibar span { display: block; height: 100%; }
.minibar .za { background: var(--za); }
.minibar .proti { background: var(--proti); }
.minibar .neopredeljeno { background: var(--neutral); }
details.why { font-size: 15px; color: var(--ink-2); margin-top: var(--s2); max-width: var(--measure); }
details.why summary { cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }
details.why ul { margin: var(--s2) 0 var(--s2); padding-left: 20px; }
details.why li { margin-bottom: 4px; }
.empty { padding: var(--s5) 0; color: var(--ink-2); }

/* Caveat */
.caveat { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: var(--s5); max-width: var(--measure); margin-top: var(--s5); }
.caveat h2 { margin-top: 0; font-size: 22px; }
.caveat ul { margin: 0; padding-left: 20px; }
.caveat li { margin-bottom: var(--s2); }

/* Method */
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: var(--s2); }
pre.prompt {
  white-space: pre-wrap; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  padding: var(--s4) var(--s5); font: 13.5px/1.55 ui-monospace, "SF Mono", Menlo, monospace; max-height: 560px; overflow: auto; color: var(--ink);
}
code { font: 0.92em ui-monospace, "SF Mono", Menlo, monospace; }

/* Tooltip */
.tip { position: fixed; pointer-events: none; background: var(--ink); color: var(--ground); font-size: 14px; line-height: 1.4;
  padding: 8px 10px; border-radius: 6px; max-width: 340px; z-index: 10; opacity: 0; transition: opacity .1s; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.tip.on { opacity: 1; }

/* Footer */
footer { max-width: var(--wide); margin: 0 auto; padding: var(--s5); border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-3); }
footer p { max-width: var(--measure); margin: 0 0 var(--s2); }

@media (max-width: 680px) {
  body { font-size: 16px; }
  .dek, .lead { font-size: 18px; }
  .pair, .rob { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .parody-row { grid-template-columns: 1fr; }
  .mast { padding-top: var(--s4); }
  .nav { gap: var(--s4); }
  main { padding-top: var(--s4); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

strong { font-weight: 700; color: var(--ink); }

/* Who spoke: back-to-back bars, ZA to the left, PROTI to the right */
.butterfly { margin-top: var(--s3); border-top: 1px solid var(--rule-strong); }
.bf-row { display: grid; grid-template-columns: 1fr minmax(120px, 190px) 1fr; align-items: center; gap: var(--s3); padding: 7px 0; border-bottom: 1px solid var(--rule); }
.bf-name { text-align: center; font-size: 15px; line-height: 1.25; }
.bf-name.lead { font-weight: 700; }
.bf-side { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.bf-side.za { flex-direction: row-reverse; }
.bf-bar { height: 14px; min-width: 0; }
.bf-side.za .bf-bar { background: var(--za); border-radius: 4px 0 0 4px; }
.bf-side.proti .bf-bar { background: var(--proti); border-radius: 0 4px 4px 0; }
.bf-val { font-size: 14px; color: var(--ink-2); min-width: 2ch; }
.bf-side.za .bf-val { text-align: right; }
.bf-head { display: grid; grid-template-columns: 1fr minmax(120px, 190px) 1fr; gap: var(--s3); font-size: 14px; color: var(--ink-3); padding: 6px 0; }
.bf-head span:first-child { text-align: right; }
.bf-head span:nth-child(2) { text-align: center; }
@media (max-width: 680px) { .bf-row, .bf-head { grid-template-columns: 1fr 104px 1fr; gap: 6px; } .bf-name { font-size: 13px; } }
