/* KadSjeda — "Ploča": Geist + Geist Mono, palette Grafit i šljiva. */
/* Geist and Geist Mono (Vercel, SIL OFL 1.1, see geist-OFL.txt), self-hosted variable fonts. */
@font-face { font-family: "Geist"; src: url("/static/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/static/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --bg: #f5f5f3; --card: #fff; --fg: #151515; --text2: #3a3a3d; --muted: #66666a;
  --line: #ececea; --line2: #e2e2df; --hover: #fafaf8;
  --accent: #6b3a68; --accent-soft: #f4eef3; --on-accent: #fff;
  --hero: #6b3a68; --hero-fg: #fff; --hero-sub: #ecdfeb; --hero-line: rgba(255,255,255,.22);
  --ok: #2e6b46; --ok-bg: #e3eee6; --plan: #86601a; --plan-bg: #f3ead6;
  --rule: #3e5486; --rule-bg: #e4e8f2; --grey: #5e5e62; --grey-bg: #eaeae7; --red: #a12020;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --w: 68rem; --read: 44rem; --pad: 20px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414; --card: #1e1e1f; --fg: #ededeb; --text2: #cfcfcc; --muted: #a3a3a6;
    --line: #2c2c2e; --line2: #333336; --hover: #242426;
    --accent: #d3a6cf; --accent-soft: #2a1d29; --on-accent: #141414;
    --hero: #3b2139; --hero-fg: #fff; --hero-sub: #d9c5d7; --hero-line: rgba(255,255,255,.16);
    --ok: #8fcfa6; --ok-bg: #1d3326; --plan: #e3c27e; --plan-bg: #3a2f17;
    --rule: #a9bbe6; --rule-bg: #1f2840; --grey: #b4b4b8; --grey-bg: #2a2a2c; --red: #f08a8a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.err { color: var(--red); }
.cap { display: inline-block; }
.cap::first-letter { text-transform: uppercase; }

/* Shell */
header.site .wrap, main, footer.site { max-width: var(--w); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
header.site .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 4.25rem; }
.logo { font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; color: var(--fg); }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
header.site nav { display: flex; gap: 1.5rem; }
header.site nav a { color: var(--fg); font-weight: 500; font-size: .95rem; padding: .75rem 0; }
header.site nav a[aria-current] { color: var(--accent); }
main { padding-top: .5rem; padding-bottom: 1rem; }
main > *:not(.home) { max-width: var(--read); }
footer.site { color: var(--muted); font-size: .85rem; line-height: 1.6; padding-top: 2.5rem; padding-bottom: 3rem; }
footer.site p { max-width: var(--read); margin: 0 0 .75rem; }
footer.site a { color: var(--muted); text-decoration: underline; text-underline-offset: .18em; }

/* Type */
h1 { font-size: 2rem; line-height: 1.1; font-weight: 600; letter-spacing: -.025em; margin: 1rem 0 .75rem; text-wrap: balance; }
h2 { font-size: 1.15rem; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; margin: 3rem 0 1rem; }
p { margin: .5rem 0; }
.lead { color: var(--muted); margin: 0; text-wrap: pretty; }
.crumb { font-size: .92rem; color: var(--muted); margin-top: .75rem; }
.crumb a { color: var(--muted); font-weight: 500; }
.crumb .sep { padding: 0 .2rem; }
.prose p { color: var(--text2); line-height: 1.65; text-wrap: pretty; }
.more { margin: 1.25rem 0 0; font-weight: 600; }

/* Status */
.badge { display: inline-flex; align-items: center; flex: none; font: 600 .72rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; white-space: nowrap; }
.tag { font: 600 .7rem/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge.confirmed, .badge.paid { color: var(--ok); background: var(--ok-bg); }
.badge.planned { color: var(--plan); background: var(--plan-bg); }
.badge.rule { color: var(--rule); background: var(--rule-bg); }
.badge.unpublished { color: var(--grey); background: var(--grey-bg); }
.tag.confirmed, .tag.paid { color: var(--ok); }
.tag.planned { color: var(--plan); }
.tag.rule { color: var(--rule); }
.tag.unpublished { color: var(--grey); }

/* Home */
.hero { display: flex; flex-direction: column; gap: 1.25rem; background: var(--hero); color: var(--hero-fg); border-radius: 22px; padding: 24px 24px 26px; margin-top: 1.75rem; transition: transform .15s ease; }
.hero:hover { text-decoration: none; transform: translateY(-1px); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.hero-name { font-weight: 600; }
.hero-count { display: flex; align-items: baseline; gap: .6rem; }
.hero-num { font-size: 6rem; line-height: .85; font-weight: 500; letter-spacing: -.05em; }
.hero-unit { font-size: 1.5rem; font-weight: 500; }
.hero-word { font-size: 3.5rem; line-height: 1; font-weight: 500; letter-spacing: -.035em; }
.hero-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 18px; border-top: 1px solid var(--hero-line); }
.hero-date { font: 500 1.05rem/1.3 var(--mono); text-transform: uppercase; }
.hero-sub { font-size: .92rem; color: var(--hero-sub); }
.search { position: relative; margin-top: 1.5rem; }
.search::before { content: ""; position: absolute; left: 17px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border: 2px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search::after { content: ""; position: absolute; left: 29px; top: 50%; width: 2px; height: 7px; margin-top: 3px; background: var(--muted); border-radius: 1px; transform: rotate(-45deg); pointer-events: none; }
.search input { display: block; width: 100%; font: inherit; font-size: 1rem; padding: 14px 16px 14px 46px; border: 1px solid var(--line2); border-radius: 14px; background: var(--card); color: var(--fg); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.empty { background: var(--card); border-radius: 20px; padding: 20px 18px; color: var(--text2); margin: 0; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; margin: 3rem 0 .9rem; padding: 0 4px; }
.list-head h2 { margin: 0; }

/* Lists */
.list { list-style: none; margin: 0; padding: 4px 0; background: var(--card); border-radius: 20px; overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.list > .today, .list > .today + li { border-top: 0; }
.item { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; color: inherit; position: relative; }
.item.two { grid-template-columns: minmax(0, 1fr) auto; }
a.item:hover, li.item:has(.stretch:hover) { background: var(--hover); text-decoration: none; }
a.item:hover .item-name, .item .stretch:hover { text-decoration: underline; text-underline-offset: .18em; }
.stretch { color: var(--fg); }
.stretch::after { content: ""; position: absolute; inset: 0; }
.day { display: flex; flex-direction: column; align-items: center; font-family: var(--mono); }
.day-n { font-size: 1.5rem; line-height: 1; font-weight: 500; letter-spacing: -.02em; }
.day-n.sm { font-size: 1rem; line-height: 1.5; }
.day-w { font-size: .7rem; line-height: 1.6; color: var(--muted); text-transform: uppercase; font-weight: 500; }
.day.empty .day-n { color: var(--muted); }
.item-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.item-name { display: block; font-weight: 600; line-height: 1.3; color: var(--fg); }
.item-ch { font-weight: 400; color: var(--muted); }
.item-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: .85rem; color: var(--muted); }
.item-sub { font-size: .88rem; color: var(--muted); }
.item-when { font: 500 .82rem/1.3 var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
.item-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; font: 500 .82rem/1.35 var(--mono); }
.item.past .day-n, .item.past .stretch, .item.past .item-name { color: var(--muted); }
.today { display: flex; align-items: center; gap: 10px; padding: 7px 18px; background: var(--accent-soft); color: var(--accent); font: 600 .72rem/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.today::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Answer card */
.answer { background: var(--card); border-radius: 22px; padding: 24px; margin: 1.5rem 0; display: flex; flex-direction: column; gap: .85rem; }
.answer p { margin: 0; }
.answer-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 26px; }
.label, .answer h2.label { margin: 0; font: 500 .75rem/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.big { font-size: 1.85rem; line-height: 1.12; font-weight: 600; letter-spacing: -.025em; text-wrap: balance; }
.big::first-letter { text-transform: uppercase; }
.answer.unpublished .big { color: var(--muted); }
.until { color: var(--accent); font-weight: 600; margin-top: -.35rem !important; }
.text { color: var(--text2); font-size: .97rem; line-height: 1.6; text-wrap: pretty; }
.note { font-size: .92rem; color: var(--muted); line-height: 1.55; }
.paid { color: var(--ok); font-weight: 600; font-size: .95rem; }
.prov { font-size: .8rem; line-height: 1.6; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); margin-top: .25rem; overflow-wrap: anywhere; }

/* Channel tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 8px; }
.tile { background: var(--card); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tile-name { font-size: .85rem; color: var(--muted); }
.tile-date { font: 500 1.02rem/1.3 var(--mono); }
.tile-paid { font-size: .8rem; color: var(--ok); }

/* Pager, link lists */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 2rem 0 0; }
.pager.top { margin: 0 0 1.25rem; }
.pager a { background: var(--card); border-radius: 16px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px; color: var(--fg); font-weight: 600; }
.pager a:hover { background: var(--hover); text-decoration: none; }
.pager small { font: 500 .7rem/1.2 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pager .next { grid-column: 2; align-items: flex-end; text-align: right; }
.links { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 20px; overflow: hidden; }
.links li + li { border-top: 1px solid var(--line); }
.links a { display: flex; justify-content: space-between; gap: 1rem; padding: 14px 18px; color: var(--fg); font-weight: 500; }
.links a::after { content: "→"; color: var(--muted); }
.links a:hover { background: var(--hover); text-decoration: none; }

/* Sources */
.sources { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.source { background: var(--card); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.source h2 { margin: 0; font-size: 1rem; line-height: 1.35; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.source p { margin: 0; color: var(--text2); font-size: .95rem; }
.source .prov { border: 0; padding: 0; margin: 0; color: var(--muted); font-size: .8rem; }
.state { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 .7rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.ok { color: var(--ok); }
.state.err { color: var(--red); }

/* Admin and generic tables/forms */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; background: var(--card); border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font: 500 .72rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.scroll { overflow-x: auto; }
.scroll table { min-width: 34rem; }
.flash { background: var(--card); padding: 10px 14px; border-radius: 12px; }
.review { background: var(--card); border-radius: 16px; padding: 16px 18px; margin: .75rem 0; }
.review blockquote { margin: .5rem 0; padding-left: 12px; border-left: 3px solid var(--line2); color: var(--text2); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: .5rem 0; }
button { font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); cursor: pointer; }
button.secondary { background: transparent; color: var(--fg); border-color: var(--line2); }
input, select, textarea { font: inherit; max-width: 100%; }
.manual input, .manual select, .manual textarea, .review input { padding: 8px 10px; border: 1px solid var(--line2); border-radius: 10px; background: var(--card); color: var(--fg); }
.manual { display: grid; gap: 10px; max-width: 30rem; }
.manual label { display: grid; gap: 4px; font-size: .9rem; }

/* Wider screens */
@media (min-width: 40rem) {
  :root { --pad: 32px; }
  body { font-size: 18px; }
  h1 { font-size: 2.4rem; }
  .big { font-size: 2.15rem; }
  .answer { padding: 28px 30px; }
  .item { padding: 18px 22px; gap: 18px; }
}
@media (min-width: 60rem) {
  .home { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 4.5rem; align-items: start; padding-top: 1rem; }
  .home-side { position: sticky; top: 2rem; }
  .home .list-head { margin-top: 1.25rem; }
}
@media (max-width: 22.5rem) {
  :root { --pad: 16px; }
  header.site nav { gap: 1rem; }
  .hero-num { font-size: 4.75rem; }
  .item { grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
}
