@font-face { font-family: "Aspekta"; src: url("/fonts/AspektaVF.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --red: #9e0d22; --red-deep: #7f0a1b; --black: #000; --gray: #a2a2a2; --paper: #f0f0f0; --ink-2: #3d3d3d; --line: #d9d9d9; --white: #fff;
  --ok: #1f7a3a; --ok-bg: #e7f4ea; --err: #9e0d22; --err-bg: #fbe9ec; --warn-bg: #fff5d6;
  --radius: 14px; --font: "Aspekta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--black); background: var(--paper); line-height: 1.55; font-size: 16px; }
a { color: var(--red); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0.4em 0 0.4em; }
h2 { font-size: 1.25rem; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; margin: 0 0 0.3em; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.hint { display: block; font-size: 0.85rem; color: var(--ink-2); font-weight: 400; }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 700; margin: 0; }

/* header */
.top { background: var(--red); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.brand img { height: 28px; width: auto; }
.brand span { border-left: 1px solid rgba(255,255,255,.5); padding-left: 10px; }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a, .nav .linkbtn { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 999px; font-size: 0.95rem; }
.nav a.on, .nav a:hover { background: rgba(255,255,255,.16); }
.nav form { margin: 0; }
.wrap { max-width: 980px; margin: 0 auto; padding: 16px 16px 48px; }
.wrap.wide { max-width: 1180px; }
.foot { text-align: center; color: var(--ink-2); font-size: 0.8rem; padding: 24px 16px 32px; }
.back { display: inline-block; margin: 6px 0 4px; text-decoration: none; font-size: 0.95rem; }

/* building blocks */
.card { background: var(--white); border-radius: var(--radius); padding: 18px; margin: 14px 0; border: 1px solid var(--line); }
.btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 12px 20px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--red-deep); }
.chip { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 0.9rem; cursor: pointer; color: var(--black); }
.chip.on { background: var(--black); color: #fff; border-color: var(--black); }
.linkbtn { background: none; border: 0; color: var(--red); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.tag { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--warn-bg); color: #6b4f00; border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
.msg { border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.err { background: var(--err-bg); color: var(--err); }
.bar { height: 8px; background: #e4e4e4; border-radius: 99px; overflow: hidden; margin: 8px 0; }
.bar span { display: block; height: 100%; background: var(--red); border-radius: 99px; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid #bdbdbd; border-radius: 10px; width: 100%; background: #fff; color: var(--black); }
textarea { resize: vertical; }
label { display: block; font-weight: 600; margin: 10px 0; }
label input, label select, label textarea { margin-top: 6px; font-weight: 400; }
:focus-visible { outline: 3px solid #000; outline-offset: 2px; }

/* login */
.login { max-width: 440px; margin: 40px auto; }
.login .btn { width: 100%; margin-top: 8px; }
.code { font-size: 1.8rem; letter-spacing: 0.4em; text-align: center; }

/* home */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.stat { background: #fff; border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); }
.stat b { font-size: 1.6rem; display: block; }
.stat span { color: var(--ink-2); font-size: .9rem; }
.stat.wide { grid-column: span 2; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0,1fr)); } .stat.wide { grid-column: span 2; } }
.resume { display: grid; gap: 2px; background: var(--black); color: #fff; text-decoration: none; padding: 16px 18px; border-radius: var(--radius); margin: 8px 0 18px; }
.resume span { color: #cfcfcf; font-size: .85rem; }
.resume b { font-size: 1.15rem; }
.resume em { font-style: normal; color: #fff; font-weight: 700; }
.grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.course { background: #fff; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .12s; }
.course:hover { transform: translateY(-2px); }
.course .cover { height: 120px; display: flex; align-items: center; justify-content: center; position: relative; }
.course .cover img { max-height: 84px; max-width: 70%; object-fit: contain; }
.course .cover .tag { position: absolute; top: 10px; right: 10px; }
.course .body { padding: 14px 16px 16px; }

/* course */
.hero { display: flex; gap: 18px; align-items: center; border-radius: var(--radius); padding: 20px; margin: 10px 0 16px; flex-wrap: wrap; }
.hero img { height: 72px; max-width: 160px; object-fit: contain; }
.hero h1 { margin: 2px 0; }
.cols { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; align-items: start; }
@media (min-width: 860px) { .cols { grid-template-columns: minmax(0,1fr) 300px; } .side { position: sticky; top: 70px; } }
.side .big { font-size: 1.3rem; font-weight: 700; margin: 0; }
.side .btn { width: 100%; text-align: center; margin-top: 8px; }
.chapter h2 small { font-weight: 400; color: var(--ink-2); font-size: .85rem; margin-left: 6px; }
.lessons { list-style: none; padding: 0; margin: 0 0 18px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.lessons li + li { border-top: 1px solid var(--line); }
.lessons a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: inherit; }
.lessons a:hover { background: #fafafa; }
.lessons li.muted { padding: 12px 14px; }
.check { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; border: 2px solid var(--gray); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.lessons li.done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.kind { margin-left: auto; font-size: .78rem; color: var(--ink-2); }

/* lesson */
.lesson-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.lesson-head form { margin-top: 18px; }
.lead { font-size: 1.05rem; color: var(--ink-2); margin: 0; }
.lesson-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; margin-top: 10px; }
@media (min-width: 900px) { .lesson-grid { grid-template-columns: minmax(0, 420px) minmax(0,1fr); } }
.player video { width: 100%; background: #000; border-radius: var(--radius); display: block; }
.player video.v916 { aspect-ratio: 9 / 16; max-height: 78vh; object-fit: contain; }
.player video.v169 { aspect-ratio: 16 / 9; }
.player .switch { display: flex; gap: 6px; margin-top: 8px; }
.placeholder { min-height: 150px; width: 100%; background: repeating-linear-gradient(135deg, #e9e9e9 0 12px, #f4f4f4 12px 24px); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 24px; border: 1px dashed var(--gray); }
.placeholder b { font-size: 1.1rem; }
.placeholder span { color: var(--ink-2); font-size: .92rem; max-width: 280px; }
.steps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.step { width: 100%; display: grid; grid-template-columns: 28px 44px minmax(0,1fr); gap: 8px; align-items: start; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; cursor: pointer; color: inherit; }
.step:disabled { cursor: default; }
.step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.step .t { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .85rem; padding-top: 3px; }
.step em { display: block; font-style: normal; color: var(--ink-2); font-size: .9rem; }
.step.now { border-color: var(--red); box-shadow: 0 0 0 2px var(--red) inset; }
.step.now .n { background: var(--red); color: #fff; }
.recipe ol { list-style: none; padding: 0; margin: 0; }
.recipe li { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px; padding: 9px 8px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.recipe li:last-child { border-bottom: 0; }
.recipe .lbl { font-weight: 700; font-size: .9rem; }
.recipe li.now { background: #fdeef0; }
@media (max-width: 420px) { .recipe li { grid-template-columns: minmax(0,1fr); gap: 0; } }
.warn { background: var(--warn-bg); border-color: #f0dc9a; }
.warn ul { margin: 0; padding-left: 20px; }
.hyg { background: #eef6fb; border-color: #cfe3ef; }
.file { display: block; text-decoration: none; color: inherit; }
.quiz fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.quiz legend { font-weight: 700; padding: 0 6px; }
.quiz fieldset.right { border-color: var(--ok); }
.quiz fieldset.wrong { border-color: var(--err); }
.opt { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 4px 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.opt input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; }
.opt:hover { background: #fafafa; }
.opt.c { background: var(--ok-bg); }
.opt.x { background: var(--err-bg); }
.opt em { margin-left: auto; font-style: normal; font-size: .8rem; color: var(--ok); font-weight: 700; }
.done-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 18px 0; }
.helpful { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.helpful form { display: flex; gap: 6px; margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pager a { text-decoration: none; font-weight: 600; }
.list { list-style: none; padding: 0; }
.list li a { display: grid; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; text-decoration: none; color: inherit; }

/* admin */
.subnav { display: flex; gap: 6px; margin: 4px 0 14px; flex-wrap: wrap; }
.subnav a { text-decoration: none; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: inherit; }
.subnav a.on { background: var(--black); color: #fff; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; font-size: .93rem; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: #fafafa; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.tbl tr.off { opacity: .55; }
.card .tbl { margin: 8px 0; }
@media (max-width: 720px) { .tbl { display: block; overflow-x: auto; } }
.st { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #eee; white-space: nowrap; }
.st.PUBLISHED, .st.APPROVED { background: var(--ok-bg); color: var(--ok); }
.st.DRAFT { background: var(--warn-bg); color: #6b4f00; }
.form.row, .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form.row label, .row label { flex: 1 1 180px; margin: 4px 0; }
.form.row .hint { flex-basis: 100%; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; flex: 0 0 auto; }
label.check input { width: auto; margin: 0; }
details summary { cursor: pointer; font-weight: 700; }
.qedit { border-top: 1px solid var(--line); padding: 10px 0; }
.media-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
@media (min-width: 760px) { .media-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.media { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 6px; }
.media input[type=file] { padding: 6px; }
.mini { display: grid; grid-template-columns: minmax(0,1fr) 90px 70px; gap: 8px; align-items: center; font-size: .85rem; }
.mini .bar { margin: 0; }

/* certificate */
.cert-body { background: #e9e9e9; padding: 24px 16px; }
.cert { background: #fff; max-width: 900px; margin: 0 auto; padding: 48px 40px 36px; border-radius: 6px; text-align: center; position: relative; overflow: hidden; aspect-ratio: 1.414 / 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; }
.cert-band { position: absolute; left: 0; right: 0; top: 0; height: 14px; }
.cert-logo { height: 56px; width: auto; margin-bottom: 10px; }
.cert h1 { font-size: clamp(1.8rem, 1rem + 3vw, 3rem); margin: 4px 0; }
.cert-partner { color: var(--ink-2); margin: 0; }
.cert-text { max-width: 560px; font-size: 1.1rem; }
.cert-foot { display: flex; justify-content: space-between; gap: 16px; width: 100%; max-width: 620px; margin-top: 24px; font-size: .85rem; color: var(--ink-2); flex-wrap: wrap; }
.noprint { margin-top: 16px; }
@media print { .noprint { display: none; } .cert-body { background: #fff; padding: 0; } .cert { border-radius: 0; box-shadow: none; } @page { size: A4 landscape; margin: 10mm; } }
