/* =================================================================
   Web3 Academy
   ================================================================= */
.lede-sm { font-size: 1.12rem; color: var(--ink); }
.ac-about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.ac-cover { margin: 0; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(0,0,0,.85); background: #EAF3FF; }
.ac-cover img { width: 100%; height: auto; display: block; }
.ac-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: 1.4rem 0 1rem; }
.ac-facts div { padding: .8rem .9rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.ac-facts dt { font-size: .74rem; color: var(--ink-soft); }
.ac-facts dd { margin: .15rem 0 0; font: 800 1.05rem/1.2 var(--display); color: var(--gold); }
.ac-for { color: var(--ink-soft); margin-bottom: 1.2rem; }
.ac-for b { color: var(--ink); }
.ac-motto { margin: 1.2rem 0 0; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 900px) { .ac-about-grid { grid-template-columns: 1fr; } .ac-cover { max-width: 460px; } .ac-facts { grid-template-columns: repeat(2, 1fr); } }

/* sticky in-page nav */
.ac-jump { position: sticky; top: var(--hdr-h, 64px); z-index: 40; background: rgba(10, 8, 38, .96); border-bottom: 1px solid rgba(244,182,63,.15); }
.ac-jump-row { display: flex; align-items: center; gap: 1rem; min-height: 48px; }
.ac-jump-links { flex: 1; display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
.ac-jump-links::-webkit-scrollbar { display: none; }
.ac-jump-links a { flex: none; padding: .45rem .75rem; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.ac-jump-links a:hover, .ac-jump-links a.on { color: var(--night); background: var(--gold); }
.ac-progress { flex: none; display: flex; align-items: center; gap: .5rem; font-size: .8rem; }
.ac-bar { width: 90px; height: 6px; border-radius: 3px; background: rgba(245,238,225,.12); overflow: hidden; }
.ac-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--malachite), var(--gold)); transition: width .6s var(--ease); }
.ac-progress b { color: var(--gold); min-width: 2.6em; }
@media (max-width: 560px) { .ac-bar { width: 50px; } }
#modules, #study, #glossary, #compare, #safety, #quiz, #graduate, #resources { scroll-margin-top: calc(var(--hdr-h, 64px) + 56px); }

/* objectives */
.ac-obj { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .7rem; }
.ac-obj li { position: relative; padding: .9rem 1rem .9rem 2.8rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); }
.ac-obj li::before { content: "✓"; position: absolute; left: .9rem; top: .85rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; background: var(--malachite); color: #fff; font-size: .75rem; font-weight: 800; }

/* module cards */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.ac-card { display: flex; flex-direction: column; gap: .25rem; padding: 0 0 1rem; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left; cursor: pointer; transition: transform .35s var(--ease), border-color .25s, box-shadow .35s; }
.ac-card:hover { transform: translateY(-5px); border-color: rgba(244,182,63,.55); box-shadow: 0 30px 50px -30px rgba(0,0,0,.8); }
.ac-img { position: relative; display: block; aspect-ratio: 4 / 3; background: #EAF3FF; margin-bottom: .6rem; }
.ac-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-done { position: absolute; top: .6rem; right: .6rem; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--malachite); color: #fff; font-style: normal; font-weight: 800; transform: scale(0); transition: transform .3s var(--ease); }
.ac-card.is-done .ac-done { transform: scale(1); }
.ac-card.is-done { border-color: rgba(19,168,129,.6); }
.ac-meta { padding: 0 1rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.ac-card b { padding: 0 1rem; font: 800 1.12rem/1.25 var(--display); }
.ac-card small { padding: 0 1rem; color: var(--ink-soft); font-size: .86rem; }

/* notes: hidden when JS runs (shown inside the sheet instead) */
.ac-notes { width: min(var(--wrap), 100% - 2.5rem); margin: 0 auto; display: grid; gap: 1.5rem; }
.ac-js .ac-notes { display: none; }
.ac-note-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 16px; background: #EAF3FF; margin-bottom: 1rem; }
.ac-note h3 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); margin: .3rem 0 .8rem; }
.ac-note .ac-meta { padding: 0; }
.ac-note p { color: var(--ink-soft); line-height: 1.65; }
.ac-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1rem; }
.ac-chips li { padding: .3rem .7rem; border-radius: 999px; background: rgba(244,182,63,.12); color: var(--gold); font-size: .8rem; font-weight: 600; }
.ac-boxes { display: grid; gap: .7rem; margin-top: 1rem; }
.ac-box { padding: .9rem 1rem; border-radius: 14px; border-left: 4px solid var(--sky); background: rgba(45,185,218,.08); }
.ac-box b { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .25rem; color: var(--sky); }
.ac-box p { margin: 0; color: var(--ink) !important; }
.ac-box.rem { border-color: var(--terracotta); background: rgba(210,100,63,.1); } .ac-box.rem b { color: var(--terracotta); }
.ac-box.act { border-color: var(--malachite); background: rgba(19,168,129,.1); } .ac-box.act b { color: var(--malachite); }

