/* Crypto Steps Academy - shared stylesheet (v3) */
:root {
  --bg: #0d0b1e;
  --card: #17142e;
  --card-2: #1e1a3a;
  --border: #2a2547;
  --text: #ece9ff;
  --muted: #a7a2c9;
  --accent: #8b5cf6;          /* violet: buttons, active nav, fills */
  --accent-2: #6d28d9;
  --link: #b49cfc;            /* lighter violet for text links (AA on dark) */
  --link-hover: #d4c6ff;
  --gold: #f5c542;
  --gold-ink: #1a1405;        /* text on gold */
  --btn-text: #ffffff;
  --header-bg: rgba(13, 11, 30, 0.97);
  --header-bg-scrolled: rgba(13, 11, 30, 0.72);
  --glow-violet: rgba(139, 92, 246, 0.30);
  --glow-gold: rgba(245, 197, 66, 0.20);
  --page-glow-1: transparent;
  --page-glow-2: transparent;
  --ok: #5ee0a0;
  --ok-bg: rgba(94, 224, 160, 0.10);
  --bad: #ff8a8a;
  --bad-bg: rgba(255, 138, 138, 0.10);
  --warn: #f5c542;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.40);
  --radius: 14px;
  --max: 1080px;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 200ms;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f6fc;
  --card: #ffffff;
  --card-2: #f0edfb;
  --border: #dcd7f0;
  --text: #15122b;
  --muted: #4c4770;
  --accent: #7c3aed;
  --accent-2: #5b21b6;
  --link: #6025c9;
  --link-hover: #4a1a9e;
  --gold: #8a5a00;
  --gold-ink: #ffffff;
  --btn-text: #ffffff;
  --header-bg: rgba(247, 246, 252, 0.97);
  --header-bg-scrolled: rgba(247, 246, 252, 0.78);
  --glow-violet: rgba(124, 58, 237, 0.16);
  --glow-gold: rgba(200, 150, 20, 0.16);
  --ok: #0f7a47;
  --ok-bg: rgba(15, 122, 71, 0.08);
  --bad: #b42323;
  --bad-bg: rgba(180, 35, 35, 0.07);
  --warn: #8a5a00;
  --shadow: 0 10px 28px rgba(30, 20, 70, 0.12);
  color-scheme: light;
}

/* Per-page accent glow */
.page-home       { --page-glow-1: var(--glow-violet); --page-glow-2: var(--glow-gold); }
.page-learn,
.page-about,
.page-glossary   { --page-glow-1: var(--glow-violet); --page-glow-2: transparent; }
.page-blog,
.page-scam       { --page-glow-1: var(--glow-gold);   --page-glow-2: transparent; }
.page-privacy,
.page-disclaimer,
.page-404        { --page-glow-1: rgba(167, 162, 201, 0.10); --page-glow-2: transparent; }
[data-theme="light"] .page-privacy, [data-theme="light"] .page-disclaimer, [data-theme="light"] .page-404 { --page-glow-1: rgba(76, 71, 112, 0.07); }

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background-color var(--t) ease, color var(--t) ease;
}

h1, h2, h3 { color: var(--gold); line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.2rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

a { color: var(--link); text-underline-offset: 3px; transition: color var(--t) ease; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--bg);
  padding: 8px 14px; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--t) ease, box-shadow var(--t) ease;
}
.site-header.scrolled {
  background: var(--header-bg-scrolled);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.header-inner {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 10px 20px; min-height: var(--header-h);
  padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold); font-weight: 800; font-size: 1.15rem;
  text-decoration: none; margin-right: auto;
}
.brand:hover { color: var(--gold); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border: 2px solid var(--gold); border-radius: 9px;
  font-size: 0.85rem; color: var(--link);
  background: linear-gradient(135deg, var(--glow-violet), transparent);
}

.site-nav { order: 2; }
.header-tools { order: 3; display: flex; align-items: center; gap: 8px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 7px 11px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-size: 0.95rem;
  transition: background-color var(--t) ease, color var(--t) ease;
}
.site-nav a:hover { color: var(--link); background: var(--card); }
.site-nav a[aria-current="page"] {
  color: var(--btn-text);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 65%);
  font-weight: 700;
}

