/* ============================================================
   Financial Training Center — design system
   Derived from "FTC Website.dc.html" + "FTC App Screens.dc.html"
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* brand */
  --green:        #01ff8f;
  --green-600:    #01c46e;
  --green-700:    #04804e;
  --green-ink:    #04301d;
  --green-ink-2:  #0a4d31;
  --green-deep:   #052b1b;
  --green-eyebrow:#04502f;

  /* neutrals */
  --ink:      #0d1a14;
  --ink-2:    #33413a;
  --slate:    #4a5a52;
  --muted:    #65726c;
  --muted-2:  #66736c;
  --faint:    #6a7a71;
  --line:     #e6ebe9;
  --line-2:   #eef1f0;
  --field:    #e2e7e5;
  --hair:     #d5ddd9;

  --surface:   #fff;
  --surface-2: #fbfcfc;
  --surface-3: #f2f5f4;
  --mint:      #f2fdf8;
  --mint-line: #b8f0d6;
  --mint-2:    #e6f9f0;

  /* accents */
  --blue:     #0077aa;
  --blue-700: #00658f;
  --red:      #ff2103;
  --red-ink:  #dc1a00;   /* text-size red — AA on white and on --red-bg */
  --red-bg:   #fff0ec;
  --red-line: #ffd2c8;

  /* dark surfaces */
  --dark:      #0d1a14;
  --dark-2:    #0a1410;
  --dark-line: rgba(255,255,255,.08);
  --on-dark:   #c9d3ce;
  --on-dark-2: #9fb0a8;
  --on-dark-3: #7f9188;
  --on-dark-4: #738a7b;

  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;

  --shadow-card: 0 24px 50px -34px rgba(6,43,27,.4);
  --shadow-pop: 0 30px 70px -30px rgba(6,43,27,.45);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-700); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
[hidden] { display: none !important; }

::selection { background: var(--green); color: var(--green-deep); }

:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); font-weight: 700; line-height: 1.1; text-wrap: pretty; }

