/* DFIR akadémia – vizuálny jazyk „spis a dôkazný štítok“:
   pokojná laboratórna sivomodrá, atrament, jedna výrazná farba – žltá dôkaznej pásky. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/archivo-latin-ext-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/archivo-latin-standard-normal.woff2) format("woff2-variations");
  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: "Atkinson"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-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+1E00-1E9F, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-ext-400-italic.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+1E00-1E9F, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-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+1E00-1E9F, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/atkinson-hyperlegible-next-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+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #edf1f4;
  --surface: #ffffff;
  --sunk: #e2e8ee;
  --ink: #1a2b3c;
  --ink-2: #51606f;
  --line: #c9d3dc;
  --tape: #f2c230;
  --tape-ink: #1a2b3c;
  --ok: #17796f;
  --ok-bg: #dcefec;
  --bad: #b5402c;
  --bad-bg: #f6e1dc;
  --half: #9a6a08;
  --half-bg: #f6ecd2;
  --focus: #2f6fdb;
  --shadow: 0 1px 0 rgba(26, 43, 60, 0.06), 0 6px 18px -10px rgba(26, 43, 60, 0.35);
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1620; --surface: #16212d; --sunk: #1d2a38; --ink: #e3e9ef; --ink-2: #9aa9b8; --line: #2b3b4c;
    --tape: #e8b923; --ok: #46b5a6; --ok-bg: #143430; --bad: #e57b64; --bad-bg: #3a1f1a; --half: #e0b04a; --half-bg: #3a2e14;
    --focus: #79a6ff; --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 20px -12px rgba(0, 0, 0, 0.8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1620; --surface: #16212d; --sunk: #1d2a38; --ink: #e3e9ef; --ink-2: #9aa9b8; --line: #2b3b4c;
  --tape: #e8b923; --ok: #46b5a6; --ok-bg: #143430; --bad: #e57b64; --bad-bg: #3a1f1a; --half: #e0b04a; --half-bg: #3a2e14;
  --focus: #79a6ff; --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 20px -12px rgba(0, 0, 0, 0.8); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--body); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 650; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-stretch: 80%; font-weight: 750; }
h2 { font-size: 1.5rem; font-stretch: 88%; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 0.8em; }
a { color: inherit; text-decoration-color: var(--tape); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink-2); }
.small { font-size: 0.88rem; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- rozvrhnutie ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #dbe3ea; padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
:root[data-theme="dark"] .side, .side { --ink-2: #93a4b5; }
@media (prefers-color-scheme: dark) { .side { background: #0a1119; border-right: 1px solid var(--line); } }
:root[data-theme="dark"] .side { background: #0a1119; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand b { font-family: var(--display); font-stretch: 75%; font-size: 1.25rem; font-weight: 750; line-height: 1; color: #fff; display: block; }
.brand span { font-size: 0.78rem; color: #93a4b5; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); text-decoration: none; color: #c7d2dc; }
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav a[aria-current="page"] { background: rgba(242, 194, 48, 0.14); color: #fff; box-shadow: inset 3px 0 0 var(--tape); }
.nav .count { margin-left: auto; background: var(--tape); color: var(--tape-ink); border-radius: 10px; font-size: 0.75rem; font-weight: 700; padding: 0 7px; }
.nav-title { font-size: 0.8rem; color: #8597a9; padding: 0 10px; margin-top: 4px; }
.side-foot { margin-top: auto; font-size: 0.85rem; color: #93a4b5; display: flex; flex-direction: column; gap: 6px; }
.side-foot button { background: none; border: 1px solid #34465a; color: #c7d2dc; border-radius: var(--r); padding: 5px 10px; cursor: pointer; text-align: left; }
.main { min-width: 0; padding: 28px clamp(16px, 4vw, 48px) 80px; }
.topbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; position: fixed; inset: 0 auto 0 0; width: 82vw; max-width: 320px; z-index: 40; }
  .side.open { display: flex; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; padding: 10px 16px; }
  .topbar button { background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px; }
  .topbar b { font-family: var(--display); font-stretch: 75%; font-size: 1.1rem; }
  body { font-size: 16px; }
  .main { padding: 20px 16px 80px; }
}
.wrap { max-width: 1060px; }
.read { max-width: 70ch; }

/* ---------- všeobecné prvky ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); padding: 9px 16px; border-radius: var(--r); cursor: pointer; font-weight: 700; text-decoration: none; line-height: 1.2; }
.btn:hover { filter: brightness(1.15); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); filter: none; }
.btn.tape { background: var(--tape); color: var(--tape-ink); border-color: var(--tape); }
.btn.small { padding: 5px 11px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.notice { border-left: 4px solid var(--tape); background: var(--surface); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; margin: 0 0 16px; }
.error { color: var(--bad); }
input[type="text"], input[type="password"], textarea, select { width: 100%; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 9px 12px; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
label { display: block; font-weight: 700; margin: 12px 0 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin: 18px 0 22px; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; font-weight: 700; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--tape); }
.bar { height: 8px; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 4px; transition: width 0.6s ease; }
.pill { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: var(--sunk); color: var(--ink-2); }
.pill.a { background: var(--tape); color: var(--tape-ink); }

/* ---------- prihlásenie ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  linear-gradient(var(--paper), var(--paper)) padding-box; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.login-card .tape-strip { background: var(--tape); color: var(--tape-ink); font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 0.95rem; padding: 6px 20px; letter-spacing: 0.02em; }
.login-card form { padding: 22px 24px 26px; }

/* ---------- dôkazný štítok (jednotka kurzu) ---------- */
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tag { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 4px 4px; box-shadow: var(--shadow); text-decoration: none; overflow: hidden; transition: transform 0.15s ease; min-height: 190px; }
.tag:hover { transform: translateY(-2px); }
.tag-head { background: var(--tape); color: var(--tape-ink); padding: 8px 14px 8px 40px; display: flex; align-items: baseline; gap: 8px; font-family: var(--display); font-stretch: 70%; font-weight: 800; }
.tag-head .id { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.tag-head .mod { font-size: 0.82rem; font-weight: 600; opacity: 0.8; margin-left: auto; }
.tag-hole { position: absolute; left: 13px; top: 11px; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px rgba(26, 43, 60, 0.45); }
.tag-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tag-body h3 { margin: 0; font-size: 1.12rem; }
.tag-body p { margin: 0; color: var(--ink-2); font-size: 0.92rem; }
.tag-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--ink-2); }
.tag-foot .bar { flex: 1; }
.seal { position: absolute; right: 12px; bottom: 34px; width: 62px; height: 62px; border-radius: 50%; border: 2.5px solid var(--ok); color: var(--ok); display: grid; place-items: center; font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 0.72rem; transform: rotate(-14deg); opacity: 0.85; text-align: center; line-height: 1.05; }

