/* Learn Hub — scoped component styles (the `lh-*` namespace). Plain CSS so it
   doesn't depend on the purged Tailwind build. Dark theme to match the site. */

#learn-root { color: #e5e7eb; }

.lh-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: 12px; padding: .35rem .7rem; border-radius: 999px;
  background: rgba(0, 212, 168, .08); color: #6ee7d2;
  border: 1px solid rgba(0, 212, 168, .25); white-space: nowrap;
}

.lh-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(0,212,168,.10), rgba(66,165,245,.06));
  border: 1px solid rgba(0,212,168,.22); border-radius: 14px;
  padding: .85rem 1.1rem;
}

.lh-card {
  background: #0e131d; border: 1px solid #1d2532; border-radius: 16px;
  padding: 1.1rem 1.2rem;
}
.lh-card--accent {
  background: linear-gradient(160deg, #0e1b1a, #0e131d);
  border-color: rgba(0,212,168,.28);
}

.lh-h2 {
  font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 .9rem;
  letter-spacing: -.01em;
}

/* Rendered lesson bodies (mdLite / body_html output). Mirrors the prose-policy
   styles re-declared in course_lesson.html so the learn page doesn't fall back to
   browser defaults for headings, lists, quotes, tables and code. */
.prose-policy p { margin: 0.7rem 0; color: #cbd5e1; line-height: 1.7; }
.prose-policy strong { color: #fff; font-weight: 600; }
.prose-policy ul { margin: 0.7rem 0; padding-left: 1.4rem; list-style: disc; color: #cbd5e1; }
.prose-policy ol { margin: 0.7rem 0; padding-left: 1.4rem; list-style: decimal; color: #cbd5e1; }
.prose-policy li { margin: 0.35rem 0; line-height: 1.6; }
.prose-policy a { color: #00d4a8; text-decoration: underline; }
.prose-policy a:hover { color: #42e8c0; }
.prose-policy h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: #00d4a8; margin: 1.5rem 0 0.6rem; font-weight: 700; }
.prose-policy h3 { font-size: 1rem; color: #fff; margin: 1rem 0 0.4rem; font-weight: 600; }
.prose-policy blockquote {
  margin: 0.9rem 0; padding: 0.5rem 0.9rem; color: #9fb0c4;
  border-left: 3px solid rgba(0,212,168,0.4); background: rgba(0,212,168,0.04);
  border-radius: 0 8px 8px 0; font-style: italic;
}
.prose-policy code {
  background: #10141e; padding: 1px 5px; border-radius: 4px; color: #00d4a8;
  font-size: 0.85em; font-family: 'Inter', system-ui, sans-serif;
}
.prose-policy pre {
  background: #0a0e16; border: 1px solid #1a2230; border-radius: 10px;
  padding: 0.85rem 1rem; margin: 1rem 0; overflow-x: auto;
}
.prose-policy pre code { background: transparent; padding: 0; color: #d7dee8; }
.prose-policy table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.875rem; }
.prose-policy th, .prose-policy td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #1f2937; color: #cbd5e1; }
.prose-policy th { color: #00d4a8; text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em; background: rgba(0,212,168,0.03); }

/* XP / progress bar */
.lh-bar { height: 9px; background: #1a2230; border-radius: 999px; overflow: hidden; }
.lh-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #00d4a8, #42e8c0);
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}

/* buttons */
.lh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-size: 13px; font-weight: 600; padding: .55rem .95rem; border-radius: 10px;
  cursor: pointer; border: 1px solid transparent; transition: all .15s; text-decoration: none;
}
.lh-btn--mint { background: #00d4a8; color: #06231e; }
.lh-btn--mint:hover { background: #2ee0bb; }
.lh-btn--mint:disabled { opacity: .5; cursor: default; }
.lh-btn--ghost { background: #131a26; color: #cbd5e1; border-color: #243043; }
.lh-btn--ghost:hover { color: #fff; border-color: #36506e; }
.lh-btn--sm { padding: .35rem .7rem; font-size: 12px; }

/* activity tiles */
.lh-act {
  display: flex; flex-direction: column; align-items: flex-start; gap: .25rem;
  background: #0e131d; border: 1px solid #1d2532; border-radius: 16px;
  padding: 1.1rem; cursor: pointer; transition: all .18s; text-align: left;
}
.lh-act:hover { border-color: rgba(0,212,168,.45); transform: translateY(-2px); }
.lh-act-ico { font-size: 1.8rem; }
.lh-act-t { font-weight: 700; color: #fff; font-size: 1rem; }
.lh-act-d { font-size: 12px; color: #8b97a8; }

/* track cards */
.lh-track { background: #0e131d; border: 1px solid #1d2532; border-radius: 16px; overflow: hidden; }
.lh-track-head {
  display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem;
  cursor: pointer; user-select: none;
}
.lh-track-ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.lh-track-title { font-weight: 700; color: #fff; font-size: 1rem; }
.lh-track-blurb { font-size: 12px; color: #8b97a8; margin-top: 1px; }
.lh-track-meter { font-size: 12px; color: #6ee7d2; margin-left: auto; white-space: nowrap; }
.lh-track-body { border-top: 1px solid #1a2230; display: none; }
.lh-track.is-open .lh-track-body { display: block; }
.lh-track.is-open .lh-track-caret { transform: rotate(90deg); }
.lh-track-caret { color: #6b7689; transition: transform .2s; }

.lh-lesson { border-bottom: 1px solid #161d28; }
.lh-lesson:last-child { border-bottom: 0; }
.lh-lesson-head {
  display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem;
  cursor: pointer;
}
.lh-lesson-check {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #2c3a4e;
  display: grid; place-items: center; font-size: 12px; flex-shrink: 0; color: transparent;
}
.lh-lesson.is-done .lh-lesson-check { background: #00d4a8; border-color: #00d4a8; color: #06231e; }
.lh-lesson-title { color: #e5e7eb; font-size: 14px; font-weight: 600; }
.lh-lesson.is-done .lh-lesson-title { color: #9fb0c4; }
.lh-lesson-min { font-size: 12px; color: #6b7689; margin-left: auto; white-space: nowrap; }
.lh-lesson-body { display: none; padding: 0 1.1rem 1rem 2.6rem; }
.lh-lesson.is-expanded .lh-lesson-body { display: block; }

/* badges */
.lh-badge {
  background: #0e131d; border: 1px solid #1d2532; border-radius: 14px;
  padding: .85rem .5rem; text-align: center; opacity: .42; filter: grayscale(.8);
  transition: all .2s;
}
.lh-badge.is-earned { opacity: 1; filter: none; border-color: rgba(0,212,168,.4);
  background: linear-gradient(160deg, #0e1b1a, #0e131d); }
.lh-badge-ico { font-size: 1.7rem; }
.lh-badge-name { font-size: 12px; font-weight: 700; color: #fff; margin-top: .25rem; }
.lh-badge-desc { font-size: 12px; color: #8b97a8; margin-top: 1px; line-height: 1.35; }

/* tabs */
.lh-tabs, .lh-tab { display: inline-flex; }
.lh-tabs { gap: .4rem; background: #0b0f17; padding: .25rem; border-radius: 10px; }
.lh-tab {
  font-size: 12px; font-weight: 600; padding: .4rem .8rem; border-radius: 8px;
  color: #8b97a8; cursor: pointer; border: 0; background: transparent;
}
.lh-tab.is-on { background: #1a2230; color: #fff; }

/* section nav (Learn · Practice · Games · Progress) */
.lh-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 768px) { .lh-nav { grid-template-columns: repeat(4, 1fr); } }
.lh-nav-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: .1rem;
  background: #0e131d; border: 1px solid #1d2532; border-radius: 14px;
  padding: .8rem 1rem; cursor: pointer; text-align: left; transition: all .18s;
}
.lh-nav-btn:hover { border-color: rgba(0,212,168,.4); }
.lh-nav-btn.is-on {
  border-color: rgba(0,212,168,.55);
  background: linear-gradient(160deg, #0e1b1a, #0e131d);
}
.lh-nav-ico { font-size: 1.4rem; line-height: 1.2; }
.lh-nav-t { font-weight: 700; color: #fff; font-size: .98rem; }
.lh-nav-btn.is-on .lh-nav-t { color: #6ee7d2; }
.lh-nav-d { font-size: 12px; color: #8b97a8; }

/* section panels */
.lh-section[hidden] { display: none; }
.lh-section-intro {
  font-size: 13px; color: #8b97a8; margin: -.4rem 0 1.1rem;
  max-width: 46rem; line-height: 1.55;
}

/* leaderboard */
.lh-board { list-style: none; margin: 0; padding: 0; }
.lh-board li {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .25rem;
  border-bottom: 1px solid #161d28;
}
.lh-board li:last-child { border-bottom: 0; }
.lh-rank { width: 26px; text-align: center; font-weight: 700; color: #6b7689; font-size: 13px; }
.lh-rank.gold { color: #ffd34d; } .lh-rank.silver { color: #cbd5e1; } .lh-rank.bronze { color: #d8995a; }
.lh-board .lh-h { color: #e5e7eb; font-weight: 600; font-size: 14px; }
.lh-board .lh-xp { margin-left: auto; color: #6ee7d2; font-weight: 700; font-size: 13px; }
.lh-board .lh-me { color: #00d4a8; }
.lh-empty { color: #6b7689; font-size: 13px; padding: 1rem .25rem; }

/* modal */
.lh-modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; }
.lh-modal-wrap[hidden] { display: none; }
.lh-modal-back { position: absolute; inset: 0; background: rgba(3,6,11,.78); backdrop-filter: blur(3px); }
.lh-modal {
  position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: #0d1119; border: 1px solid #20293a; border-radius: 18px; padding: 1.5rem;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.lh-modal-x {
  position: absolute; top: .9rem; right: 1rem; background: transparent; border: 0;
  color: #6b7689; font-size: 16px; cursor: pointer;
}
.lh-modal-x:hover { color: #fff; }
.lh-modal h3 { font-size: 1.25rem; font-weight: 700; color: #fff; margin: 0 0 .3rem; }
.lh-modal-sub { font-size: 12px; color: #8b97a8; margin-bottom: 1rem; }

/* quiz / pattern choices */
.lh-q { margin-bottom: 1.1rem; }
.lh-q-txt { font-weight: 600; color: #fff; font-size: 15px; margin-bottom: .6rem; }
.lh-opt {
  display: block; width: 100%; text-align: left; padding: .65rem .85rem; margin-bottom: .45rem;
  background: #121925; border: 1px solid #232f41; border-radius: 10px; color: #d7dee8;
  font-size: 14px; cursor: pointer; transition: all .12s;
}
.lh-opt:hover { border-color: #36506e; }
.lh-opt.is-sel { border-color: #00d4a8; background: rgba(0,212,168,.08); }
.lh-opt.is-correct { border-color: #1fbf7a; background: rgba(31,191,122,.12); color: #c8f3df; }
.lh-opt.is-wrong { border-color: #e5564b; background: rgba(229,86,75,.12); color: #f6cfcb; }
.lh-opt[disabled] { cursor: default; }
.lh-explain { font-size: 12px; color: #9fb0c4; margin: .35rem 0 0; padding-left: .2rem; }
.lh-explain b { color: #6ee7d2; }

/* flashcard */
.lh-fc {
  perspective: 1000px; height: 220px; margin-bottom: 1rem; cursor: pointer;
}
.lh-fc-inner { position: relative; width: 100%; height: 100%; transition: transform .5s;
  transform-style: preserve-3d; }
.lh-fc.is-flipped .lh-fc-inner { transform: rotateY(180deg); }
.lh-fc-face {
  position: absolute; inset: 0; backface-visibility: hidden; display: grid; place-items: center;
  padding: 1.5rem; border-radius: 16px; text-align: center; border: 1px solid #243043;
}
.lh-fc-front { background: #121a27; }
.lh-fc-front .t { font-size: 1.4rem; font-weight: 700; color: #fff; }
.lh-fc-back { background: linear-gradient(160deg,#0e1b1a,#101826); transform: rotateY(180deg); }
.lh-fc-back .t { font-size: 1rem; color: #d7dee8; line-height: 1.5; }
.lh-fc-hint { font-size: 12px; color: #6b7689; margin-top: .8rem; }

/* candles canvas */
.lh-canvas-wrap { background: #0a0e16; border: 1px solid #1a2230; border-radius: 12px; padding: .6rem; margin-bottom: 1rem; }

/* progress + score lines */
.lh-progrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.lh-pill { font-size: 12px; padding: .25rem .6rem; border-radius: 999px; background: #131a26; color: #9fb0c4; }
.lh-score-big { font-size: 2.4rem; font-weight: 800; color: #fff; text-align: center; }
.lh-xp-pop { color: #6ee7d2; font-weight: 700; text-align: center; margin-top: .25rem; }

/* sim */
.lh-sim-stat { display: flex; gap: 1.2rem; margin-bottom: .8rem; flex-wrap: wrap; }
.lh-sim-stat div span { display: block; }
.lh-sim-stat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #6b7689; }
.lh-sim-stat .v { font-size: 1.1rem; font-weight: 700; color: #fff; }
.lh-sim-actions { display: flex; gap: .5rem; margin-top: .9rem; }
.lh-sim-actions .lh-btn { flex: 1; }
.up { color: #1fbf7a; } .down { color: #e5564b; }

/* lesson body (markdown rendered by mdLite) */
.prose-policy { color: #d7dee8; line-height: 1.65; }
.prose-policy h1, .prose-policy h2, .prose-policy h3,
.prose-policy h4, .prose-policy h5, .prose-policy h6 {
  color: #fff; font-weight: 700; line-height: 1.3; margin: 1.1rem 0 .5rem;
}
.prose-policy h1 { font-size: 1.4rem; }
.prose-policy h2 { font-size: 1.2rem; }
.prose-policy h3 { font-size: 1.05rem; }
.prose-policy h4, .prose-policy h5, .prose-policy h6 { font-size: .95rem; }
.prose-policy p { margin: .55rem 0; }
.prose-policy strong { color: #fff; font-weight: 600; }
.prose-policy em { font-style: italic; }
.prose-policy a { color: #6ee7d2; text-decoration: underline; }
.prose-policy ul { margin: .55rem 0; padding-left: 1.2rem; list-style: disc; }
.prose-policy ol { margin: .55rem 0; padding-left: 1.2rem; list-style: decimal; }
.prose-policy li { margin: .25rem 0; }
.prose-policy blockquote {
  margin: .8rem 0; padding: .5rem .9rem; border-left: 3px solid #00d4a8;
  background: #0d1320; color: #9fb0c4; border-radius: 0 8px 8px 0;
}
.prose-policy code {
  font-family: 'Inter', system-ui, sans-serif; font-size: .9em;
  background: #131a26; color: #cfe9e2; padding: .1rem .35rem; border-radius: 5px;
}
.prose-policy pre {
  margin: .8rem 0; padding: .8rem; background: #0a0e16; border: 1px solid #1a2230;
  border-radius: 10px; overflow-x: auto;
}
.prose-policy pre code { background: none; padding: 0; color: #d7dee8; }
.prose-policy table {
  margin: .8rem 0; border-collapse: collapse; width: 100%; font-size: .92em;
}
.prose-policy th, .prose-policy td {
  border: 1px solid #1a2230; padding: .4rem .65rem; text-align: left;
}
.prose-policy th { background: #131a26; color: #fff; font-weight: 600; }

/* ── Academy hero + upsell strip ───────────────────────────────────────── */
.lh-hero {
  position: relative;
  border: 1px solid #1d2532;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(900px 340px at 8% -20%, rgba(0,212,168,.14), transparent 60%),
    radial-gradient(700px 300px at 95% 120%, rgba(66,165,245,.10), transparent 60%),
    #0e131d;
}
.lh-hero-inner { padding: 1.9rem 1.6rem; }
@media (min-width: 768px) { .lh-hero-inner { padding: 2.4rem 2.2rem; } }
.lh-hero-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.lh-fact {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: 12px; color: #b9c4d4;
  background: rgba(19,26,38,.85); border: 1px solid #223047;
  border-radius: 999px; padding: .35rem .75rem;
}
.lh-upsell {
  border-top: 1px solid #1a2230;
  padding-top: 1.6rem;
}
.lh-upsell-head { margin-bottom: 1rem; }
.lh-upsell-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 768px) { .lh-upsell-grid { grid-template-columns: repeat(3, 1fr); } }
.lh-upsell-card {
  display: flex; flex-direction: column; gap: .3rem;
  background: #0e131d; border: 1px solid #1d2532; border-radius: 16px;
  padding: 1.1rem 1.2rem; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.lh-upsell-card:hover { border-color: rgba(0,212,168,.45); transform: translateY(-2px); }
.lh-upsell-ico { font-size: 1.6rem; line-height: 1.2; }
.lh-upsell-t { font-weight: 700; color: #fff; font-size: 1rem; }
.lh-upsell-d { font-size: 12px; color: #8b97a8; line-height: 1.5; flex: 1; }
.lh-upsell-cta { font-size: 12px; font-weight: 700; color: #6ee7d2; margin-top: .5rem; }
.lh-upsell-card--pro {
  border-color: rgba(0,212,168,.35);
  background:
    radial-gradient(420px 180px at 90% -30%, rgba(0,212,168,.16), transparent 60%),
    #0e131d;
}
