/* Svitla Training - brand: navy #1C1E29, orange #FF6E00 */
:root {
  --navy: #1c1e29;
  --navy-2: #272a38;
  --navy-3: #3a3e50;
  --orange: #ff6e00;
  --orange-soft: #fff1e6;
  --orange-ink: #b84f00;          /* orange that passes contrast on white, for links */
  --ink: #1c1e29;
  --text: #2f3342;
  --muted: #646a7a;
  --line: #e3e5ea;
  --line-2: #d3d6dd;
  --bg: #f6f6f8;
  --card: #ffffff;
  --success: #12805c;
  --success-soft: #e7f6f0;
  --warning: #9a6200;
  --warning-soft: #fff6e0;
  --danger: #c0352b;
  --danger-soft: #fdecea;
  --info-soft: #eef1f8;
  --radius: 12px;
  --radius-small: 8px;
  --shadow: 0 1px 2px rgba(28, 30, 41, .06), 0 4px 16px rgba(28, 30, 41, .05);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--orange-ink); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .85rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--info-soft); padding: .1em .35em; border-radius: 4px; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--card); padding: .5rem 1rem; z-index: 100; border-radius: var(--radius-small); }
.skip-link:focus { left: 8px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #fff; border-bottom: 3px solid var(--orange); }
.topbar__inner { max-width: 1180px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand__logo { height: 23px; width: auto; display: block; }
.brand__name { font-weight: 600; letter-spacing: .02em; padding-left: .65rem; border-left: 1px solid rgba(255, 255, 255, .25); }
.nav { display: flex; gap: .25rem; flex: 1; }
.nav__link { color: #d9dbe3; text-decoration: none; padding: .45rem .8rem; border-radius: 6px; font-weight: 500; }
.nav__link:hover { color: #fff; background: var(--navy-2); }
.nav__link[aria-current="page"] { color: #fff; background: var(--navy-3); box-shadow: inset 0 -2px 0 var(--orange); }
.usermenu { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.usermenu__name { color: #d9dbe3; font-size: .92rem; text-decoration: none; }
a.usermenu__name:hover { color: #fff; text-decoration: underline; }
.usermenu form { margin: 0; }

.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; flex: 1; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem; border-top: 1px solid var(--line); background: var(--card); }
.footer__sep { margin: 0 .5rem; }

/* ---------- Buttons, badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  padding: .62rem 1.1rem; border-radius: var(--radius-small); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--orange); color: var(--navy); }
.btn--primary:hover { background: #ff8424; color: var(--navy); }
.btn--ghost { background: var(--card); color: var(--navy); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn--on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn--on-dark:hover { border-color: #fff; color: #fff; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #a42a21; color: #fff; }
.btn--danger-ghost { background: var(--card); color: var(--danger); border-color: #efc2be; }
.btn--danger-ghost:hover { border-color: var(--danger); color: var(--danger); }
.btn--linkedin { background: #0a66c2; color: #fff; }
.btn--linkedin:hover { background: #004182; color: #fff; }
.btn--small { padding: .38rem .7rem; font-size: .85rem; }
.btn--large { padding: .8rem 1.4rem; font-size: 1.02rem; }
.btn:disabled { opacity: .6; cursor: progress; }

.badge {
  display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 999px; background: var(--info-soft); color: var(--navy-3); vertical-align: middle;
}
.badge--done { background: var(--success-soft); color: var(--success); }
.badge--progress, .badge--ready { background: var(--orange-soft); color: var(--orange-ink); }
.badge--locked, .badge--new { background: #eef0f3; color: var(--muted); }
.badge--draft, .badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--error { background: var(--danger-soft); color: var(--danger); }
.chip { font-size: .82rem; font-weight: 600; color: var(--muted); background: #eef0f3; border-radius: 999px; padding: .15rem .6rem; white-space: nowrap; }
.chip--done { color: var(--success); background: var(--success-soft); }
.chip--done::before { content: "\2713  "; }

/* ---------- Generic blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.35rem 1.5rem; }
.card__title { font-size: 1.05rem; margin-bottom: .35rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--orange-ink); margin-bottom: .35rem; }
.lead { font-size: 1.06rem; color: var(--text); max-width: 72ch; }
.meta { color: var(--muted); font-size: .88rem; }
.link { font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.actions--stack { flex-direction: column; align-items: stretch; }
.section-title { font-size: 1.15rem; margin: 2rem 0 .85rem; display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.section-title__note { font-size: .88rem; font-weight: 500; color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head .section-title { margin-bottom: .85rem; }

.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .88rem; color: var(--muted); margin-bottom: 1.1rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--navy); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head__aside { display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.page-head__aside .meter { min-width: 260px; }

.flash { border-radius: var(--radius-small); padding: .8rem 1rem; margin-bottom: 1.25rem; background: var(--info-soft); color: var(--navy); border-left: 4px solid var(--navy-3); }
.flash ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.flash--success { background: var(--success-soft); border-color: var(--success); }
.flash--warning { background: var(--warning-soft); border-color: #e0a100; }
.flash--error { background: var(--danger-soft); border-color: var(--danger); }
.flash:empty { display: none; }

.callout { border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; background: var(--info-soft); border: 1px solid #d8deec; }
.callout--success { background: var(--success-soft); border-color: #bfe5d6; }
.callout--preview { background: var(--orange-soft); border-color: #ffd2ae; }
.callout--warning { background: var(--warning-soft); border-color: #f1d79c; margin: 0 0 1rem; }

.empty { text-align: center; padding: 3rem 1.5rem; background: var(--card); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty--small { padding: 1.25rem; text-align: left; }
.empty--small p { margin: 0; color: var(--muted); }

/* Progress meters (native <progress>, so no inline styles are needed) */
.meter { display: flex; flex-direction: column; gap: .35rem; }
.meter progress { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 999px; background: #eceef2; overflow: hidden; }
.meter progress::-webkit-progress-bar { background: #eceef2; border-radius: 999px; }
.meter progress::-webkit-progress-value { background: var(--orange); border-radius: 999px; }
.meter progress::-moz-progress-bar { background: var(--orange); border-radius: 999px; }
.meter__label { font-size: .84rem; color: var(--muted); }
.meter--large progress { height: 10px; }
.meter--table { min-width: 120px; }

/* ---------- Dashboard ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero__text { max-width: 720px; }
.stats { display: flex; gap: .75rem; margin: 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem; min-width: 112px; box-shadow: var(--shadow); }
.stat dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat dd { margin: 0; font-size: 1.7rem; font-weight: 700; color: var(--navy); }

.seminar-card { display: flex; flex-direction: column; gap: .6rem; border-top: 4px solid var(--orange); }
.seminar-card__badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.seminar-card__title { font-size: 1.25rem; margin: 0; }
.seminar-card__title a { color: var(--ink); text-decoration: none; }
.seminar-card__title a:hover { color: var(--orange-ink); }
.seminar-card__summary { color: var(--text); margin: 0; flex: 1; }
.seminar-card .meta { margin: 0; }
.seminar-card__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .35rem; }

/* ---------- Seminar page ---------- */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.layout-2 .section-title { margin-top: 0; }
.prose { color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2 { font-size: 1.2rem; margin-top: 1.4rem; }
.prose h3 { margin-top: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { margin: 0 0 1rem; padding: .5rem 1rem; border-left: 3px solid var(--orange); background: var(--orange-soft); border-radius: 0 var(--radius-small) var(--radius-small) 0; }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; }
.prose img { border-radius: var(--radius-small); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.step { display: flex; gap: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow); }
.step__marker {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; background: var(--orange-soft); color: var(--orange-ink); border: 2px solid #ffd2ae;
}
.step__marker svg { width: 20px; height: 20px; fill: currentColor; }
.step--done .step__marker { background: var(--success); border-color: var(--success); color: #fff; }
.step--locked .step__marker { background: #eef0f3; border-color: var(--line-2); color: var(--muted); }
.step--locked .step__title { color: var(--muted); }
.step__body { min-width: 0; }
.step__eyebrow { font-size: .8rem; color: var(--muted); margin: 0 0 .15rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.step__title { margin: 0 0 .2rem; font-size: 1.05rem; }
.step__title a { color: var(--ink); text-decoration: none; }
.step__title a:hover { color: var(--orange-ink); text-decoration: underline; }
.step .meta { margin: 0; }

/* ---------- Session page ---------- */
.page-head--session { margin-bottom: 1.25rem; }
.layout-session { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.75rem; align-items: start; }
.layout-session__main > section, .layout-session__main > .prose { margin-bottom: 1.75rem; }
.layout-session__main .section-title { margin-top: 0; }
.layout-session__aside { position: sticky; top: 1rem; }
.outline { padding: 1.1rem 1.2rem; }
.outline__title { font-weight: 700; margin-bottom: .6rem; }
.outline__title a { color: var(--ink); text-decoration: none; }
.outline__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.outline__item a, .outline__item span { display: block; padding: .45rem .6rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .92rem; }
.outline__item a:hover { background: var(--bg); }
.outline__item.is-current a { background: var(--orange-soft); color: var(--navy); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }
.outline__item.is-done a::after { content: " \2713"; color: var(--success); font-weight: 700; }
.outline__item.is-locked span { color: #9aa0ad; }
.outline__item.is-locked span::after { content: " \1F512"; font-size: .8em; }

.video-card { padding: 0; overflow: hidden; margin-bottom: 1.25rem; }
.video-card__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.video-card__head h3 { margin: 0; }
.player-placeholder { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--navy); color: #c9cdd6; padding: 1.5rem; text-align: center; }

.files { list-style: none; margin: 0; padding: .4rem 1rem; }
.file { display: flex; align-items: center; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.file:last-child { border-bottom: 0; }
.file__type { flex: none; width: 46px; text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .04em; color: var(--orange-ink); background: var(--orange-soft); border-radius: 6px; padding: .45rem 0; }
.file__name { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); }
.file__name .meta { display: block; font-weight: 400; }
.file form { margin: 0; }

.test-panel { border-left: 4px solid var(--line-2); }
.test-panel.is-unlocked, .test-panel:has(.test-panel__state--done:not([hidden])) { border-left-color: var(--orange); }
.test-panel__title { font-size: 1.15rem; }
.test-panel__state p:last-child { margin-bottom: 0; }
.test-panel__state .btn { margin-top: .4rem; }
.test-panel__lock { display: flex; gap: .6rem; align-items: center; color: var(--muted); }
.test-panel__lock svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.test-panel__state--done strong { color: var(--success); }

/* ---------- Protected video player ---------- */
.player { position: relative; background: #0d0e14; color: #fff; outline: none; user-select: none; -webkit-user-select: none; }
.player__stage { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.player__video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.player__watermark {
  position: absolute; z-index: 2; pointer-events: none; color: rgba(255, 255, 255, .28); font-size: clamp(.7rem, 1.4vw, .95rem);
  font-weight: 600; letter-spacing: .03em; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); transition: top 2s ease, left 2s ease; white-space: nowrap;
}
.player__big-play {
  position: absolute; z-index: 3; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--orange); color: var(--navy);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 28px rgba(0, 0, 0, .4); transition: transform .15s;
}
.player__big-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.player__big-play svg { width: 38px; height: 38px; fill: currentColor; margin-left: 4px; }
.player.is-started .player__big-play { display: none; }
.player__spinner { position: absolute; z-index: 3; inset: 50% auto auto 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .25); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player__toast {
  position: absolute; z-index: 4; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: calc(100% - 28px);
  background: rgba(28, 30, 41, .94); color: #fff; padding: .55rem .9rem; border-radius: 8px; font-size: .9rem; text-align: center;
  border-left: 3px solid var(--orange);
}
.player__controls { display: flex; align-items: center; gap: .35rem; padding: .45rem .7rem; background: var(--navy); }
.player__btn { flex: none; width: 38px; height: 38px; border: 0; border-radius: 6px; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.player__btn:hover { background: var(--navy-3); }
.player__btn svg { width: 22px; height: 22px; fill: currentColor; }
.player__btn text { fill: currentColor; font-family: var(--font); }
.player .icon-pause, .player .icon-muted { display: none; }
.player.is-playing .icon-play { display: none; }
.player.is-playing .icon-pause { display: block; }
.player.is-muted .icon-volume { display: none; }
.player.is-muted .icon-muted { display: block; }
.player__time { font-variant-numeric: tabular-nums; font-size: .86rem; color: #d9dbe3; padding: 0 .35rem; white-space: nowrap; }
.player__track { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.player__track::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 5px; border-radius: 3px; background: repeating-linear-gradient(135deg, #3a3e50 0 6px, #2f3242 6px 12px); }
.player__track-watched, .player__track-played { position: absolute; left: 0; top: 12px; height: 5px; border-radius: 3px; width: 0; }
.player__track-watched { background: #8a8fa0; }
.player__track-played { background: var(--orange); }
.player__track-thumb { position: absolute; top: 8px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 110, 0, .35); left: 0; }
.player__track:focus-visible { outline-offset: 0; }
.player__tip { position: absolute; bottom: 30px; transform: translateX(-50%); background: #fff; color: var(--navy); font-size: .78rem; font-weight: 600; padding: .2rem .45rem; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.player__note { margin: 0; padding: .6rem 1.25rem .8rem; background: var(--card); color: var(--muted); font-size: .86rem; border-top: 1px solid var(--line); }
.player.is-complete .player__note { color: var(--success); font-weight: 600; }
.player:fullscreen { display: flex; flex-direction: column; background: #000; }
.player:fullscreen .player__stage { flex: 1; aspect-ratio: auto; }
.player:fullscreen .player__note { display: none; }
.player:-webkit-full-screen { width: 100%; height: 100%; }

/* ---------- Test ---------- */
.quiz__list { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.question fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.question__text { font-size: 1.08rem; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: .9rem; }
.question__number { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--orange-ink); margin-bottom: .3rem; }
.question.is-answered { border-color: #ffd2ae; }
.question.is-missing { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.question__choices { display: flex; flex-direction: column; gap: .5rem; }
.choice { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem .9rem; border: 1px solid var(--line-2); border-radius: var(--radius-small); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--navy-3); }
.choice input { margin-top: .25rem; accent-color: var(--orange); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); }
.quiz__footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; position: sticky; bottom: 1rem; flex-wrap: wrap; }

/* ---------- Result ---------- */
.result { display: flex; gap: 2.25rem; align-items: center; flex-wrap: wrap; padding: 2rem; border-top: 5px solid var(--line-2); }
.result--pass { border-top-color: var(--success); }
.result--fail { border-top-color: #e0a100; }
.result__ring { width: 150px; height: 150px; flex: none; }
.result__ring-bg { fill: none; stroke: #eceef2; stroke-width: 10; }
.result__ring-fg { fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round; }
.result--pass .result__ring-fg { stroke: var(--success); }
.result__ring-score { font-size: 24px; font-weight: 700; fill: var(--navy); font-family: var(--font); }
.result__ring-pct { font-size: 13px; fill: var(--muted); font-family: var(--font); }
.result__body { flex: 1; min-width: 260px; }

/* ---------- Certificates ---------- */
.certificate-card { display: flex; flex-direction: column; gap: .5rem; }
.certificate-card__thumb { display: block; border-radius: var(--radius-small); overflow: hidden; border: 1px solid var(--line); }
.certificate-card__thumb img { display: block; width: 100%; }
.certificate-card__title { font-size: 1.1rem; margin: .35rem 0 0; }
.certificate-card__title a { color: var(--ink); text-decoration: none; }
.layout-certificate { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.5rem; align-items: start; }
.certificate-preview { margin: 0; padding: .75rem; }
.certificate-preview img { display: block; width: 100%; border-radius: 6px; }
.certificate-actions { display: flex; flex-direction: column; gap: 1rem; }
.copy-field { display: flex; gap: .5rem; margin: .5rem 0 .75rem; }
.copy-field input { flex: 1; min-width: 0; font: inherit; font-size: .85rem; padding: .45rem .6rem; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); color: var(--text); }

.verify { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }
.verify__card { text-align: center; padding: 2rem; border-top: 5px solid var(--success); }
.verify__card--missing { border-top-color: var(--danger); }
.verify__badge { display: inline-flex; align-items: center; gap: .45rem; color: var(--success); font-weight: 700; background: var(--success-soft); padding: .35rem .85rem; border-radius: 999px; }
.verify__badge svg { width: 20px; height: 20px; fill: currentColor; }
.verify .lead { margin: 0 auto 1.25rem; }
.facts { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; margin: 0; }
.facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); }

/* ---------- Sign-in & messages ---------- */
.signin { max-width: 520px; margin: 3rem auto; padding: 2.25rem; }
.signin__logo { display: block; height: 40px; width: auto; margin: 0 0 1.5rem; }
.quick-users { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.quick-users form { margin: 0; }
.quick-users .btn { width: 100%; justify-content: flex-start; }
.quick-users .meta { font-weight: 400; margin-left: .35rem; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 1.05rem; }
.field { display: flex; flex-direction: column; gap: .35rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field__label { font-weight: 600; color: var(--ink); font-size: .93rem; }
.field__label .meta { font-weight: 400; margin-left: .3rem; }
.field input:not([type=checkbox]):not([type=radio]), .field textarea, .field select, .choice-edit input[type=text], .search input, .input--inline, .input--small {
  font: inherit; color: var(--text); padding: .6rem .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-small); background: #fff; width: 100%;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field textarea.mono { font-size: .88rem; }
.field input:focus, .field textarea:focus, .choice-edit input:focus, .input--inline:focus, .input--small:focus, .search input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 110, 0, .18); }
.field__error { color: var(--danger); font-size: .85rem; }
.field__prefix { display: flex; align-items: stretch; }
.field__prefix > span { display: flex; align-items: center; padding: 0 .6rem; background: var(--bg); border: 1px solid var(--line-2); border-right: 0; border-radius: var(--radius-small) 0 0 var(--radius-small); color: var(--muted); font-size: .9rem; }
.field__prefix input { border-radius: 0 var(--radius-small) var(--radius-small) 0 !important; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 180px; }
.field--grow { flex: 3 1 260px !important; }
.field--narrow { flex: 0 0 110px !important; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--orange); }
.choice-edit { display: flex; align-items: center; gap: .65rem; margin-bottom: .45rem; }
.choice-edit input[type=radio] { width: 18px; height: 18px; accent-color: var(--success); flex: none; }
.choice-edit label { flex: none; }
.search { display: flex; gap: .5rem; }
.search input { min-width: 240px; }
.input--small { width: 72px; padding: .35rem .45rem; }
.input--inline { padding: .35rem .5rem; font-weight: 600; }
pre.code { font-family: var(--mono); font-size: .85rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-small); padding: .9rem; white-space: pre-wrap; margin: 0 0 1rem; }
textarea[readonly] { width: 100%; font-family: var(--mono); font-size: .85rem; padding: .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-small); background: var(--bg); margin-bottom: .5rem; }

/* ---------- Admin ---------- */
.layout-admin { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.layout-admin .section-title { margin-top: 0; }
.admin-section { margin-top: 2.25rem; }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.table td { padding: .75rem 1rem; 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; }
.table a { color: var(--ink); }
.table tr.is-inactive td { color: var(--muted); background: #fbfbfc; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell > * { margin-left: .3rem; }
.inline-form { display: inline; margin: 0; }
.upload { margin-top: 1rem; background: #fcfcfd; border-style: dashed; }
.question-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.question-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.1rem; }
.question-row.is-unusable { border-color: #efc2be; background: #fffafa; }
.question-row__text { min-width: 0; }
.danger-zone { margin-top: 2.5rem; padding: 1.1rem 1.25rem; border: 1px solid #efc2be; border-radius: var(--radius); background: #fffafa; }
.danger-zone h3 { color: var(--danger); margin-bottom: .2rem; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .layout-2, .layout-session, .layout-certificate, .layout-admin { grid-template-columns: minmax(0, 1fr); }
  .layout-session__aside { position: static; order: -1; }
  .page-head__aside { align-items: stretch; width: 100%; }
}
@media (max-width: 640px) {
  .page { padding: 1.1rem .9rem 2.5rem; }
  .topbar__inner { gap: .6rem 1rem; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .usermenu__name { display: none; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 1.1rem; }
  .player__time { display: none; }
  .player__big-play { width: 64px; height: 64px; }
  .result { padding: 1.4rem; }
  .table { font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .footer, .player, .actions, .crumbs { display: none !important; }
}