/* ---------- prehľad ---------- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-bottom: 30px; align-items: stretch; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 6px; }
.today { display: flex; flex-direction: column; gap: 12px; }
.today-item { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; text-decoration: none; }
.today-item:hover { border-color: var(--ink); }
.today-item .big { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 2rem; line-height: 1; min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.readiness { display: grid; gap: 10px; }
.readiness .r { display: grid; grid-template-columns: 1fr 120px 42px; gap: 10px; align-items: center; font-size: 0.95rem; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.section-title h2 { margin: 0; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 48px; }
.spark i { flex: 1; background: var(--ok); opacity: 0.75; border-radius: 2px 2px 0 0; min-height: 2px; }

/* ---------- jednotka a lekcia ---------- */
.unit-head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: end; }
.crumbs { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 8px; }
.crumbs a { color: var(--ink-2); }
.goals { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.goals li { padding-left: 26px; position: relative; }
.goals li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.lesson-list { display: grid; gap: 8px; counter-reset: l; }
.lesson-list a { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; text-decoration: none; counter-increment: l; }
.lesson-list a::before { content: counter(l); font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: 1.3rem; width: 1.6ch; color: var(--ink-2); }
.lesson-list a.done::before { content: "✓"; color: var(--ok); }
.lesson-list a:hover { border-color: var(--ink); }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 34px; }
@media (max-width: 1100px) { .lesson-layout { grid-template-columns: minmax(0, 1fr); } .lesson-rail { display: none; } }
.lesson-rail { position: sticky; top: 24px; align-self: start; font-size: 0.9rem; display: flex; flex-direction: column; gap: 4px; }
.lesson-rail a { text-decoration: none; padding: 6px 10px; border-left: 3px solid var(--line); color: var(--ink-2); }
.lesson-rail a[aria-current="page"] { border-color: var(--tape); color: var(--ink); font-weight: 700; }
.lesson-rail a.done { color: var(--ok); }
.lesson-nav { display: flex; gap: 10px; margin-top: 34px; padding-top: 18px; border-top: 1.5px solid var(--line); flex-wrap: wrap; }