/* module sheet */
.ac-dialog { padding: 0; border: 0; background: transparent; width: min(760px, 100vw); max-width: 100vw; max-height: 100dvh; color: var(--ink); }
.ac-dialog::backdrop { background: rgba(3, 2, 14, .75); backdrop-filter: blur(4px); }
.ac-dialog[open] { animation: ac-up .35s var(--ease); }
@keyframes ac-up { from { opacity: 0; transform: translateY(30px); } }
.ac-dialog-inner { position: relative; max-height: min(88dvh, 900px); overflow-y: auto; overscroll-behavior: contain; padding: 1.4rem clamp(1.1rem, 4vw, 2rem) 0; border-radius: 24px; background: #120E3A; border: 1px solid rgba(244,182,63,.3); }
.ac-x { position: sticky; top: 0; float: right; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(245,238,225,.2); background: rgba(10,8,38,.9); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.ac-dialog-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 1.4rem calc(-1 * clamp(1.1rem, 4vw, 2rem)) 0; padding: .8rem clamp(1.1rem, 4vw, 2rem) calc(.8rem + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, #120E3A 30%); }
.ac-dialog-foot .tp-link { background: none; border: 0; color: var(--ink-soft); font-weight: 600; cursor: pointer; padding: .5rem; }
.ac-dialog-foot .tp-link:disabled { opacity: .3; cursor: default; }
.ac-mark.is-done { background: var(--malachite); color: #fff; box-shadow: 0 5px 0 #0B6E54; }
@media (max-width: 640px) {
  .ac-dialog { width: 100vw; margin: auto 0 0; }
  .ac-dialog-inner { border-radius: 22px 22px 0 0; max-height: 92dvh; }
}

/* study */
.ac-two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); }
@media (max-width: 860px) { .ac-two { grid-template-columns: 1fr; } }
.ac-flow { list-style: none; counter-reset: f; margin: 1rem 0 0; padding: 0; display: grid; gap: .6rem; }
.ac-flow li { counter-increment: f; position: relative; padding: .9rem 1rem .9rem 3.4rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.ac-flow li::before { content: counter(f); position: absolute; left: 1rem; top: .9rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--night); font: 800 .9rem var(--display); }
.ac-flow b { display: flex; justify-content: space-between; }
.ac-flow b span { color: var(--gold); font-weight: 600; font-size: .85rem; }
.ac-flow p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .92rem; }
.ac-plan { list-style: none; margin: 1rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid rgba(244,182,63,.35); display: grid; gap: .9rem; }
.ac-plan li { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: .6rem; align-items: start; }
.ac-plan li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.ac-wk { font: 800 .85rem var(--display); color: var(--gold); }
.ac-plan b { display: block; }
.ac-plan small { color: var(--ink-soft); }

/* glossary */
.ac-search input { width: 100%; max-width: 480px; min-height: 50px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid rgba(245,238,225,.2); background: rgba(7,6,28,.6); color: var(--ink); font: inherit; margin-bottom: 1.2rem; }
.ac-search input:focus { outline: none; border-color: var(--gold); }
.ac-terms { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .7rem; }
.ac-term { padding: .9rem 1rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.ac-term dt { font: 800 1rem var(--display); color: var(--gold); }
.ac-term dd { margin: .25rem 0 0; color: var(--ink-soft); font-size: .92rem; }

/* compare */
.ac-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.ac-tabs button { min-height: 42px; padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(245,238,225,.25); background: transparent; color: var(--ink); font: 600 .92rem var(--body); cursor: pointer; }
.ac-tabs button[aria-selected="true"] { background: var(--gold); color: var(--night); border-color: var(--gold); }
.ac-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: stretch; }
.ac-vs-col { padding: 1.2rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.ac-vs-col.b { border-color: rgba(45,185,218,.4); }
.ac-vs-col h3 { margin-bottom: .6rem; }
.ac-vs-col.b h3 { color: var(--sky); }
.ac-vs-col ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; color: var(--ink-soft); }
.ac-vs-mid { align-self: center; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--night); font: 800 .9rem var(--display); }
@media (max-width: 680px) { .ac-vs { grid-template-columns: 1fr; } .ac-vs-mid { justify-self: center; } }

