/* Atkinson Hyperlegible (OFL) – pisava za lažje branje, gostuje pri nas */
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/ah-400-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/ah-400.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: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/ah-700-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/ah-700.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 {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1d2330;
  --muted: #646b7a;
  --line: #e4e0d6;
  --accent: #3d6df2;
  --accent-soft: #e8eefe;
  --ok: #1e8e4e;
  --ok-soft: #e3f4ea;
  --bad: #c9473b;
  --bad-soft: #fbe9e6;
  --warn: #b7791f;
  --warn-soft: #fdf3dc;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(29, 35, 48, .06), 0 6px 20px rgba(29, 35, 48, .06);
  --font: "Atkinson Hyperlegible", -apple-system, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font: 17px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
.narrow { max-width: 460px; margin: 8vh auto; padding: 0 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stack > * + * { margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px;
  padding: 12px 20px; font: 600 17px var(--font); cursor: pointer; background: var(--accent); color: #fff;
  text-decoration: none; transition: transform .05s, filter .15s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.big { padding: 18px 30px; font-size: 21px; border-radius: 16px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.ok { background: var(--ok); }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .45; cursor: default; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; font: 17px var(--font); padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px;
  background: #fff; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { display: block; font-weight: 600; margin-bottom: 5px; }
.field + .field { margin-top: 14px; }
.err { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 10px; }
.note { background: var(--warn-soft); color: #6b4a10; padding: 10px 14px; border-radius: 10px; }
.okmsg { background: var(--ok-soft); color: var(--ok); padding: 10px 14px; border-radius: 10px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.grey { background: #eeece6; color: var(--muted); }
.bar { height: 10px; border-radius: 99px; background: #ebe8e0; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar.ok > i { background: var(--ok); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; max-width: 1080px; margin: 0 auto; }
.brand { font-weight: 700; font-size: 20px; text-decoration: none; color: var(--ink); }
.brand b { color: var(--accent); }
nav a { margin-left: 16px; text-decoration: none; color: var(--muted); font-weight: 600; }
nav a.on, nav a:hover { color: var(--ink); }

/* ---------- otrok: danes ---------- */
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 10px 0 22px; flex-wrap: wrap; }
.hello h1 { font-size: 36px; }
.go { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px;
  background: var(--accent); color: #fff; border-radius: 22px; box-shadow: var(--shadow); text-decoration: none; }
.go:hover { filter: brightness(1.05); }
.go .lbl { opacity: .85; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.go .sub { font-size: 30px; font-weight: 700; }
.go .arrow { font-size: 40px; }
.blocks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 18px; }
.block { padding: 16px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.block.done { background: var(--ok-soft); box-shadow: none; }
.block.current { outline: 3px solid var(--accent); }
.block .n { font-weight: 700; }
.celebrate { text-align: center; padding: 40px 20px; }
.celebrate .big { font-size: 64px; }

/* ---------- ura ---------- */
.lesson { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.lhead { position: sticky; top: 0; z-index: 5; background: rgba(246, 244, 239, .94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); }
.lhead .in { max-width: 900px; margin: 0 auto; padding: 10px 20px; display: flex; gap: 14px; align-items: center; }
.lhead .t { flex: 1; min-width: 0; }
.lhead .t .s { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lhead .t .h { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots { display: flex; gap: 4px; max-width: 900px; margin: 0 auto; padding: 0 20px 8px; }
.dots i { flex: 1; height: 6px; border-radius: 9px; background: #e3dfd4; }
.dots i.done { background: var(--accent); }
.dots i.cur { background: var(--accent); opacity: .45; }
.stage { max-width: 900px; margin: 0 auto; padding: 26px 20px 140px; width: 100%; }
.step { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 30px; animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step .kind { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 10px; }
.step .txt { font-size: 22px; line-height: 1.55; }
.step .txt p { margin: 0 0 .7em; }
.step .txt ul { margin: 0 0 .7em; padding-left: 1.2em; }
.step .pic { margin: 18px 0 4px; text-align: center; }
.step .pic img { max-width: 100%; height: auto; max-height: 380px; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.05; margin: 0 .12em; font-size: .9em; }
.frac > span:first-child { border-bottom: 2px solid currentColor; padding: 0 .15em; }
.opts { display: grid; gap: 10px; margin-top: 20px; }
.opt { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 15px 18px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; font: 20px var(--font); color: var(--ink); cursor: pointer; }
.opt .L { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #f0ede6; font-weight: 700; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.sel .L { background: var(--accent); color: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.fields { display: grid; gap: 12px; margin-top: 18px; }
.fieldrow { display: flex; gap: 12px; align-items: center; font-size: 20px; flex-wrap: wrap; }
.fieldrow > span:first-child { min-width: 9em; }
.fieldrow input { max-width: 280px; font-size: 20px; }
.fieldrow input.right { border-color: var(--ok); background: var(--ok-soft); }
.fieldrow input.wrong { border-color: var(--bad); background: var(--bad-soft); }
.pairs { display: grid; gap: 10px; margin-top: 18px; }
.pair { display: grid; grid-template-columns: 1fr 30px 1fr; gap: 10px; align-items: center; font-size: 19px; }
.pair .l { padding: 12px 14px; background: #f3f1eb; border-radius: 12px; }
.pair select { font-size: 18px; }
.pair select.right { border-color: var(--ok); background: var(--ok-soft); }
.pair select.wrong { border-color: var(--bad); background: var(--bad-soft); }
.order { display: grid; gap: 8px; margin-top: 18px; }
.oitem { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-size: 19px; }
.oitem .num { font-weight: 700; color: var(--muted); width: 24px; }
.oitem .tx { flex: 1; }
.oitem button { border: 0; background: #f0ede6; border-radius: 8px; width: 38px; height: 34px; cursor: pointer; font-size: 18px; }
.oitem.right { border-color: var(--ok); background: var(--ok-soft); }
.oitem.wrong { border-color: var(--bad); background: var(--bad-soft); }
.answer textarea { font-size: 20px; min-height: 150px; margin-top: 16px; }
.fb { margin-top: 20px; padding: 16px 18px; border-radius: 14px; font-size: 19px; display: flex; gap: 12px; }
.fb .ic { font-size: 26px; line-height: 1; }
.fb.ok { background: var(--ok-soft); color: #145c33; }
.fb.bad { background: var(--bad-soft); color: #7d2a22; }
.fb.info { background: var(--accent-soft); color: #23408f; }
.fb .sol { margin-top: 6px; font-weight: 700; }
.target { font-size: 26px; font-weight: 700; padding: 16px 20px; background: var(--accent-soft); border-radius: 14px; margin-top: 16px; }
.rec { display: flex; gap: 12px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.recbtn { width: 74px; height: 74px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-size: 30px; cursor: pointer; box-shadow: var(--shadow); }
.recbtn.on { animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(201, 71, 59, .5); } 50% { box-shadow: 0 0 0 14px rgba(201, 71, 59, 0); } }
.cam { margin-top: 18px; display: grid; gap: 12px; }
.cam video, .cam img.prev { width: 100%; max-height: 420px; object-fit: contain; background: #111; border-radius: 14px; }
.qr { display: flex; gap: 18px; align-items: center; background: #fff; border: 1.5px dashed var(--line); padding: 14px; border-radius: 14px; }
.qr svg { width: 150px; height: 150px; flex: none; }
.lfoot { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(246, 244, 239, .96); border-top: 1px solid var(--line); z-index: 5; }
.lfoot .in { max-width: 900px; margin: 0 auto; padding: 14px 20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.timer.over { color: var(--warn); }
.iconbtn { border: 0; background: #fff; box-shadow: var(--shadow); width: 46px; height: 46px; border-radius: 12px; cursor: pointer; font-size: 20px; flex: none; }
.iconbtn.off { opacity: .5; }
.thinking { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); margin-top: 18px; font-size: 18px; }
.thinking i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; }
.thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff; box-shadow: -10px 0 40px rgba(0, 0, 0, .12);
  transform: translateX(105%); transition: transform .25s ease; z-index: 20; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer .dh { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer .msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 11px 14px; border-radius: 14px; max-width: 88%; font-size: 17px; white-space: pre-wrap; }
.msg.child { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.teacher { align-self: flex-start; background: #f2f0ea; border-bottom-left-radius: 4px; }
.drawer form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.drawer form textarea { min-height: 48px; height: 48px; font-size: 17px; }
.summary .score { font-size: 56px; font-weight: 800; }
.summary li { margin: 6px 0; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 1s linear infinite; margin: 10px auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- starši ---------- */
.kid { margin-bottom: 26px; }
.kid h2 .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.cols { display: grid; gap: 16px; grid-template-columns: 1.2fr 1fr; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } .pair { grid-template-columns: 1fr; } .pair span.ar { display: none; } }
.subj { border-top: 1px solid var(--line); padding: 16px 0; }
.subj:first-child { border-top: 0; }
.subj summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.subj summary::-webkit-details-marker { display: none; }
.topics td { font-size: 15px; }
.topics tr.st-done td { color: var(--muted); }
.topics tr.st-active td:first-child { font-weight: 700; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs a img { width: 70px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.days label { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; margin-right: 10px; }
.ans { background: #faf9f6; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 8px; font-size: 15px; }
.ans img { max-width: 260px; border-radius: 8px; display: block; margin-top: 6px; }
pre.json { white-space: pre-wrap; font-size: 13px; background: #faf9f6; padding: 12px; border-radius: 10px; }