/* ---------- bloky ---------- */
.blocks > * + * { margin-top: 22px; }
.md ul, .md ol { padding-left: 1.3em; margin: 0 0 0.8em; }
.md li + li { margin-top: 3px; }
.md code { background: var(--sunk); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.md p:last-child, .md ul:last-child, .md ol:last-child { margin-bottom: 0; }
.lawref { display: inline; background: none; border: 0; padding: 0 2px; margin: 0; cursor: pointer; font-weight: 700; color: inherit; text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 2px; text-underline-offset: 3px; white-space: nowrap; }
.lawref:hover { background: color-mix(in srgb, var(--tape) 25%, transparent); }
.callout { border-radius: var(--r); padding: 14px 18px 14px 18px; border: 1.5px solid var(--line); background: var(--surface); position: relative; }
.callout h4 { font-family: var(--body); font-size: 0.98rem; font-weight: 700; margin: 0 0 4px; display: flex; gap: 8px; align-items: center; }
.callout h4 svg { width: 18px; height: 18px; flex: none; }
.callout.skuska { border-color: var(--tape); box-shadow: inset 5px 0 0 var(--tape); }
.callout.prax { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); box-shadow: inset 5px 0 0 var(--ok); }
.callout.pozor { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); box-shadow: inset 5px 0 0 var(--bad); }
.callout.tip, .callout.kniha { box-shadow: inset 5px 0 0 var(--ink-2); }
.scenario { background: var(--ink); color: #e4ebf1; border-radius: var(--r); padding: 18px 20px; }
.scenario h4 { font-family: var(--display); font-stretch: 80%; color: var(--tape); margin: 0 0 6px; font-size: 1.05rem; }
:root[data-theme="dark"] .scenario { background: #233243; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .scenario { background: #233243; } }
.reveal { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 14px 18px; }
.reveal .q { font-weight: 700; }
.reveal .a { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
figure { margin: 0; }
figure img, figure video { width: 100%; height: auto; display: block; border-radius: var(--r); background: var(--sunk); aspect-ratio: 16 / 9; object-fit: cover; }
figcaption { font-size: 0.88rem; color: var(--ink-2); margin-top: 6px; }
.media-missing { aspect-ratio: 16 / 9; border-radius: var(--r); background: repeating-linear-gradient(-45deg, var(--sunk) 0 14px, transparent 14px 28px); display: grid; place-items: center; color: var(--ink-2); font-size: 0.9rem; text-align: center; padding: 10px; }
.table-wrap { overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--surface); }
table.cmp th, table.cmp td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; }
table.cmp thead th { background: var(--ink); color: var(--paper); font-family: var(--display); font-stretch: 85%; font-weight: 700; }
table.cmp tbody th { background: var(--sunk); }
.block-title { font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.block-title .btn { margin-left: auto; }
.lawbox { border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.lawbox header { background: var(--sunk); padding: 8px 14px; font-weight: 700; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.lawbox .body { padding: 12px 16px; font-size: 0.95rem; max-height: 340px; overflow: auto; }
.lawbox .note { padding: 10px 16px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--tape) 12%, var(--surface)); }
.lawline { margin: 0 0 4px; }
.lawline.l4 { padding-left: 1.4em; }
.lawline.l5 { padding-left: 2.8em; }
.lawline.l6 { padding-left: 4.2em; }

/* diagramy krokov */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.dg-node { cursor: pointer; }
.dg-node rect, .dg-node path.shape, .dg-node circle { fill: var(--sunk); stroke: var(--line); stroke-width: 1.5; transition: fill 0.2s; }
.dg-node:hover rect, .dg-node:hover path.shape, .dg-node:hover circle { stroke: var(--ink); }
.dg-node.active rect, .dg-node.active path.shape, .dg-node.active circle { fill: var(--tape); stroke: var(--tape); }
.dg-node.active text { fill: var(--tape-ink); }
.dg-node text { fill: var(--ink); font-family: var(--body); font-size: 15px; font-weight: 700; }
.dg-node .n { font-family: var(--display); font-size: 13px; fill: var(--ink-2); font-weight: 800; }
.dg-node.active .n { fill: var(--tape-ink); }
.dg-arrow { stroke: var(--ink-2); stroke-width: 2; fill: none; }
.dg-head { fill: var(--ink-2); }
.diagram.anim .dg-node, .diagram.anim .dg-arrow, .diagram.anim .dg-head { opacity: 0; }
.diagram.play .dg-node, .diagram.play .dg-arrow, .diagram.play .dg-head { animation: dgIn 0.45s ease forwards; animation-delay: calc(var(--i) * 0.38s); }
@keyframes dgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dg-detail { margin-top: 12px; min-height: 3.2em; border-top: 1px solid var(--line); padding-top: 10px; }
.dg-detail b { display: block; font-family: var(--display); font-stretch: 85%; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 3px solid var(--line); display: grid; gap: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -31px; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--tape); border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--ink-2); }
.timeline .t { font-family: var(--display); font-stretch: 80%; font-weight: 800; }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.term { perspective: 800px; min-height: 120px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.term .in { position: relative; width: 100%; height: 100%; min-height: 120px; transition: transform 0.45s; transform-style: preserve-3d; }
.term.flip .in { transform: rotateY(180deg); }
.term .f, .term .b { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--r); padding: 12px 14px; border: 1.5px solid var(--line); background: var(--surface); overflow: auto; }
.term .f { display: grid; place-items: center; text-align: center; font-weight: 700; font-family: var(--display); font-stretch: 85%; font-size: 1.05rem; }
.term .b { transform: rotateY(180deg); font-size: 0.9rem; background: var(--sunk); }

