/* Paleta: bijela s narančastim naglascima. Tamnija narančasta za tekst i poveznice (kontrast >= 4.5:1 na bijelom),
   svjetlija samo za oznake i ispune; razlike među medijima su plave da se ne miješaju s naglaskom. */
:root {
  --bg: #ffffff;
  --surface: #fff6ee;
  --ink: #221d19;
  --muted: #6f6660;
  --rule: #f1e3d6;
  --accent: #c2410c;
  --accent-fill: #f97316;
  --accent-soft: #ffedd5;
  --diverge: #1d4ed8;
  --diverge-bg: #eef3ff;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  font-variant-numeric: lining-nums;
}
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 5; }

/* zaglavlje */
.brand { padding-top: 32px; padding-bottom: 20px; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.digest-btn {
  flex: none; padding: 8px 14px; border-radius: 6px; background: var(--accent-fill); color: #fff;
  font-weight: 700; font-size: 15px; text-decoration: none;
}
.digest-btn:hover { background: var(--accent); }
.digest-btn[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.logo { font: 600 34px/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent-fill); }
.dateline { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* traka s filterima ostaje vidljiva pri listanju */
.bar { position: sticky; top: 0; z-index: 3; background: rgb(255 255 255 / 0.96); border-bottom: 1px solid var(--rule); }
.bar button { border: 0; cursor: pointer; font: inherit; color: inherit; background: none; }
.tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--rule); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; padding: 10px 0 9px; font-size: 16px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent-fill); }
.tools { display: flex; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.search { flex: 1 1 220px; min-width: 0; position: relative; }
.search input {
  width: 100%; padding: 7px 40px 7px 12px; border: 1px solid #e7d5c4; border-radius: 6px;
  background: var(--bg); color: var(--ink); font: 16px var(--sans);
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search input:focus { outline: 2px solid var(--accent-fill); outline-offset: 0; border-color: transparent; }
.search .clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px;
  display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted);
  font: 22px/1 var(--sans); cursor: pointer;
}
.search .clear:hover { background: var(--accent-soft); color: var(--accent); }
.search .clear[hidden] { display: none; }
.search input::placeholder { color: var(--muted); }
.segmented { flex: none; display: flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.segmented:empty { display: none; }
.segmented button { padding: 6px 11px; font-size: 15px; color: var(--muted); }
.segmented button + button { border-left: 1px solid var(--rule); }
.segmented button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* raspored: vijesti lijevo, teme u trendu desno (na mobitelu traka iznad vijesti) */
.layout { display: grid; grid-template-columns: minmax(0, 680px) 240px; gap: 0 56px; justify-content: space-between; }
.layout > main { grid-column: 1; grid-row: 1; }
.trending { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 112px; padding-top: 28px; }
.trending h2 { margin: 0 0 10px; font: 600 18px/1.3 var(--serif); }
.trending ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.trending li { border-top: 1px solid var(--rule); }
.trending button {
  display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 0; border: 0; background: none; cursor: pointer; text-align: left; font: 16px/1.35 var(--sans); color: var(--ink);
}
.trending button:hover .kw, .trending button[aria-pressed="true"] .kw { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.trending .n { flex: none; font-size: 13px; color: var(--muted); }
.trending li:first-child .kw { font-weight: 700; }
.trending .n { font-variant-numeric: tabular-nums; }

/* feed */
.status { color: var(--muted); padding: 28px 0 0; max-width: 36em; }
.status:empty { display: none; }
.feed { list-style: none; margin: 0; padding: 0; }
.story { padding: 24px 0 26px; border-bottom: 1px solid var(--rule); }
.story:last-child { border-bottom: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.meta .cat { color: var(--accent); font-weight: 700; }
.meta .type { color: var(--ink); }

/* pokrivenost: koji mediji pišu o događaju (puna točka), koji ne (prazna), a koji navode nešto drugo (oker) */
.coverage { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.coverage li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.coverage li::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--rule); flex: none;
}
.coverage li.on { color: var(--ink); }
.coverage li.on::before { background: var(--accent-fill); border-color: var(--accent-fill); }
.coverage li.differs::before { background: var(--diverge); border-color: var(--diverge); }

.title { font: 600 27px/1.22 var(--serif); margin: 10px 0 10px; letter-spacing: -0.012em; text-wrap: balance; }
.title a { color: inherit; text-decoration: none; }
.title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.more-link { margin: 4px 0 0; font-size: 15px; }
.related a.rel-title { color: var(--ink); }
.translated-title { margin: -4px 0 10px; font-size: 14px; color: var(--muted); }
.summary { margin: 0; max-width: 38em; }
.feed .summary { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story { position: relative; }
/* cijela kartica vodi na priču, a naslov ostaje jedina poveznica za čitače zaslona */
.feed .title a::after { content: ""; position: absolute; inset: 0; }
.feed .story:hover .title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.uncertainty { margin: 0 0 14px; padding-left: 12px; border-left: 2px solid var(--rule); color: var(--muted); font-size: 15px; }

.claims { margin: 0 0 14px; padding: 14px 16px 6px; background: var(--surface); border-radius: 6px; }
.claims h3 { margin: 0 0 8px; font: 600 16px/1.3 var(--serif); }
.claims ul { list-style: none; margin: 0; padding: 0; }
.claims li { padding: 0 0 10px; font-size: 16px; line-height: 1.5; }
.claims li + li { border-top: 1px solid var(--rule); padding-top: 10px; }
.claims .who { display: block; font-size: 14px; color: var(--muted); }
.claims .alt {
  display: block; margin-top: 6px; padding: 5px 10px; border-left: 3px solid var(--diverge);
  background: var(--diverge-bg); font-size: 15px; border-radius: 0 4px 4px 0;
}
.claims .alt b { color: var(--diverge); }

.topics { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; font-size: 14px; }
.topics button { border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: var(--accent); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.topics button:hover { text-decoration-color: currentColor; }
.ai-label { margin: 0; font-size: 14px; color: var(--muted); }
details { margin-top: 10px; font-size: 15px; }
details summary { cursor: pointer; color: var(--accent); width: fit-content; }
details ul { list-style: none; margin: 8px 0 0; padding: 0; }
details li { margin-bottom: 8px; line-height: 1.45; }
.related .rel-source { display: block; font-size: 13px; color: var(--muted); }
.related time { color: var(--muted); }
.more { text-align: center; padding: 28px 0; }
#more { border: 1px solid var(--rule); background: var(--surface); color: var(--ink); padding: 10px 22px; border-radius: 6px; font: 16px var(--sans); cursor: pointer; }

/* stranica priče: /prica/<id>-<naslov> */
.detail { padding: 24px 0 8px; max-width: 680px; }
.detail .back {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); font-size: 17px; font-weight: 700; text-decoration: none;
}
.detail .back::before { content: "←"; font-size: 20px; line-height: 1; }
.detail .back:hover { background: #fed7aa; }
.detail .meta { margin-top: 18px; }
.detail h1.title { font-size: 36px; line-height: 1.15; margin: 12px 0 16px; }
.detail .lede { font-size: 19px; line-height: 1.55; margin: 0 0 18px; }
.detail .body p { margin: 0 0 16px; max-width: 38em; }
.detail .claims h2, .detail .originals h2 { margin: 0 0 8px; font: 600 18px/1.3 var(--serif); }
.detail .claims { margin-top: 24px; }
.detail .topics a { color: var(--accent); }
.detail .originals { margin-top: 24px; }
.detail .originals ul { list-style: none; margin: 0; padding: 0; }
.detail .originals li { padding: 8px 0; border-top: 1px solid var(--rule); }
.detail .originals .rel-source { display: block; font-size: 13px; color: var(--muted); }
.detail .share { margin-top: 18px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); padding: 9px 18px; border-radius: 6px; font: 16px var(--sans); cursor: pointer; }
.detail:not([hidden]) ~ .feed, .detail:not([hidden]) ~ .more { display: none; }

/* niti: povezane priče o istoj temi */
.thread-label { position: relative; z-index: 1; display: inline-block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.thread-label:hover { text-decoration: underline; text-underline-offset: 3px; }
.thread-more { position: relative; z-index: 1; margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--accent-soft); }
.thread-more ul { list-style: none; margin: 0 0 6px; padding: 0; }
.thread-more li { padding: 4px 0; font-size: 15px; line-height: 1.4; }
.thread-more li a { color: var(--ink); text-decoration: none; }
.thread-more li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.thread-more time { font-size: 13px; color: var(--muted); white-space: nowrap; }
.thread-more ul:empty { display: none; }
.thread-all { font-size: 14px; font-weight: 700; }
.timeline { margin-top: 24px; }
.timeline h2 { margin: 0 0 8px; font: 600 18px/1.3 var(--serif); }
.timeline h2 a { color: var(--ink); }
.timeline ol { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; border-left: 2px solid var(--accent-soft); }
.timeline li { position: relative; padding: 6px 0; font-size: 15px; line-height: 1.4; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent-fill); }
.timeline li.current::before { background: var(--accent-fill); }
.timeline li.current span { font-weight: 700; }
.timeline time { display: block; font-size: 13px; color: var(--muted); }
.timeline a { color: var(--ink); }
.thread-page .kicker { margin: 18px 0 0; font-weight: 700; color: var(--accent); }
.thread-page h1.title { margin-top: 4px; }
.thread-page .thread-count { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.thread-list { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--accent-soft); }
.thread-list li { position: relative; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.thread-list li::before { content: ""; position: absolute; left: -20px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent-fill); }
.thread-list time { font-size: 13px; color: var(--muted); }
.thread-list h2 { margin: 2px 0 4px; font: 600 20px/1.25 var(--serif); }
.thread-list h2 a { color: var(--ink); text-decoration: none; }
.thread-list h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.thread-list p { margin: 0; }

/* sažetak dana */
.digest-list { margin: 8px 0 0; padding-left: 1.6em; }
.digest-list li { padding: 14px 0; border-top: 1px solid var(--rule); }
.digest-list li::marker { font: 600 20px var(--serif); color: var(--accent-fill); }
.digest-list h2 { margin: 0 0 6px; font: 600 21px/1.25 var(--serif); }
.digest-list h2 a { color: var(--ink); text-decoration: none; }
.digest-list h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.digest-list p { margin: 0; }
.digest-list .digest-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.digest-list .digest-thread { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 700; }
.digest-list h3 { margin: 0 0 4px; font: 700 16px/1.35 var(--sans); }
.digest-list h3 a { color: var(--ink); text-decoration: none; }
.digest-list h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.digest-headlines { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--accent-soft); }
.digest-headlines li { padding: 3px 0; border: 0; font-size: 15px; line-height: 1.4; }
.digest-headlines a { color: var(--ink); text-decoration: none; }
.digest-headlines a:hover { text-decoration: underline; text-underline-offset: 3px; }
.digest-headlines time { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* tržište predviđanja na stranici priče */
.market { margin: 4px 0 22px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 6px; }
.market h2 { margin: 0 0 4px; font: 600 18px/1.3 var(--serif); }
.market .question { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.market ul { list-style: none; margin: 0; padding: 0; }
.market li { display: grid; grid-template-columns: minmax(0, 11em) 1fr 3.2em; align-items: center; gap: 10px; padding: 4px 0; font-size: 15px; }
.market .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market .bar { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
.market .fill { display: block; height: 100%; background: var(--accent-fill); border-radius: 4px; }
.market .pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.market .note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* ocjena priče */
.rating { margin-top: 24px; padding: 14px 16px; background: var(--surface); border-radius: 6px; }
.rating h2 { margin: 0 0 8px; font: 600 18px/1.3 var(--serif); }
.rating .q { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.rating .q span { min-width: 7.5em; }
.rating button { border: 1px solid #e7d5c4; background: var(--bg); color: var(--ink); padding: 5px 14px; border-radius: 6px; font: 15px var(--sans); cursor: pointer; }
.rating button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-fill); color: var(--accent); font-weight: 700; }
.rating textarea { display: block; width: 100%; margin: 8px 0; padding: 8px 10px; border: 1px solid #e7d5c4; border-radius: 6px; font: 15px var(--sans); resize: vertical; }
.rating .send { margin-top: 8px; background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; font-weight: 700; }
.rating .send:disabled { opacity: 0.5; cursor: default; }
.rating .thanks { margin: 0; color: var(--muted); }

/* statistika */
.stats { max-width: 920px; }
.key-form { display: flex; gap: 8px; max-width: 420px; }
.key-form input { flex: 1; padding: 8px 12px; border: 1px solid #e7d5c4; border-radius: 6px; font: 16px var(--sans); }
.key-form button { padding: 8px 16px; border: 0; border-radius: 6px; background: var(--accent-fill); color: #fff; font: 700 15px var(--sans); cursor: pointer; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 8px 0 24px; }
.tile { padding: 14px 16px; border: 1px solid var(--rule); border-radius: 8px; }
.tile .label { margin: 0; font-size: 14px; color: var(--muted); }
.tile .value { margin: 4px 0; font: 600 32px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.tile .note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.chart { margin: 0 0 24px; }
.chart figcaption { font: 600 16px var(--serif); margin-bottom: 8px; }
.plot { position: relative; padding-left: 34px; }
.plot .ymax { position: absolute; left: 0; top: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 160px; border-bottom: 1px solid var(--rule); }
.bars .b { flex: 1; min-width: 3px; max-width: 28px; background: var(--accent-fill); border-radius: 4px 4px 0 0; outline-offset: 1px; }
.bars .b:hover, .bars .b:focus { background: var(--accent); }
.plot .tip { position: absolute; top: -8px; transform: translate(-50%, -100%); white-space: nowrap; padding: 4px 8px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 13px; pointer-events: none; }
.axis { display: flex; justify-content: space-between; padding-left: 34px; font-size: 12px; color: var(--muted); }
.stats-section { margin-top: 24px; overflow-x: auto; }
.stats-section h2 { font: 600 18px var(--serif); margin: 0 0 8px; }
.stats table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats th { text-align: left; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--rule); padding: 6px 8px 6px 0; }
.stats td { border-bottom: 1px solid var(--rule); padding: 6px 8px 6px 0; vertical-align: top; }
.stats td:not(:first-child):not(:nth-child(2)) { font-variant-numeric: tabular-nums; }

/* podnožje */
.footer { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 16px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
.footer p { margin: 0; }
.footer .copy { font: 600 15px var(--serif); color: var(--ink); margin-right: 16px; }
.footer .sources-label { margin-right: 4px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .trending { grid-column: 1; grid-row: 1; position: static; padding-top: 16px; }
  .trending h2 { font-size: 16px; margin-bottom: 6px; }
  .trending ol { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .trending ol::-webkit-scrollbar { display: none; }
  .trending li { border: 1px solid var(--rule); border-radius: 6px; flex: none; }
  .trending button { padding: 6px 10px; width: auto; }
  .layout > main { grid-row: 2; }
}
@media (max-width: 640px) {
  .brand { padding-top: 22px; padding-bottom: 14px; }
  .logo { font-size: 28px; }
  .title { font-size: 23px; }
  .detail h1.title { font-size: 28px; }
  .detail .lede { font-size: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  details[open] > ul { animation: open 160ms ease-out; }
  @keyframes open { from { opacity: 0; transform: translateY(-3px); } }
}