/* safety */
.ac-rules { list-style: none; counter-reset: r; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: .8rem; }
.ac-rules li { counter-increment: r; position: relative; padding: 1.1rem 1.1rem 1.1rem 3.6rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--terracotta); }
.ac-rules li::before { content: counter(r); position: absolute; left: 1.1rem; top: 1.1rem; font: 800 1.5rem/1 var(--display); color: var(--terracotta); }
.ac-rules b { display: block; margin-bottom: .2rem; }
.ac-rules p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* quiz */
.narrow { max-width: 820px; }
.ac-quiz { padding: clamp(1.2rem, 4vw, 2rem); border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.ac-q { border: 0; margin: 0; padding: 0; }
.ac-q legend { font: 800 1.25rem/1.3 var(--display); margin-bottom: 1rem; padding: 0; }
.ac-q legend span { display: block; font: 600 .74rem var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.ac-opt { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 52px; margin-bottom: .5rem; padding: .7rem 1rem; border-radius: 14px; border: 1px solid rgba(245,238,225,.18); background: rgba(7,6,28,.5); color: var(--ink); font: 500 1rem/1.35 var(--body); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.ac-opt i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(245,238,225,.1); font-style: normal; font-weight: 700; font-size: .85rem; }
.ac-opt:hover:not(:disabled) { border-color: var(--gold); }
.ac-opt:disabled { cursor: default; }
.ac-opt.right { border-color: var(--malachite); background: rgba(19,168,129,.18); }
.ac-opt.right i { background: var(--malachite); color: #fff; }
.ac-opt.wrong { border-color: var(--rose); background: rgba(226,85,126,.15); }
.ac-opt.wrong i { background: var(--rose); color: #fff; }
.ac-why { margin: .6rem 0 0; padding: .8rem 1rem; border-radius: 12px; background: rgba(244,182,63,.1); color: var(--ink); }
.ac-quiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.2rem; flex-wrap: wrap; }
.ac-dots { display: flex; gap: 5px; }
.ac-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(245,238,225,.15); }
.ac-dots i.cur { outline: 2px solid var(--gold); outline-offset: 1px; }
.ac-dots i.ok { background: var(--malachite); } .ac-dots i.no { background: var(--rose); }
.ac-result { text-align: center; }
.ac-score { font: 800 3rem/1 var(--display); color: var(--ink-soft); margin-bottom: .4rem; }
.ac-score b { color: var(--gold); }
.ac-sub { margin: 2.5rem 0 .3rem; font-size: 1.4rem; }
.ac-practice { display: grid; gap: .5rem; margin-top: 1rem; }
.ac-practice details { border-radius: 14px; background: var(--card); border: 1px solid var(--line); padding: 0 1rem; }
.ac-practice summary { cursor: pointer; padding: .95rem 1.6rem .95rem 0; font-weight: 600; list-style: none; position: relative; }
.ac-practice summary::-webkit-details-marker { display: none; }
.ac-practice summary::after { content: "Reveal"; position: absolute; right: 0; top: 50%; translate: 0 -50%; font-size: .75rem; color: var(--gold); }
.ac-practice details[open] summary::after { content: "Hide"; }
.ac-practice details p { margin: 0 0 1rem; color: var(--ink-soft); }

/* graduation */
.ac-weights { display: grid; gap: .7rem; margin: 1.2rem 0; }
.ac-w { display: grid; grid-template-columns: minmax(0, 1fr) 1fr auto; gap: .8rem; align-items: center; font-size: .92rem; }
.ac-w-bar { height: 10px; border-radius: 5px; background: rgba(245,238,225,.1); overflow: hidden; }
.ac-w-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--malachite), var(--gold)); }
.ac-w b { color: var(--gold); min-width: 3ch; text-align: right; }
.ac-req { padding: 1rem 1.1rem; border-radius: 14px; background: rgba(244,182,63,.1); border: 1px solid rgba(244,182,63,.3); }
.ac-check { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .45rem; }
.ac-check label { display: flex; gap: .8rem; align-items: flex-start; padding: .75rem .9rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.ac-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--malachite); }
.ac-check input:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(19,168,129,.7); }

/* resources */
.ac-res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .8rem; }
.ac-res-card { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .3s var(--ease); }
.ac-res-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.ac-res-card b { color: var(--ink); }
.ac-res-card small { color: var(--gold); font-size: .78rem; }
.ac-res-card span { color: var(--ink-soft); font-size: .9rem; }
.ac-final { margin: 2.5rem auto 0; max-width: 32ch; text-align: center; font: 800 clamp(1.3rem, 3vw, 1.8rem)/1.3 var(--display); color: var(--gold); }

/* Web3 hub teaser */
.w3-academy { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.w3-academy img { width: 100%; height: 100%; object-fit: cover; display: block; background: #EAF3FF; }
.w3-academy > div { padding: clamp(1.4rem, 4vw, 2.4rem); }
.w3-academy ul { margin: .8rem 0 1.4rem; padding-left: 1.1rem; color: var(--ink-soft); display: grid; gap: .3rem; }
@media (max-width: 800px) { .w3-academy { grid-template-columns: 1fr; } .w3-academy img { max-height: 260px; } }
