:root {
  /* Brand: navy (logo background), gold coin, jade snake */
  --bg: #121a31;
  --bg-alt: #0d1428;
  --card: #18223f;
  --border: #2a3658;
  --text: #eef1f8;
  --muted: #a3adc6;
  --gold: #f2c14e;
  --gold-deep: #d9952a;
  --accent: #3cc47c;
  --accent-2: #f2c14e;
  --on-gold: #1a1406;
  --radius: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(18, 26, 49, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 38px; height: 38px; border-radius: 50%; display: block; }
.logo-text span { color: var(--gold); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  font-weight: 600; font-size: 1rem; transition: transform .15s, opacity .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--on-gold);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.25);
}
.btn-ghost { border: 1px solid var(--border); color: var(--text); }

/* Hero */
.hero { padding: 96px 0 80px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% 10% auto; height: 560px;
  background: radial-gradient(closest-side, rgba(242,193,78,.14), transparent);
  pointer-events: none;
}
.hero .container { position: relative; }
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); font-size: .85rem; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.hero h1 span {
  background: linear-gradient(90deg, var(--gold), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { max-width: 640px; margin: 22px auto 34px; color: var(--muted); font-size: 1.15rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Sections */
section { padding: 80px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.card .icon { font-size: 1.8rem; margin-bottom: 14px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .97rem; }
.level {
  display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; margin-bottom: 12px;
}
.lv-beg { background: rgba(60,196,124,.15); color: var(--accent); }
.lv-int { background: rgba(242,193,78,.15); color: var(--gold); }
.lv-adv { background: rgba(248,113,113,.15); color: #f87171; }
.card { transition: border-color .2s, transform .2s; }
.card:hover { border-color: rgba(242,193,78,.45); }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 64px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 26px; top: 26px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: var(--on-gold); font-weight: 800;
  display: grid; place-items: center; font-size: .9rem;
}

/* Lesson preview */
.lesson { max-width: 760px; margin: 0 auto; }
.lesson h3 { font-size: 1.4rem; margin-bottom: 14px; }
.lesson p { color: var(--muted); margin-bottom: 14px; }
.lesson ul { color: var(--muted); padding-left: 22px; margin-bottom: 14px; }
.callout {
  border-left: 4px solid var(--accent); background: rgba(60,196,124,.08);
  padding: 16px 20px; border-radius: 8px; color: var(--text); margin-top: 18px;
}

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 22px; margin-bottom: 12px;
}
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-size: 1.2rem; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin-top: 12px; }

/* Disclaimer */
.disclaimer {
  max-width: 860px; margin: 0 auto; padding: 24px 28px;
  border: 1px solid rgba(250,204,21,.35); background: rgba(250,204,21,.06);
  border-radius: var(--radius); color: var(--muted); font-size: .95rem;
}
.disclaimer strong { color: #facc15; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 48px 0 32px; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
footer h4 { color: var(--text); margin-bottom: 12px; font-size: .95rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.copyright { border-top: 1px solid var(--border); padding-top: 22px; text-align: center; font-size: .85rem; }

/* Legal pages */
.legal { max-width: 800px; margin: 0 auto; padding: 64px 20px; }
.legal h1 { font-size: 2.2rem; margin-bottom: 8px; }
.legal .updated { color: var(--muted); margin-bottom: 36px; }
.legal h2 { font-size: 1.3rem; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 10px; }
.legal ul { padding-left: 22px; }

/* Clickable lesson cards */
.card-link { display: flex; flex-direction: column; color: var(--text); }
.card-link:hover { text-decoration: none; transform: translateY(-3px); }
.card-link p { flex: 1; }
.card-link .level, .card-link .read-more { align-self: flex-start; }
.read-more { display: inline-block; margin-top: 16px; color: var(--gold); font-weight: 600; font-size: .95rem; }
.card-link:hover .read-more { text-decoration: underline; }

/* About */
.about { max-width: 900px; margin: 0 auto; text-align: center; }
.about > p { color: var(--muted); font-size: 1.05rem; max-width: 720px; margin: 0 auto; }
.about-points { margin: 36px 0; text-align: left; }

/* Lesson pages */
.article { max-width: 760px; margin: 0 auto; padding: 48px 20px 72px; }
.breadcrumb { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); }
.article h1 { font-size: clamp(2rem, 4.5vw, 2.7rem); line-height: 1.15; letter-spacing: -0.02em; margin: 6px 0 12px; }
.article .lede { font-size: 1.15rem; color: var(--muted); margin-bottom: 8px; }
.article .meta { color: var(--muted); font-size: .9rem; padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.article h2 { font-size: 1.5rem; margin: 44px 0 14px; letter-spacing: -0.01em; }
.article h3 { font-size: 1.15rem; margin: 28px 0 10px; }
.article p, .article li { color: #c8d0e2; font-size: 1.05rem; }
.article p { margin-bottom: 16px; }
.article ul, .article ol { padding-left: 24px; margin-bottom: 16px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--text); }
.article .callout { margin: 24px 0; }
.callout.warn { border-left-color: #f87171; background: rgba(248,113,113,.08); }
.chain { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 24px 0; }
.chain .blk {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: .85rem; color: var(--muted); min-width: 140px;
}
.chain .blk b { display: block; color: var(--gold); margin-bottom: 4px; }
.chain .arrow { color: var(--accent); font-size: 1.3rem; }
.compare { width: 100%; border-collapse: collapse; margin: 20px 0 24px; font-size: .97rem; }
.compare th, .compare td { border: 1px solid var(--border); padding: 12px 14px; text-align: left; vertical-align: top; color: #c8d0e2; }
.compare th { background: var(--card); color: var(--text); }
.table-wrap { overflow-x: auto; }
.quiz details { background: var(--card); }
.quiz summary { font-weight: 600; }
.next-lessons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.lesson-note {
  margin-top: 48px; padding: 18px 22px; border: 1px solid var(--border); border-radius: 12px;
  color: var(--muted); font-size: .92rem;
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 60px; }
  section { padding: 60px 0; }
}