/* Buttons in the header are only useful with JavaScript */
.theme-toggle, .menu-toggle { display: none; }
.js .theme-toggle { display: inline-grid; }
.theme-toggle, .menu-toggle {
  place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); cursor: pointer;
  transition: border-color var(--t) ease, transform var(--t) ease;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--link); }
.theme-toggle:active, .menu-toggle:active { transform: scale(0.94); }
/* Moon in dark mode, sun in light mode, drawn with CSS */
.theme-icon {
  width: 18px; height: 18px; border-radius: 50%;
  box-shadow: inset -6px -3px 0 0 var(--gold);
  transition: box-shadow var(--t) ease, background var(--t) ease;
}
[data-theme="light"] .theme-icon {
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--gold);
  width: 12px; height: 12px;
}
.bars { display: grid; gap: 4px; width: 18px; }
.bars span {
  display: block; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform var(--t) var(--ease), opacity var(--t) ease;
}
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 700px) and (max-width: 959px) {
  .site-nav { order: 4; width: 100%; }
  .site-nav ul { justify-content: flex-start; }
  .header-inner { padding-bottom: 8px; }
}

@media (max-width: 699px) {
  .header-inner { gap: 8px 12px; }
  .site-nav { order: 4; width: 100%; }
  .site-nav ul { justify-content: center; }
  .site-nav a { padding: 6px 9px; font-size: 0.9rem; }

  .js .menu-toggle { display: inline-grid; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; animation: drop 200ms var(--ease); }
  .js .site-nav ul { flex-direction: column; gap: 2px; padding: 6px 0 10px; }
  .js .site-nav a { padding: 11px 14px; font-size: 1rem; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------------- Main ---------------- */
main { padding: 48px 0 72px; }
.section { margin-bottom: 64px; }
.page-intro { max-width: 720px; color: var(--muted); font-size: 1.1rem; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; text-align: center;
  padding: 56px 0 96px; margin-bottom: 16px;
  isolation: isolate;
}
.hero-content { position: relative; z-index: 2; }
.hero-glow {
  position: absolute; z-index: 0; left: 50%; top: 42%;
  width: min(720px, 110%); aspect-ratio: 1.6;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(closest-side at 35% 50%, var(--glow-violet), transparent 70%),
    radial-gradient(closest-side at 65% 45%, var(--glow-gold), transparent 70%);
  filter: blur(24px);
  animation: glow 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glow {
  0%   { transform: translate(-54%, -52%) scale(0.95) rotate(-4deg); opacity: 0.85; }
  50%  { transform: translate(-48%, -48%) scale(1.06) rotate(3deg);  opacity: 1; }
  100% { transform: translate(-51%, -50%) scale(1) rotate(-1deg);    opacity: 0.9; }
}
.hero .eyebrow {
  display: inline-block; color: var(--link);
  border: 1px solid var(--border); background: var(--card);
  padding: 5px 15px; border-radius: 999px;
  font-size: 0.85rem; margin-bottom: 20px;
}
.hero h1 { max-width: 820px; margin-left: auto; margin-right: auto; }
.hero p { max-width: 620px; margin: 0 auto 30px; color: var(--muted); font-size: 1.15rem; }

.load-in { animation: rise 650ms var(--ease) both; }
.load-in.d1 { animation-delay: 90ms; }
.load-in.d2 { animation-delay: 190ms; }
.load-in.d3 { animation-delay: 290ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Staircase decoration made of CSS blocks */
.stairs {
  position: absolute; z-index: 1; right: 0; bottom: 18px;
  display: flex; align-items: flex-end; gap: 6px;
  pointer-events: none; opacity: 0.9;
}
.stairs .s {
  display: block; width: 26px; border-radius: 6px 6px 2px 2px;
  border: 1px solid; background: transparent;
  animation: step-in 600ms var(--ease) both;
}
.stairs .s:nth-child(odd)  { border-color: var(--link); background: linear-gradient(to top, transparent, var(--glow-violet)); }
.stairs .s:nth-child(even) { border-color: var(--gold); background: linear-gradient(to top, transparent, var(--glow-gold)); }
.stairs .s1 { height: 16px; animation-delay: 350ms; }
.stairs .s2 { height: 32px; animation-delay: 420ms; }
.stairs .s3 { height: 48px; animation-delay: 490ms; }
.stairs .s4 { height: 64px; animation-delay: 560ms; }
.stairs .s5 { height: 80px; animation-delay: 630ms; }
.hero .stairs::before {
  content: ""; position: absolute; left: -120px; bottom: 0; width: 110px; height: 1px;
  background: linear-gradient(to right, transparent, var(--border));
}
@keyframes step-in { from { opacity: 0; transform: translateY(12px) scaleY(0.6); transform-origin: bottom; } to { opacity: 1; transform: none; } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 65%);
  color: var(--btn-text); font-weight: 700;
  padding: 13px 26px; border-radius: 11px; border: 0;
  text-decoration: none;
  box-shadow: 0 6px 18px var(--glow-violet);
  transition: transform var(--t) var(--ease), box-shadow var(--t) ease, filter var(--t) ease;
}
.btn:hover { color: var(--btn-text); transform: translateY(-2px); box-shadow: 0 10px 26px var(--glow-violet); filter: brightness(1.06); }
.btn:active { transform: translateY(0) scale(0.98); box-shadow: 0 3px 10px var(--glow-violet); }
.btn-ghost {
  background: transparent; color: var(--link);
  border: 1px solid var(--link); box-shadow: none;
}
.btn-ghost:hover { color: var(--link); background: var(--card); box-shadow: none; }
.arrow { display: inline-block; transition: transform var(--t) var(--ease); }
.btn:hover .arrow, a:hover > .arrow, .post-card:hover .arrow { transform: translateX(4px); }

/* ---------------- Cards ---------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: transform var(--t) var(--ease), border-color var(--t) ease, box-shadow var(--t) ease;
}
.card h3 { color: var(--link); margin-bottom: 6px; transition: color var(--t) ease; }
.card p { margin: 0; color: var(--muted); }
a.card { display: block; text-decoration: none; color: var(--text); }
a.card:hover, .step:hover {
  transform: translateY(-4px);
  border-color: var(--link);
  box-shadow: var(--shadow), 0 0 0 1px var(--glow-violet), 0 0 28px var(--glow-violet);
}
.grid a.card:nth-child(even):hover {
  border-color: var(--gold);
  box-shadow: var(--shadow), 0 0 0 1px var(--glow-gold), 0 0 28px var(--glow-gold);
}
a.card:hover h3 { color: var(--gold); }

/* How it works strip */
.steps-strip {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px;
  counter-reset: none;
}
.steps-strip li { margin: 0; position: relative; }
.step-circle {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: var(--gold-ink); font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 0 0 5px var(--glow-gold);
}
[data-theme="light"] .step-circle { color: #ffffff; }

/* Blog list on home */
.post-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.post-list li { margin: 0; }
.post-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  text-decoration: none; font-weight: 600;
  transition: transform var(--t) var(--ease), border-color var(--t) ease, box-shadow var(--t) ease;
}
.post-list a:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { padding: 0; }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 52px 18px 22px; position: relative;
  font-weight: 700; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after, .lesson summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--link); border-bottom: 2px solid var(--link);
  transform: rotate(45deg);
  transition: transform var(--t) var(--ease);
}
details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 22px 20px; }
.faq details[open] { border-color: var(--link); }

