:root {
  --orange:#F89422; --deep:#A85F12; --ink:#1c1c1e; --muted:#66666b; --line:#e6e1d8;
  --tint:#FDF6EC; --bg:#faf8f4; --card:#fff; --ok:#1f7a3d; --okbg:#e7f5ec; --bad:#b3261e; --badbg:#fdecea;
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height:1.2; margin:0; }
button { font:inherit; cursor:pointer; }

.top { position:sticky; top:0; z-index:5; background:#fff; }
.top-in { max-width:760px; margin:0 auto; padding:10px 16px; display:flex; align-items:center; gap:14px; }
.logo { height:34px; width:auto; }
.top-title { font:700 17px Georgia, serif; }
.bar { height:4px; background:#f3e3cb; }
.bar-fill { height:4px; width:0; background:var(--orange); transition:width .3s; }

.wrap { max-width:760px; margin:0 auto; padding:20px 16px 40px; min-height:70vh; }
.loading { color:var(--muted); }
.foot { max-width:760px; margin:0 auto; padding:16px; color:var(--muted); font-size:13px; text-align:center; }

.hero { background:var(--tint); border-radius:16px; padding:28px 22px; border:1px solid #f3dfc0; }
.hero h1 { font-size:32px; }
.hero p { margin:10px 0 0; font-size:18px; }
.eyebrow { font:700 12px/1 -apple-system, sans-serif; letter-spacing:.1em; text-transform:uppercase; color:var(--deep); margin-bottom:8px; }

.topics { list-style:none; padding:0; margin:18px 0 0; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.topics li { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:12px; display:flex; gap:10px; align-items:center; font-weight:600; font-size:15px; }
.topics small { display:block; font-weight:400; color:var(--muted); }
.ico { flex:0 0 36px; width:36px; height:36px; border-radius:10px; background:var(--tint); color:var(--deep); display:grid; place-items:center; }
.ico svg { width:22px; height:22px; }

.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px; margin-top:16px; }
.card h3 { font-size:19px; margin-bottom:8px; }
.card ul, .card ol { margin:0; padding-left:22px; }
.card li { margin:7px 0; }
.card li::marker { color:var(--orange); font-weight:700; }
.card p { margin:0; }

label { display:block; font-weight:600; font-size:15px; margin:14px 0 6px; }
input[type=text] { width:100%; font:inherit; padding:12px; border:1px solid #b9b4aa; border-radius:10px; background:#fff; }
input[type=text]:focus-visible, button:focus-visible, .choice:focus-visible { outline:3px solid #f8942266; outline-offset:2px; }
.radios { display:flex; gap:10px; flex-wrap:wrap; }
.radios label { margin:0; font-weight:500; border:1px solid #b9b4aa; border-radius:10px; padding:10px 14px; background:#fff; display:flex; gap:8px; align-items:center; cursor:pointer; }
.radios label:has(input:checked) { border-color:var(--orange); background:var(--tint); font-weight:600; }

.btn { background:var(--orange); color:#1c1c1e; border:0; border-radius:12px; padding:14px 22px; font-weight:700; font-size:17px; }
.btn:disabled { background:#e3ded5; color:#8d8a84; cursor:not-allowed; }
.btn.ghost { background:none; border:1px solid #b9b4aa; font-weight:600; }
.nav { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:22px; flex-wrap:wrap; }
.nav .hint { color:var(--muted); font-size:14px; }
.err { color:var(--bad); font-weight:600; min-height:1.5em; margin:10px 0 0; }

.mod-head { display:flex; gap:14px; align-items:center; }
.mod-head .ico { flex-basis:52px; width:52px; height:52px; border-radius:14px; }
.mod-head .ico svg { width:30px; height:30px; }
.mod-head h1 { font-size:28px; }
.step { color:var(--muted); font-size:14px; font-weight:600; }
.intro { font-size:19px; margin:14px 0 0; }
.note { background:var(--tint); border-left:4px solid var(--orange); border-radius:4px; padding:10px 14px; margin-top:14px; font-size:15px; }

.video { position:relative; margin-top:16px; border-radius:14px; overflow:hidden; background:#000; aspect-ratio:16/9; }
.video iframe, .video button { position:absolute; inset:0; width:100%; height:100%; border:0; }
.video button { background-size:cover; background-position:center; padding:0; }
.video button span { position:absolute; left:0; right:0; bottom:0; padding:28px 14px 12px; color:#fff; text-align:left; font-weight:600; background:linear-gradient(transparent, #000c); }
.video button i { position:absolute; left:50%; top:50%; width:72px; height:72px; margin:-36px 0 0 -36px; border-radius:50%; background:var(--orange); display:grid; place-items:center; }
.video button i::after { content:""; border-left:22px solid #1c1c1e; border-top:14px solid transparent; border-bottom:14px solid transparent; margin-left:6px; }
.vcap { font-size:14px; color:var(--muted); margin:6px 2px 0; }

.map { width:100%; height:auto; border-radius:10px; border:1px solid var(--line); display:block; }

.quiz-h { margin-top:30px; font-size:22px; padding-top:18px; border-top:2.5px solid var(--orange); }
.quiz-sub { color:var(--muted); margin:4px 0 0; font-size:15px; }
.q { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; margin-top:14px; }
.q.done { border-color:#b9dfc6; }
.q-text { font-weight:700; margin:0 0 10px; }
.choice { display:flex; gap:10px; align-items:flex-start; width:100%; text-align:left; background:#fff; border:1.5px solid #cfcabf; border-radius:10px; padding:12px; margin-top:8px; color:inherit; }
.choice .box { flex:0 0 22px; height:22px; border:2px solid #9a958b; border-radius:50%; margin-top:2px; display:grid; place-items:center; font-size:14px; font-weight:800; }
.q.multi .choice .box { border-radius:5px; }
.choice.sel { border-color:var(--orange); background:var(--tint); }
.choice.sel .box { border-color:var(--deep); background:var(--orange); }
.choice.right { border-color:var(--ok); background:var(--okbg); }
.choice.right .box { border-color:var(--ok); background:var(--ok); color:#fff; }
.choice.wrong { border-color:var(--bad); background:var(--badbg); }
.choice.wrong .box { border-color:var(--bad); color:var(--bad); }
.choice:disabled { cursor:default; opacity:1; }
.fb { margin:10px 0 0; font-size:15px; font-weight:600; }
.fb.ok { color:var(--ok); } .fb.no { color:var(--bad); }
.check { margin-top:12px; padding:10px 16px; font-size:15px; }

.ack { background:var(--tint); border-left:4px solid var(--orange); border-radius:4px; padding:14px 16px; }
.agree { display:flex; gap:12px; align-items:flex-start; margin-top:14px; font-weight:600; cursor:pointer; }
.agree input { width:24px; height:24px; flex:0 0 24px; margin-top:2px; accent-color:var(--orange); }
.sigwrap { position:relative; margin-top:8px; }
canvas.sig { width:100%; height:180px; background:#fff; border:1.5px dashed #9a958b; border-radius:12px; touch-action:none; display:block; }
.sigwrap .ph { position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); text-align:center; color:#b0aba1; pointer-events:none; }
.sigrow { display:flex; justify-content:space-between; align-items:center; margin-top:6px; font-size:14px; color:var(--muted); }
.link { background:none; border:0; color:var(--deep); text-decoration:underline; padding:4px; font-size:14px; }

.done { text-align:center; padding:26px 16px; }
.done .tick { width:84px; height:84px; border-radius:50%; background:var(--ok); color:#fff; display:grid; place-items:center; margin:0 auto 16px; }
.done .tick svg { width:46px; height:46px; }
.done h1 { font-size:30px; }
.score { display:inline-block; margin-top:14px; background:var(--tint); border-radius:12px; padding:10px 18px; font-weight:700; }

@media (max-width:520px) {
  .topics { grid-template-columns:1fr; }
  .hero h1 { font-size:27px; } .mod-head h1 { font-size:24px; }
  .nav .btn { flex:1 1 auto; }
}