/* ---------- otázky ---------- */
.q-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.q-card.inline { border-style: dashed; }
.q-meta { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--ink-2); margin-bottom: 8px; }
.q-prompt { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; }
.q-case { background: var(--sunk); border-radius: var(--r); padding: 10px 14px; margin-bottom: 12px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; background: var(--surface); text-align: left; width: 100%; }
.opt:hover { border-color: var(--ink); }
.opt .key { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink-2); display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; }
.opt.sel { border-color: var(--ink); background: var(--sunk); }
.opt.sel .key { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt[disabled] { cursor: default; }
.multi .opt .key { border-radius: 4px; }
.sortable { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sortable li { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 8px 10px; }
.sortable li .h { cursor: grab; color: var(--ink-2); user-select: none; }
.sortable li.right { border-color: var(--ok); background: var(--ok-bg); }
.sortable li.wrong { border-color: var(--bad); background: var(--bad-bg); }
.sortable li .mv { margin-left: auto; display: flex; gap: 4px; }
.sortable li .mv button { border: 1px solid var(--line); background: var(--surface); border-radius: 4px; cursor: pointer; width: 30px; height: 28px; }
.sortable li.dragging { opacity: 0.4; }
.match { display: grid; gap: 8px; }
.match .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.match .pair > div { padding: 8px 10px; background: var(--sunk); border-radius: var(--r); }
.match select.right { border-color: var(--ok); background: var(--ok-bg); }
.match select.wrong { border-color: var(--bad); background: var(--bad-bg); }
.fill input { display: inline-block; width: auto; min-width: 9ch; padding: 3px 8px; margin: 0 2px; }
.fill input.right { border-color: var(--ok); background: var(--ok-bg); }
.fill input.wrong { border-color: var(--bad); background: var(--bad-bg); }
.tf { display: flex; gap: 10px; }
.tf .opt { justify-content: center; font-weight: 700; }
/* tvrdenia (test MS SR): 4 riadky, pri každom P / N */
.tvrdenia { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tv-row { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px; }
.tv-row + .tv-row { border-top: 1px solid var(--line); }
.tv-key { font-weight: 700; color: var(--ink-2); padding-top: 6px; }
.tv-text { padding-top: 5px; min-width: 0; }
.tv-pn { display: flex; gap: 6px; }
.pn { width: 44px; height: 40px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper); font-weight: 800; font-size: 1rem; cursor: pointer; color: var(--ink); }
.pn:hover:not([disabled]) { border-color: var(--ink); }
.pn.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pn.right { border-color: var(--ok); box-shadow: inset 0 0 0 2px var(--ok); }
.pn.sel.right { background: var(--ok); border-color: var(--ok); color: #fff; }
.pn.wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.pn[disabled] { cursor: default; }
.tv-row.ok { box-shadow: inset 4px 0 0 var(--ok); }
.tv-row.bad { box-shadow: inset 4px 0 0 var(--bad); background: var(--bad-bg); }
.tv-why { margin-top: 8px; font-size: 0.92rem; color: var(--ink-2); }
.tv-row.bad .tv-why { color: var(--ink); }
.ms-test { border-top: 6px solid var(--tape); }
.tv-count { font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 560px) {
  .tv-row { grid-template-columns: 1.6em minmax(0, 1fr); }
  .tv-pn { grid-column: 2; }
}
.q-actions { margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.result { margin-top: 14px; border-radius: var(--r); padding: 12px 16px; }
.result.ok { background: var(--ok-bg); }
.result.bad { background: var(--bad-bg); }
.result.half { background: var(--half-bg); }
.result h4 { margin: 0 0 4px; font-family: var(--body); font-size: 1rem; }
.eval .score { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 2.2rem; line-height: 1; }
.eval .kp { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.eval .kp li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; }
.eval .kp .s { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #fff; margin-top: 2px; }
.eval .kp .s.y { background: var(--ok); }
.eval .kp .s.p { background: var(--half); }
.eval .kp .s.n { background: var(--bad); }
.eval details { margin-top: 8px; }
.eval summary { cursor: pointer; font-weight: 700; }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin-top: 12px; }
.thinking::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--tape); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.quiz-top .bar { flex: 1; }

/* ---------- kartičky ---------- */
.card-stage { perspective: 1200px; max-width: 620px; margin: 0 auto; }
.fcard { position: relative; min-height: 280px; cursor: pointer; transform-style: preserve-3d; transition: transform 0.5s; background: none; border: 0; padding: 0; width: 100%; }
.fcard.flip { transform: rotateY(180deg); }
.fcard .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; justify-content: center; text-align: left; overflow: auto; }
.fcard .front { font-family: var(--display); font-stretch: 85%; font-size: 1.4rem; font-weight: 700; text-align: center; border-top: 8px solid var(--tape); }
.fcard .back { transform: rotateY(180deg); border-top: 8px solid var(--ok); }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.grades button { padding: 10px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; }
.grades button:hover { border-color: var(--ink); }
.grades .g1 { color: var(--bad); } .grades .g4 { color: var(--ok); }
.boxes { display: flex; gap: 6px; }
.boxes span { flex: 1; text-align: center; background: var(--sunk); border-radius: 4px; padding: 4px 0; font-size: 0.8rem; }

/* ---------- skúška ---------- */
.exam-chat { display: grid; gap: 14px; }
.bubble { border-radius: 10px; padding: 14px 16px; max-width: 760px; }
.bubble.k { background: var(--surface); border: 1.5px solid var(--line); }
.bubble.k .who { font-family: var(--display); font-stretch: 80%; font-weight: 800; color: var(--ink-2); font-size: 0.85rem; margin-bottom: 4px; }
.bubble.me { background: var(--ink); color: var(--paper); justify-self: end; white-space: pre-wrap; }
.timer { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); }
.unit-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; margin: 8px 0 14px; }
.unit-pick label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.unit-pick input { margin-top: 5px; }

