/* WATCH – vizuálny systém
   Chladný papier, hlboká petrolejová, semafor ako jediný hlasný prvok. */
:root {
  --paper: #eef2f0;
  --surface: #ffffff;
  --ink: #16302c;
  --muted: #5a6e6a;
  --line: #cdd8d4;
  --petrol: #0e5a55;
  --petrol-soft: #d8e8e5;
  --green: #2e8b57;
  --amber: #d9951a;
  --red: #c23b2e;
  --off: #c9d2cf;
  --radius-s: 6px;
  --radius-l: 14px;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1d1b;
    --surface: #172826;
    --ink: #e3ecea;
    --muted: #9db1ac;
    --line: #2c4340;
    --petrol: #5fb8ae;
    --petrol-soft: #1f3a37;
    --off: #34504c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
a { color: var(--petrol); }
code { background: var(--petrol-soft); padding: .05em .35em; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.center { text-align: center; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- rám ---------- */
.topbar {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: .7rem 1.5rem;
  background: var(--ink); color: var(--paper);
}
.topbar a { color: inherit; text-decoration: none; }
.brand { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; gap: .55rem; }
.brand-lights { display: inline-flex; flex-direction: column; gap: 2px; background: #0a1614; padding: 3px; border-radius: 5px; }
.brand-lights i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.brand-lights i:nth-child(1) { background: var(--red); }
.brand-lights i:nth-child(2) { background: var(--amber); }
.brand-lights i:nth-child(3) { background: var(--green); }
.topbar nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.topbar nav a { padding: .35rem .7rem; border-radius: var(--radius-s); opacity: .8; }
.topbar nav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
.topbar nav a.on { opacity: 1; background: rgba(255,255,255,.14); }
.who { display: flex; gap: 1rem; font-size: .9rem; }
.who a { text-decoration: underline; opacity: .8; }
@media (prefers-color-scheme: dark) { .topbar { background: #081210; color: var(--ink); } }

.wrap { max-width: 1320px; margin: 0 auto; padding: 1.5rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}
.card.narrow { max-width: 520px; margin: 3rem auto; }
.table-wrap { overflow-x: auto; }

/* ---------- formuláre ---------- */
label { display: block; font-weight: 700; font-size: .92rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem;
  font: inherit; font-weight: 400; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: .5rem .65rem;
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { display: inline-block; width: auto; margin: 0 .35rem 0 0; }
input.num { display: inline-block; width: 5rem; }
.stack { display: grid; gap: 1rem; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; align-items: end; }
.grid-form .span { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .4rem 0; }
.inline-form input, .inline-form select { width: auto; margin: 0; }
.inline-form label { display: flex; align-items: center; gap: .4rem; }
.toggle { display: flex; align-items: center; font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; font-size: .92rem; margin-bottom: .35rem; }
.chips-select { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; margin: .5rem 0; }
.chips-select label { font-weight: 400; display: flex; align-items: center; }

.btn {
  display: inline-block; cursor: pointer;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  background: var(--petrol); color: #fff;
  border: 2px solid var(--petrol); border-radius: 999px;
  padding: .55rem 1.3rem;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--petrol); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.small { padding: .3rem .8rem; font-size: .85rem; }
.btn.wide { width: 100%; margin-top: 1.25rem; padding: .8rem; font-size: 1.05rem; }
@media (prefers-color-scheme: dark) { .btn { color: #0f1d1b; } }

.flash { padding: .7rem 1rem; border-radius: var(--radius-s); margin-bottom: 1rem; border-left: 5px solid var(--green); background: var(--surface); }
.flash-err { border-color: var(--red); }
.flash-warn { border-color: var(--amber); }

/* ---------- prihlásenie ---------- */
.login { max-width: 420px; margin: 8vh auto; }
.login h1 { font-size: 3.4rem; margin: .6rem 0 .1rem; letter-spacing: .02em; }
.login-mark { display: inline-flex; gap: 8px; background: var(--ink); padding: 8px 10px; border-radius: 999px; }
.login-mark i { width: 18px; height: 18px; border-radius: 50%; background: var(--off); animation: cycle 4.5s infinite; }
.login-mark i:nth-child(1) { --c: var(--red); animation-delay: 0s; }
.login-mark i:nth-child(2) { --c: var(--amber); animation-delay: 1.5s; }
.login-mark i:nth-child(3) { --c: var(--green); animation-delay: 3s; }
@keyframes cycle { 0%, 30% { background: var(--c); box-shadow: 0 0 12px var(--c); } 34%, 100% { background: #34504c; box-shadow: none; } }

/* ---------- semafor ---------- */
.sem {
  display: inline-grid; place-items: center;
  min-width: 2.1rem; height: 2.1rem; padding: 0 .4rem;
  border-radius: 999px; font-weight: 700; font-family: var(--font-head);
  color: #fff; background: var(--off);
}
.sem-green { background: var(--green); }
.sem-amber { background: var(--amber); color: #2b1d00; }
.sem-red { background: var(--red); }
.sem-none { color: var(--muted); }

.holistic { display: flex; gap: 1.25rem; align-items: flex-start; }
.lights {
  flex: none; display: flex; flex-direction: column; gap: 10px;
  background: var(--ink); padding: 12px 10px; border-radius: 22px;
}
.lights i { width: 34px; height: 34px; border-radius: 50%; background: #2d403d; transition: background .25s, box-shadow .25s; }
.holistic[data-sem=red] .l-red { background: var(--red); box-shadow: 0 0 18px var(--red); }
.holistic[data-sem=amber] .l-amber { background: var(--amber); box-shadow: 0 0 18px var(--amber); }
.holistic[data-sem=green] .l-green { background: var(--green); box-shadow: 0 0 18px var(--green); }
.hol-body { flex: 1; }
.hol-label { font-family: var(--font-head); font-size: 1.1rem; }
.hol-label output { font-size: 2rem; font-weight: 800; }
.hol-sem { font-family: var(--font-body); font-weight: 400; font-size: .9rem; color: var(--muted); display: block; }
input[type=range] { padding: 0; border: 0; accent-color: var(--petrol); height: 2rem; }
.hol-scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.anchors dl { display: grid; grid-template-columns: 3.5rem 1fr; gap: .25rem .5rem; font-size: .88rem; margin: .5rem 0; }
.anchors dt { font-weight: 700; }
.anchors dd { margin: 0; }

/* ---------- hodnotenie ---------- */
.runbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: .9rem; color: var(--muted); }
.meter { flex: 1; height: 8px; background: var(--petrol-soft); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--petrol); border-radius: inherit; }

.rate-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .rate-grid { grid-template-columns: 1fr; } }
.content-pane { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
@media (max-width: 960px) { .content-pane { position: static; max-height: none; } }
.item-title { font-size: 1.7rem; margin-bottom: .2rem; }
.item-sub { font-size: 1.05rem; margin-top: 0; }
.meta { margin: 0 0 .4rem; color: var(--muted); font-size: .88rem; }
.chip { display: inline-block; background: var(--petrol-soft); color: var(--ink); border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; font-weight: 700; }
.content-text { white-space: normal; max-width: 72ch; font-size: .98rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.shot { max-width: 100%; border-radius: var(--radius-s); border: 1px solid var(--line); }
.video { aspect-ratio: 16 / 9; }
.video iframe, iframe.pdf { width: 100%; height: 100%; border: 0; border-radius: var(--radius-s); }
iframe.pdf { height: 75vh; }

.steps { list-style: none; counter-reset: st; padding: 0; margin: 0; }
.step { counter-increment: st; position: relative; padding: 0 0 1.4rem 2.6rem; border-left: 2px solid var(--line); margin-left: .9rem; }
.step:last-child { border-left-color: transparent; }
.step::before {
  content: counter(st);
  position: absolute; left: -.95rem; top: -.1rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-weight: 700; font-family: var(--font-head);
}
.step h2 { font-size: 1.1rem; padding-top: .1rem; }
.rate-form[data-env="0"] [data-needs-env] { display: none; }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { font-weight: 400; font-size: .82rem; padding: .3rem .7rem; cursor: pointer; border-left: 1px solid var(--line); }
.seg label:first-of-type { border-left: 0; }
.seg input:checked + label { background: var(--ink); color: var(--paper); font-weight: 700; }
.seg input:checked + label.seg-1 { background: var(--amber); color: #2b1d00; }
.seg input:checked + label.seg-2 { background: var(--red); color: #fff; }
.seg input:checked + label.seg-na { background: var(--muted); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--amber); outline-offset: -3px; }
.seg.big label { font-size: 1rem; padding: .5rem 1.2rem; }

.ind-group { margin: 0 0 1rem; }
.ind-group legend { font-family: var(--font-head); font-size: 1rem; color: var(--petrol); }
.ind { border-top: 1px solid var(--line); padding: .55rem 0; }
.ind-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.ind-head details { flex: 1 1 14rem; }
.ind-head summary { cursor: pointer; font-weight: 700; }
.ind-head details p { font-size: .9rem; margin: .3rem 0; max-width: 60ch; }
.code { font-family: var(--font-head); font-weight: 800; color: var(--petrol); font-size: .85em; }
.sev { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-left: .2rem; vertical-align: middle; }
.sev-clear { background: var(--red); }
.sev-mild { background: #e6c200; }
.sev-theoretical { background: #00a650; }
.evidence { display: none; margin-top: .45rem; font-size: .9rem; }
.ind.has-value .evidence { display: block; }
.ind.missing-ev .evidence { border-color: var(--red); }

.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: .75rem; }
.versus > div { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; background: var(--paper); padding: .75rem; border-radius: var(--radius-s); }
.versus .sem { min-width: 3rem; height: 3rem; font-size: 1.4rem; }
.ai-out { font-size: .92rem; margin-bottom: 1rem; }
.ai-out ul { padding-left: 1.1rem; }
.ai-ind { font-size: .86rem; margin-top: .4rem; padding: .45rem .6rem; border-radius: var(--radius-s); background: var(--paper); display: none; }
.ai-ind.show { display: block; }
.ai-ind b { font-family: var(--font-head); }
.ind.cmp.diff { background: linear-gradient(90deg, rgba(217,149,26,.14), transparent 70%); border-radius: var(--radius-s); padding-left: .5rem; padding-right: .5rem; }
.only-diff .ind.cmp:not(.diff):not(.has-value) { display: none; }
.agree { margin-top: 1.25rem; }
.done-head { display: flex; justify-content: space-between; align-items: center; }
.done-head .sem { min-width: 3.2rem; height: 3.2rem; font-size: 1.5rem; }
.found { padding-left: 1.1rem; }
blockquote { margin: .3rem 0 .6rem; padding-left: .8rem; border-left: 3px solid var(--line); color: var(--muted); }

/* ---------- oslava ---------- */
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }
.celebrate { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(10, 22, 20, .55); z-index: 40; padding: 1rem; }
.celebrate.hidden { display: none; }
.cel-card { background: var(--surface); border-radius: 20px; padding: 2rem 2.2rem; max-width: 440px; width: 100%; text-align: center; }
.cel-points { font-family: var(--font-head); font-size: 4.2rem; font-weight: 800; color: var(--petrol); margin: 0; line-height: 1; }
.cel-level { font-weight: 700; color: var(--amber); }
.cel-badge { display: flex; align-items: center; gap: .6rem; text-align: left; background: var(--paper); padding: .5rem .8rem; border-radius: var(--radius-s); }
.cel-badge span { font-size: 1.8rem; }
.cel-badge small { display: block; color: var(--muted); }
.cel-actions { display: flex; gap: .6rem; justify-content: center; margin-top: 1.2rem; flex-wrap: wrap; }

/* ---------- nástenka ---------- */
.hero-dash { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin: 1rem 0 1.75rem; }
.hero-dash h1 { font-size: 2.6rem; }
.level { min-width: 260px; }
.level-num { margin: 0; font-size: .9rem; color: var(--muted); }
.level-name { margin: 0 0 .4rem; font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.big-fraction { font-family: var(--font-head); font-size: 3.2rem; font-weight: 800; margin: 0 0 .4rem; line-height: 1; }
.big-fraction span { font-size: 1.5rem; color: var(--muted); }
.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.badges li { text-align: center; padding: .5rem .25rem; border-radius: var(--radius-s); background: var(--paper); }
.badges .b-icon { font-size: 1.6rem; display: block; line-height: 1.2; }
.badges .b-name { font-size: .78rem; font-weight: 700; display: block; }
.badges .b-desc { position: absolute; left: -9999px; }
.badges li.off { opacity: .45; }
.board { padding-left: 1.3rem; margin: 0; }
.board li { padding: .25rem 0; }
.board li span:first-child { font-weight: 700; margin-right: .4rem; }
.board li span + span { color: var(--muted); font-size: .85rem; }
.board li strong { float: right; font-family: var(--font-head); }
.board li.me { color: var(--petrol); }
.list-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.tabs { display: flex; gap: .25rem; }
.tabs a, .pager a { padding: .3rem .8rem; border-radius: 999px; text-decoration: none; }
.tabs a.on, .pager a.on { background: var(--ink); color: var(--paper); }
.pager { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: 1rem; }

table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--line); padding: .45rem .5rem; white-space: nowrap; }
table.list td { border-bottom: 1px solid var(--line); padding: .45rem .5rem; vertical-align: middle; }
table.list .sem { min-width: 1.8rem; height: 1.8rem; font-size: .85rem; }

/* ---------- admin ---------- */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 0 1.25rem; }
@media (max-width: 500px) { .tools { grid-template-columns: 1fr; } }
.tools summary { cursor: pointer; }
.tools summary h2 { display: inline; }
.bulkbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.bulkbar select { width: auto; margin: 0; }
.filters { margin-bottom: .5rem; }
.raters { display: flex; flex-wrap: wrap; gap: .3rem; }
.rater { font-size: .8rem; background: var(--paper); border-radius: 999px; padding: .1rem .5rem; display: inline-flex; align-items: center; gap: .25rem; }
.rater.st-final { background: var(--petrol-soft); }
.rater .sem { min-width: 1.3rem; height: 1.3rem; font-size: .7rem; }
.dist { display: flex; height: 12px; min-width: 140px; border-radius: 999px; overflow: hidden; background: var(--paper); }
.dist i { display: block; height: 100%; }
.d-green { background: var(--green); } .d-amber { background: var(--amber); } .d-red { background: var(--red); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem; }
.kpis div { background: var(--paper); border-radius: var(--radius-s); padding: .8rem; }
.kpis strong { display: block; font-family: var(--font-head); font-size: 1.8rem; }
.kpis span { font-size: .82rem; color: var(--muted); }
.rel { font-weight: 700; }
.rel-good { color: var(--green); } .rel-ok { color: var(--amber); } .rel-weak { color: var(--red); }
.member { border-top: 1px solid var(--line); padding: .9rem 0; }
.member header { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; }
.member.inactive { opacity: .5; }
.ind-edit { border-top: 1px solid var(--line); padding: .6rem 0; }
.ind-edit summary { cursor: pointer; font-weight: 700; }
.ind-edit .grid-form { margin: .8rem 0; }
.cb p { max-width: 75ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.anchors summary { cursor: pointer; font-size: .9rem; color: var(--petrol); }
.prompt-box { margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-s); padding: .5rem .8rem; }
.prompt-box summary { cursor: pointer; font-weight: 700; color: var(--petrol); }
.prompt-box pre { white-space: pre-wrap; font-size: .8rem; max-height: 420px; overflow: auto; background: var(--paper); padding: .8rem; border-radius: var(--radius-s); }
.feedback-list li { margin-bottom: .8rem; }
