/* Operation Blind Tasting – téma „tajné spisy“ (spec §9, design/*.dc.html) */

@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/special-elite-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/special-elite-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/courier-prime-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/courier-prime-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/courier-prime-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/courier-prime-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #efe6d2;
  --card: #f7f1e3;
  --border: #cfc3a8;
  --border-light: #d9cdb2;
  --dashed: #8a8170;
  --ink: #1d1d1b;
  --ink-soft: #3d382f;
  --muted: #5a5346;
  --stamp: #b3261e;
  --stamp-dark: #7f1b15;
  --hit: #2f5d3a;
  --dark: #1d1d1b;
  --dark-2: #2a2926;
  --dark-track: #3a3833;
  --on-dark: #efe6d2;
  --on-dark-muted: #c9bfa8;
  --eyes-only: #e8a49e;
  --input-bg: #fbf7ee;
  --font-head: 'Special Elite', 'Courier New', monospace;
  --font-body: 'Courier Prime', 'Courier New', monospace;
}

* { box-sizing: border-box; }
/* `hidden` musí vyhrať nad triedami s display: flex (Unlock bloky, hinty) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}
a { color: var(--stamp); }
a:hover { color: var(--stamp-dark); }

.page {
  max-width: 390px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Typografia */
.h1 { margin: 8px 0 0; font-family: var(--font-head); font-weight: 400; font-size: 32px; line-height: 1.1; }
.h2 { margin: 0; font-family: var(--font-head); font-weight: 400; font-size: 20px; }
.head { font-family: var(--font-head); font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.label { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); }
.kicker { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }
.ok { color: var(--hit); }
.err { color: var(--stamp); }
.bold { font-weight: 700; }

/* Bloky */
.stack { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--dark); color: var(--on-dark); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.panel .muted { color: var(--on-dark-muted); }
.divider { border-top: 1px dashed var(--dashed); padding-top: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Pečiatka */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  flex-shrink: 0;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  padding: 0.45em 0.7em 0.35em; /* Special Elite sedí nízko – fallback bez text-box */
  font-family: var(--font-head);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.1em;
  transform: rotate(-4deg);
  white-space: nowrap;
}
/* Orezanie na výšku veľkých písmen → rovnaký padding hore aj dole = text presne v strede */
@supports (text-box: trim-both cap alphabetic) {
  .stamp { text-box: trim-both cap alphabetic; padding: 0.45em 0.7em; }
}
.stamp-lg { border-width: 3px; font-size: 16px; }
/* Hlavička s pečiatkou vpravo – pečiatka nikdy neprekryje nadpis (pri úzkom displeji sa zalomí pod neho) */
.title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.title-row > .stamp { margin-top: 6px; }
.stamp-ok { border-color: var(--hit); color: var(--hit); }

/* Redigovaný pruh – šírka sa nastavuje inline per pole (fixná, spec §8) */
.redacted { display: block; height: 16px; background: var(--ink); border-radius: 1px; }

/* Formuláre */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.input, select, textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px;
  min-height: 46px;
  border: 1.5px solid var(--ink);
  background: var(--input-bg);
  color: var(--ink);
  width: 100%;
}
textarea { resize: vertical; min-height: 0; }
input[type='range'] { width: 100%; accent-color: var(--ink); min-height: 32px; }
.field-dark { background: var(--dark); color: var(--on-dark); padding: 12px; }
.field-dark textarea { border-color: var(--dashed); background: var(--dark-2); color: var(--on-dark); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border: none;
  background: var(--dark);
  color: var(--on-dark);
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { color: var(--on-dark); }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font-family: var(--font-body); font-weight: 700; font-size: 15px; min-height: 44px; }
.btn-outline:hover { color: var(--ink); }

.link { font-size: 14px; font-weight: 700; text-decoration: none; min-height: 24px; }

/* Progress */
.bar { flex-grow: 1; height: 8px; background: var(--dark-track); }
.bar > span { display: block; height: 8px; background: var(--on-dark); }
.bar-light { height: 6px; background: var(--border-light); }
.bar-light > span { height: 6px; background: var(--ink); }

/* Flash správy */
.flash { padding: 12px 14px; border-left: 4px solid var(--stamp); background: var(--card); font-size: 14px; }
.flash-ok { border-left-color: var(--hit); }

.agent-footer { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--dashed); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.agent-footer form { margin: 0; display: flex; }
.agent-footer button { display: inline-flex; align-items: center; line-height: 1; background: none; border: none; padding: 0; min-height: 44px; color: var(--stamp); font: inherit; font-weight: 700; cursor: pointer; }

.touch { min-height: 44px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Prehľad: karty krycích mien */
.codename-card {
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 44px;
}
.codename-card:hover { color: var(--ink); border-color: var(--ink); }
.dots { display: flex; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.dot-on { background: var(--ink); }
.suspect-row {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--border-light);
}
.suspect-row:hover { color: var(--ink); }
.rank-row {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border-bottom: 1px solid var(--border-light);
}
.rank-row:hover { color: var(--ink); }

/* Evidence board */
.board-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.board-item summary { list-style: none; cursor: pointer; min-height: 32px; display: flex; }
.board-item summary::-webkit-details-marker { display: none; }
.board-item[open] { border-color: var(--ink); }
fieldset[disabled] { opacity: 0.6; }

/* Odhalenie vo final: karty sa postupne odkrývajú (~0,8 s), potom ponuka Final report.
   Trieda .reveal-anim sa pridá z app.js iba pri prvom zobrazení (localStorage flag). */
@keyframes declassify {
  from { opacity: 0; transform: scaleX(0.3); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
.reveal-name { min-height: 12px; transform-origin: left center; }
.reveal-anim .reveal-name,
.reveal-anim .reveal-cta { opacity: 0; animation: declassify 0.45s ease-out forwards; animation-delay: calc(var(--i, 0) * 0.8s); }
.reveal-anim .reveal-name { position: relative; }
@media (prefers-reduced-motion: reduce) {
  .reveal-anim .reveal-name, .reveal-anim .reveal-cta { animation: none; opacity: 1; }
}