/* ---------- zákony ---------- */
.law-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 26px; }
@media (max-width: 960px) { .law-layout { grid-template-columns: 1fr; } .law-toc { max-height: 220px; } }
.law-toc { position: sticky; top: 20px; align-self: start; max-height: calc(100vh - 40px); overflow: auto; font-size: 0.88rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 8px; }
.law-toc a { display: block; padding: 3px 8px; text-decoration: none; border-radius: 4px; }
.law-toc a:hover { background: var(--sunk); }
.law-toc .ctx { font-weight: 700; color: var(--ink-2); padding: 8px 8px 2px; font-size: 0.8rem; }
.law-sec { padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.law-sec h3 { font-size: 1.05rem; }
.law-sec.hl { background: color-mix(in srgb, var(--tape) 16%, transparent); border-radius: var(--r); padding: 14px; }
.law-sec mark { background: var(--tape); color: var(--tape-ink); }
.law-list { display: grid; gap: 10px; }
.law-list a { display: grid; grid-template-columns: 100px 1fr auto; gap: 14px; align-items: baseline; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; text-decoration: none; }
.law-list a:hover { border-color: var(--ink); }
.law-list b { font-family: var(--display); font-stretch: 80%; font-size: 1.15rem; }

/* zásuvka (paragraf, tútor) */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -10px 0 30px -12px rgba(0, 0, 0, 0.4); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.25s ease; }
.drawer.open { transform: none; }
.drawer header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--sunk); }
.drawer header h3 { margin: 0; font-size: 1.05rem; }
.drawer header button { margin-left: auto; }
.drawer .content { padding: 16px 18px; overflow: auto; flex: 1; }
.drawer .foot { padding: 12px 18px; border-top: 1px solid var(--line); }
.tutor-msg { margin-bottom: 14px; }
.tutor-msg.me { background: var(--sunk); border-radius: var(--r); padding: 8px 12px; white-space: pre-wrap; }
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 35; box-shadow: var(--shadow); }
.scrim { position: fixed; inset: 0; background: rgba(10, 17, 25, 0.35); z-index: 45; }

