/* dopetice.com — jedan stylesheet, bez build koraka. Boje su tokeni; tamna tema ih samo menja. */
:root {
  color-scheme: light;
  --bg: #faf9fc;
  --surface: #ffffff;
  --surface-2: #f3f1f8;
  --ink: #17131f;
  --ink-2: #4b465c;
  --muted: #736d84;
  --line: #e6e2ee;
  --brand: #7c3aed;
  --brand-ink: #6d28d9;
  --grad: linear-gradient(120deg, #7c3aed 0%, #db2777 55%, #ea580c 100%);
  --ok: #0a7a3a;
  --ok-bg: #e6f6ec;
  --err: #b42318;
  --err-bg: #fdecea;
  --info: #3b2fa0;
  --info-bg: #efedfd;
  --warn: #b45309;
  --star: #f59e0b;
  --series: #2a78d6;
  --series-track: #cde2fb;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23, 19, 31, .05), 0 6px 20px rgba(23, 19, 31, .06);
  --shadow-lg: 0 2px 4px rgba(23, 19, 31, .06), 0 16px 40px rgba(23, 19, 31, .10);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0d14;
    --surface: #18151f;
    --surface-2: #221e2b;
    --ink: #f4f2f8;
    --ink-2: #cdc8da;
    --muted: #9a93ab;
    --line: #2f2a3a;
    --brand: #a78bfa;
    --brand-ink: #c4b5fd;
    --ok: #4ade80;
    --ok-bg: #12301f;
    --err: #fca5a5;
    --err-bg: #3a1717;
    --info: #c7c2ff;
    --info-bg: #25213f;
    --warn: #fbbf24;
    --series: #3987e5;
    --series-track: #184f95;
    --grid: #2c2c2a;
    --axis: #383835;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0d14; --surface: #18151f; --surface-2: #221e2b; --ink: #f4f2f8; --ink-2: #cdc8da;
  --muted: #9a93ab; --line: #2f2a3a; --brand: #a78bfa; --brand-ink: #c4b5fd; --ok: #4ade80; --ok-bg: #12301f;
  --err: #fca5a5; --err-bg: #3a1717; --info: #c7c2ff; --info-bg: #25213f; --warn: #fbbf24;
  --series: #3987e5; --series-track: #184f95; --grid: #2c2c2a; --axis: #383835;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.55; overflow-x: hidden;
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.35rem; margin-top: 1.4em; }
h3 { font-size: 1.08rem; }
.card h2:first-child, .card-head h2 { margin-top: 0; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
img, iframe { max-width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.prewrap { white-space: pre-line; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--brand-ink); margin-bottom: .5em; }

/* ---------- header / footer ---------- */
.demo-bar { background: var(--ink); color: var(--bg); text-align: center; font-size: .8rem; padding: 6px 16px; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; left: 11px; top: 8px; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.nav-links { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; font-weight: 500; }
.nav-links > a:not(.btn), .link-btn { color: var(--ink-2); }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--brand-ink); }
.nav-links .link-btn { color: var(--ink-2); }
.link-btn:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 32px 0 48px; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.logo-footer { margin-bottom: 6px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- buttons, chips, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 22px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 14px rgba(219, 39, 119, .25); transition: transform .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(219, 39, 119, .32); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--brand); box-shadow: none; }
.btn-sm { padding: 7px 14px; font-size: .875rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chips-lg { margin: 18px 0; gap: 8px; }
.chip { display: inline-block; background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 3px 11px; font-size: .82rem; font-weight: 500; }
.chips-lg .chip { padding: 6px 14px; font-size: .9rem; background: var(--surface); border: 1px solid var(--line); }
a.chip:hover { text-decoration: none; border-color: var(--brand); color: var(--ink); }
.chip-on, .chips-lg .chip-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-sm { font-size: .72rem; padding: 1px 7px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.badge-hot { background: #fff; color: #c2410c; box-shadow: var(--shadow); }
.badge-free { background: var(--ok-bg); color: var(--ok); }
.pill { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 5px 13px; font-size: .88rem; }
.pill-link:hover { background: rgba(255, 255, 255, .3); text-decoration: none; }
.stars { color: var(--star); font-weight: 650; white-space: nowrap; }
.stars-off { color: var(--line); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-hot { background: #2a1a10; color: #fdba74; }
}

/* ---------- avatar ---------- */
.avatar {
  --c: #7c3aed; display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #f97316));
  color: #fff; font-weight: 750; letter-spacing: .02em;
}
.avatar-xs { width: 22px; height: 22px; font-size: .6rem; }
.avatar-md { width: 46px; height: 46px; font-size: .95rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; border: 3px solid var(--surface); }
.avatar-xl { width: 120px; height: 120px; font-size: 2.4rem; border: 4px solid rgba(255, 255, 255, .7); box-shadow: var(--shadow-lg); }

/* ---------- layout ---------- */
.section { padding: 36px 0; }
.section-alt { background: var(--surface-2); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad, .pad { padding: 22px; }
.card + .card, .card + .studio-grid, .studio-grid + .card { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; }  /* u mreži razmak daje gap — inače su sve kartice osim prve spuštene */
.empty { text-align: center; padding: 40px 16px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty-inline { color: var(--muted); margin: 0; }
.empty-inline .btn { margin-top: 10px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 28px; background:
  radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, #ec4899 16%, transparent), transparent 70%),
  radial-gradient(600px 300px at 10% 0%, color-mix(in srgb, #7c3aed 14%, transparent), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); letter-spacing: -.03em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.search { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); max-width: 560px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 14px; font: inherit; color: var(--ink); }
.search input:focus { outline: none; box-shadow: none; }
.search:focus-within { border-color: var(--brand); }
.search-inline { margin: 8px 0 4px; }
.hero-stats { display: grid; gap: 12px; }
.hero-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); display: flex; align-items: baseline; gap: 10px; }
.hero-stat strong { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; }
.hero-stat span { color: var(--muted); }

/* ---------- cards: teacher and lesson ---------- */
.teacher-card, .lesson-card { display: flex; flex-direction: column; color: var(--ink); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.teacher-card:hover, .lesson-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tc-banner { height: 84px; position: relative; background: linear-gradient(120deg, var(--c, #7c3aed), color-mix(in srgb, var(--c, #7c3aed) 35%, #fb923c)); }
.tc-banner .avatar { position: absolute; left: 18px; bottom: -36px; }
.tc-banner .badge { position: absolute; right: 12px; top: 12px; }
.tc-body { padding: 44px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.tc-body h3 { margin: 0; }
.tc-headline { color: var(--ink-2); margin: 8px 0 0; font-size: .95rem; }
.tc-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); margin-top: auto; padding-top: 8px; }
.tc-price { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .95rem; }

.price { font-weight: 750; font-size: 1.1rem; }
.urgent { color: var(--warn); font-weight: 650; }
.proof { color: var(--ok); font-weight: 600; }

.pitch { padding: 28px; }
.recommend { text-align: center; padding: 28px; }
.recommend h2 { margin: 4px 0 8px; }
.recommend .share { justify-content: center; margin-top: 14px; }
.pitch h2 { margin-top: 0; }
.pitch-teacher { background: linear-gradient(160deg, color-mix(in srgb, #7c3aed 10%, var(--surface)), var(--surface) 60%); }
.steps { padding-left: 1.2em; display: grid; gap: 8px; margin: 0 0 18px; }

/* ---------- teacher profile ---------- */
.profile-hero { --c: #7c3aed; color: #fff; padding: 40px 0 34px;
  background: linear-gradient(125deg, var(--c), color-mix(in srgb, var(--c) 40%, #f97316)); }
.profile-grid { display: flex; gap: 28px; align-items: center; }
.profile-main h1 { margin: 0; color: #fff; }
.profile-handle { opacity: .85; font-weight: 500; }
.profile-headline { font-size: 1.15rem; margin: 10px 0 14px; max-width: 40em; }
.profile-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-badges .pill .stars { color: #fde68a; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.profile-layout > div > h2:first-child { margin-top: 0; }
.profile-side { display: grid; gap: 18px; position: sticky; top: 80px; }
.profile-side .card + .card { margin-top: 0; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin-bottom: 8px; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.note { background: var(--info-bg); color: var(--info); border-color: transparent; }
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.review { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.review-head { display: flex; justify-content: space-between; align-items: center; }
.review blockquote { margin: 8px 0; }
.share { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- buy box, teacher mini ---------- */
.teacher-mini { display: flex; gap: 14px; align-items: center; color: var(--ink); }
.teacher-mini:hover { text-decoration: none; border-color: var(--brand); }
.buy-price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.perks { list-style: none; padding: 0; margin: 16px 0 0; font-size: .88rem; color: var(--muted); display: grid; gap: 4px; }
.perks li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }

/* ---------- checkout ---------- */
.checkout-item { display: flex; gap: 16px; align-items: flex-start; }
.checkout-title { margin: 6px 0 4px; font-size: 1.2rem; }
.promo-form label { font-weight: 650; display: block; margin-bottom: 6px; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.field-error { color: var(--err); margin: 8px 0 0; font-size: .9rem; }
.field-ok { color: var(--ok); margin: 8px 0 0; font-size: .9rem; font-weight: 600; }
.summary { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.summary td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary .good td { color: var(--ok); }
.summary .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary .total td { font-weight: 800; font-size: 1.2rem; border-bottom: 0; padding-top: 14px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form-section { font-size: 1.05rem; margin: 8px 0 -4px; padding-top: 8px; }
.form-section:first-of-type { padding-top: 0; margin-top: 0; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.field-inline { display: flex; align-items: center; gap: 12px; }
.hint { font-weight: 400; font-size: .84rem; color: var(--muted); }
:where(input:not([type="radio"], [type="checkbox"], [type="color"]), select, textarea) {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
}
:where(input, select, textarea):focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
textarea { resize: vertical; }
input[type="color"] { width: 52px; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface); }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.input-prefix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input-prefix > span { background: var(--surface-2); color: var(--muted); padding: 10px 4px 10px 12px; font-weight: 400; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.input-prefix input { border: 0; box-shadow: none; border-radius: 0; padding-left: 2px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.auth-box { max-width: 440px; }
.benefits { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 22px; }
.benefits li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; }
.benefits strong { display: block; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; margin-bottom: 12px; }
.segmented a { padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.segmented a:hover { text-decoration: none; color: var(--ink); }
.segmented a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- flash ---------- */
.flashes { margin-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info); font-weight: 500; }
.flash ul { margin: 0; padding-left: 1.2em; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--err-bg); color: var(--err); }
.card .flash { margin-bottom: 4px; }

/* ---------- my lessons ---------- */
.my-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.my-layout > div > h2:first-child { margin-top: 0; }
.list { overflow: hidden; }
.lesson { display: flex; gap: 14px; align-items: center; padding: 14px 18px; color: var(--ink); }
.lesson-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lesson + .lesson { border-top: 1px solid var(--line); }
.lesson-main { flex: 1; min-width: 0; }
.lesson-title { font-weight: 650; color: var(--ink); }
.celebrate { background: linear-gradient(140deg, color-mix(in srgb, #10b981 14%, var(--surface)), var(--surface) 70%); margin-bottom: 8px; }
.celebrate h2 { margin-top: 0; }
.invite-box { position: sticky; top: 80px; }
.invite-credit { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.copy-field { display: flex; gap: 6px; margin: 12px 0; }
.copy-field input { font-size: .85rem; }
.rate { display: grid; gap: 10px; margin-bottom: 12px; }
.star-input { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { font-size: 1.8rem; line-height: 1; color: var(--line); cursor: pointer; transition: color .1s; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.rate .btn { justify-self: start; }

/* ---------- studio ---------- */
.studio-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.studio-who { display: flex; gap: 14px; align-items: center; }
.studio-who h1 { margin: 0; }
.studio-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.studio-grid > * { min-width: 0; }
.studio-grid .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-label { font-size: .85rem; color: var(--ink-2); }
.stat-value { font-size: 1.75rem; font-weight: 650; letter-spacing: -.02em; margin: 4px 0 2px; }
.stat-sub { font-size: .8rem; color: var(--muted); }

/* Stubičasti grafikon: jedna serija, stubovi do 24px, zaobljen vrh 4px, ravna osnova. */
.chart { position: relative; height: 220px; margin: 8px 0 0 44px; }
.chart-grid { position: absolute; inset: 0 0 24px 0; }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--grid); }
.gridline.baseline { border-top-color: var(--axis); }
.gridline span { position: absolute; right: calc(100% + 8px); transform: translateY(-50%); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars { position: absolute; inset: 0 0 24px 0; display: flex; align-items: stretch; }
.bar-col { flex: 1; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px; cursor: default; }
.bar-col:hover, .bar-col:focus-visible { background: color-mix(in srgb, var(--series) 8%, transparent); outline: none; }
.bar { width: 66%; max-width: 24px; background: var(--series); border-radius: 4px 4px 0 0; }
.bar-labels { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; display: flex; }
.bar-labels span { flex: 1; text-align: center; font-size: .72rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-view { margin-top: 14px; font-size: .9rem; }
.table-view summary { cursor: pointer; color: var(--muted); }
.table-view .table { margin-top: 8px; max-width: 420px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 6px 10px 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.inactive td { opacity: .55; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions a, .row-actions form { margin-left: 12px; display: inline; }
.status { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-off { background: var(--surface-2); color: var(--muted); }
.hbar { position: relative; height: 22px; display: flex; align-items: center; min-width: 120px; }
.hbar span { display: block; height: 14px; min-width: 2px; background: var(--series); border-radius: 0 4px 4px 0; }
.hbar em { font-style: normal; font-size: .82rem; margin-left: 8px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.links { display: grid; gap: 8px; }
.link-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.link-label { font-weight: 600; font-size: .9rem; }
.link-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; padding: 6px 8px; }
.promo-create { display: grid; grid-template-columns: 1.3fr .6fr 1fr auto; gap: 6px; margin-top: 14px; }
.promo-create input { padding: 8px 10px; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--bg);
  font-size: .8rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  box-shadow: var(--shadow-lg); transform: translate(-50%, calc(-100% - 8px));
}

.error-page { padding: 40px 16px; }
.error-code { font-size: 5rem; font-weight: 800; line-height: 1; margin-bottom: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .profile-layout, .lesson-layout, .my-layout { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-stat { flex-direction: column; gap: 0; padding: 14px; }
  .hero-stat strong { font-size: 1.5rem; }
  .profile-side, .lesson-side, .invite-box { position: static; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-header { position: static; }  /* visok meni na telefonu ne sme da pokriva čas */
  .player { scroll-margin-top: 8px; }
  .nav { padding-top: 8px; padding-bottom: 8px; }
  .nav-links { gap: 4px 12px; font-size: .92rem; }
  .profile-grid { flex-direction: column; align-items: flex-start; gap: 16px; }
  .avatar-xl { width: 92px; height: 92px; font-size: 1.9rem; }
  .form-grid, .form-grid-3, .benefits { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-value { font-size: 1.4rem; }
  .link-row { grid-template-columns: 1fr auto; }
  .link-label { grid-column: 1 / -1; }
  .promo-create { grid-template-columns: 1fr 1fr; }
  .chart { margin-left: 36px; height: 180px; }
  .search .btn { padding: 9px 16px; }
  .card.pad, .pad { padding: 18px; }
  .lesson { flex-wrap: wrap; }
}

/* ---------- lesson cards & catalog ---------- */
.lesson-card { padding: 18px; gap: 8px; border-top: 4px solid var(--c, var(--brand)); }
.lc-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lesson-card h3 { margin: 2px 0 0; font-size: 1.12rem; }
.lc-teacher { display: flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--ink-2); }
.lc-parts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85rem; color: var(--muted); }
.lc-parts span + span::before { content: "·"; margin-right: 12px; }
.lc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; }
.lc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price-free { color: var(--ok); }
.subject-tag, .grade-tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.subject-tag { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand-ink); }
.grade-tag { background: var(--surface-2); color: var(--ink-2); }
.badge-draft { background: var(--surface-2); color: var(--muted); }
.filters { display: grid; gap: 2px; margin: 14px 0 18px; }
.filters .chips { margin: 4px 0; }
.grade-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.grade-picker a { display: grid; place-items: center; width: 62px; height: 58px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 800; font-size: 1.25rem; line-height: 1; box-shadow: var(--shadow); }
.grade-picker a small { font-size: .62rem; font-weight: 600; color: var(--muted); }
.grade-picker a:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); }
.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; counter-reset: how; }
.how li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; align-content: start; position: relative; counter-increment: how; }
.how li::after { content: counter(how); position: absolute; top: 12px; right: 14px; font-weight: 800; color: var(--line); font-size: 1.4rem; }
.how-icon { font-size: 1.6rem; }
.how span:last-child { font-size: .88rem; color: var(--ink-2); }

/* ---------- lesson page & player ---------- */
.lesson-head { margin-bottom: 18px; }
.lesson-head h1 { margin-bottom: 6px; }
.lesson-head .lead { margin-bottom: 10px; }
.lesson-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; color: var(--ink-2); font-size: .95rem; }
.lesson-teacher { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.lesson-side { display: grid; gap: 16px; position: sticky; top: 80px; }
.lesson-side .card + .card, .lesson-side .card + a.card { margin-top: 0; }

.player { padding: 0; overflow: hidden; scroll-margin-top: 76px; }
.player { container-type: inline-size; }
/* Kartice delova časa: ikonica iznad naziva; svi nazivi se uvek vide (na uskom ekranu u dva reda). */
.step-tabs { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 4px; padding: 8px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.step-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; padding: 8px 4px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: .8rem; font-weight: 600; line-height: 1.15; text-align: center; color: var(--ink-2); cursor: pointer; }
.step-icon { font-size: 1.25rem; line-height: 1; }
@container (max-width: 560px) {
  .step-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step-tab { font-size: .74rem; min-height: 56px; }
}
.step-tab:hover { background: var(--surface); }
.step-tab.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.step-tab.done:not(.on) { color: var(--ok); }
.step-tab.locked { color: var(--muted); }
.lock { position: absolute; top: 3px; right: 5px; font-size: .7rem; }
.player-bar { height: 4px; background: var(--surface-2); }
.player-bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s ease; }
.step { padding: 24px 26px 26px; }
.step-title { font-size: 1.45rem; margin: 0 0 16px; }
.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.player:not(.is-interactive) .step + .step { border-top: 8px solid var(--surface-2); }
.player:not(.is-interactive) .step-nav, .player:not(.is-interactive) .player-bar { display: none; }
.math .katex { font-size: 1.08em; }

.video, .video-file { margin-bottom: 16px; }
.video-file { width: 100%; border-radius: var(--radius); background: #000; }
.video-missing { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 18px; text-align: center; color: var(--muted); margin-bottom: 16px; }
.story { font-size: 1.12rem; line-height: 1.65; background: linear-gradient(140deg, color-mix(in srgb, #f59e0b 12%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; white-space: pre-line; }

.concepts { margin: 0; display: grid; gap: 10px; }
.concept { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 12px 16px; background: var(--surface); }
.concept dt { font-weight: 750; font-size: 1.05rem; }
.concept dd { margin: 4px 0 0; color: var(--ink-2); }

.formulas { display: grid; gap: 16px; }
.formula { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.formula-name { font-weight: 700; color: var(--brand-ink); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.formula-tex { font-size: 1.5rem; text-align: center; padding: 10px 0 6px; overflow-x: auto; overflow-y: hidden; font-family: "Cambria Math", "Times New Roman", serif; }
.formula-tex .katex-display { margin: .3em 0; }
.symbols { width: 100%; border-collapse: collapse; font-size: .95rem; margin-top: 6px; }
.symbols th { text-align: left; font-size: .78rem; color: var(--muted); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.symbols td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.symbols tr:last-child td { border-bottom: 0; }
.symbols .sym { font-family: "Cambria Math", "Times New Roman", serif; font-style: italic; font-size: 1.15rem; width: 70px; }
.symbols .unit { font-weight: 650; white-space: nowrap; }
.formula-note { margin: 10px 0 0; font-size: .92rem; color: var(--ink-2); background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius-sm); }

.quiz-count { color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.q-text { font-size: 1.2rem; font-weight: 650; margin-bottom: 14px; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answer { font: inherit; font-size: 1.02rem; text-align: left; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .1s ease, border-color .1s ease; min-height: 56px; }
.answer:hover:not(:disabled) { border-color: var(--brand); transform: translateY(-1px); }
.answer:disabled { cursor: default; }
.answer.wrong { border-color: var(--err); background: var(--err-bg); color: var(--err); opacity: .75; animation: shake .3s; }
.answer.right { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); font-weight: 700; animation: pop .3s; }
.q.solved .answer:not(.right):not(.wrong) { opacity: .5; }
.q-feedback { min-height: 1.6em; margin: 12px 0 6px; font-weight: 700; }
.q-feedback.good, .t-feedback.good { color: var(--ok); }
.q-feedback.bad, .t-feedback.bad { color: var(--err); }
.q-explain { background: var(--info-bg); color: var(--info); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.player:not(.is-interactive) .q + .q { margin-top: 24px; }
.result { text-align: center; padding: 22px; border-radius: var(--radius); background: var(--surface-2); margin-top: 10px; }
.result-stars { font-size: 2.2rem; letter-spacing: 4px; }
.result-text { font-size: 1.15rem; font-weight: 650; margin: 8px 0 12px; }
.result-actions { display: flex; justify-content: center; gap: 8px; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }

.example, .t-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.example + .example, .t-item + .t-item { margin-top: 14px; }
.ex-head { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-ink); }
.ex-task { font-size: 1.08rem; font-weight: 600; margin: 6px 0 10px; }
.ex-steps { list-style: none; counter-reset: ex; padding: 0; margin: 0; display: grid; gap: 8px; }
.ex-step { counter-increment: ex; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.ex-step::before { content: counter(ex); grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .85rem; }
.ex-line { font-size: 1.1rem; overflow-x: auto; overflow-y: hidden; }
.ex-why { color: var(--ink-2); font-size: .92rem; }
.ex-step.appear { animation: appear .35s ease; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ex-answer { margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); }
.ex-controls { display: flex; gap: 14px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

.t-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.t-form input { width: 160px; font-size: 1.05rem; }
.t-unit { font-weight: 700; }
.t-feedback { min-height: 1.4em; margin: 8px 0 4px; font-weight: 700; }
.t-item.ok { border-color: var(--ok); }
.t-solution { margin-top: 10px; }

.locked { text-align: center; padding: 26px 12px; border: 2px dashed var(--line); border-radius: var(--radius); }
.locked-icon { font-size: 2.2rem; }

.finish { text-align: center; padding: 10px 0; }
.finish-emoji { font-size: 3.6rem; }
.celebrate-in .finish-emoji { animation: pop .6s ease 2; }
.finish h2 { margin-top: 4px; }
.finish-scores { display: flex; justify-content: center; gap: 14px; margin: 14px 0 20px; flex-wrap: wrap; }
.finish-scores div { background: var(--surface-2); border-radius: var(--radius); padding: 14px 22px; display: grid; min-width: 150px; }
.finish-scores strong { font-size: 2rem; font-weight: 800; }
.finish-scores span { color: var(--muted); font-size: .88rem; }
.finish-share { margin: 18px 0; }
.finish-share .share { justify-content: center; }
.finish .rate { max-width: 420px; margin: 18px auto; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.finish-next { margin-top: 18px; }

.lesson-progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; max-width: 320px; }
.lesson-progress span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.lesson-scores { display: flex; gap: 14px; color: var(--ink-2); }

/* ---------- lesson editor ---------- */
.editor-wrap { max-width: 900px; }
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.editor-tip { font-size: .9rem; color: var(--ink-2); background: var(--info-bg); padding: 10px 14px; border-radius: var(--radius-sm); margin: 0; }
.editor { display: grid; gap: 14px; }
.ed-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.ed-section > summary::-webkit-details-marker { display: none; }
.ed-section > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.ed-section:not([open]) > summary::after { transform: rotate(-90deg); }
.ed-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; flex: none; }
.ed-title { font-weight: 750; font-size: 1.08rem; }
.ed-count { font-size: .8rem; color: var(--muted); background: var(--surface-2); padding: 2px 10px; border-radius: 999px; }
.ed-body { padding: 0 20px 20px; display: grid; gap: 12px; }
.ed-body > .hint { margin: -4px 0 4px; }
.ed-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: grid; gap: 10px; background: var(--surface); }
.ed-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ed-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.ed-grid-concept { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px; }
.row-tools { display: flex; gap: 2px; }
.icon-btn { width: 30px; height: 30px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .9rem; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn.danger:hover { color: var(--err); background: var(--err-bg); }
.add-btn { justify-self: start; }
.tex-toolbar { display: flex; flex-wrap: wrap; gap: 4px; font-weight: 400; }
.tex-btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink); }
.tex-btn:hover { border-color: var(--brand); }
.tex-input { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.tex-preview { min-height: 52px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: var(--radius-sm); font-size: 1.3rem; font-weight: 400; overflow-x: auto; }
.tex-preview.empty { font-size: .85rem; color: var(--muted); }
.ed-symbol { display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px auto; gap: 6px; align-items: center; font-weight: 400; }
.ed-symbol-head span { font-size: .75rem; color: var(--muted); }
.ed-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-answer { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 4px 8px 4px 10px; }
.ed-answer input[type="radio"] { width: 18px; height: 18px; accent-color: var(--ok); flex: none; }
.ed-answer input[type="text"] { border: 0; padding: 8px 4px; box-shadow: none; }
.ed-answer.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.ed-answer.is-correct input[type="text"] { background: transparent; }
.ed-letter { font-weight: 800; color: var(--muted); }
.ed-step { display: grid; grid-template-columns: 26px minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; font-weight: 400; }
.ed-step-head span { font-size: .75rem; color: var(--muted); }
.ed-step-num { color: var(--muted); font-weight: 700; text-align: right; }
.editor-save { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: var(--shadow-lg); }
.danger-zone { margin-top: 24px; text-align: right; }
.link-btn.danger { color: var(--err); }

@media (max-width: 900px) {
  .how { grid-template-columns: repeat(3, 1fr); }
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-side { position: static; }
}
@media (max-width: 640px) {
  .how { grid-template-columns: repeat(2, 1fr); }
  .answers, .ed-answers { grid-template-columns: 1fr; }
  .step { padding: 18px 16px 20px; }
  .ed-grid-concept { grid-template-columns: 1fr; }
  .ed-symbol { grid-template-columns: 60px minmax(0, 1fr) 70px; }
  .ed-symbol .row-tools { grid-column: 1 / -1; justify-content: flex-end; }
  .ed-symbol-head span:last-child { display: none; }
  .ed-step { grid-template-columns: 22px minmax(0, 1fr); }
  .ed-step > input:nth-of-type(2) { grid-column: 2; }
  .ed-step .row-tools { grid-column: 2; justify-content: flex-end; }
  .ed-step-head { display: none; }
  .ed-body { padding: 0 14px 16px; }
  .grade-picker a { width: 54px; height: 52px; }
}

/* ---------- sertifikat ---------- */
.cert-box { margin: 18px auto; max-width: 460px; padding: 18px 20px; border-radius: var(--radius); border: 2px solid color-mix(in srgb, var(--brand) 35%, var(--line)); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.cert-box .cert-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 6px; }
.cert-box p { margin: 0 0 10px; }
.cert-form { display: grid; gap: 10px; text-align: left; }
.cert-form .btn { justify-self: center; }
.cert-locked .btn { margin-top: 4px; }

.cert-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cert-after { max-width: 760px; margin: 22px auto 0; }
.cert-after h2 { margin-top: 0; }

/* Dokument je uvek svetao (i u tamnoj temi), odnos stranica A4 vodoravno; slova rastu sa širinom. */
.certificate { container-type: inline-size; max-width: 1000px; margin: 0 auto; aspect-ratio: 297 / 210; background: #fffdf8; color: #1d1a26; border-radius: 6px; box-shadow: var(--shadow-lg); padding: 2.2cqw; background-image: linear-gradient(120deg, #7c3aed, #db2777 55%, #ea580c); }
.cert-frame { height: 100%; background: #fffdf8; border-radius: 4px; outline: 0.25cqw solid #d9cfee; outline-offset: -1.6cqw; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 3.2cqw 6cqw 2.4cqw; }
.cert-brand { display: flex; align-items: center; gap: 0.8cqw; font-weight: 800; font-size: 1.9cqw; color: #1d1a26; }
.cert-brand .logo-mark { width: 2.8cqw; height: 2.8cqw; border-radius: 0.8cqw; }
.cert-brand .logo-mark::after { left: 1.1cqw; top: 0.8cqw; border-left-width: 0.9cqw; border-top-width: 0.6cqw; border-bottom-width: 0.6cqw; }
.cert-kicker { margin-top: 2.2cqw; font-size: 5.4cqw; font-weight: 800; letter-spacing: 0.9cqw; background: linear-gradient(120deg, #7c3aed, #db2777 55%, #ea580c); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.cert-sub { font-size: 1.7cqw; color: #6b6480; text-transform: uppercase; letter-spacing: 0.25cqw; }
.cert-given { margin-top: 2.4cqw; font-size: 1.8cqw; color: #4b465c; }
.cert-name { font-family: Georgia, Cambria, "Times New Roman", serif; font-style: italic; font-size: 5cqw; line-height: 1.15; color: #1d1a26; border-bottom: 0.2cqw solid #e2d9f3; padding: 0 3cqw 0.6cqw; margin-top: 0.6cqw; max-width: 90%; overflow-wrap: anywhere; }
.cert-for { margin-top: 1.6cqw; font-size: 1.8cqw; color: #4b465c; }
.cert-lesson { font-family: Georgia, Cambria, "Times New Roman", serif; font-size: 2.9cqw; font-weight: 700; margin-top: 0.4cqw; max-width: 92%; line-height: 1.2; }
.cert-meta { margin-top: 0.6cqw; font-size: 1.7cqw; color: #6b6480; font-weight: 600; }
.cert-results { display: flex; gap: 2.4cqw; margin-top: 1.2cqw; font-size: 1.7cqw; color: #4b465c; }
.cert-foot { margin-top: auto; width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 3cqw; }
.cert-sign { display: grid; justify-items: center; gap: 0.4cqw; }
.cert-sign-value { font-family: Georgia, Cambria, "Times New Roman", serif; font-style: italic; font-size: 2.1cqw; color: #1d1a26; }
.cert-sign-line { width: 80%; border-top: 0.15cqw solid #8a829c; }
.cert-sign-label { font-size: 1.3cqw; color: #8a829c; text-transform: uppercase; letter-spacing: 0.15cqw; }
.cert-seal { width: 11cqw; height: 11cqw; border-radius: 50%; display: grid; place-content: center; justify-items: center; color: #fff; font-weight: 800; font-size: 1.4cqw; text-transform: uppercase; letter-spacing: 0.15cqw; background: radial-gradient(circle at 35% 30%, #f59e0b, #ea580c 60%, #c2410c); box-shadow: 0 0 0 0.6cqw #fde7c7, 0 0 0 0.8cqw #f59e0b; }
.cert-seal span { font-size: 3.6cqw; line-height: 1; }
.cert-code { margin-top: 1.6cqw; font-size: 1.15cqw; color: #8a829c; }

@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { background: #fff !important; }
  .demo-bar, .site-header, .site-footer, .flashes, .no-print, #tooltip { display: none !important; }
  .section.cert-page { padding: 0; }
  .cert-kicker { background: none; color: #7c3aed; }  /* prelaz boja kroz slova u PDF-u ostavlja tanak okvir */
  .cert-page .wrap { max-width: none; padding: 0; }
  .certificate { width: 297mm; height: 210mm; max-width: none; margin: 0; border-radius: 0; box-shadow: none;
                 -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- zaštita časa: vodeni žig, video, štampa ---------- */
.player { position: relative; }
.watermark { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; user-select: none; -webkit-user-select: none; }
.watermark span { white-space: nowrap; }
.watermark-page { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 80px 110px; padding: 30px;
                  transform: rotate(-18deg) scale(1.5); opacity: .07; color: var(--ink); font-size: 15px; font-weight: 700; }
.video-wrap { position: relative; margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-wrap .video-file { display: block; width: 100%; margin: 0; border-radius: 0; }
.watermark-video { display: flex; flex-direction: column; justify-content: space-around; align-items: center;
                   transform: rotate(-12deg) scale(1.15); opacity: .25; color: #fff; text-shadow: 0 1px 2px #000;
                   font-size: clamp(11px, 1.7vw, 20px); font-weight: 700; }
.watermark-video span:nth-child(odd) { transform: translateX(-20%); }
.watermark-video span:nth-child(even) { transform: translateX(20%); }
.video-fs { position: absolute; top: 10px; right: 10px; z-index: 5; width: 40px; height: 40px; border: 0; border-radius: 10px;
            background: rgba(0, 0, 0, .55); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.video-fs:hover { background: rgba(0, 0, 0, .75); }
.video-wrap:fullscreen { display: flex; align-items: center; border-radius: 0; }
.video-wrap:fullscreen .video-file { height: 100%; object-fit: contain; }
.video-wrap:-webkit-full-screen { display: flex; align-items: center; border-radius: 0; }
.video-wrap:-webkit-full-screen .video-file { height: 100%; object-fit: contain; }
.player.protected .step { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.player.protected input, .player.protected textarea { user-select: text; -webkit-user-select: text; }
.print-blocked { display: none; }
@media print {
  .lesson-page .player > :not(.print-blocked), .lesson-page .lesson-side, .lesson-page .reviews, .lesson-page .grid { display: none !important; }
  .lesson-page .player { box-shadow: none; border: 0; }
  .print-blocked { display: block !important; padding: 24px 0; font-size: 16pt; }
}

/* editor: da li zadatak za test dobija druge brojeve u svakom pokušaju */
.ed-vary { margin: 0; }
div.ed-vary { border-radius: var(--radius-sm); padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-2); }
div.ed-vary p { margin: 4px 0 0; }
.ed-vary.ok { border-color: var(--ok); background: var(--ok-bg); }
.ed-vary.same { border-style: dashed; }

/* paketi časova */
.bundle-card { border-top-style: double; border-top-width: 6px; }
.bundle-summary { margin: 0; }
.bundle-was { margin-left: 6px; font-size: .85rem; font-weight: 500; color: var(--muted); text-decoration: line-through; }
.badge-save { background: var(--ok-bg); color: var(--ok); }
.bundle-card .lc-foot { gap: 8px; }
.bundle-card .lc-foot .btn { margin-left: auto; }
.bundle-offer { display: grid; gap: 4px; color: var(--ink); border: 2px dashed color-mix(in srgb, var(--brand) 40%, var(--line)); }
.bundle-offer:hover { text-decoration: none; border-color: var(--brand); }
.bundle-offer .subject-tag { justify-self: start; }
.bundle-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bundle-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.bundle-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.bundle-pick { display: grid; gap: 4px; }
.bundle-pick-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bundle-pick-row:last-child { border-bottom: 0; }
.field-narrow { max-width: 220px; }

/* registracija: potvrda roditelja */
.check.consent { align-items: flex-start; font-size: .92rem; line-height: 1.45; }
.check.consent input { margin-top: 2px; flex: none; }

/* uslovi korišćenja i privatnost */
.legal h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.legal p, .legal li { line-height: 1.6; color: var(--ink-2); }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal .placeholder { background: var(--warn); color: var(--surface); padding: 0 4px; border-radius: 4px; font-size: .9em; }

/* probni period: „Ceo čas uskoro“ umesto kupovine */
.buy-soon { margin: 0 0 6px; }
.buy-box form { margin: 0; }

/* stranica predmeta: nivo škole i razredi */
.subject-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.grade-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 24px; }
.grade-tab { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: .95rem; }
.grade-tab strong { font-size: 1.5rem; line-height: 1; }
.grade-tab small { color: var(--muted); }
.grade-tab:hover { text-decoration: none; border-color: var(--brand); }
.grade-tab-on { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.topic-title { font-size: 1.2rem; margin: 28px 0 12px; }
.topic-title:first-of-type { margin-top: 8px; }

/* časovi po redu (redni broj u razredu) */
.crumb-num { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.course-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.course-nav a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); }
.course-nav a:hover { text-decoration: none; border-color: var(--brand); }
.course-nav small { color: var(--muted); }
.course-next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .course-nav { grid-template-columns: 1fr; } .course-next { grid-column: 1; } }
