/* NeonNow Academy – matched to the neonnow.ai design system */
:root {
  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #f9f9fa;
  --panel: #f7f7f9;
  --surface: #ffffff;

  /* Text */
  --ink: #03294a;       /* headings */
  --navy: #101e47;      /* brand navy: buttons, logo */
  --navy-75: #26345c;
  --text: #576470;      /* body copy */
  --muted: #576470;
  --line: #e3e6ec;
  --line-soft: #ececec;

  /* Product colours (CX / IQ / Outreach / Agentic) */
  --cx: #11b5e7;
  --cx-5: #ecf9fd;
  --cx-10: #cff0fa;
  --iq: #5f36c2;
  --iq-5: #f2effa;
  --iq-10: #dfd7f3;
  --coral: #f85b6a;
  --coral-5: #fff2f3;
  --coral-10: #fedee1;
  --green: #2ccf9a;
  --green-dark: #0f7f5c;
  --green-5: #eefbf7;
  --green-10: #d5f5eb;
  --yellow: #f7fe8e;
  --amber: #f90;

  /* Gradients from the brand */
  --grad-brand: linear-gradient(135deg, #16b6e7 0%, #5f36c2 55%, #f85b6a 100%);
  --grad-text: linear-gradient(90deg, #11b5e7 0%, #5f36c2 55%, #f85b6a 100%);
  --grad-pill: linear-gradient(90deg, #a9d3f1 0%, #b9b8ea 50%, #f3bbc8 100%);
  --grad-soft: linear-gradient(135deg, #fde3ee 0%, #efe9fb 50%, #e3f3fb 100%);
  --grad-mint: linear-gradient(135deg, #2ece99 0%, #12936b 100%);

  --dots: radial-gradient(circle, rgba(0, 0, 0, 0.1) 1.4px, transparent 1.8px);
  --dots-size: 45px 45px;

  --shadow-card: 0 7.5px 37.5px #cccae54d;
  --shadow-lift: 0 30px 60px #101e4724;
  --shadow-btn: inset 1px 1px 2px #9fa5ff, inset -2px -2px 2px #00000024, inset 0 17px 24px #0000001a;

  --r-btn: 8px;
  --r-input: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 100px;

  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --nav-h: 84px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--dots);
  background-size: var(--dots-size);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); margin: 0 0 .4em; font-weight: 600; }
h1 { font-size: 48px; line-height: 1.1; letter-spacing: -2px; }
h2 { font-size: 32px; line-height: 1.2; letter-spacing: -1px; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.3px; }
h4 { font-size: 16px; line-height: 1.4; }
p { margin: 0 0 1em; }
b, strong { color: var(--ink); font-weight: 600; }
a { color: var(--iq); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--font-mono); }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nowrap { white-space: nowrap; }

/* ---------- Brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-divider { width: 1px; height: 22px; background: var(--line); }
.brand-product { font-size: 19px; font-weight: 500; letter-spacing: -.4px; color: var(--navy); line-height: 1; }
.brand.on-dark .brand-divider { background: #ffffff40; }
.brand.on-dark .brand-product { color: #fff; }
.brand.lg .brand-logo { height: 38px; }
.brand.lg .brand-product { font-size: 24px; }
.ai-mark { width: 30px; height: 30px; flex: none; display: block; }
.ai-mark.sm { width: 22px; height: 22px; }

/* ---------- Layout ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 40px;
  padding: 0 80px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.navlinks { display: flex; gap: 32px; flex: 1; align-items: center; }
.navlinks a {
  color: var(--ink); font-weight: 400; font-size: 16px; padding: 6px 0; position: relative; white-space: nowrap;
}
.navlinks a:hover { text-decoration: none; color: var(--iq); }
.navlinks a.active { font-weight: 600; }
.navlinks a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--grad-text);
}
.navlinks .sep { width: 1px; height: 22px; background: var(--line); }
.usermenu { position: relative; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad-pill); color: var(--navy); font-weight: 600; font-size: 14px; display: grid; place-items: center;
}
.dropdown {
  position: absolute; right: 0; top: 52px; background: #fff; border-radius: var(--r-md); min-width: 240px;
  box-shadow: var(--shadow-lift); padding: 8px; display: none; border: 1px solid var(--line-soft);
}
.dropdown.open { display: block; }
.dropdown .who { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; line-height: 1.4; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--r-btn); color: var(--ink); background: none; border: 0; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg-soft); text-decoration: none; }
.menu-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--navy); }

main.page { max-width: 1280px; margin: 0 auto; padding: 40px 40px 96px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 44px; }
.page-head p { margin: 8px 0 0; color: var(--text); font-size: 17px; }

/* Section label pill (neonnow.ai .tw-pill) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  background: var(--grad-pill); border-radius: var(--r-pill); padding: 4px 14px 4px 12px;
  font-size: 14px; font-weight: 500; color: var(--navy); line-height: 1.6; margin-bottom: 14px;
  text-transform: none; letter-spacing: 0;
}
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }

.grid { display: grid; gap: 24px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 24px; }
.spacer { flex: 1; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border-radius: var(--r-lg); padding: 28px;
  border: 1px solid var(--line-soft); box-shadow: var(--shadow-card);
}
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.panel { background: var(--panel); box-shadow: none; border-color: transparent; }
.card.link { transition: transform .25s ease, box-shadow .25s ease; cursor: pointer; color: inherit; display: block; }
.card.link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); text-decoration: none; }
.card h3 { margin-bottom: 6px; }

/* Light hero, like the neonnow.ai homepage */
.hero {
  position: relative; overflow: hidden; border-radius: 32px; padding: 52px 48px;
  background:
    radial-gradient(circle at 0% 100%, #fde3ee 0%, rgba(253, 227, 238, 0) 45%),
    radial-gradient(circle at 100% 100%, #e3f3fb 0%, rgba(227, 243, 251, 0) 50%),
    radial-gradient(circle at 80% 0%, #efe9fb 0%, rgba(239, 233, 251, 0) 40%),
    #fff;
  border: 1px solid var(--line-soft);
  margin-bottom: 32px;
}
.hero::before { content: ''; position: absolute; inset: 0; background-image: var(--dots); background-size: var(--dots-size); opacity: .6; pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 56px; letter-spacing: -2.5px; margin-bottom: 12px; }
.hero p { color: var(--text); max-width: 640px; font-size: 18px; }

.stat { padding: 22px 24px; box-shadow: none; }
.stat .label { font-size: 14px; font-weight: 500; color: var(--text); }
.stat .value { font-size: 36px; font-weight: 600; color: var(--ink); line-height: 1.1; margin-top: 6px; letter-spacing: -1px; }
.stat .value small { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.stat.tint-cx { background: var(--cx-5); border-color: var(--cx-10); }
.stat.tint-iq { background: var(--iq-5); border-color: var(--iq-10); }
.stat.tint-green { background: var(--green-5); border-color: var(--green-10); }
.stat.tint-coral { background: var(--coral-5); border-color: var(--coral-10); }

/* ---------- Buttons (neonnow.ai .button-style-01 / -02) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--r-btn); border: 1px solid #fff;
  background: var(--navy); color: #fff; font-weight: 500; font-size: 16px; line-height: 1.2; cursor: pointer;
  box-shadow: var(--shadow-btn); transition: all .3s ease-in-out; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--navy-75); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--navy); border: 2px solid var(--navy); box-shadow: none; padding: 12px 22px; }
.btn.ghost:hover { background: var(--bg-soft); }
.btn.ai .spark, .spark { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: brightness(1.35); }
.btn.danger { background: var(--coral); box-shadow: none; border-color: transparent; }
.btn.danger.ghost { background: #fff; color: #c93746; border: 2px solid var(--coral-10); }
.btn.success { background: var(--green-dark); box-shadow: none; border-color: transparent; }
.btn.sm { padding: 9px 16px; font-size: 14px; }
.btn.ghost.sm { padding: 7px 14px; }
.btn.xs { padding: 5px 11px; font-size: 13px; }
.btn.ghost.xs { padding: 3px 10px; border-width: 1.5px; }
.btn.lg { padding: 16px 30px; font-size: 17px; }
.linkbtn { background: none; border: 0; color: var(--iq); cursor: pointer; padding: 0; font-weight: 500; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--coral); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line-soft); line-height: 1.6; }
.badge.cx { background: var(--cx-5); color: #0b7fa3; border-color: var(--cx-10); }
.badge.iq { background: var(--iq-5); color: var(--iq); border-color: var(--iq-10); }
.badge.green { background: var(--green-5); color: var(--green-dark); border-color: var(--green-10); }
.badge.coral { background: var(--coral-5); color: #c93746; border-color: var(--coral-10); }
.badge.amber { background: #fff6e5; color: #a65f00; border-color: #ffe2b3; }
.badge.navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 18px; }
label.field > span { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
label.field > small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-input); background: #fff;
  font: inherit; line-height: 1.4; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 110px; }
textarea.code { font-family: var(--font-mono); font-size: 13.5px; line-height: 1.5; min-height: 420px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--iq); box-shadow: 0 0 0 4px var(--iq-5); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--ink); }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.error-msg { background: var(--coral-5); color: #b42838; border: 1px solid var(--coral-10); padding: 10px 14px; border-radius: var(--r-btn); font-size: 14px; margin-bottom: 14px; }
.info-msg { background: var(--cx-5); color: #0b6987; border: 1px solid var(--cx-10); padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--ink); line-height: 1.45; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-soft); }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; gap: 4px; background: var(--panel); padding: 5px; border-radius: 12px; margin-bottom: 24px; flex-wrap: wrap; border: 1px solid var(--line-soft); }
.tabs button { border: 0; background: none; padding: 8px 18px; border-radius: var(--r-btn); cursor: pointer; font-weight: 500; color: var(--ink); }
.tabs button.active { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 2px 8px #101e471a; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: var(--line-soft); border-radius: 8px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad-brand); border-radius: 8px; transition: width .4s ease; }
.progress.green > i { background: var(--grad-mint); }

/* ---------- Topic / cert cards ---------- */
.topic-card { display: flex; flex-direction: column; min-height: 240px; }
.topic-card .desc { color: var(--text); font-size: 15px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.topic-card .meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 14px; align-items: center; }
.topic-cover { height: 96px; border-radius: 16px; margin: -8px -8px 20px; position: relative; overflow: hidden; }
.topic-cover::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .9) 1px, transparent 1.5px); background-size: 14px 14px; }
.topic-cover span { position: absolute; left: 14px; bottom: 12px; font-weight: 500; color: var(--navy); font-size: 13px; background: #fffd; padding: 2px 10px; border-radius: var(--r-pill); }
.cover-0 { background: linear-gradient(135deg, #fde3ee 0%, #efe9fb 50%, #e3f3fb 100%); }
.cover-1 { background: linear-gradient(90deg, #ebe6fb 0%, #f6eef8 50%, #fde7ec 100%); }
.cover-2 { background: linear-gradient(100deg, #a6efd7 0%, #d2f7ea 55%, #ebfbf5 100%); }
.cover-3 { background: linear-gradient(135deg, #a0e1f5 0%, #e2deff 100%); }
.cover-4 { background: linear-gradient(135deg, #a9d3f1 0%, #b9b8ea 50%, #f3bbc8 100%); }
.cover-5 { background: linear-gradient(160deg, #e2deff 0%, #fed3f1 100%); }

.cert-card { position: relative; overflow: hidden; }
.cert-seal {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; font-weight: 700;
  background: var(--grad-soft); border: 1px solid var(--iq-10); color: #fff; margin-bottom: 16px; flex: none;
}
.cert-seal img { width: 30px; height: 30px; }
.cert-seal.earned { background: var(--grad-mint); border-color: transparent; }
.cert-seal.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; margin: 0; }
.cert-seal.sm img { width: 20px; height: 20px; }
.cert-facts { display: flex; gap: 22px; flex-wrap: wrap; margin: 14px 0; font-size: 14px; color: var(--muted); }
.cert-facts b { color: var(--ink); font-size: 18px; display: block; line-height: 1.3; }

/* ---------- Lesson layout ---------- */
.lesson-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }
.lesson-nav { position: sticky; top: calc(var(--nav-h) + 20px); padding: 20px; }
.lesson-nav ol { list-style: none; padding: 0; margin: 0; }
.lesson-nav li a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; color: var(--ink); font-size: 14px; line-height: 1.4; }
.lesson-nav li a:hover { background: var(--bg-soft); text-decoration: none; }
.lesson-nav li a.active { background: var(--iq-5); color: var(--iq); font-weight: 600; }
.lesson-nav .num { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); background: #fff; }
.lesson-nav .num.done { background: var(--green); border-color: var(--green); color: #fff; }
.lesson-body { padding: 44px 56px; }
.lesson-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }

/* ---------- Markdown ---------- */
.md { font-size: 17px; line-height: 1.75; color: #3c4a57; }
.md h2 { font-size: 28px; margin: 1.6em 0 .5em; letter-spacing: -.8px; }
.md h2:first-child { margin-top: 0; }
.md h3 { font-size: 20px; margin: 1.4em 0 .4em; }
.md p, .md ul, .md ol { margin: 0 0 1em; }
.md li { margin: .25em 0; }
.md code { font-family: var(--font-mono); font-size: .86em; background: var(--iq-5); color: #4a2a9a; padding: 2px 6px; border-radius: 6px; }
.md pre { background: var(--navy); color: #e8ecff; padding: 18px 20px; border-radius: var(--r-md); overflow-x: auto; font-size: 14px; line-height: 1.55; }
.md pre code { background: none; color: inherit; padding: 0; }
.md blockquote { margin: 1.2em 0; padding: 14px 18px; border-radius: var(--r-md); background: var(--cx-5); border: 1px solid var(--cx-10); color: #0d4a60; }
.md blockquote p:last-child { margin: 0; }
.md table { border-collapse: collapse; width: 100%; margin: 1em 0 1.4em; font-size: 15px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.md th { background: var(--panel); font-weight: 600; color: var(--ink); }
.md details { background: var(--green-5); border: 1px solid var(--green-10); border-radius: 12px; padding: 10px 14px; margin: .4em 0 1.2em; }
.md summary { cursor: pointer; font-weight: 600; color: var(--green-dark); }
.md details[open] summary { margin-bottom: 6px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.md img { max-width: 100%; border-radius: 12px; }
.md.compact { font-size: 15px; line-height: 1.6; }
.md.compact pre { font-size: 13px; padding: 12px 14px; }

/* ---------- Tutor drawer ---------- */
.tutor-fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 40;
  padding: 14px 22px; border-radius: var(--r-btn); border: 1px solid #fff; cursor: pointer;
  background: var(--navy); color: #fff; font-weight: 500; box-shadow: var(--shadow-btn), 0 14px 34px #101e4740;
  display: flex; align-items: center; gap: 10px;
}
.tutor-fab:hover { background: var(--navy-75); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 60;
  background: #fff; display: flex; flex-direction: column; visibility: hidden;
  transform: translateX(105%); transition: transform .3s ease, visibility 0s .3s;
}
.drawer.open { transform: none; visibility: visible; box-shadow: -20px 0 60px #101e4730; transition: transform .3s ease; }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 12px; line-height: 1.3; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; background: var(--bg-soft); }
.drawer-foot { padding: 14px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; }
.drawer-foot textarea { min-height: 48px; height: 48px; resize: none; }
.msg { max-width: 90%; padding: 10px 14px; border-radius: 14px; margin-bottom: 10px; font-size: 15px; line-height: 1.55; }
.msg.user { margin-left: auto; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { background: #fff; border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; color: var(--ink); }
.msg.assistant .md { font-size: 15px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions button { border: 1px solid var(--iq-10); background: var(--iq-5); color: var(--iq); border-radius: var(--r-pill); padding: 6px 12px; font-size: 13px; cursor: pointer; }
.suggestions button:hover { background: var(--iq-10); }

/* ---------- Modal & toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: #101e4766; backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { background: #fff; border-radius: var(--r-lg); padding: 32px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lift); }
.modal.wide { width: min(820px, 100%); }
.modal h2 { font-size: 26px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--navy); color: #fff; padding: 12px 20px; border-radius: var(--r-btn); box-shadow: var(--shadow-lift); font-size: 15px; animation: fade .2s; }
.toast.error { background: var(--coral); }
.toast.success { background: var(--green-dark); }

/* ---------- Loading ---------- */
.loading { display: grid; place-items: center; min-height: 40vh; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--iq-10); border-top-color: var(--iq); animation: spin .8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-working { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r-md); background: var(--grad-soft); border: 1px solid var(--iq-10); color: var(--ink); }
.ai-orb { width: 38px; height: 38px; flex: none; background: url('/img/neonnow-mark.svg') center / contain no-repeat; animation: orb 1.6s ease-in-out infinite; }
@keyframes orb { 50% { transform: scale(.82) rotate(20deg); } }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .big { display: flex; justify-content: center; margin-bottom: 12px; color: var(--iq); }
.icon { flex: none; vertical-align: -3px; }
.eyebrow .icon { vertical-align: -2px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art {
  padding: 48px 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 0% 100%, #fde3ee 0%, rgba(253, 227, 238, 0) 50%),
    radial-gradient(circle at 100% 30%, #e3f3fb 0%, rgba(227, 243, 251, 0) 55%),
    radial-gradient(circle at 60% 0%, #efe9fb 0%, rgba(239, 233, 251, 0) 45%),
    #fff;
  border-right: 1px solid var(--line-soft);
}
.login-art::before { content: ''; position: absolute; inset: 0; background-image: var(--dots); background-size: var(--dots-size); pointer-events: none; }
.login-art > * { position: relative; z-index: 1; }
.login-art h1 { font-size: 64px; letter-spacing: -3px; line-height: 1.05; max-width: 560px; }
.login-art p { color: var(--text); font-size: 18px; max-width: 500px; }
.login-form { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-form .card { width: min(420px, 100%); padding: 40px; }
.feature-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.feature-pills span { padding: 8px 14px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line-soft); font-size: 14px; color: var(--ink); box-shadow: var(--shadow-card); }

/* ---------- Leaderboard ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 20px; align-items: end; margin-bottom: 28px; }
.podium .card { text-align: center; }
.podium .place { font-size: 44px; font-weight: 600; line-height: 1; color: var(--ink); letter-spacing: -2px; }
.podium .p1 { background: var(--grad-soft); padding-top: 36px; padding-bottom: 36px; }
.podium .p1 .place { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.podium .name { font-weight: 600; color: var(--ink); margin-top: 8px; }
.rank-pill { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--panel); font-weight: 600; font-size: 14px; padding: 0 8px; color: var(--ink); }
.rank-pill.r1 { background: var(--grad-brand); color: #fff; }
.rank-pill.r2 { background: var(--navy); color: #fff; }
.rank-pill.r3 { background: var(--iq-10); color: var(--iq); }
tr.me td { background: #fbfdd6 !important; }

/* ---------- Studio ---------- */
.studio-steps { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.studio-steps span { padding: 6px 14px; border-radius: var(--r-pill); background: #fff; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.studio-steps span.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.studio-steps span.done { background: var(--green-5); color: var(--green-dark); border-color: var(--green-10); }
.module-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; margin-bottom: 10px; align-items: start; }
.module-row .idx { width: 30px; height: 30px; border-radius: 50%; background: var(--iq-5); color: var(--iq); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.module-row input, .module-row textarea { padding: 8px 10px; }
.module-row textarea { min-height: 60px; font-size: 14px; }
.module-row .tools { display: flex; flex-direction: column; gap: 4px; }
.icon-btn { width: 32px; height: 32px; border-radius: var(--r-btn); border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--navy); color: var(--navy); }
.icon-btn.danger:hover { border-color: var(--coral); color: var(--coral); }
.lesson-row { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: #fff; margin-bottom: 8px; transition: border-color .2s; }
a.lesson-row:hover { border-color: var(--iq-10); background: var(--bg-soft); }
.lesson-row .t { flex: 1; min-width: 0; line-height: 1.45; }
.lesson-row .t b { display: block; color: var(--ink); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.preview-pane { max-height: 640px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 24px; background: #fff; }
.q-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; background: #fff; margin-bottom: 12px; }
.q-card ol { margin: 10px 0 8px; padding-left: 22px; color: var(--ink); }
.q-card li.correct { color: var(--green-dark); font-weight: 600; }
.q-card li.correct::marker { content: '✓  '; }
.opt-edit { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.ai-panel { background: var(--grad-soft) !important; border-color: var(--iq-10) !important; box-shadow: none !important; }

/* ---------- Exam mode ---------- */
body.exam-mode { background-color: var(--panel); user-select: none; -webkit-user-select: none; }
.exam-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: 80px;
  background: radial-gradient(circle at 72% 55%, #f85b6a40 0%, #f85b6a00 40%), radial-gradient(circle at 20% 0%, #16b6e733 0%, #16b6e700 35%), linear-gradient(135deg, #101e47 0%, #1b1d5c 100%);
  color: #fff; display: flex; align-items: center; gap: 22px; padding: 0 32px;
  box-shadow: 0 10px 30px #101e4740;
}
.exam-bar .brand-logo { height: 26px; }
.exam-bar .title { font-weight: 500; font-size: 15px; color: #d7dcf0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exam-lock { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); background: #ffffff14; border: 1px solid #ffffff2e; font-size: 13px; font-weight: 500; }
.timer {
  font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 600; letter-spacing: 0;
  padding: 6px 20px; border-radius: var(--r-btn); background: #ffffff12; border: 1px solid #ffffff30; min-width: 150px; text-align: center;
}
.timer.warn { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.timer.crit { background: var(--coral); border-color: var(--coral); animation: pulse 1s infinite; }
.exam-timebar { position: fixed; top: 80px; left: 0; right: 0; height: 4px; background: #fff; z-index: 90; }
.exam-timebar > i { display: block; height: 100%; background: var(--grad-text); transition: width 1s linear; }
.exam-shell { max-width: 1180px; margin: 0 auto; padding: 116px 28px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.question-card { padding: 40px 44px; }
.question-card .qnum { font-size: 14px; font-weight: 500; color: var(--iq); }
.question-card .qtext { font-size: 24px; font-weight: 600; color: var(--ink); line-height: 1.35; letter-spacing: -.5px; margin: 10px 0 8px; }
.question-card .qhint { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.option {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 12px;
  margin-bottom: 12px; cursor: pointer; background: #fff; transition: all .15s; font-size: 16px; color: var(--ink); line-height: 1.5;
}
.option:hover { border-color: var(--iq-10); background: var(--iq-5); }
.option.selected { border-color: var(--navy); background: var(--iq-5); box-shadow: 0 0 0 3px var(--iq-10); }
.option .key { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--muted); background: #fff; }
.option.multi .key { border-radius: 6px; }
.option.single .key { border-radius: 50%; }
.option.selected .key { background: var(--navy); border-color: var(--navy); color: #fff; }
.exam-nav-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.palette { position: sticky; top: 116px; padding: 22px; }
.palette-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0; }
.palette-grid button { height: 38px; border-radius: var(--r-btn); border: 1.5px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; color: var(--muted); position: relative; }
.palette-grid button.answered { background: var(--navy); color: #fff; border-color: var(--navy); }
.palette-grid button.current { outline: 3px solid var(--cx); outline-offset: 1px; }
.palette-grid button.flagged::after { content: ''; position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); border: 2px solid #fff; }
.legend { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; border: 1.5px solid var(--line); }
.violation-banner { position: fixed; top: 92px; left: 50%; transform: translateX(-50%); z-index: 95; background: var(--coral); color: #fff; padding: 12px 22px; border-radius: var(--r-btn); font-weight: 500; box-shadow: var(--shadow-lift); }
.exam-gate { position: fixed; inset: 0; z-index: 120; background: radial-gradient(circle at 72% 55%, #f85b6a40 0%, #f85b6a00 45%), linear-gradient(135deg, #101e47 0%, #1b1d5c 100%); display: grid; place-items: center; padding: 20px; color: #fff; text-align: center; }
.exam-gate h2 { color: #fff; }
.exam-gate p { color: #c9d0ea; max-width: 520px; margin: 0 auto 22px; }
.exam-gate .btn { border-color: #fff; }

/* ---------- Results & certificate ---------- */
.score-ring { width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; }
.score-ring .inner { width: 146px; height: 146px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; line-height: 1.3; }
.score-ring b { font-size: 44px; color: var(--ink); display: block; line-height: 1; letter-spacing: -2px; }
.review-q { border-left: 4px solid var(--line); padding: 4px 0 4px 18px; margin-bottom: 24px; }
.review-q.ok { border-color: var(--green); }
.review-q.bad { border-color: var(--coral); }
.review-q ul { list-style: none; padding: 0; margin: 10px 0; }
.review-q li { padding: 8px 12px; border-radius: var(--r-btn); margin-bottom: 6px; background: var(--bg-soft); font-size: 15px; color: var(--ink); }
.review-q li.is-correct { background: var(--green-5); color: var(--green-dark); font-weight: 600; }
.review-q li.picked-wrong { background: var(--coral-5); color: #b42838; text-decoration: line-through; }
.certificate {
  max-width: 900px; margin: 0 auto; background: #fff; border-radius: 28px; padding: 64px; text-align: center; position: relative; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-lift);
}
.certificate::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--grad-text); }
.certificate::after { content: ''; position: absolute; inset: auto 0 0 0; height: 10px; background: var(--grad-pill); }
.certificate .who { font-size: 48px; font-weight: 600; color: var(--ink); margin: 14px 0; letter-spacing: -2px; line-height: 1.1; }
.certificate .what { font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.certificate .sig { display: flex; justify-content: space-around; margin-top: 48px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.certificate .sig div { border-top: 1px solid var(--line); padding-top: 8px; min-width: 200px; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .topnav { padding: 0 32px; gap: 28px; }
  .navlinks { gap: 22px; }
}
@media (max-width: 1080px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-layout, .exam-shell, .split { grid-template-columns: 1fr; }
  .lesson-nav, .palette { position: static; }
}
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .navlinks { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 12px 16px; box-shadow: var(--shadow-lift); }
  .navlinks.open { display: flex; }
  .navlinks a { padding: 10px 4px; }
  .navlinks a.active::after { display: none; }
  .navlinks .sep { height: 1px; width: auto; margin: 6px 0; }
  .topnav { padding: 0 16px; gap: 12px; --nav-h: 68px; height: 68px; }
  .spacer-nav { flex: 1; }
  .brand-logo { height: 24px; }
  .brand-product { font-size: 16px; }
}
@media (max-width: 860px) {
  main.page { padding: 24px 16px 60px; }
  h1, .page-head h1 { font-size: 34px; letter-spacing: -1.2px; }
  .grid.c2, .grid.c3, .grid.c4, .form-grid, .podium { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 28px 24px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .login-art h1 { font-size: 38px; letter-spacing: -1.5px; }
  .hero { padding: 30px 22px; }
  .hero h1 { font-size: 36px; letter-spacing: -1.5px; }
  .lesson-body { padding: 24px 20px; }
  .question-card { padding: 24px 20px; }
  .exam-bar { padding: 0 14px; gap: 10px; }
  .exam-bar .title, .exam-lock, .exam-bar .brand-divider, .exam-bar .brand-product { display: none; }
  .timer { font-size: 22px; min-width: 110px; }
  .exam-shell { padding: 104px 14px 40px; }
  .certificate { padding: 36px 20px; }
  .certificate .who { font-size: 32px; }
}

@media print {
  .topnav, .no-print { display: none !important; }
  body { background: #fff; }
  main.page { padding: 0; }
  .certificate { box-shadow: none; border: 0; }
}