/* audio */
.audio-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.audio-text { max-height: 420px; overflow: auto; margin-top: 14px; }
.audio-text p.now { background: color-mix(in srgb, var(--tape) 25%, transparent); border-radius: 4px; }
audio { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .diagram.anim .dg-node, .diagram.anim .dg-arrow, .diagram.anim .dg-head { opacity: 1; }
}
@media print {
  .side, .topbar, .fab, .tabs, .lesson-nav, .lesson-rail { display: none !important; }
  .shell { display: block; }
}

/* tok krokov (line) */
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.flow-node button { height: 100%; display: flex; gap: 8px; align-items: flex-start; text-align: left; background: var(--sunk); border: 1.5px solid var(--line); border-radius: var(--r); padding: 8px 12px; cursor: pointer; font-weight: 700; max-width: 220px; }
.flow-node button:hover { border-color: var(--ink); }
.flow-node .n { font-family: var(--display); font-stretch: 75%; font-weight: 800; color: var(--ink-2); }
.flow-node.active button { background: var(--tape); border-color: var(--tape); color: var(--tape-ink); }
.flow-node.active .n { color: var(--tape-ink); }
.flow-arrow { align-self: center; width: 22px; height: 14px; background: var(--ink-2); clip-path: polygon(0 35%, 60% 35%, 60% 0, 100% 50%, 60% 100%, 60% 65%, 0 65%); }
@media (max-width: 640px) {
  .flow { flex-direction: column; }
  .flow-node button { max-width: none; width: 100%; }
  .flow-arrow { transform: rotate(90deg); margin-left: 14px; }
}
.dg-label { width: 100%; height: 100%; display: flex; align-items: center; padding-left: 16px; font: 700 14px/1.2 var(--body); color: var(--ink); overflow: hidden; }
.dg-label.center { justify-content: center; text-align: center; padding-left: 0; }
.dg-node.active .dg-label { color: var(--tape-ink); }
.diagram.play .flow-node, .diagram.play .flow-arrow { animation: dgIn 0.45s ease forwards; animation-delay: calc(var(--i) * 0.22s); }
.diagram.anim .flow-node, .diagram.anim .flow-arrow { opacity: 0; }
.scenario code { background: rgba(255,255,255,.14); color: inherit; }
.scenario a, .scenario .lawref { color: inherit; }
.shell > div { min-width: 0; }
.block-title { flex-wrap: wrap; }
@keyframes dgFade { from { opacity: 0; } to { opacity: 1; } }
.diagram.play .flow-arrow, .diagram.play .dg-arrow, .diagram.play .dg-head { animation-name: dgFade; }
.side { min-height: 100vh; }
.read, .lesson-layout > * { min-width: 0; }
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stack-layer { min-width: 0; }
.stack-layer button { width: 100%; min-height: 46px; background: var(--sunk); border: 0; color: var(--ink); font-weight: 700; font-size: 0.92rem; line-height: 1.25; padding: 8px 26px; cursor: pointer; clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%); }
.stack.funnel .stack-layer button { clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 14px 100%); }
.stack-layer button:hover { background: color-mix(in srgb, var(--tape) 30%, var(--sunk)); }
.stack-layer.active button { background: var(--tape); color: var(--tape-ink); }
.diagram.anim .stack-layer { opacity: 0; }
.diagram.play .stack-layer { animation: dgIn 0.45s ease forwards; animation-delay: calc(var(--i) * 0.22s); }
@media (max-width: 640px) { .stack-layer button { padding: 8px 16px; font-size: 0.84rem; } }
.topbar { background: #1a2b3c !important; color: #fff; }
@media (max-width: 860px) {
  .fab { right: 12px; bottom: 12px; padding: 8px 12px; font-size: 0.9rem; }
}