.eyebrow {
  font: 600 12px/1 var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-700);
}
.lbl {
  font: 500 12px/1 var(--mono);
  letter-spacing: .06em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.mono { font-family: var(--mono); }
.dim { color: var(--muted); }
.dimmer { color: var(--muted-2); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- logo ---------- */
.logo { height: 32px; width: auto; color: var(--ink); flex: none; }
.logo .mark { fill: var(--green-600); }
.logo.on-dark { color: #fff; }
.logo.on-dark .mark { fill: var(--green); }
.logo-mark { height: 30px; width: auto; flex: none; }
.logo-mark .mark { fill: var(--green); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 700 15px/1 var(--display);
  padding: 15px 26px;
  border-radius: var(--r);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--green-deep); color: var(--green); }
.btn-dark:hover { background: #083a25; color: var(--green); }
.btn-green { background: var(--green); color: var(--green-deep); }
.btn-green:hover { background: #22ffa0; color: var(--green-deep); }
.btn-glass { background: rgba(255,255,255,.6); color: var(--green-ink); }
.btn-glass:hover { background: rgba(255,255,255,.85); color: var(--green-ink); }
.btn-outline { border-color: var(--hair); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline-light { border-color: rgba(255,255,255,.22); color: #fff; }
.btn-outline-light:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-sm { font-size: 13px; padding: 10px 16px; border-radius: var(--r-sm); }
.btn-md { font-size: 14px; padding: 12px 20px; border-radius: 10px; }
.btn-lg { font-size: 16px; padding: 18px 30px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-link { color: var(--blue); font: 600 14px/1 var(--display); padding: 0; }
.btn-link:hover { color: var(--blue-700); }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 13px/1 var(--display);
  color: var(--ink-2);
  border: 1px solid var(--field);
  background: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: .15s ease;
}
.chip:hover { border-color: var(--muted-2); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.chip.is-on { color: var(--green-700); border-color: var(--mint-line); background: var(--mint); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11px/1 var(--display);
  letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 999px;
}
.badge-green { background: var(--mint); color: var(--green-700); border: 1px solid var(--mint-line); }
.badge-blue  { background: #e9f7fe; color: var(--blue); border: 1px solid #cdeefd; }
.badge-red   { background: var(--red-bg); color: var(--red-ink); border: 1px solid var(--red-line); }
.badge-grey  { background: var(--surface-3); color: var(--slate); border: 1px solid var(--field); }
.badge-dark-green { background: rgba(1,255,143,.14); color: var(--green); }
.badge-dark-grey  { background: rgba(255,255,255,.08); color: var(--on-dark); }

.streak {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--red-bg); color: var(--red-ink);
  font: 700 14px/1 var(--display);
  padding: 10px 15px; border-radius: 999px; white-space: nowrap;
}
.streak .flame { font-size: 15px; }

.tag-level { font: 600 11px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--green-700); }
.tag-level.blue { color: var(--blue); }

/* ---------- cards ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  padding: 20px;
}
.card-lg { border-radius: var(--r-lg); padding: 28px; }
.card p, .card-lg p { max-width: 68ch; }
.card-dark { background: var(--dark); color: #fff; border: none; border-radius: var(--r-md); padding: 22px; }
.card-dark h3, .card-dark h2 { color: #fff; }

/* ---------- progress ---------- */
.bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .35s ease; }
.bar.on-dark { background: rgba(255,255,255,.12); }
.bar.thin { height: 5px; }
.bar.thick { height: 7px; }

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 16px; }
.field > .lbl { display: block; margin-bottom: 8px; }
.input {
  width: 100%;
  border: 1px solid var(--field);
  border-radius: 10px;
  padding: 15px 16px;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted-2); }
.input:focus {
  outline: none;
  border-color: var(--green);
  border-width: 1.5px;
  box-shadow: 0 0 0 4px rgba(1,255,143,.18);
}
.input-wrap { position: relative; }
.input-wrap .reveal {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; font-weight: 600; color: var(--blue);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 > .field + .field { margin-top: 0; }
.field + .grid-2, .grid-2 + .field { margin-top: 16px; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--slate); line-height: 1.45; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 5px;
  border: 1.5px solid var(--hair); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent; margin-top: 1px;
  transition: .15s;
}
.check input:checked + .box { background: var(--green); border-color: var(--green); color: var(--green-deep); }
.check input:focus-visible + .box { outline: 2px solid var(--green-600); outline-offset: 2px; }

.select {
  border: 1px solid var(--field); border-radius: 9px; padding: 10px 34px 10px 14px;
  font: 600 13.5px/1.2 var(--display); color: var(--ink); background: #fff;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%238a978f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px;
}

.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-3); border-radius: 999px; padding: 10px 18px;
  border: 1px solid transparent;
  transition: .15s;
}
.search:focus-within { background: #fff; border-color: var(--field); box-shadow: 0 0 0 4px rgba(1,255,143,.12); }
.search input { border: none; background: none; outline: none; font-size: 13px; width: 100%; }
.search input::placeholder { color: var(--muted-2); }
.search .ico { width: 15px; height: 15px; flex: none; color: var(--faint); }

.form-error {
  background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red);
  border-radius: 10px; padding: 12px 14px; font-size: 13.5px; font-weight: 500;
  display: flex; gap: 9px; align-items: flex-start;
}

/* ---------- media placeholders (design language) ---------- */
.thumb {
  border-radius: var(--r);
  background: repeating-linear-gradient(135deg, #dbf7ea 0 12px, #eafaf3 12px 24px);
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 10px;
}
.thumb.blue { background: repeating-linear-gradient(135deg, #d6f0fd 0 12px, #e9f7fe 12px 24px); }
.thumb.dark { background: repeating-linear-gradient(135deg, #123024 0 14px, #17402e 14px 28px); }
.thumb-label {
  font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #61766d;
}
.thumb.dark .thumb-label { color: #6f8579; }
.avatar {
  border-radius: 50%; flex: none;
  background: repeating-linear-gradient(135deg, #cfeee0 0 6px, #e3f6ec 6px 12px);
  display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 var(--display); color: var(--green-ink);
}
.avatar.dark { background: repeating-linear-gradient(135deg, #33463d 0 5px, #3f544a 5px 10px); color: #fff; }

.play {
  width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: var(--green-deep);
  display: flex; align-items: center; justify-content: center; flex: none;
  box-shadow: 0 8px 24px -8px rgba(4,48,29,.5);
  transition: transform .15s ease;
}
.play:hover { transform: scale(1.06); }
.play svg { width: 20px; height: 20px; margin-left: 3px; }

/* ============================================================
   PUBLIC SITE
   ============================================================ */
.site-head {
  display: flex; align-items: center; gap: 40px;
  padding: 20px 64px;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 40;
}
.site-nav { display: flex; align-items: center; gap: 30px; margin-left: 12px; }
.site-nav a {
  font: 600 14.5px/1 var(--display); color: var(--slate);
  padding-bottom: 4px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--ink); font-weight: 700; border-bottom-color: var(--green); }
.site-head .actions { margin-left: auto; display: flex; align-items: center; gap: 18px; flex: none; }
.site-head .actions a.plain { font: 600 14.5px/1 var(--display); color: var(--ink); white-space: nowrap; }
.site-head > a:first-child { flex: none; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--ink);
}
.site-header .brand img {
  display: block;
  width: auto;
  height: 38px;
  max-width: min(300px, 42vw);
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 8px;
}
.site-header nav a {
  font: 600 14.5px/1 var(--display);
  color: var(--slate);
  white-space: nowrap;
}
.site-header nav a:hover { color: var(--ink); }
.site-header .nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.wrap { max-width: 1312px; margin: 0 auto; padding: 0 64px; }
.section { padding-top: 72px; padding-bottom: 72px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.section-head h3 { font-size: 38px; margin-top: 14px; }

.hero {
  background: var(--green);
  position: relative; overflow: hidden;
}
.hero .blob {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,.35); pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: flex; gap: 56px; align-items: flex-end; }
.hero h1 { font-size: 60px; line-height: 1.02; color: var(--green-ink); margin-top: 20px; max-width: 560px; }
.hero p.lede { font-size: 18px; line-height: 1.55; color: var(--green-ink-2); margin-top: 20px; max-width: 480px; }
.hero .eyebrow { color: var(--green-eyebrow); }
.hero-stats { display: flex; gap: 36px; margin-top: 44px; }
.hero-stats b { display: block; font: 700 28px/1 var(--display); color: var(--green-ink); }
.hero-stats span { display: block; font-size: 13px; color: var(--green-ink-2); margin-top: 6px; }

.trust {
  padding: 26px 64px; background: var(--surface-2); border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
}
.trust > .lbl { max-width: 100%; }
.trust .names { flex: 1; display: flex; gap: 34px; align-items: center; flex-wrap: wrap; }
.trust .names span { font: 700 17px/1 var(--display); color: #81978c; }

.band-dark { background: var(--dark); color: #fff; padding: 72px 0; }
.band-dark .eyebrow { color: var(--green); }
.band-dark h3 { color: #fff; }
.stat-tile { background: rgba(255,255,255,.06); border-radius: 18px; padding: 26px; }
.stat-tile b { display: block; font: 700 34px/1 var(--display); color: var(--green); }
.stat-tile span { display: block; font-size: 13.5px; color: var(--on-dark-2); margin-top: 10px; line-height: 1.5; }

.tick { display: flex; gap: 14px; }
.tick .k { color: var(--green); font-size: 15px; line-height: 1.4; }
.tick b { display: block; font: 700 16px/1.2 var(--display); }
.tick span { display: block; font-size: 14px; color: var(--on-dark-2); margin-top: 6px; line-height: 1.55; }

.cta-band {
  background: var(--green); border-radius: var(--r-xl); padding: 56px;
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 40px; flex-wrap: wrap;
}
.cta-band > .flex { flex-wrap: wrap; }
.cta-band h3 { font-size: 40px; color: var(--green-ink); max-width: 520px; }
.cta-band p { font-size: 16px; color: var(--green-ink-2); margin-top: 14px; max-width: 420px; }

.site-foot { background: var(--dark); color: #fff; padding: 56px 64px 34px; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; max-width: 1312px; margin: 0 auto; }
.site-foot .lbl { color: var(--on-dark-4); letter-spacing: .1em; }
.site-foot .col-links { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.site-foot .col-links a { font-size: 14px; color: var(--on-dark-2); }
.site-foot .col-links a:hover { color: var(--green); }
.site-foot .rule { height: 1px; background: rgba(255,255,255,.1); margin: 36px auto 22px; max-width: 1312px; }
.site-foot .base { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1312px; margin: 0 auto; flex-wrap: wrap; }
.site-foot .base span { font-size: 13px; color: var(--on-dark-4); }
.site-foot .base a { font-size: 13px; color: var(--on-dark-2); }

.course-card {
  border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fff;
  display: block; color: inherit; transition: .18s ease;
}
.course-card:hover { color: inherit; border-color: var(--mint-line); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.course-card .thumb { aspect-ratio: 16/10; }
.course-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.course-card h4 { font-size: 17px; line-height: 1.25; margin-top: 7px; }
.course-card .sub { font-size: 12.5px; color: var(--muted-2); margin-top: 8px; }

.split-auth { display: flex; min-height: 100vh; }
.split-auth .form-side { flex: 1; padding: 52px 72px; display: flex; flex-direction: column; }
.split-auth .form-body { margin: auto 0; max-width: 430px; width: 100%; padding: 40px 0; }
.split-auth .green-side {
  width: 600px; flex: 0 0 600px; background: var(--green); padding: 52px;
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
}
.split-auth .green-side .blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.35); }
.split-auth .green-side .inner { position: relative; z-index: 1; }
.split-auth .green-side h3 { font-size: 40px; color: var(--green-ink); margin-top: 16px; max-width: 420px; }
.split-auth .green-side .eyebrow { color: var(--green-eyebrow); }

.divider-or { display: flex; align-items: center; gap: 14px; margin: 26px 0 0; }
.divider-or i { flex: 1; height: 1px; background: var(--line-2); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app { display: flex; align-items: stretch; min-height: 100vh; background: var(--surface-2); }

.side {
  width: 250px; flex: 0 0 250px; background: var(--dark); color: var(--on-dark);
  padding: 26px 0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  transition: width .2s ease, flex-basis .2s ease;
}
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: #24352c; border-radius: 3px; }
.side .side-top { padding: 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side .side-top .logo { color: #fff; }
.side .side-top .logo .mark { fill: var(--green); }
.side .collapse { color: var(--on-dark-4); font-size: 13px; padding: 4px; }
.side .collapse:hover { color: var(--green); }
.side .lbl { color: var(--on-dark-4); letter-spacing: .14em; padding: 0 26px; margin-top: 32px; font-size: 11px; }
.side nav { margin-top: 12px; display: flex; flex-direction: column; }
.side nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 26px;
  font-size: 14px; color: var(--on-dark); border-left: 3px solid transparent;
  transition: .15s;
}
.side nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.side nav a.is-active {
  color: #fff; font: 600 14px/1.2 var(--display);
  border-left-color: var(--green); background: rgba(1,255,143,.08);
}
.side nav a .ico { width: 16px; height: 16px; flex: none; color: var(--on-dark-4); }
.side nav a.is-active .ico { color: var(--green); }
.side .cats { margin-top: 12px; display: flex; flex-direction: column; }
.side .cats a { padding: 9px 26px; font-size: 14px; color: var(--on-dark-2); }
.side .cats a:hover { color: var(--green); }
.side .who {
  margin: 32px 26px 0; padding: 18px; background: rgba(255,255,255,.05); border-radius: var(--r);
  display: flex; align-items: center; gap: 10px; color: inherit;
}
.side .who:hover { background: rgba(255,255,255,.09); color: inherit; }
.side .who .avatar { width: 34px; height: 34px; }
.side .who b { display: block; font: 600 14px/1.2 var(--display); color: #fff; }
.side .who span { display: block; font-size: 12px; color: var(--on-dark-3); margin-top: 3px; }
.side .spacer { flex: 1; min-height: 20px; }
.side .signout { padding: 14px 26px 0; font-size: 13px; color: var(--on-dark-3); }
.side .signout:hover { color: var(--red); }

/* collapsed rail */
.side.is-rail { width: 84px; flex-basis: 84px; align-items: center; }
.side.is-rail .side-top { padding: 0; justify-content: center; }
.side.is-rail .logo { display: none; }
.side.is-rail .logo-mark { display: block; }
.side .logo-mark { display: none; height: 30px; }
.side.is-rail .lbl, .side.is-rail .cats, .side.is-rail .who b, .side.is-rail .who span, .side.is-rail .signout span { display: none; }
.side.is-rail nav { margin-top: 26px; gap: 10px; align-items: center; }
.side.is-rail nav a {
  width: 46px; height: 46px; padding: 0; border-radius: 13px; border-left: none;
  justify-content: center;
}
.side.is-rail nav a span { display: none; }
.side.is-rail nav a.is-active { background: rgba(1,255,143,.12); border: 1px solid rgba(1,255,143,.45); }
.side.is-rail .who { margin: 26px 0 0; padding: 0; background: none; justify-content: center; }
.side.is-rail .collapse { margin-top: 8px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 28px; padding: 16px 32px;
  background: #fff; border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 30;
}
.topbar .tabs { display: flex; gap: 6px; }
.topbar .tabs a {
  font: 600 14px/1 var(--display); padding: 9px 16px; border-radius: 999px; color: var(--slate);
  transition: .15s;
}
.topbar .tabs a:hover { background: var(--surface-3); color: var(--ink); }
.topbar .tabs a.is-active { background: var(--ink); color: #fff; }
.topbar .search { max-width: 300px; flex: 1; margin-left: auto; }
.topbar .crumbs { display: flex; align-items: center; gap: 10px; font: 600 13.5px/1 var(--display); color: var(--slate); }
.topbar .crumbs .sep { color: #667b71; }
.topbar .crumbs b { color: var(--ink); font-weight: 700; }
.topbar.dark { background: var(--dark); border-bottom-color: var(--dark-line); }
.topbar.dark .crumbs { color: var(--on-dark-2); }
.topbar.dark .crumbs b { color: #fff; }
.topbar.dark .crumbs .sep { color: #668878; }

.page { padding: 28px 32px 44px; background: #fff; flex: 1; }
.page > h2 { font-size: 30px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.green-hero {
  background: var(--green); border-radius: var(--r-xl); padding: 36px;
  position: relative; overflow: hidden; display: flex; gap: 26px; flex-wrap: wrap;
}
.green-hero .blob { position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.35); }
.green-hero .inner { flex: 1; min-width: 300px; position: relative; z-index: 1; }
.green-hero .eyebrow { color: var(--green-eyebrow); }
.green-hero h2 { font-size: 42px; line-height: 1.05; color: var(--green-ink); margin-top: 14px; max-width: 460px; }
.green-hero p { font-size: 16px; color: var(--green-ink-2); margin-top: 14px; max-width: 420px; }

.kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.kpis > div { background: #fff; padding: 18px 20px; }
.kpis .lbl { font-size: 12px; }
.kpis b { display: block; font: 700 30px/1 var(--display); color: var(--ink); margin-top: 10px; }
.kpis b small { font-size: 17px; color: var(--muted-2); font-weight: 700; }

.rowlist { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.rowlist .row {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border-bottom: 1px solid var(--line-2); background: #fff;
}
.rowlist .row:last-child { border-bottom: none; }
.rowlist .row:hover { background: var(--surface-2); }
.rowlist .row .thumb { width: 78px; height: 52px; flex: 0 0 78px; border-radius: 6px; padding: 0; }
.rowlist .row .info { flex: 1; min-width: 0; }
.rowlist .row .info b { display: block; font: 700 15px/1.2 var(--display); color: var(--ink); }
.rowlist .row .info span { display: block; font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }
.rowlist .row .prog { width: 150px; flex: none; }
.rowlist .row .prog .nums { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-2); margin-bottom: 5px; }

.table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.table .tr { display: grid; grid-template-columns: 1fr 130px 170px 120px; gap: 16px; padding: 15px 18px; align-items: center; border-bottom: 1px solid var(--line-2); }
.table .tr:last-child { border-bottom: none; }
.table .th { background: var(--surface-2); padding: 13px 18px; }
.table .tr b { display: block; font: 700 15px/1.2 var(--display); color: var(--ink); }
.table .tr .sub { font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }

.rail { display: flex; flex-direction: column; gap: 18px; }
.layout-rail { display: grid; grid-template-columns: 1fr 320px; gap: 28px; margin-top: 28px; align-items: start; }
.layout-rail-sm { grid-template-columns: 1fr 300px; }

/* course detail */
.detail-hero { display: flex; gap: 26px; background: var(--dark); border-radius: 22px; padding: 32px; color: #fff; flex-wrap: wrap; }
.detail-hero h2 { font-size: 36px; color: #fff; margin-top: 16px; max-width: 460px; }
.detail-hero p { font-size: 15px; line-height: 1.55; color: var(--on-dark-2); margin-top: 14px; max-width: 480px; }
.detail-hero .facts { display: flex; gap: 28px; margin-top: 24px; flex-wrap: wrap; }
.detail-hero .facts .lbl { color: var(--on-dark-4); }
.detail-hero .facts b { display: block; font: 700 20px/1 var(--display); margin-top: 8px; }
.detail-hero .side-col { width: 360px; flex: 0 0 360px; }

.syllabus { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.mod-head {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; width: 100%;
  border-bottom: 1px solid var(--line-2); background: var(--surface-2); text-align: left;
}
.mod-head:hover { background: #f4f8f6; }
.mod-head .info { flex: 1; min-width: 0; }
.mod-head .info b { display: block; font: 700 15px/1.2 var(--display); color: var(--ink); }
.mod-head .info span { display: block; font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }
.mod-head.is-open { background: var(--mint); }
.mod-head.is-done { background: var(--surface-2); }
.mod-head .caret { font-size: 11px; color: var(--muted-2); transition: transform .2s; }
.mod-head.is-open .caret { transform: rotate(180deg); }
.dot {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px;
  display: flex; align-items: center; justify-content: center;
  font: 600 12px/1 var(--display); background: var(--surface-3); color: var(--muted-2);
}
.dot.done { background: var(--green); color: var(--green-deep); }
.dot.current { border: 2px solid var(--green); color: var(--green-700); background: #fff; }

.lesson-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 18px 13px 58px;
  border-top: 1px solid var(--surface-3); width: 100%; text-align: left; background: #fff;
}
.lesson-row:hover { background: var(--surface-2); }
.lesson-row .t { flex: 1; font-size: 14px; color: var(--ink-2); }
.lesson-row.is-current { background: var(--surface-2); }
.lesson-row.is-current .t { font: 700 14px/1.2 var(--display); color: var(--ink); }
.lesson-row .dur { font-size: 12px; color: var(--muted-2); }
.lesson-row.is-current .dur { color: var(--blue); font-weight: 600; }
.pip { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--hair); flex: none; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.pip.done { border: none; color: var(--green-700); }
.pip.playing { background: var(--green); border: none; color: var(--green-deep); }

/* ---------- player ---------- */
.player-page { background: var(--dark); color: #fff; min-height: 100vh; display: flex; flex-direction: column; }
.player-grid { display: grid; grid-template-columns: 1fr 340px; align-items: stretch; flex: 1; }
.player-col { padding: 24px 28px 30px; min-width: 0; }
.stage {
  aspect-ratio: 16/9; border-radius: var(--r-md); position: relative; overflow: hidden;
  background: repeating-linear-gradient(135deg, #123024 0 14px, #17402e 14px 28px);
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.stage-slide {
  position: absolute; inset: 0; padding: 8% 9%;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  background: linear-gradient(135deg, #0f2a20 0%, #12362a 60%, #0d2a1f 100%);
  opacity: 0; transition: opacity .5s ease;
}
.stage-slide.is-on { opacity: 1; }
.stage-slide .kicker { font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--green); }
.stage-slide h3 { font-size: clamp(20px, 2.6vw, 34px); color: #fff; line-height: 1.12; }
.stage-slide ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.stage-slide li { display: flex; gap: 12px; font-size: clamp(13px, 1.25vw, 16px); color: var(--on-dark); line-height: 1.5; }
.stage-slide li::before { content: '—'; color: var(--green); flex: none; }
.stage-slide .big { font: 700 clamp(32px, 6vw, 68px)/1 var(--display); color: var(--green); }
.stage .center-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(4,20,14,.45); transition: opacity .2s; z-index: 3;
}
.stage .center-play .play { width: 68px; height: 68px; }
.stage .center-play.is-hidden { opacity: 0; pointer-events: none; }
.stage .stamp { position: absolute; top: 14px; left: 16px; z-index: 2; }
.controls { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 4; }
.scrub { height: 5px; border-radius: 999px; background: rgba(255,255,255,.22); cursor: pointer; position: relative; }
.scrub:hover { height: 7px; margin-top: -1px; }
.scrub .fill { height: 100%; background: var(--green); border-radius: 999px; position: relative; width: 0; }
.scrub .knob { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.ctrl-row { display: flex; align-items: center; gap: 18px; margin-top: 12px; color: #fff; }
.ctrl-row button { color: #fff; display: flex; align-items: center; }
.ctrl-row button:hover { color: var(--green); }
.ctrl-row .time { font: 500 12px/1 var(--mono); color: var(--on-dark); }
.ctrl-row .right { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: var(--on-dark); }
.ctrl-row .right button.is-on { color: var(--green); font-weight: 700; }

.tabs-dark { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.tabs-dark button {
  font: 600 13px/1 var(--display); color: var(--on-dark-2); padding: 10px 16px; border-radius: 999px;
}
.tabs-dark button:hover { color: #fff; }
.tabs-dark button.is-active { background: rgba(255,255,255,.08); color: #fff; font-weight: 700; }
.panel-dark { background: rgba(255,255,255,.05); border-radius: 14px; padding: 20px; margin-top: 16px; }
.panel-dark p { font-size: 14.5px; line-height: 1.6; color: var(--on-dark); }

.transcript { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.transcript button {
  display: flex; gap: 14px; text-align: left; padding: 9px 10px; border-radius: 9px; width: 100%;
}
.transcript button:hover { background: rgba(255,255,255,.06); }
.transcript .ts { font: 500 11.5px/1.5 var(--mono); color: var(--on-dark-3); flex: none; }
.transcript .tx { font-size: 14px; color: var(--on-dark-2); line-height: 1.5; }
.transcript button.is-on .tx { color: #fff; }
.transcript button.is-on .ts { color: var(--green); }

.playlist { width: 340px; background: var(--dark-2); border-left: 1px solid var(--dark-line); padding: 24px 22px 30px; }
.playlist .item {
  display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 11px; width: 100%; text-align: left;
  border: 1px solid transparent;
}
.playlist .item:hover { background: rgba(255,255,255,.05); }
.playlist .item .t { flex: 1; font-size: 13.5px; color: var(--on-dark); line-height: 1.35; }
.playlist .item .d { font-size: 11.5px; color: var(--on-dark-4); }
.playlist .item.done .t { color: var(--on-dark-2); }
.playlist .item.is-current { background: rgba(1,255,143,.1); border-color: rgba(1,255,143,.28); }
.playlist .item.is-current .t { font: 700 13.5px/1.3 var(--display); color: #fff; }
.playlist .item.is-current .d { color: var(--green); }
.pip-dark { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 10px; border: 1.5px solid #3f544a; color: var(--on-dark-3); font-family: var(--display); font-weight: 600; }
.pip-dark.done { background: rgba(1,255,143,.16); color: var(--green); border: none; }
.pip-dark.playing { background: var(--green); color: var(--green-deep); border: none; }

.note-row { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.07); }
.note-row .ts { font: 500 11.5px/1.6 var(--mono); color: var(--green); flex: none; }
.note-row p { font-size: 13.5px; color: var(--on-dark); line-height: 1.5; flex: 1; }
.note-row button { color: var(--on-dark-3); font-size: 12px; }
.note-row button:hover { color: var(--red); }

/* quiz */
.quiz-card { background: rgba(255,255,255,.05); border-radius: 16px; padding: 26px; }
.quiz-opt {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 15px 16px;
  color: var(--on-dark); font-size: 14.5px; line-height: 1.45; transition: .15s;
}
.quiz-opt:hover { border-color: rgba(1,255,143,.5); background: rgba(1,255,143,.06); }
.quiz-opt .k { font: 600 12px/1.3 var(--mono); color: var(--on-dark-3); flex: none; width: 16px; }
.quiz-opt.is-picked { border-color: var(--green); background: rgba(1,255,143,.1); color: #fff; }
.quiz-opt.is-right { border-color: var(--green); background: rgba(1,255,143,.16); color: #fff; }
.quiz-opt.is-wrong { border-color: var(--red); background: rgba(255,33,3,.12); color: #fff; }
.quiz-opt[disabled] { pointer-events: none; }

/* activity chart */
.activity { display: flex; align-items: flex-end; gap: 9px; height: 130px; margin-top: 22px; }
.activity > div { flex: 1; background: #dbf7ea; border-radius: 6px; min-height: 4px; position: relative; transition: height .4s ease; }
.activity > div.mid { background: var(--mint-line); }
.activity > div.hot { background: var(--green); }
.activity > div:hover::after {
  content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font: 500 11px/1 var(--mono); padding: 6px 8px; border-radius: 6px;
  white-space: nowrap; margin-bottom: 6px; z-index: 5;
}

.ring {
  width: 124px; height: 124px; flex: 0 0 124px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.ring .hole {
  width: 92px; height: 92px; border-radius: 50%; background: var(--green);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring .hole b { font: 700 28px/1 var(--display); color: var(--green-ink); }
.ring .hole span { font-size: 11px; color: var(--green-ink-2); margin-top: 4px; }

/* certificate */
.cert-thumb {
  aspect-ratio: 16/10; border-radius: 11px; background: var(--mint); border: 1px solid var(--mint-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px;
}
.cert-thumb .lbl { color: var(--green-700); letter-spacing: .14em; font-size: 10px; }
.cert-thumb b { font: 700 15px/1.2 var(--display); color: var(--green-ink); text-align: center; max-width: 160px; }
.cert-thumb.locked { background: var(--surface-3); border: none; }
.cert-thumb.locked .lbl { color: var(--muted-2); }

.certificate {
  background: #fff; border: 2px solid var(--ink); border-radius: 4px;
  padding: clamp(28px, 6vw, 56px) clamp(24px, 7vw, 64px);
  max-width: 900px; margin: 0 auto; position: relative; overflow: hidden;
}
.certificate h1 { font-size: clamp(28px, 5vw, 44px); }
.certificate .band { position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--green); }
.certificate .seal {
  width: 96px; height: 96px; border-radius: 50%; background: var(--green);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--green-deep); font-family: var(--display); font-weight: 700;
}

/* toast */
.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  background: var(--ink); color: #fff; padding: 14px 18px; border-radius: 12px;
  font: 600 14px/1.35 var(--display); box-shadow: var(--shadow-pop);
  display: flex; align-items: center; gap: 10px; max-width: 340px;
  animation: toast-in .28s cubic-bezier(.2,.9,.3,1.2);
}
.toast .k { color: var(--green); flex: none; }
.toast.warn .k { color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

/* modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(6,25,17,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 90;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: #fff; border-radius: var(--r-lg); padding: 32px; max-width: 460px; width: 100%;
  box-shadow: var(--shadow-pop); animation: toast-in .25s cubic-bezier(.2,.9,.3,1.2);
}
.modal h3 { font-size: 24px; }
.modal p { color: var(--muted); margin-top: 10px; line-height: 1.6; }

.empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--hair); border-radius: var(--r-md); background: var(--surface-2); }
.empty h4 { font-size: 18px; }
.empty p { color: var(--muted); margin-top: 8px; font-size: 14px; }

/* utility grids */
.g2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mt-8 { margin-top: 8px } .mt-10 { margin-top: 10px } .mt-12 { margin-top: 12px }
.mt-14 { margin-top: 14px } .mt-16 { margin-top: 16px } .mt-20 { margin-top: 20px }
.mt-24 { margin-top: 24px } .mt-28 { margin-top: 28px } .mt-32 { margin-top: 32px }
.mt-40 { margin-top: 40px }
.gap-8 { gap: 8px } .gap-10 { gap: 10px } .gap-12 { gap: 12px }
.gap-14 { gap: 14px } .gap-16 { gap: 16px } .gap-20 { gap: 20px }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .layout-rail, .layout-rail-sm { grid-template-columns: 1fr; }
  .player-grid { grid-template-columns: 1fr; }
  .playlist { width: auto; border-left: none; border-top: 1px solid var(--dark-line); }
  .detail-hero .side-col { width: 100%; flex: 1 1 100%; }
}
@media (max-width: 900px) {
  .wrap { padding: 0 28px; }
  .site-head { padding: 14px 20px; gap: 16px; flex-wrap: wrap; row-gap: 12px; }
  .site-header .nav { min-height: 64px; gap: 16px; flex-wrap: wrap; row-gap: 12px; }
  .site-header .brand img { height: 30px; max-width: 220px; }
  .site-header nav { display: none; }
  .site-header .nav-actions { margin-left: auto; gap: 12px; }
  .site-nav { display: none; }
  .site-head .actions { flex: 0 1 auto; gap: 12px; min-width: 0; }
  .hero-inner { flex-direction: column; align-items: stretch; }
  .hero h1 { font-size: 42px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .split-auth { flex-direction: column; }
  .split-auth .green-side { width: auto; flex: none; }
  .split-auth .form-side { padding: 32px 28px; }
  .side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; }
  .side.is-open { transform: none; box-shadow: 0 0 80px rgba(0,0,0,.5); }
  .page { padding: 20px 20px 40px; }
  .topbar { padding: 12px 20px; gap: 12px; overflow-x: auto; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .table .tr { grid-template-columns: 1fr; gap: 8px; }
  .table .th { display: none; }
  .green-hero h2 { font-size: 30px; }
  .cta-band { padding: 32px; }
  .cta-band h3 { font-size: 28px; }
  .kpis { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr; }
  .rowlist .row { flex-wrap: wrap; }
  .rowlist .row .prog { width: 100%; }
  .trust { padding: 22px 28px; gap: 16px; }
  .trust .nowrap, .trust > .lbl { white-space: normal; }
  .trust .names { gap: 20px; }
  .player-col { padding: 18px 20px 26px; }
  .playlist { padding: 20px 20px 26px; }
  .site-foot { padding: 40px 28px 28px; }
  .cta-band h3 { font-size: 26px; }
  .detail-hero { padding: 24px; }
  .detail-hero h2 { font-size: 28px; }
  .certificate { border-width: 1.5px; }
}
/* The player stage is a fixed-ratio box. Below ~700px a 16:9 frame is too short
   for a slide, so the deck, the stamp and the controls end up on top of each
   other — give it a taller ratio and start the content from the top. */
@media (max-width: 700px) {
  .stage { aspect-ratio: 4 / 3; }
  .stage-slide { justify-content: flex-start; padding: 18px 18px 72px; gap: 10px; }
  .stage-slide h3 { font-size: 19px; line-height: 1.2; }
  .stage-slide li { font-size: 12.5px; gap: 8px; }
  .stage-slide .kicker { font-size: 9.5px; letter-spacing: .12em; }
  .stage .stamp { display: none; }
  .cc { left: 12px; right: 12px; bottom: 66px; font-size: 12.5px; padding: 6px 10px; }
  .ctrl-row { gap: 12px; }
  .ctrl-row .time { font-size: 11px; }
  .ctrl-row .right { gap: 12px; }
}

/* narrow phones: the header keeps the mark and the primary CTA only */
@media (max-width: 560px) {
  .site-head .logo { height: 26px; }
  .site-header .brand img { height: 26px; max-width: 180px; }
  .site-header .nav-actions .btn-link { display: none; }
  .site-header .nav-actions .btn { padding: 11px 16px; font-size: 13.5px; }
  .site-head .actions a.plain { display: none; }
  .site-head .actions .btn { padding: 11px 16px; font-size: 13.5px; }
}

.burger { display: none; }
@media (max-width: 900px) {
  .burger { display: flex; align-items: center; color: var(--ink); flex: 0 0 auto; padding: 4px; }
  .topbar.dark .burger { color: #fff; }
  .topbar .tabs { flex: 0 0 auto; }
  .topbar .search { display: none; }
  .topbar .streak { flex: 0 0 auto; margin-left: auto; }
  /* a narrow bar only has room for the page you are on — show that, in full,
     rather than clipping it behind its own ancestors */
  .topbar .crumbs { flex: 1; min-width: 0; overflow: hidden; }
  .topbar .crumbs > * { display: none; }
  .topbar .crumbs > b {
    display: block; min-width: 0; flex: 1 1 auto;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .certificate { border-width: 3px; box-shadow: none; max-width: none; }
}