.contact-line { margin-top: 20px; }

.notice {
  border: 1px solid var(--border); border-left: 4px solid var(--gold);
  background: var(--card); border-radius: var(--radius); padding: 18px 22px;
}
.notice p:last-child { margin-bottom: 0; }

/* ---------------- Long-form pages ---------------- */
.prose { max-width: 780px; }
.prose > section, .prose > article {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 28px; margin-bottom: 20px;
}
.prose section > :last-child, .prose article > :last-child { margin-bottom: 0; }

.toc {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 26px; margin-bottom: 32px; max-width: 780px;
}
.toc h2 { font-size: 1.1rem; margin-bottom: 10px; }
.toc ol, .toc ul { margin: 0; }

.step-num { color: var(--link); font-weight: 700; margin-right: 6px; }
.takeaway { border-top: 1px solid var(--border); padding-top: 12px; color: var(--text); }
.takeaway strong { color: var(--gold); }
.small { font-size: 0.9rem; color: var(--muted); }
.meta { font-size: 0.85rem; color: var(--muted); margin: 0 0 6px; letter-spacing: 0.02em; }

/* Learn: vertical timeline */
.timeline { list-style: none; padding: 0; margin: 0 0 24px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--link));
  opacity: 0.55; border-radius: 2px;
}
.tl-item { position: relative; padding-left: 62px; margin: 0 0 18px; }
.tl-dot {
  position: absolute; left: 0; top: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px var(--glow-gold);
}
[data-theme="light"] .tl-dot { color: #ffffff; }
.lesson {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t) ease, box-shadow var(--t) ease;
}
.lesson:hover { border-color: var(--link); box-shadow: 0 0 22px var(--glow-violet); }
.lesson details[open] { border-radius: var(--radius); }
.lesson summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 20px 56px 20px 24px;
}
.lesson summary::-webkit-details-marker { display: none; }
.lesson summary h2 { display: inline; font-size: clamp(1.2rem, 2.6vw, 1.5rem); margin: 0; }
.lesson-body { padding: 0 24px 22px; }
.lesson-body > :last-child { margin-bottom: 0; }
.prev-next {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--border); margin-top: 18px; padding-top: 14px;
}
.pn { font-weight: 600; text-decoration: none; }
.pn:hover { text-decoration: underline; }
.prose > .more { padding: 26px 28px; }
.prose > .more:hover { transform: none; }

/* Blog cards */
.post-cards { margin-bottom: 40px; }
.post-card { display: flex !important; flex-direction: column; gap: 4px; }
.post-card h3 { font-size: 1.12rem; }
.post-card p { flex: 1; margin-bottom: 14px; }
.read-more { color: var(--link); font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }

/* Reading progress (blog) - hidden without JavaScript */
.read-progress { display: none; }
.js .read-progress {
  display: block; position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 60; background: transparent; pointer-events: none;
}
.read-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--link), var(--gold));
  box-shadow: 0 0 10px var(--glow-violet);
}

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-inner p { margin: 0; max-width: 640px; }
.footer-links { display: flex; gap: 16px; }

/* ---------------- Back to top ---------------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 65%);
  color: var(--btn-text); text-decoration: none; font-size: 1.2rem; font-weight: 800;
  box-shadow: 0 8px 22px var(--glow-violet);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--t) ease, transform var(--t) var(--ease), visibility var(--t);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--btn-text); transform: translateY(-3px); }
.to-top:focus-visible { opacity: 1; visibility: visible; transform: none; }

/* ---------------- 404 ---------------- */
.not-found { position: relative; text-align: center; padding: 56px 0 120px; }
.not-found .code {
  font-size: clamp(4rem, 14vw, 7rem); font-weight: 800; line-height: 1; margin: 0 0 8px;
  background: linear-gradient(135deg, var(--link), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.not-found p { color: var(--muted); max-width: 520px; margin-left: auto; margin-right: auto; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.not-found .stairs { left: 50%; right: auto; transform: translateX(-50%); bottom: 20px; }

/* ---------------- Scroll reveal (only when JS adds .reveal) ---------------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 600ms var(--ease) var(--delay, 0ms), transform 600ms var(--ease) var(--delay, 0ms),
              border-color var(--t) ease, box-shadow var(--t) ease;
}
.reveal.in { opacity: 1; transform: none; }
a.card.reveal.in:hover, .step.reveal.in:hover { transform: translateY(-4px); transition-delay: 0ms; }
.post-list li.reveal.in a:hover { transform: translateY(-2px); }

/* ---------------- Responsive ---------------- */
@media (max-width: 699px) {
  body { font-size: 1rem; }
  main { padding: 32px 0 56px; }
  .hero { padding: 36px 0 92px; }
  .stairs { right: 50%; transform: translateX(50%); bottom: 14px; opacity: 0.75; }
  .stairs .s { width: 20px; }
  .hero .stairs::before { display: none; }
  .prose > section, .prose > article { padding: 20px; }
  .tl-item { padding-left: 52px; }
  .timeline::before { left: 17px; }
  .tl-dot { width: 36px; height: 36px; font-size: 0.95rem; top: 16px; }
  .lesson summary { padding: 18px 46px 18px 18px; }
  .lesson summary::after { right: 18px; }
  .lesson-body { padding: 0 18px 18px; }
  .footer-inner { flex-direction: column; text-align: center; align-items: center; }
  .post-list a { padding: 14px 16px; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  a.card:hover, .step:hover, .btn:hover, .post-list a:hover, .to-top:hover { transform: none !important; }
}

/* Small phones: keep brand and buttons on one row */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .brand { font-size: 0.98rem; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; font-size: 0.78rem; }
  .header-tools { gap: 6px; }
  .theme-toggle, .menu-toggle { width: 38px; height: 38px; }
}
.not-found .code { max-width: none; width: 100%; text-align: center; }

/* =================== v3 additions =================== */

/* Page background glow (fixed, behind everything) */
body { position: relative; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, var(--page-glow-1), transparent 70%),
    radial-gradient(760px 480px at 95% 4%, var(--page-glow-2), transparent 70%);
}

/* Page fade in / out */
.js main { animation: page-in 280ms var(--ease) both; }
.js body.leaving main { opacity: 0; transform: translateY(6px); transition: opacity 160ms ease, transform 160ms ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.js-only { display: none !important; }
.js .js-only { display: revert !important; }
.js .complete-row.js-only, .js .progress-card.js-only, .js .search-field.js-only { display: block !important; }
.js .result-msg.js-only, .js .meter.js-only { display: block !important; }
.js .share-btn.js-only { display: inline-flex !important; }
.js .az li.js-only { display: list-item !important; }

/* Brand with logo */
.brand-logo { display: block; height: 40px; width: auto; flex: none; }
.brand-name { display: inline-block; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 28px; width: auto; flex: none; }

/* Header icon buttons */
.icon-btn {
  display: none; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); cursor: pointer; padding: 0;
  font: inherit; font-size: 1.4rem; line-height: 1;
  transition: border-color var(--t) ease, transform var(--t) ease, color var(--t) ease;
}
.js .search-toggle, .js .theme-toggle { display: inline-grid; }
.icon-btn:hover { border-color: var(--accent); color: var(--link); }
.icon-btn:active { transform: scale(0.94); }
@media (max-width: 699px) { .js .menu-toggle { display: inline-grid; } }

/* Active nav uses violet gradient */
.site-nav a[aria-current="page"] { color: #ffffff; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 65%); }
.footer-links a[aria-current="page"] { color: var(--text); font-weight: 700; }

/* Buttons */
.btn { color: #ffffff; }
.btn:hover, .btn:active { color: #ffffff; }
.btn-ghost, .btn-ghost:hover { color: var(--link); border-color: var(--accent); }
.btn-gold { background: linear-gradient(135deg, #f5c542, #e0a91c); color: #1a1405; box-shadow: 0 6px 18px var(--glow-gold); }
.btn-gold:hover, .btn-gold:active { color: #1a1405; box-shadow: 0 10px 26px var(--glow-gold); }
[data-theme="light"] .btn-gold { background: linear-gradient(135deg, #f5c542, #e8b22a); }
.btn-small { padding: 9px 18px; font-size: 0.95rem; }
.hero-actions { display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.link-btn {
  background: none; border: 0; padding: 0; font: inherit; color: var(--link);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { color: var(--link-hover); }

/* Gold number circles keep dark text in both themes for contrast on #f5c542 */
.step-circle, .tl-dot, .num-badge { background: #f5c542 !important; color: #1a1405 !important; }

/* Hero stairs: violet + gold */
.stairs .s:nth-child(odd)  { border-color: var(--accent); background: linear-gradient(to top, transparent, var(--glow-violet)); }
.stairs .s:nth-child(even) { border-color: #f5c542; background: linear-gradient(to top, transparent, var(--glow-gold)); }
.hero .eyebrow { color: var(--link); }

/* Section head with link */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 0.6em; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; }

/* Latest lessons cards */
.lesson-card { position: relative; padding-top: 22px; }
.num-badge {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 0.95rem;
}
.lesson-card h3 { padding-right: 40px; }

/* Safety first strip */
.safety-strip {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px 22px;
  margin: 0 0 64px; padding: 22px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 197, 66, 0.45);
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.10), var(--card) 60%);
}
.safety-strip h2 { margin: 0 0 4px; font-size: 1.35rem; }
.safety-strip p { margin: 0; color: var(--muted); }
.safety-icon { color: #f5c542; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: rgba(245, 197, 66, 0.12); }
[data-theme="light"] .safety-icon { color: #8a5a00; }
@media (max-width: 699px) {
  .safety-strip { grid-template-columns: 1fr; text-align: left; }
  .safety-strip .btn { justify-self: start; }
}

/* ---------- Search dialog ---------- */
.no-scroll { overflow: hidden; }
.search-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 4, 15, 0.66);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 10vh 16px 16px;
  animation: fade 160ms ease;
}
.search-overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.search-panel {
  width: 100%; max-width: 620px; max-height: 78vh; overflow: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); padding: 18px;
  animation: drop 200ms var(--ease);
}
.search-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.search-head h2 { font-size: 1.1rem; margin: 0; }
.search-close { display: inline-grid; }
.search-input, .search-field input {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px;
}
.search-input:focus, .search-field input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.search-status { margin: 10px 2px 6px; color: var(--muted); font-size: 0.9rem; }
.search-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.search-results li { margin: 0; }
.search-results a {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text);
}
.search-results a:hover, .search-results a:focus-visible { border-color: var(--accent); background: var(--card-2); }
.r-kind { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.r-title { font-weight: 600; color: var(--link); }

/* ---------- Learn: progress, quiz, completion ---------- */
.progress-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 20px; max-width: 780px;
}
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.progress-top h2 { font-size: 1.1rem; margin: 0; }
.progress-label { margin: 0; color: var(--muted); }
.progress-count { color: var(--gold); font-weight: 800; }
.progress-track { height: 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); overflow: hidden; margin: 12px 0 10px; }
.progress-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #f5c542); transition: width 400ms var(--ease); }
.progress-note { margin: 0; }
.toc li.done a::after { content: " \2713"; color: var(--ok); text-decoration: none; display: inline-block; margin-left: 4px; }
.done-tag {
  display: inline-block; margin-left: 10px; vertical-align: middle;
  font-size: 0.75rem; font-weight: 700; color: var(--ok); background: var(--ok-bg);
  border: 1px solid var(--ok); padding: 1px 8px; border-radius: 999px;
}
.done-tag[hidden] { display: none; }
.tl-item.done .tl-dot { box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px var(--ok); }
.timeline::before { background: linear-gradient(to bottom, #f5c542, var(--accent)); }

.quiz {
  margin: 22px 0 6px; padding: 18px 20px;
  border: 1px dashed var(--border); border-radius: 12px; background: var(--card-2);
}
.quiz h3 { margin-bottom: 4px; }
.quiz-intro { margin-bottom: 12px; }
.q { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.q legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.opt {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 9px 12px; margin-bottom: 6px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
  transition: border-color var(--t) ease, background-color var(--t) ease;
}
.opt:hover { border-color: var(--accent); }
.opt input { margin-top: 0.35em; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.opt:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.feedback { margin: 6px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.feedback.is-right { color: var(--ok); background: var(--ok-bg); }
.feedback.is-wrong { color: var(--bad); background: var(--bad-bg); }
.feedback[hidden], .explain[hidden] { display: none; }
.answer-fallback { margin-top: 6px; font-size: 0.95rem; }
.answer-fallback summary { cursor: pointer; color: var(--link); }
.js .answer-fallback { display: none; }
.quiz-score { margin: 4px 0 0; font-weight: 700; color: var(--gold); }
.quiz-score:empty { display: none; }
.complete-row { margin: 16px 0 0; }
.complete-btn.is-done { background: transparent; color: var(--ok); border: 1px solid var(--ok); box-shadow: none; }
.complete-btn.is-done:hover { color: var(--ok); }

/* ---------- Glossary ---------- */
.glossary-tools { max-width: 820px; margin-bottom: 24px; }
.search-field { margin-bottom: 14px; }
.search-field label { display: block; font-weight: 700; margin-bottom: 6px; }
.az ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.az li { margin: 0; }
.az-link {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--card);
  color: var(--link); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: border-color var(--t) ease, background-color var(--t) ease, color var(--t) ease;
}
.az-link:hover { border-color: var(--accent); }
.az-link.active { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 65%); color: #fff; border-color: transparent; }
.az-link.disabled { color: var(--muted); opacity: 0.45; cursor: default; }
.glossary-status { margin: 12px 0 0; }
.glossary { max-width: 820px; }
.letter-group { margin-bottom: 22px; }
.letter-group[hidden] { display: none; }
.letter {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(245, 197, 66, 0.12); border: 1px solid rgba(245, 197, 66, 0.4);
  font-size: 1.25rem; margin-bottom: 10px;
}
.letter-group dl { margin: 0; display: grid; gap: 10px; }
.term {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
  transition: border-color var(--t) ease, box-shadow var(--t) ease;
}
.term[hidden] { display: none; }
.term:hover { border-color: var(--accent); }
.term dt { font-weight: 800; color: var(--link); margin-bottom: 4px; }
.term dd { margin: 0; color: var(--text); }
.term.flash { border-color: #f5c542; box-shadow: 0 0 0 3px var(--glow-gold); }
.no-results { max-width: 820px; }
.no-results[hidden] { display: none; }

/* ---------- Scam check ---------- */
.scam-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 48px; }
.scam-form h2, .scam-result h2 { font-size: 1.25rem; }
.flags { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.flags li { margin: 0; }
.flag {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-2);
  transition: border-color var(--t) ease, background-color var(--t) ease;
}
.flag:hover { border-color: var(--accent); }
.flag:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.flag input { margin-top: 0.3em; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.flag.on { border-color: #f5c542; background: rgba(245, 197, 66, 0.08); }
.scam-result { position: sticky; top: calc(var(--header-h) + 16px); }
.meter { height: 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); overflow: hidden; margin-bottom: 10px; }
.meter-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width 300ms var(--ease), background-color 300ms ease; }
.meter[data-level="1"] .meter-fill { background: #f5c542; }
.meter[data-level="2"] .meter-fill { background: #ff9f43; }
.meter[data-level="3"] .meter-fill { background: #ff5c5c; }
.result-count { color: var(--muted); margin-bottom: 10px; }
.ticked { color: var(--gold); font-weight: 800; }
.result-msg { border-radius: 10px; padding: 12px 14px; border: 1px solid var(--border); margin-bottom: 12px; transition: border-color var(--t), background-color var(--t); }
.result-msg p { margin: 0; }
.result-msg[data-level="1"] { border-color: var(--warn); background: rgba(245, 197, 66, 0.08); }
.result-msg[data-level="2"] { border-color: #ff9f43; background: rgba(255, 159, 67, 0.10); }
.result-msg[data-level="3"] { border-color: var(--bad); background: var(--bad-bg); }
.edu-line { margin: 0; border-top: 1px solid var(--border); padding-top: 10px; }
.scam-reset { font-size: 0.95rem; }
.after-check ul { max-width: 780px; }
@media (max-width: 899px) {
  .scam-layout { grid-template-columns: 1fr; }
  .scam-result { position: static; }
}

/* ---------- Blog share ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.share-label { font-weight: 700; color: var(--muted); font-size: 0.92rem; }
.share-btn {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card-2); color: var(--link);
  font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: border-color var(--t) ease, transform var(--t) var(--ease);
}
.share-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.copy-status { font-size: 0.9rem; color: var(--ok); }
.read-progress span { background: linear-gradient(90deg, #f5c542, var(--accent)); }

/* ---------- About logo panel ---------- */
.about-mark {
  margin: 0 0 28px; max-width: 780px; padding: 26px;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: radial-gradient(300px 160px at 50% 50%, var(--glow-violet), transparent 70%), var(--card);
}
.about-mark img { height: 120px; width: auto; }

/* ---------- 404 code gradient ---------- */
.not-found .code { background: linear-gradient(135deg, var(--accent), #f5c542); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Small screens ---------- */
@media (max-width: 420px) {
  .brand { font-size: 0.95rem; gap: 8px; }
  .brand-logo { height: 36px; }
  .brand-name { max-width: 7.2em; line-height: 1.15; }
  .icon-btn { width: 38px; height: 38px; }
  .header-tools { gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .js main { animation: none !important; }
  .js body.leaving main { opacity: 1; transform: none; }
}
.no-results.reveal { opacity: 1; transform: none; }
.hero { overflow-x: clip; }
.hero-glow { width: min(720px, 100%); }
